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