|
1 /* |
|
2 * Copyright (c) 2005-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: Get count of VoIP profiles. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef FINDITEMVOIPEXTENSION_H |
|
19 #define FINDITEMVOIPEXTENSION_H |
|
20 |
|
21 #include <e32base.h> |
|
22 #ifndef RD_VOIP_REL_2_2 |
|
23 #include <CenRepNotifyHandler.h> |
|
24 |
|
25 // FORWARD DECLARATIONS |
|
26 class CRepository; |
|
27 class CCenRepNotifyHandler; |
|
28 #else |
|
29 class CSPSettings; |
|
30 class CSPSettingsVoIPUtils; |
|
31 #endif // RD_VOIP_REL_2_2 |
|
32 |
|
33 // CLASS DECLARATION |
|
34 |
|
35 /** |
|
36 * Internal class to get count of VoIP profiles and |
|
37 * the value of the settings Preferred Telephone. |
|
38 * Allows also to drop RCSE component from rom. |
|
39 * |
|
40 * @since Series 60 3.0 |
|
41 */ |
|
42 NONSHARABLE_CLASS(CFindItemVoIPExtension): |
|
43 public CBase |
|
44 #ifndef RD_VOIP_REL_2_2 |
|
45 ,public MCenRepNotifyHandlerCallback |
|
46 #endif // RD_VOIP_REL_2_2 |
|
47 { |
|
48 public: |
|
49 /** |
|
50 * Two-phased constructor. |
|
51 */ |
|
52 static CFindItemVoIPExtension* NewL(); |
|
53 |
|
54 /** |
|
55 * Destructor. |
|
56 */ |
|
57 ~CFindItemVoIPExtension(); |
|
58 |
|
59 /** |
|
60 * Check if any VoIP profiles saved in the phone. |
|
61 * @since Series60 3.0 |
|
62 * @return ETrue if VoIP profiles exist, else EFalse. |
|
63 */ |
|
64 TBool VoIPProfilesExistL() const; |
|
65 |
|
66 /** |
|
67 * Check Preferred Telephony key value VoIP |
|
68 * @since Series60 3.0 |
|
69 * @return ETrue if Send key creates VoIP call, else EFalse. |
|
70 */ |
|
71 TBool IsPreferredTelephonyVoIP(); |
|
72 |
|
73 /** |
|
74 * Returns information of general VoIP feature |
|
75 * @since Series60 3.0 |
|
76 * @return ETrue if Send key creates VoIP call, else EFalse. |
|
77 */ |
|
78 TBool IsVoIPSupported(); |
|
79 |
|
80 #ifndef RD_VOIP_REL_2_2 |
|
81 /** |
|
82 * From MCentRepNotifyHandlerCallback. |
|
83 * @since Series S60 3.0 |
|
84 * @param aId Id of the key that has changed. |
|
85 * @param aNewValue The new value of the key. |
|
86 */ |
|
87 void HandleNotifyInt( |
|
88 TUint32 aId, TInt aNewValue ); |
|
89 |
|
90 /** |
|
91 * From MCentRepNotifyHandlerCallback. |
|
92 * @since Series S60 3.0 |
|
93 * @param aId Id of the key this instance listens to or if notifications for |
|
94 * whole repository are listened, could also be KInvalidNotificationId. |
|
95 * @param aError Error code. |
|
96 * @param aHandler Pointer to the handler instance. |
|
97 * This pointer can be used to identify the handler or restart the listening. |
|
98 */ |
|
99 void HandleNotifyError( |
|
100 TUint32 aId, TInt aError, CCenRepNotifyHandler* aHandler ); |
|
101 #endif // !RD_VOIP_REL_2_2 |
|
102 |
|
103 private: |
|
104 /** |
|
105 * C++ default constructor. |
|
106 */ |
|
107 CFindItemVoIPExtension(); |
|
108 |
|
109 /** |
|
110 * By default Symbian 2nd phase constructor is private. |
|
111 */ |
|
112 void ConstructL(); |
|
113 |
|
114 private: |
|
115 #ifndef RD_VOIP_REL_2_2 |
|
116 /** |
|
117 * Dynamic VoIP status |
|
118 */ |
|
119 TBool iVoIPSupported; |
|
120 |
|
121 /** |
|
122 * Preferred Telephony settings value. EFalse=CS and ETrue=PS. |
|
123 */ |
|
124 TBool iPreferredTelephonyVoIP; |
|
125 |
|
126 /** |
|
127 * A CR session & notifier |
|
128 * Own. |
|
129 */ |
|
130 CRepository* iCenRepSession; |
|
131 CCenRepNotifyHandler* iNotifier; |
|
132 |
|
133 /** |
|
134 * A CR session & notifier for dynamic VoIP |
|
135 * Own. |
|
136 */ |
|
137 CRepository* iVoIPVariation; |
|
138 CCenRepNotifyHandler* iVoIPVariationNotifier; |
|
139 #else // RD_VOIP_REL_2_2 |
|
140 /** |
|
141 * A Service provider settings |
|
142 * Own. |
|
143 */ |
|
144 CSPSettings* iSPSettings; |
|
145 CSPSettingsVoIPUtils* iSPSettingsVoipUtils; |
|
146 #endif // !RD_VOIP_REL_2_2 |
|
147 }; |
|
148 #endif // FINDITEMVOIPEXTENSION_H |
|
149 |
|
150 // End of File |