telephonyserverplugins/common_tsy/commontsy/src/mmgsmwcdma/mmgsmwcdmaprivateutils.cpp
changeset 0 3553901f7fa8
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 
       
    17 
       
    18 //  INCLUDE FILES
       
    19 #include "mmgsmwcdmaprivateutils.h"
       
    20 #include <ctsy/serviceapi/mmtsy_defaults.h>
       
    21 #include "MmTsy_conf.h"
       
    22 #include <ctsy/mmtsy_names.h>
       
    23 #include "CMmCommonStaticUtility.h"
       
    24 
       
    25 // ======== LOCAL FUNCTIONS ========
       
    26 
       
    27 // ---------------------------------------------------------------------------
       
    28 // MapLinenameToMmMobileService
       
    29 // Map multimode api linename to mobile service.
       
    30 // (other items were commented in a header).
       
    31 // ---------------------------------------------------------------------------
       
    32 //
       
    33 TInt MapLinenameToMmMobileService(
       
    34     const TDesC& aLinename, 
       
    35     RMobilePhone::TMobileService* aMobileService )
       
    36     {
       
    37     if ( 0 == aLinename.CompareF( KMmTsyVoice1LineName )  )
       
    38         {
       
    39         *aMobileService = RMobilePhone::ETelephony;
       
    40         }
       
    41     else if ( 0 == aLinename.CompareF( KMmTsyVoice2LineName ) )
       
    42         {
       
    43         *aMobileService = RMobilePhone::EAuxVoiceService;
       
    44         }
       
    45     else if ( 0 == aLinename.CompareF( KMmTsyDataLineName ) )
       
    46         {
       
    47         *aMobileService = RMobilePhone::EAsyncData;
       
    48         }
       
    49     else if ( 0 == aLinename.CompareF( KMmTsyFaxLineName ) )
       
    50         {
       
    51         *aMobileService = RMobilePhone::EFaxService;
       
    52         }
       
    53     else 
       
    54         {
       
    55         // this can't be KErrArgument because basic
       
    56         // service code isn't usually given as argument
       
    57         return KErrGeneral;                 
       
    58         }
       
    59 
       
    60     return KErrNone;
       
    61     }
       
    62 
       
    63 
       
    64 //  End of File