|
1 /* |
|
2 * Copyright (c) 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: Handle to NWSessionSlot. |
|
15 * |
|
16 */ |
|
17 |
|
18 // INCLUDE FILES |
|
19 #include "CPEngNWSessionSlot2.h" |
|
20 #include "CPEngNWSessionSlot2Imp.h" |
|
21 #include "PresenceDebugPrint.h" |
|
22 |
|
23 |
|
24 // ============================ MEMBER FUNCTIONS =============================== |
|
25 |
|
26 |
|
27 // ----------------------------------------------------------------------------- |
|
28 // CPEngNWSessionSlot2::NewL() |
|
29 // Two-phased constructor. |
|
30 // ----------------------------------------------------------------------------- |
|
31 // |
|
32 EXPORT_C CPEngNWSessionSlot2* CPEngNWSessionSlot2::NewL( |
|
33 const CPEngNWSessionSlotID2& aNWSessionSlotID, |
|
34 TInt aPriority ) |
|
35 { |
|
36 PENG_DP_TXT( "CPEngNWSessionSlot2::NewL()" ); |
|
37 |
|
38 CPEngNWSessionSlot2* self = new ( ELeave ) CPEngNWSessionSlot2; |
|
39 CleanupStack::PushL( self ); |
|
40 self->iImp = CPEngNWSessionSlot2Imp::NewL( *self, |
|
41 aPriority, |
|
42 aNWSessionSlotID ); |
|
43 CleanupStack::Pop( self ); |
|
44 return self; |
|
45 } |
|
46 |
|
47 |
|
48 // ----------------------------------------------------------------------------- |
|
49 // CPEngNWSessionSlot2::NewLC() |
|
50 // Two-phased constructor. |
|
51 // ----------------------------------------------------------------------------- |
|
52 // |
|
53 EXPORT_C CPEngNWSessionSlot2* CPEngNWSessionSlot2::NewLC( |
|
54 const CPEngNWSessionSlotID2& aNWSessionSlotID, |
|
55 TInt aPriority ) |
|
56 { |
|
57 PENG_DP_TXT( "CPEngNWSessionSlot2::NewLC()" ); |
|
58 |
|
59 CPEngNWSessionSlot2* self = new ( ELeave ) CPEngNWSessionSlot2; |
|
60 CleanupStack::PushL( self ); |
|
61 self->iImp = CPEngNWSessionSlot2Imp::NewL( *self, |
|
62 aPriority, |
|
63 aNWSessionSlotID ); |
|
64 return self; |
|
65 } |
|
66 |
|
67 |
|
68 |
|
69 // Destructor |
|
70 CPEngNWSessionSlot2::~CPEngNWSessionSlot2() |
|
71 { |
|
72 PENG_DP_TXT( "CPEngNWSessionSlot2::~CPEngNWSessionSlot2()" ); |
|
73 |
|
74 delete iImp; |
|
75 } |
|
76 |
|
77 |
|
78 |
|
79 // ----------------------------------------------------------------------------- |
|
80 // CPEngNWSessionSlot2::CPEngNWSessionSlot2 |
|
81 // C++ default constructor can NOT contain any code, that |
|
82 // might leave. |
|
83 // ----------------------------------------------------------------------------- |
|
84 // |
|
85 CPEngNWSessionSlot2::CPEngNWSessionSlot2() |
|
86 { |
|
87 } |
|
88 |
|
89 |
|
90 // ----------------------------------------------------------------------------- |
|
91 // CPEngNWSessionSlot2::GetNWSessionSlotID() |
|
92 // ----------------------------------------------------------------------------- |
|
93 // |
|
94 EXPORT_C TInt CPEngNWSessionSlot2::GetNWSessionSlotID( |
|
95 CPEngNWSessionSlotID2& aNWSessionSlotID ) const |
|
96 { |
|
97 PENG_DP_TXT( "CPEngNWSessionSlot2::GetNWSessionSlotID()" ); |
|
98 |
|
99 return iImp->GetNWSessionSlotID( aNWSessionSlotID ); |
|
100 } |
|
101 |
|
102 |
|
103 // ----------------------------------------------------------------------------- |
|
104 // CPEngNWSessionSlot2::GetOption() |
|
105 // ----------------------------------------------------------------------------- |
|
106 // |
|
107 EXPORT_C TInt CPEngNWSessionSlot2::GetOption( TUint aOptionName, |
|
108 TUint aOptionLevel, |
|
109 TDes8& aOption ) |
|
110 { |
|
111 PENG_DP( D_PENG_LIT( "CPEngNWSessionSlot2::GetOption() [%08x][%08x]" ), |
|
112 aOptionName, aOptionLevel ); |
|
113 |
|
114 return iImp->GetOption( aOptionName, aOptionLevel, aOption ); |
|
115 } |
|
116 |
|
117 |
|
118 // ----------------------------------------------------------------------------- |
|
119 // CPEngNWSessionSlot2::IsOpenNWPresenceSessionActive() |
|
120 // ----------------------------------------------------------------------------- |
|
121 // |
|
122 EXPORT_C TBool CPEngNWSessionSlot2::IsOpenNWPresenceSessionActive() const |
|
123 { |
|
124 PENG_DP_TXT( "CPEngNWSessionSlot2::IsOpenNWPresenceSessionActive()" ); |
|
125 |
|
126 return iImp->IsOpenNWPresenceSessionActive(); |
|
127 } |
|
128 |
|
129 |
|
130 // ----------------------------------------------------------------------------- |
|
131 // CPEngNWSessionSlot2::OpenNWPresenceSession() |
|
132 // ----------------------------------------------------------------------------- |
|
133 // |
|
134 EXPORT_C TInt CPEngNWSessionSlot2::OpenNWPresenceSession( |
|
135 const CWVSAPSettings& /*aSAP*/, |
|
136 MPEngNWSessionOperationObserver2& /*aObserver*/ ) |
|
137 { |
|
138 PENG_DP( D_PENG_LIT( "CPEngNWSessionSlot2::OpenNWPresenceSession() - CWVSAPSettings deprecated" ) ); |
|
139 return KErrNotSupported; |
|
140 } |
|
141 |
|
142 |
|
143 // ----------------------------------------------------------------------------- |
|
144 // CPEngNWSessionSlot2::OpenNWPresenceSession() |
|
145 // ----------------------------------------------------------------------------- |
|
146 // |
|
147 EXPORT_C TInt CPEngNWSessionSlot2::OpenNWPresenceSession( |
|
148 const CIMPSSAPSettings& aSAP, |
|
149 MPEngNWSessionOperationObserver2& aObserver ) |
|
150 { |
|
151 PENG_DP( D_PENG_LIT( "CPEngNWSessionSlot2::OpenNWPresenceSession()" ) ); |
|
152 |
|
153 return iImp->OpenNWPresenceSession( aSAP, aObserver ); |
|
154 } |
|
155 |
|
156 |
|
157 // ----------------------------------------------------------------------------- |
|
158 // CPEngNWSessionSlot2::CancelOpenNWPresenceSession() |
|
159 // ----------------------------------------------------------------------------- |
|
160 // |
|
161 EXPORT_C void CPEngNWSessionSlot2::CancelOpenNWPresenceSession() |
|
162 { |
|
163 PENG_DP_TXT( "CPEngNWSessionSlot2::CancelOpenNWPresenceSession()" ); |
|
164 |
|
165 iImp->CancelOpenNWPresenceSession(); |
|
166 } |
|
167 |
|
168 // ----------------------------------------------------------------------------- |
|
169 // CPEngNWSessionSlot2::CancelOpenNWPresenceSession() |
|
170 // ----------------------------------------------------------------------------- |
|
171 // |
|
172 EXPORT_C TInt CPEngNWSessionSlot2::OpenNWPresenceSessionOwnership() |
|
173 { |
|
174 PENG_DP_TXT( "CPEngNWSessionSlot2::OpenNWPresenceSessionOwnership()" ); |
|
175 |
|
176 return iImp->OpenNWPresenceSessionOwnership(); |
|
177 } |
|
178 |
|
179 // ----------------------------------------------------------------------------- |
|
180 // CPEngNWSessionSlot2::IsCloseNWPresenceSessionActive() |
|
181 // ----------------------------------------------------------------------------- |
|
182 // |
|
183 EXPORT_C TBool CPEngNWSessionSlot2::IsCloseNWPresenceSessionActive() const |
|
184 { |
|
185 PENG_DP_TXT( "CPEngNWSessionSlot2::IsCloseNWPresenceSessionActive()" ); |
|
186 |
|
187 return iImp->IsCloseNWPresenceSessionActive(); |
|
188 } |
|
189 |
|
190 |
|
191 // ----------------------------------------------------------------------------- |
|
192 // CPEngNWSessionSlot2::CloseNWPresenceSession() |
|
193 // ----------------------------------------------------------------------------- |
|
194 // |
|
195 EXPORT_C TInt CPEngNWSessionSlot2::CloseNWPresenceSession( |
|
196 MPEngNWSessionOperationObserver2& aObserver ) |
|
197 { |
|
198 PENG_DP_TXT( "CPEngNWSessionSlot2::CloseNWPresenceSession()" ); |
|
199 |
|
200 return iImp->CloseNWPresenceSession( aObserver, EFalse ); |
|
201 } |
|
202 |
|
203 // ----------------------------------------------------------------------------- |
|
204 // CPEngNWSessionSlot2::ForceCloseNWPresenceSession() |
|
205 // ----------------------------------------------------------------------------- |
|
206 // |
|
207 EXPORT_C TInt CPEngNWSessionSlot2::ForceCloseNWPresenceSession( |
|
208 MPEngNWSessionOperationObserver2& aObserver ) |
|
209 { |
|
210 PENG_DP_TXT( "CPEngNWSessionSlot2::ForceCloseNWPresenceSession()" ); |
|
211 |
|
212 return iImp->CloseNWPresenceSession( aObserver, ETrue ); |
|
213 } |
|
214 |
|
215 |
|
216 // ----------------------------------------------------------------------------- |
|
217 // CPEngNWSessionSlot2::CancelCloseNWPresenceSession() |
|
218 // ----------------------------------------------------------------------------- |
|
219 // |
|
220 EXPORT_C void CPEngNWSessionSlot2::CancelCloseNWPresenceSession() |
|
221 { |
|
222 PENG_DP_TXT( "CPEngNWSessionSlot2::CancelCloseNWPresenceSession()" ); |
|
223 |
|
224 iImp->CancelCloseNWPresenceSession(); |
|
225 } |
|
226 |
|
227 |
|
228 // ----------------------------------------------------------------------------- |
|
229 // CPEngNWSessionSlot2::CloseNWPresenceSessionOwnership() |
|
230 // ----------------------------------------------------------------------------- |
|
231 // |
|
232 EXPORT_C void CPEngNWSessionSlot2::CloseNWPresenceSessionOwnership() |
|
233 { |
|
234 PENG_DP_TXT( "CPEngNWSessionSlot2::CloseNWPresenceSessionOwnership()" ); |
|
235 |
|
236 iImp->CloseNWPresenceSessionOwnership(); |
|
237 } |
|
238 |
|
239 |
|
240 // ----------------------------------------------------------------------------- |
|
241 // CPEngNWSessionSlot2::StoreNWPresenceSessionOwnership() |
|
242 // ----------------------------------------------------------------------------- |
|
243 // |
|
244 EXPORT_C TInt CPEngNWSessionSlot2::StoreNWPresenceSessionOwnership( |
|
245 const TDesC16& aOwnerID ) |
|
246 { |
|
247 PENG_DP( D_PENG_LIT( "CPEngNWSessionSlot2::StoreNWPresenceSessionOwnership() [%S]" ), |
|
248 &aOwnerID ); |
|
249 |
|
250 return iImp->StoreNWPresenceSessionOwnership( aOwnerID ); |
|
251 } |
|
252 |
|
253 |
|
254 // ----------------------------------------------------------------------------- |
|
255 // CPEngNWSessionSlot2::RestoreNWPresenceSessionOwnership() |
|
256 // ----------------------------------------------------------------------------- |
|
257 // |
|
258 EXPORT_C TInt CPEngNWSessionSlot2::RestoreNWPresenceSessionOwnership( |
|
259 const TDesC16& aOwnerID ) |
|
260 { |
|
261 PENG_DP( D_PENG_LIT( "CPEngNWSessionSlot2::RestoreNWPresenceSessionOwnership() [%S]" ), |
|
262 &aOwnerID ); |
|
263 |
|
264 return iImp->RestoreNWPresenceSessionOwnership( aOwnerID ); |
|
265 } |
|
266 |
|
267 |
|
268 // ----------------------------------------------------------------------------- |
|
269 // CPEngNWSessionSlot2::GetNWPresenceSessionSap() |
|
270 // ----------------------------------------------------------------------------- |
|
271 // |
|
272 EXPORT_C TInt CPEngNWSessionSlot2::GetNWPresenceSessionSap( |
|
273 CWVSAPSettings& /*aSAP*/ ) const |
|
274 { |
|
275 PENG_DP_TXT( "CPEngNWSessionSlot2::GetNWPresenceSessionSap() - CWVSAPSettings deprecated" ); |
|
276 return KErrNotSupported; |
|
277 } |
|
278 |
|
279 // ----------------------------------------------------------------------------- |
|
280 // CPEngNWSessionSlot2::GetNWPresenceSessionSap() |
|
281 // ----------------------------------------------------------------------------- |
|
282 // |
|
283 EXPORT_C TInt CPEngNWSessionSlot2::GetNWPresenceSessionSap( |
|
284 CIMPSSAPSettings& aSAP ) const |
|
285 { |
|
286 PENG_DP_TXT( "CPEngNWSessionSlot2::GetNWPresenceSessionSap() - CIMPSSAPSettings" ); |
|
287 |
|
288 return iImp->GetNWPresenceSessionSap( aSAP ); |
|
289 } |
|
290 |
|
291 |
|
292 // ----------------------------------------------------------------------------- |
|
293 // CPEngNWSessionSlot2::GetNWSessionSlotState() |
|
294 // ----------------------------------------------------------------------------- |
|
295 // |
|
296 EXPORT_C TInt CPEngNWSessionSlot2::GetNWSessionSlotState( TPEngNWSessionSlotState& aState ) const |
|
297 { |
|
298 PENG_DP_TXT( "CPEngNWSessionSlot2::GetNWSessionSlotState()" ); |
|
299 |
|
300 return iImp->GetNWSessionSlotState( aState ); |
|
301 } |
|
302 |
|
303 |
|
304 |
|
305 // End of File |
|
306 |
|
307 |