|
1 /* |
|
2 * Copyright (c) 2002-2004 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: |
|
15 * Customer Service Profile wrapper layer for SsSettings. |
|
16 * PsetCustomerServiceProfile is a class that access CSP through |
|
17 * SSsettings. It is in Phone Settings to provide easier access |
|
18 * to CSP values. Whole class should only be used if CSP is supported. |
|
19 * |
|
20 * |
|
21 */ |
|
22 |
|
23 |
|
24 #ifndef PSETCSP_H |
|
25 #define PSETCSP_H |
|
26 |
|
27 // INCLUDES |
|
28 #include <e32base.h> |
|
29 #include <RCustomerServiceProfileCache.h> |
|
30 |
|
31 // CLASS DECLARATION |
|
32 /** |
|
33 * CPsetCustomerServiceProfile class is a wrapper for Ss Settings. |
|
34 * @lib phonesettings.lib |
|
35 * @since 1.0 |
|
36 */ |
|
37 class CPsetCustomerServiceProfile : public CBase |
|
38 { |
|
39 |
|
40 public: // constructor & destructor |
|
41 |
|
42 /** |
|
43 * Symbian OS 2-phase Constructor. |
|
44 * @return CPsetCustomerServiceProfile object. |
|
45 */ |
|
46 IMPORT_C static CPsetCustomerServiceProfile* NewL(); |
|
47 |
|
48 /** |
|
49 * Destructor |
|
50 */ |
|
51 IMPORT_C ~CPsetCustomerServiceProfile(); |
|
52 |
|
53 public: // New functions |
|
54 |
|
55 /** |
|
56 * Checks if Call Waiting is to be supported |
|
57 * @param aSupport Feature supported. |
|
58 * @return Error code or KErrNone. |
|
59 */ |
|
60 IMPORT_C TInt IsCWSupported( TBool& aSupport ); |
|
61 |
|
62 /** |
|
63 * Checks if Call Barring is to be supported . |
|
64 * @param aSupport Feature supported. |
|
65 * @return Error code or KErrNone. |
|
66 */ |
|
67 IMPORT_C TInt IsCBSupported( TBool& aSupport ); |
|
68 |
|
69 /** |
|
70 * Checks if Call Forwarding is to be supported. |
|
71 * @param aSupport Feature supported. |
|
72 * @return Error code or KErrNone. |
|
73 */ |
|
74 IMPORT_C TInt IsCFSupported( TBool& aSupport ); |
|
75 |
|
76 /** |
|
77 * Checks if Alternate Line is to be supported. |
|
78 * @param aSupport Feature supported. |
|
79 * @return Error code or KErrNone. |
|
80 */ |
|
81 IMPORT_C TInt IsALSSupported( TBool& aSupport ); |
|
82 |
|
83 /** |
|
84 * Opens Customer Service Profile from SIM. |
|
85 * @return Error code or KErrNone. |
|
86 */ |
|
87 IMPORT_C TInt OpenCSProfileL(); |
|
88 |
|
89 /** |
|
90 * Checks if Manual Network Selection is to be supported. |
|
91 * @since 1.2 |
|
92 * @param aSupport Feature supported. |
|
93 * @return Error code or KErrNone. |
|
94 */ |
|
95 IMPORT_C TInt IsNetworkSelectionSupported( TBool& aSupport ); |
|
96 |
|
97 |
|
98 public: // New functions |
|
99 |
|
100 /** |
|
101 * Checks if Call Waiting is to be supported in parameter. |
|
102 * @since 2.8 |
|
103 * @param aContainer The parameter to be checked. |
|
104 * @return ETrue if supported, otherwise EFalse. |
|
105 */ |
|
106 TBool CheckIfCWSupported( |
|
107 const RMobilePhone::TCspCallCompletion aContainer ) const; |
|
108 |
|
109 /** |
|
110 * Checks if Call Barring is to be supported in parameter. |
|
111 * @since 2.8 |
|
112 * @param aContainer The parameter to be checked. |
|
113 * @return ETrue if supported, otherwise EFalse. |
|
114 */ |
|
115 TBool CheckIfCBSupported( |
|
116 const RMobilePhone::TCspCallRestriction aContainer ) const; |
|
117 |
|
118 /** |
|
119 * Checks if Call Forwarding is to be supported in parameter. |
|
120 * @since 2.8 |
|
121 * @param aContainer The parameter to be checked. |
|
122 * @return ETrue if supported, otherwise EFalse. |
|
123 */ |
|
124 TBool CheckIfCFSupported( |
|
125 const RMobilePhone::TCspCallOffering aContainer ) const; |
|
126 |
|
127 /** |
|
128 * Checks if Alternate Line is to be supported in parameter. |
|
129 * @since 2.8 |
|
130 * @param aContainer The parameter to be checked. |
|
131 * @return ETrue if supported, otherwise EFalse. |
|
132 */ |
|
133 TBool CheckIfAlsSupported( |
|
134 const RMobilePhone::TCspCPHSTeleservices aContainer ) const; |
|
135 |
|
136 /** |
|
137 * Checks if Manual Network Selection is supported in parameter. |
|
138 * @since 2.8 |
|
139 * @param aContainer The parameter to be checked. |
|
140 * @return ETrue if supported, otherwise EFalse. |
|
141 */ |
|
142 TBool CheckIfNetworkSelectionSupported( |
|
143 const RMobilePhone::TCspValueAdded aContainer ) const; |
|
144 |
|
145 private: |
|
146 |
|
147 /** |
|
148 * Checks if the first parameter supports the feature mentioned in the |
|
149 * second parameter. |
|
150 * @since 2.8 |
|
151 * @param aContainer The parameter to be checked. |
|
152 * @param aFeature The feature to be checked. |
|
153 * @return ETrue if supported, otherwise EFalse. |
|
154 */ |
|
155 TBool IsSupported( |
|
156 const TInt aContainer, |
|
157 const TInt aFeature ) const; |
|
158 |
|
159 |
|
160 private: // Member data |
|
161 |
|
162 // SsSettings' csp cache. |
|
163 RCustomerServiceProfileCache* iCsp; |
|
164 }; |
|
165 #endif //PSETCSP_H |
|
166 |
|
167 // End of File |