|
1 /* |
|
2 * Copyright (c) 2002 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: CPsetCallWaiting is call waiting SS setting abstraction. |
|
15 * |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef PSETCALLWAITING_H |
|
21 #define PSETCALLWAITING_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <etelmm.h> |
|
25 #include <mmretrieve.h> |
|
26 #include "MSSSettingsObserver.h" |
|
27 #include "nwdefs.h" |
|
28 #include "MPsetCallWaiting.h" |
|
29 #include "MPsetCallWaitingObs.h" |
|
30 #include "PsetConstants.h" |
|
31 |
|
32 |
|
33 // FORWARD DECLARATIONS |
|
34 class MAdvGsmLineCallWaitingMode; |
|
35 class MPsetRequestObserver; |
|
36 |
|
37 |
|
38 // CLASS DECLARATION |
|
39 /** |
|
40 * CPsetCallWaiting class is call waiting SS handler. |
|
41 * @lib phonesettings.lib |
|
42 * @since 1.0 |
|
43 */ |
|
44 class CPsetCallWaiting : public CActive, |
|
45 public MPsetCallWaiting, |
|
46 public MSSSettingsObserver |
|
47 { |
|
48 public: // constructor & destructor |
|
49 |
|
50 /** |
|
51 * Symbian OS 2-phase Constructor. |
|
52 * |
|
53 * @param aPhone Provides client access to |
|
54 * mobile phone functionality provided by TSY. |
|
55 * @param aObserver Call Waiting observer. |
|
56 * @return Created CPsetCallWaiting object. |
|
57 */ |
|
58 /***************************************************** |
|
59 * Series 60 Customer / ETel |
|
60 * Series 60 ETel API |
|
61 *****************************************************/ |
|
62 IMPORT_C static CPsetCallWaiting* NewL( RMobilePhone& aPhone, |
|
63 MPsetCallWaitingObserver& aObserver ); |
|
64 |
|
65 /** |
|
66 * Destructor. |
|
67 */ |
|
68 IMPORT_C ~CPsetCallWaiting(); |
|
69 |
|
70 public: // from base class MPsetCallWaiting |
|
71 |
|
72 /** |
|
73 * @see MPsetCallWaiting::SetCallWaitingL(). |
|
74 */ |
|
75 IMPORT_C void SetCallWaitingL( |
|
76 TSetCallWaiting aSetting, |
|
77 TBasicServiceGroups aBsc ); |
|
78 |
|
79 /** |
|
80 * @see MPsetCallWaiting::GetCallWaitingStatusL(). |
|
81 */ |
|
82 IMPORT_C void GetCallWaitingStatusL(); |
|
83 |
|
84 |
|
85 /** |
|
86 * @see MPsetCallWaiting::CancelProcess(). |
|
87 */ |
|
88 IMPORT_C TInt CancelProcess(); |
|
89 |
|
90 public: //new |
|
91 |
|
92 /** |
|
93 * Sets request observer. |
|
94 * |
|
95 * @param aObs Where the request completion should be informed to. |
|
96 */ |
|
97 IMPORT_C void SetRequestObserver( MPsetRequestObserver* aObs ); |
|
98 |
|
99 /** |
|
100 * @see MSSSettingsObserver::PhoneSettingChanged(). |
|
101 */ |
|
102 void PhoneSettingChanged( TSSSettingsSetting aSetting, TInt aNewValue ); |
|
103 |
|
104 private: // from base class CActive |
|
105 |
|
106 void RunL(); |
|
107 |
|
108 void DoCancel(); |
|
109 |
|
110 private: //new |
|
111 |
|
112 //Service requests for call waiting. |
|
113 enum TPSetServiceRequest |
|
114 { |
|
115 EPSetServiceRequestNone, |
|
116 EPSetServiceRequestGetCallWaitingStatus, |
|
117 EPSetServiceRequestSetCallWaiting |
|
118 }; |
|
119 |
|
120 void SetPsuiObserver( MPsetCallWaitingObserver& aObserver ); |
|
121 |
|
122 void CleanupLeavePushL(); |
|
123 |
|
124 void HandleLeave(); |
|
125 |
|
126 static void DoHandleLeave( TAny* aAny ); |
|
127 |
|
128 void RequestCompleted( const TInt& aError ); |
|
129 |
|
130 void SetRequestStatus( TPSetServiceRequest aStatus ); |
|
131 |
|
132 void ValidateBsc( TBasicServiceGroups& aBsc ); |
|
133 |
|
134 private: // constructors |
|
135 |
|
136 void ConstructL( MPsetCallWaitingObserver& aObserver ); |
|
137 |
|
138 /***************************************************** |
|
139 * Series 60 Customer / ETel |
|
140 * Series 60 ETel API |
|
141 *****************************************************/ |
|
142 CPsetCallWaiting( RMobilePhone& aPhone ); |
|
143 |
|
144 private: |
|
145 |
|
146 //Request observer |
|
147 MPsetRequestObserver* iReqObserver; |
|
148 /***************************************************** |
|
149 * Series 60 Customer / ETel |
|
150 * Series 60 ETel API |
|
151 *****************************************************/ |
|
152 //Provides client access to mobile phone functionality provided by TSY. |
|
153 RMobilePhone& iPhone; |
|
154 //Call waiting observer, shows notes associated with call waiting. |
|
155 MPsetCallWaitingObserver* iObserver; |
|
156 //Currently active request |
|
157 TPSetServiceRequest iServiceRequest; |
|
158 //Call waiting action type |
|
159 MPsetCallWaiting::TSetCallWaiting iSetValue; |
|
160 /***************************************************** |
|
161 * Series 60 Customer / ETel |
|
162 * Series 60 ETel API |
|
163 *****************************************************/ |
|
164 //Retrieves the Call Waiting status list from the phone. |
|
165 CRetrieveMobilePhoneCWList* iCwInterrogator; |
|
166 // Value of Alternative Line Selection setting |
|
167 TSSSettingsAlsValue iAls; |
|
168 // SsSettings pointer, accesses supplementary services on SIM |
|
169 RSSSettings* iSsSettings; |
|
170 // For run time variation. |
|
171 TBool iCallWaitingDistinquishEnabled; |
|
172 }; |
|
173 #endif // PSETCALLWAITING_H |
|
174 // end of file |