cmmanager/connection_settings_shim/src/cmdestination_shim.cpp
branchRCL_3
changeset 58 83ca720e2b9a
parent 57 05bc53fe583b
child 62 bb1f80fb7db2
equal deleted inserted replaced
57:05bc53fe583b 58:83ca720e2b9a
     1 /*
       
     2  * Copyright (c) 2010 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  * Wrapper for CM Manager Symbian interface.
       
    16  */
       
    17 
       
    18 // System includes
       
    19 
       
    20 #include <cmdestination.h>
       
    21 #include <cmconnectionmethod.h>
       
    22 #include <cmdestination_shim.h>
       
    23 
       
    24 // User includes
       
    25 
       
    26 #include "cmdestination_shim_s60_p.h"
       
    27 #include "cmconnectionmethod_shim_s60_p.h"
       
    28 
       
    29 // External function prototypes
       
    30 
       
    31 // Local constants
       
    32 
       
    33 // ======== LOCAL FUNCTIONS ========
       
    34 
       
    35 // ======== MEMBER FUNCTIONS ========
       
    36 
       
    37 CmDestinationShim::CmDestinationShim(RCmDestination &destination)
       
    38 {
       
    39     d_ptr = new CmDestinationShimPrivate(destination);
       
    40 }
       
    41 
       
    42 CmDestinationShim::~CmDestinationShim()
       
    43 {
       
    44     delete d_ptr;
       
    45 }
       
    46                  
       
    47 int CmDestinationShim::connectionMethodCount() const
       
    48 {
       
    49     return d_ptr->ConnectionMethodCount();
       
    50 }
       
    51                 
       
    52 CmConnectionMethodShim *CmDestinationShim::connectionMethod(int index) const
       
    53 {
       
    54     return d_ptr->ConnectionMethod(index);
       
    55 }
       
    56            
       
    57 CmConnectionMethodShim *CmDestinationShim::connectionMethodByID(
       
    58     uint cmId) const
       
    59 {    
       
    60     return d_ptr->ConnectionMethodByID(cmId);
       
    61 }
       
    62 
       
    63 uint CmDestinationShim::priority(CmConnectionMethodShim *cmItem) const
       
    64 {
       
    65     return d_ptr->Priority(cmItem);
       
    66 }
       
    67                
       
    68 QString CmDestinationShim::name() const
       
    69 {    
       
    70     return d_ptr->Name();
       
    71 }
       
    72                              
       
    73 uint CmDestinationShim::id() const
       
    74 {
       
    75     return d_ptr->Id();
       
    76 }
       
    77 
       
    78 uint CmDestinationShim::metadata(
       
    79     CMManagerShim::SnapMetadataField metadataField) const
       
    80 {
       
    81     return d_ptr->Metadata(metadataField);
       
    82 }
       
    83 
       
    84 CMManagerShim::CmmProtectionLevel CmDestinationShim::protectionLevel() const
       
    85 {
       
    86     return d_ptr->ProtectionLevel();
       
    87 }
       
    88            
       
    89 bool CmDestinationShim::isHidden() const
       
    90 {
       
    91     return d_ptr->IsHidden();
       
    92 }
       
    93            
       
    94 int CmDestinationShim::addConnectionMethod(CmConnectionMethodShim *cm)
       
    95 {
       
    96     return d_ptr->AddConnectionMethod(cm);
       
    97 }
       
    98 
       
    99 void CmDestinationShim::deleteConnectionMethod(CmConnectionMethodShim *cm)
       
   100 {
       
   101     d_ptr->DeleteConnectionMethod(cm);
       
   102 }
       
   103        
       
   104 void CmDestinationShim::removeConnectionMethod(CmConnectionMethodShim *cm)
       
   105 {
       
   106     d_ptr->RemoveConnectionMethod(cm);
       
   107 }
       
   108              
       
   109 void CmDestinationShim::modifyPriority(CmConnectionMethodShim *cm, int index)
       
   110 {
       
   111     d_ptr->ModifyPriority(cm, index);
       
   112 }
       
   113            
       
   114 void CmDestinationShim::setName(QString name)
       
   115 {
       
   116     d_ptr->SetName(name);
       
   117 }
       
   118               
       
   119 void CmDestinationShim::update()
       
   120 {
       
   121     d_ptr->Update();
       
   122 }
       
   123 
       
   124 void CmDestinationShim::refresh()
       
   125 {
       
   126     d_ptr->Refresh();
       
   127 }
       
   128 
       
   129 void CmDestinationShim::deleteDestination()
       
   130 {
       
   131     d_ptr->DeleteDestination();
       
   132 }
       
   133 
       
   134 QString CmDestinationShim::getIcon() const
       
   135 {    
       
   136     return d_ptr->GetIcon();
       
   137 }
       
   138 
       
   139 void CmDestinationShim::setIcon(QString icon)
       
   140 {    
       
   141     d_ptr->SetIcon(icon);
       
   142 }