1 /* |
|
2 * Copyright (c) 2002-2005 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: Customer service profile cache |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef RCUSTOMERSERVICEPROFILECACHE_H |
|
20 #define RCUSTOMERSERVICEPROFILECACHE_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <etelmm.h> |
|
24 #include <e32property.h> // RProperty. |
|
25 |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class RProperty; |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * Customer service profile cache |
|
34 * @since 1.0 |
|
35 * @lib SsSettings.lib |
|
36 */ |
|
37 class RCustomerServiceProfileCache |
|
38 { |
|
39 public: // Constructor and destructor |
|
40 IMPORT_C RCustomerServiceProfileCache(); |
|
41 IMPORT_C ~RCustomerServiceProfileCache(); |
|
42 |
|
43 public: // New functions |
|
44 //Settings categories |
|
45 enum TSsGroups |
|
46 { |
|
47 ESsCspGroup1, // contains Call Offering, Call Restriction, |
|
48 // Call Completion and Teleservices |
|
49 ESsCspGroup2 // contains Value Added Services |
|
50 }; |
|
51 |
|
52 /** |
|
53 * Opens connections. Must be done before fetching any items. |
|
54 * @return Error code. |
|
55 */ |
|
56 IMPORT_C TInt Open(); |
|
57 |
|
58 /** |
|
59 * Closes connections. |
|
60 */ |
|
61 IMPORT_C void Close(); |
|
62 |
|
63 /** |
|
64 * Get call completion flags from CSP. |
|
65 * @param aParams Call completion parameters. |
|
66 * @return Error code. |
|
67 */ |
|
68 IMPORT_C TInt CspCallCompletion( |
|
69 RMobilePhone::TCspCallCompletion& aParams ); |
|
70 |
|
71 /** |
|
72 * Get call offering flags from CSP. |
|
73 * @param aParams Call offering parameters. |
|
74 * @return Error code. |
|
75 */ |
|
76 IMPORT_C TInt CspCallOffering( |
|
77 RMobilePhone::TCspCallOffering& aParams ); |
|
78 |
|
79 /** |
|
80 * Get call restriction flags from CSP. |
|
81 * @param aParams Call restriction parameters. |
|
82 * @return Error code. |
|
83 */ |
|
84 IMPORT_C TInt CspCallRestriction( |
|
85 RMobilePhone::TCspCallRestriction& aParams ); |
|
86 |
|
87 /** |
|
88 * Get CPHS tele services flags from CSP. |
|
89 * @param aParams Tele services parameters. |
|
90 * @return Error code. |
|
91 */ |
|
92 IMPORT_C TInt CspCPHSTeleservices( |
|
93 RMobilePhone::TCspCPHSTeleservices& aParams ); |
|
94 |
|
95 /** |
|
96 * Handles refresh. |
|
97 * @return Error code. |
|
98 */ |
|
99 IMPORT_C TInt HandleRefresh(); |
|
100 |
|
101 /** |
|
102 * Get value added services flags from CSP. |
|
103 * @since 1.2. |
|
104 * @param aParams Value added services parameters. |
|
105 * @return Error code. |
|
106 */ |
|
107 IMPORT_C TInt CspCPHSValueAddedServices( |
|
108 RMobilePhone::TCspValueAdded& aParams ); |
|
109 |
|
110 /** |
|
111 * Get tele services flags from CSP. |
|
112 * @since 2.8. |
|
113 * @param aParams Tele services parameters. |
|
114 * @return Error code. |
|
115 */ |
|
116 IMPORT_C TInt CspTeleServices( |
|
117 RMobilePhone::TCspTeleservices& aParams ); |
|
118 |
|
119 /** |
|
120 * Get the changed CSP information after Refresh. |
|
121 * @since 2.8. |
|
122 * @param aChangedCsps The changed CSP fields, |
|
123 * type RMobilePhone::TMobilePhoneCspFileV1Pckg. |
|
124 * @param aNewValues The new values of CSP fields, |
|
125 * type RMobilePhone::TMobilePhoneCspFileV1Pckg. |
|
126 * @return Error code. KErrNone if successful. |
|
127 */ |
|
128 IMPORT_C TInt ChangedCspTable( |
|
129 TDes8& aChangedCsps, |
|
130 TDes8& aNewValues ); |
|
131 |
|
132 private: |
|
133 |
|
134 // Opens connections |
|
135 void DoOpenL(); |
|
136 |
|
137 // Gets the values |
|
138 TInt DoGetValues( TInt& aValue, TSsGroups aGroup ); |
|
139 |
|
140 // Reset the iOldCspFile. |
|
141 void DoResetOldCspFile(); |
|
142 |
|
143 // Define and set the Publish and subscribe value. |
|
144 TInt DefineAndSetValue( |
|
145 TUid aCategory, |
|
146 TUint aKey, |
|
147 TInt aValue ); |
|
148 |
|
149 // Prohibit copy constructor if not deriving from CBase. |
|
150 RCustomerServiceProfileCache( |
|
151 const RCustomerServiceProfileCache& ); |
|
152 // Prohibit assigment operator if not deriving from CBase. |
|
153 RCustomerServiceProfileCache& operator= ( |
|
154 const RCustomerServiceProfileCache& ); |
|
155 |
|
156 private: |
|
157 |
|
158 // Member data structure. |
|
159 class TCspCacheData |
|
160 { |
|
161 public: |
|
162 TCspCacheData(); |
|
163 |
|
164 // ETel connection. |
|
165 RTelServer iEtel; |
|
166 |
|
167 // Provides client access to mobile phone functionality |
|
168 // provided by TSY. |
|
169 RMobilePhone iPhone; |
|
170 |
|
171 // Defines contents of the CSP (Customer Service Profile) |
|
172 // on the SIM. |
|
173 RMobilePhone::TMobilePhoneCspFileV1 iCspFile; |
|
174 |
|
175 // Packaged contents of the CSP (Customer Service Profile) |
|
176 // on the SIM. |
|
177 RMobilePhone::TMobilePhoneCspFileV1Pckg iCspFilePckg; |
|
178 |
|
179 // RProperty. |
|
180 RProperty iProperty; |
|
181 }; |
|
182 |
|
183 //Pointer to the above. |
|
184 TCspCacheData* iData; |
|
185 |
|
186 // Defines the old content of the CSP (Customer Service Profile) on |
|
187 // the SIM before refresh. |
|
188 RMobilePhone::TMobilePhoneCspFileV1* iOldCspFile; |
|
189 }; |
|
190 |
|
191 #endif // RCUSTOMERSERVICEPROFILECACHE_H |
|
192 |
|
193 // End of File |
|