sipvoipprovider/src/svpsettings.cpp
branchRCL_3
changeset 22 d38647835c2e
parent 0 a4daefaec16c
equal deleted inserted replaced
21:f742655b05bf 22:d38647835c2e
       
     1 /*
       
     2 * Copyright (c) 2006-2008 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 : Implements svp settings reader
       
    15 *
       
    16 */
       
    17 
       
    18 #include <spsettings.h>
       
    19 #include <spproperty.h>
       
    20 #include <spdefinitions.h>
       
    21 #include <spentry.h>
       
    22 
       
    23 #include "svplogger.h"
       
    24 #include "svpsettings.h"
       
    25 
       
    26 // ---------------------------------------------------------------------------
       
    27 // Returns the id of VCC enabled VoIP service.
       
    28 // EPropertyCallProviderPluginId
       
    29 // ---------------------------------------------------------------------------
       
    30 //
       
    31 TInt SvpSettings::IntPropertyL( TUint aServiceId, 
       
    32                 TServicePropertyName aPropertyName )
       
    33     {
       
    34     SVPDEBUG1( "SvpSettings::IntPropertyL In" )
       
    35     // Create settings object and then the property one
       
    36     CSPSettings* settings = CSPSettings::NewLC();
       
    37     CSPProperty* property = CSPProperty::NewLC();
       
    38 
       
    39     // Now get the property of the given service
       
    40     // First, get the property and then use the property to get its value.
       
    41     settings->FindPropertyL( aServiceId, aPropertyName, *property );
       
    42 
       
    43     TInt value;
       
    44     TInt error = property->GetValue( value );
       
    45     SVPDEBUG2( "SvpSettings::IntPropertyL serviceId = %d", aServiceId )
       
    46     
       
    47     User::LeaveIfError( error );
       
    48 
       
    49     // Cleanup and return
       
    50     CleanupStack::PopAndDestroy( property );
       
    51     CleanupStack::PopAndDestroy( settings );
       
    52     
       
    53     SVPDEBUG1( "SvpSettings::IntPropertyL Out" )
       
    54     
       
    55     return value;
       
    56     }
       
    57