1 /* |
1 /* |
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0"" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
8 * |
8 * |
9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: |
14 * Description: |
15 * Private implementation of Wrapper for CM Manager Symbian interface. |
15 * Private implementation of Wrapper for CM Manager Symbian interface. |
16 */ |
16 */ |
17 |
17 |
18 // System includes |
18 // System includes |
19 |
19 |
20 #include <cmdestination.h> |
20 #include <cmdestination.h> |
21 #include <cmmanager.h> |
21 #include <cmmanager.h> |
25 |
25 |
26 // User includes |
26 // User includes |
27 |
27 |
28 #include "cmdestination_shim_s60_p.h" |
28 #include "cmdestination_shim_s60_p.h" |
29 #include "cmconnectionmethod_shim_s60_p.h" |
29 #include "cmconnectionmethod_shim_s60_p.h" |
|
30 |
30 #include "OstTraceDefinitions.h" |
31 #include "OstTraceDefinitions.h" |
31 #ifdef OST_TRACE_COMPILER_IN_USE |
32 #ifdef OST_TRACE_COMPILER_IN_USE |
32 #include "cmdestination_shim_s60Traces.h" |
33 #include "cmdestination_shim_s60Traces.h" |
33 #endif |
34 #endif |
34 |
|
35 |
35 |
36 /*! |
36 /*! |
37 \class CmDestinationShimPrivate |
37 \class CmDestinationShimPrivate |
38 \brief Private implementation class for CM Manager Destination Shim. |
38 \brief Private implementation class for CM Manager Destination Shim. |
39 |
39 |
309 void CmDestinationShimPrivate::AddConnectionMethodL( |
309 void CmDestinationShimPrivate::AddConnectionMethodL( |
310 CmConnectionMethodShim *cmShim, |
310 CmConnectionMethodShim *cmShim, |
311 int &index) |
311 int &index) |
312 { |
312 { |
313 index = iDestination.AddConnectionMethodL(cmShim->d_ptr->iCm); |
313 index = iDestination.AddConnectionMethodL(cmShim->d_ptr->iCm); |
314 iDestination.UpdateL(); |
|
315 } |
314 } |
316 |
315 |
317 void CmDestinationShimPrivate::DeleteConnectionMethodL( |
316 void CmDestinationShimPrivate::DeleteConnectionMethodL( |
318 CmConnectionMethodShim *cmShim) |
317 CmConnectionMethodShim *cmShim) |
319 { |
318 { |
320 RCmConnectionMethod cm; |
319 RCmConnectionMethod cm; |
321 cm = iDestination.ConnectionMethodByIDL( |
320 cm = iDestination.ConnectionMethodByIDL( |
322 cmShim->getIntAttribute(CMManagerShim::CmId)); |
321 cmShim->getIntAttribute(CMManagerShim::CmId)); |
323 iDestination.DeleteConnectionMethodL(cm); |
322 iDestination.DeleteConnectionMethodL(cm); |
324 iDestination.UpdateL(); |
|
325 } |
323 } |
326 |
324 |
327 void CmDestinationShimPrivate::RemoveConnectionMethodL( |
325 void CmDestinationShimPrivate::RemoveConnectionMethodL( |
328 CmConnectionMethodShim *cmShim) |
326 CmConnectionMethodShim *cmShim) |
329 { |
327 { |
330 RCmConnectionMethod cm; |
328 RCmConnectionMethod cm; |
331 cm = iDestination.ConnectionMethodByIDL( |
329 cm = iDestination.ConnectionMethodByIDL( |
332 cmShim->getIntAttribute(CMManagerShim::CmId)); |
330 cmShim->getIntAttribute(CMManagerShim::CmId)); |
333 iDestination.RemoveConnectionMethodL(cm); |
331 iDestination.RemoveConnectionMethodL(cm); |
334 iDestination.UpdateL(); |
|
335 } |
332 } |
336 |
333 |
337 void CmDestinationShimPrivate::ModifyPriorityL( |
334 void CmDestinationShimPrivate::ModifyPriorityL( |
338 CmConnectionMethodShim *cmShim, |
335 CmConnectionMethodShim *cmShim, |
339 int index) |
336 int index) |
340 { |
337 { |
341 RCmConnectionMethod cm; |
338 RCmConnectionMethod cm; |
342 cm = iDestination.ConnectionMethodByIDL( |
339 cm = iDestination.ConnectionMethodByIDL( |
343 cmShim->getIntAttribute(CMManagerShim::CmId)); |
340 cmShim->getIntAttribute(CMManagerShim::CmId)); |
344 iDestination.ModifyPriorityL(cm, index); |
341 iDestination.ModifyPriorityL(cm, index); |
345 iDestination.UpdateL(); |
|
346 } |
342 } |
347 |
343 |
348 void CmDestinationShimPrivate::SetNameL(QString name) |
344 void CmDestinationShimPrivate::SetNameL(QString name) |
349 { |
345 { |
350 TPtrC16 namePtr(reinterpret_cast<const TUint16*>(name.utf16())); |
346 TPtrC16 namePtr(reinterpret_cast<const TUint16*>(name.utf16())); |
351 iDestination.SetNameL(namePtr); |
347 iDestination.SetNameL(namePtr); |
352 iDestination.UpdateL(); |
|
353 } |
348 } |
354 |
349 |
355 /*! |
350 /*! |
356 * Maps CM Manager protection levels to those defined by the shim. |
351 * Maps CM Manager protection levels to those defined by the shim. |
357 * |
352 * |