|
1 /* |
|
2 * Copyright (c) 2008-2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Observer definition for CCH UI clients |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef M_CCHUIOBSERVER_H |
|
20 #define M_CCHUIOBSERVER_H |
|
21 |
|
22 /** |
|
23 * CCH UI Observer declaration class. |
|
24 * |
|
25 * This class defines observer implementation for the CCH UI |
|
26 * clients. Every client must derive this class in order to |
|
27 * be able to use services provided by CCH UI and to be able |
|
28 * to receive observer callbacks. |
|
29 * @code |
|
30 * inherit in header: |
|
31 * class CMyClass : public CBase, public MCchUiObserver |
|
32 * @endcode |
|
33 * |
|
34 * @lib cch.lib |
|
35 * @since S60 5.0 |
|
36 */ |
|
37 class MCchUiObserver |
|
38 { |
|
39 public: |
|
40 |
|
41 /** Defines dialog types available through this API */ |
|
42 enum TCchUiDialogType |
|
43 { |
|
44 ECchUiDialogTypeNotSet, |
|
45 // For connecting note showing |
|
46 ECchUiDialogTypeConnecting, |
|
47 // For disconnecting note showing |
|
48 ECchUiDialogTypeDisconnecting, |
|
49 // For showing info note about invalid username/password. |
|
50 // Will also automatically show username/password query after |
|
51 // showing info note. |
|
52 ECchUiDialogTypeUsernamePasswordFailed, |
|
53 // For showing username/password query. |
|
54 ECchUiDialogTypeAuthenticationFailed, |
|
55 // For showing no connections defined query. When user inputs |
|
56 // username/password and accepts query, CCHUI will save them |
|
57 // and also will re-enable service. |
|
58 ECchUiDialogTypeNoConnectionDefined, |
|
59 // For showing no connections available query. When user selects |
|
60 // new access point, CCHUI adds it to service´s SNAP and re-enables |
|
61 // service automatically. |
|
62 ECchUiDialogTypeNoConnectionAvailable, |
|
63 // For showing confirmation query to change connection. |
|
64 // Will show automatically also change connection query if |
|
65 // confirmation query accepted by user. |
|
66 ECchUiDialogTypeConfirmChangeConnection, |
|
67 // For showing change connection query. When user selects |
|
68 // new access point, CCHUI add it to service´s SNAP and re-enables |
|
69 // service. CCHUI will also delete old access point from service´s |
|
70 // SNAP if access point is not used by other service(s). |
|
71 ECchUiDialogTypeChangeConnection, |
|
72 // For showing defective settings info note. |
|
73 ECchUiDialogTypeDefectiveSettings, |
|
74 // For showing error in connection info note. |
|
75 // Will show automatically also confirm change connection query |
|
76 // and confirmation query is accepted by user, change connection |
|
77 // query is showed also. |
|
78 ECchUiDialogTypeErrorInConnection |
|
79 }; |
|
80 |
|
81 /** Defines operation results ie. indicates what have been done. |
|
82 Client can implement handling based on these on callback. */ |
|
83 enum TCchUiOperationResult |
|
84 { |
|
85 // Operation result not set |
|
86 ECchUiClientOperationResultNotSet, |
|
87 // User has cancelled query. |
|
88 ECchUiClientOperationResultUserCancelled, |
|
89 // Failure that prevents enabling service has happened. |
|
90 ECchUiClientOperationResultGeneralFailure, |
|
91 // CCHUI has added new access point to service´s SNAP. |
|
92 ECchUiClientOperationResultAccessPointAdded, |
|
93 // CCHUI has added new access point to service´s SNAP. |
|
94 // CCHUI has also removed previously used access point from |
|
95 // service´s SNAP if it was not used by other service(s). |
|
96 ECchUiClientOperationResultConnectionChanged, |
|
97 // CCHUI has saved new username/password for service |
|
98 ECchUiClientOperationResultCredentialsChanged |
|
99 }; |
|
100 |
|
101 /** |
|
102 * Gets called when cchui has finished showing connectivity dialogs |
|
103 * and possible connectivity related operations based on user |
|
104 * actions in those dialogs. |
|
105 * |
|
106 * @since S60 5.0 |
|
107 * @param aServiceId Service id. |
|
108 * @param aServiceState Service state after cchui operations. |
|
109 * @param aOperationResult Contains last cchui operation. |
|
110 * @return None |
|
111 */ |
|
112 virtual void ConnectivityDialogsCompletedL( |
|
113 TInt aServiceId, |
|
114 TCchUiOperationResult aOperationResult ) = 0; |
|
115 }; |
|
116 |
|
117 #endif // M_CCHUIOBSERVER_H |