1 /* |
|
2 * Copyright (c) 2009 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 * |
|
16 */ |
|
17 |
|
18 #ifndef PSETCALLBARRINGWRAPPER_P_H |
|
19 #define PSETCALLBARRINGWRAPPER_P_H |
|
20 |
|
21 #include <mpsetbarringobs.h> |
|
22 #include <mpsetrequestobs.h> |
|
23 #include <nwdefs.h> |
|
24 #include <psetcallbarringwrapper.h> |
|
25 |
|
26 // Forward declarations |
|
27 class PSetCallBarringWrapper; |
|
28 class CPsetContainer; |
|
29 class CPsetCallBarring; |
|
30 |
|
31 class PSetCallBarringWrapperPrivate |
|
32 : public MPsetBarringObserver, public MPsetRequestObserver |
|
33 { |
|
34 public: |
|
35 |
|
36 enum BarringRequest |
|
37 { |
|
38 RequestNone, |
|
39 RequestBarringStatus, |
|
40 RequestEnableBarring, |
|
41 RequestDisableBarring, |
|
42 RequestChangePassword |
|
43 }; |
|
44 |
|
45 public: |
|
46 |
|
47 PSetCallBarringWrapperPrivate( |
|
48 PSetCallBarringWrapper &owner, |
|
49 CPsetContainer &psetContainer); |
|
50 |
|
51 ~PSetCallBarringWrapperPrivate(); |
|
52 |
|
53 void barringStatus( |
|
54 PsServiceGroup serviceGroup, |
|
55 PSetCallBarringWrapper::BarringType barringType); |
|
56 |
|
57 void enableBarring( |
|
58 PsServiceGroup serviceGroup, |
|
59 PSetCallBarringWrapper::BarringType barringType, |
|
60 QString barringPassword); |
|
61 |
|
62 void disableBarring( |
|
63 PsServiceGroup serviceGroup, |
|
64 PSetCallBarringWrapper::BarringType barringType, |
|
65 QString barringPassword); |
|
66 |
|
67 void changeBarringPassword( |
|
68 const QString &oldPassword, |
|
69 const QString &newPassword, |
|
70 const QString &verifiedPassword); |
|
71 |
|
72 public: // From MPsetBarringObserver |
|
73 |
|
74 /** |
|
75 * From MPsetBarringObserver. |
|
76 * @see MPsetBarringObserver. |
|
77 */ |
|
78 void HandleBarringModeChangedL( |
|
79 TBarringProgram aType, |
|
80 TBarringStatus aStatus, |
|
81 TBool aPlural ); |
|
82 |
|
83 /** |
|
84 * From MPsetBarringObserver. |
|
85 * @see MPsetBarringObserver. |
|
86 */ |
|
87 void HandleBarringModeStatusL( |
|
88 TUint8 aBsc[KPSetNumberOfBsc], |
|
89 TBarringStatus aStatus ); |
|
90 |
|
91 /** |
|
92 * From MPsetBarringObserver. |
|
93 * @see MPsetBarringObserver. |
|
94 */ |
|
95 void HandleBarringErrorL( |
|
96 TInt aReason ); |
|
97 |
|
98 /** |
|
99 * From MPsetBarringObserver. |
|
100 * @see MPsetBarringObserver. |
|
101 */ |
|
102 void HandleCBRequestingL( |
|
103 TBool aTrue, |
|
104 TBool aInterrupted ); |
|
105 |
|
106 /** |
|
107 * From MPsetBarringObserver. |
|
108 * @see MPsetBarringObserver. |
|
109 */ |
|
110 void SetEngineContact( |
|
111 MPsetCallBarring* aBarringEngine ); |
|
112 |
|
113 /** |
|
114 * From MPsetBarringObserver. |
|
115 * @see MPsetBarringObserver. |
|
116 */ |
|
117 void CbPasswordChangedL( |
|
118 TBool aSuccess ); |
|
119 |
|
120 public: // From MPsetRequestObserver |
|
121 |
|
122 /** |
|
123 * From MPsetRequestObserver. |
|
124 * @see MPsetRequestObserver. |
|
125 */ |
|
126 void RequestComplete(); |
|
127 |
|
128 /** |
|
129 * From MPsetRequestObserver. |
|
130 * @see MPsetRequestObserver. |
|
131 */ |
|
132 void RequestStatusChanged( |
|
133 TInt aNewStatus); |
|
134 |
|
135 private: |
|
136 |
|
137 /** Owner. */ |
|
138 PSetCallBarringWrapper &m_owner; |
|
139 |
|
140 /** Call barring supplementary service handler. */ |
|
141 CPsetCallBarring *m_callBarring; |
|
142 |
|
143 /** Current barring request. */ |
|
144 BarringRequest m_currentRequest; |
|
145 |
|
146 /** Error info from last completed request. */ |
|
147 int m_barringError; |
|
148 |
|
149 /** Basic service group identifiers from last completed request. */ |
|
150 QList<unsigned char> m_basicServiceGroupIds; |
|
151 |
|
152 /** Barring status from last completed request. */ |
|
153 PSetCallBarringWrapper::BarringStatus m_barringStatus; |
|
154 |
|
155 /** Barring type from last completed request. */ |
|
156 PSetCallBarringWrapper::BarringType m_barringType; |
|
157 |
|
158 /** Plurality from last completed request. */ |
|
159 bool m_plural; |
|
160 }; |
|
161 |
|
162 #endif // PSETCALLBARRINGWRAPPER_P |
|