telephonyserverplugins/common_tsy/commontsy/src/mmgsmwcdma/mmgsmwcdmaprivateutils.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 14 Apr 2010 17:11:46 +0300
branchRCL_3
changeset 17 3f227a47ad75
parent 0 3553901f7fa8
child 24 6638e7f4bd8f
permissions -rw-r--r--
Revision: 201015 Kit: 201015

// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
//



//  INCLUDE FILES
#include "mmgsmwcdmaprivateutils.h"
#include <ctsy/serviceapi/mmtsy_defaults.h>
#include "MmTsy_conf.h"
#include <ctsy/mmtsy_names.h>
#include "CMmCommonStaticUtility.h"

// ======== LOCAL FUNCTIONS ========

// ---------------------------------------------------------------------------
// MapLinenameToMmMobileService
// Map multimode api linename to mobile service.
// (other items were commented in a header).
// ---------------------------------------------------------------------------
//
TInt MapLinenameToMmMobileService(
    const TDesC& aLinename, 
    RMobilePhone::TMobileService* aMobileService )
    {
    if ( 0 == aLinename.CompareF( KMmTsyVoice1LineName )  )
        {
        *aMobileService = RMobilePhone::ETelephony;
        }
    else if ( 0 == aLinename.CompareF( KMmTsyVoice2LineName ) )
        {
        *aMobileService = RMobilePhone::EAuxVoiceService;
        }
    else if ( 0 == aLinename.CompareF( KMmTsyDataLineName ) )
        {
        *aMobileService = RMobilePhone::EAsyncData;
        }
    else if ( 0 == aLinename.CompareF( KMmTsyFaxLineName ) )
        {
        *aMobileService = RMobilePhone::EFaxService;
        }
    else 
        {
        // this can't be KErrArgument because basic
        // service code isn't usually given as argument
        return KErrGeneral;                 
        }

    return KErrNone;
    }


//  End of File