imstutils/imconversationview/tsrc/imcvuiengine_test/src/s_spsettings.cpp
branchRCL_3
changeset 22 3104fc151679
parent 21 2b7283837edb
child 23 9a48e301e94b
equal deleted inserted replaced
21:2b7283837edb 22:3104fc151679
     1 /*
       
     2 * Copyright (c) 2009 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: s_spsettings.cpp
       
    15 *
       
    16 */
       
    17 
       
    18 #include <spsettings.h>
       
    19 #include <spentry.h>
       
    20 #include <spproperty.h>
       
    21 #include "s_cch.h"
       
    22 CSPSettings* mycspsettings = NULL;
       
    23 extern CSPEntry* mycspentry ;
       
    24 CSPSettings::CSPSettings() 
       
    25     {
       
    26     }
       
    27 CSPSettings* CSPSettings::NewL()
       
    28     {
       
    29     CSPSettings* self = CSPSettings::NewLC( );
       
    30     CleanupStack::Pop( self );
       
    31     return self;
       
    32     }
       
    33 CSPSettings* CSPSettings::NewLC()
       
    34     {
       
    35     CSPSettings* self = new (ELeave) CSPSettings( );
       
    36     CleanupStack::PushL( self );
       
    37     self->ConstructL();
       
    38     return self;
       
    39     }
       
    40 
       
    41 
       
    42 CSPSettings::~CSPSettings()
       
    43     {
       
    44     }
       
    45 
       
    46 
       
    47 TInt CSPSettings::AddEntryL( CSPEntry& aEntry )
       
    48     {
       
    49     return KErrNone;
       
    50     }
       
    51 void CopyEntry( const CSPEntry& aOriginal, CSPEntry& aTarget )
       
    52     {    
       
    53     aTarget.SetServiceId( aOriginal.GetServiceId() );
       
    54     aTarget.SetServiceName( aOriginal.GetServiceName() );
       
    55     }
       
    56 
       
    57 TInt CSPSettings::FindEntryL( TServiceId aServiceId, CSPEntry& aEntry )
       
    58     {
       
    59     aEntry.SetServiceName(KTestServiceName);
       
    60     aEntry.SetServiceId(KTestServiceId);
       
    61     return KErrNone;
       
    62     }
       
    63 
       
    64 
       
    65 TInt CSPSettings::UpdateEntryL( const CSPEntry& aEntry )
       
    66     {
       
    67     return KErrNotFound;
       
    68     }
       
    69 
       
    70 TInt CSPSettings::FindPropertyL( TServiceId aServiceId,
       
    71         TServicePropertyName aPropertyName,
       
    72         CSPProperty& aProperty )
       
    73     {
       
    74     if(aPropertyName == EPropertyPCSPluginId)
       
    75         {
       
    76         TInt protocolUidValue = 0x20007B6D;
       
    77         aProperty.SetValue(protocolUidValue );       
       
    78         }
       
    79     if(aPropertyName == EPropertyBrandId)
       
    80         {
       
    81         _LIT(brand,"MyBrand");
       
    82         aProperty.SetValue(brand);       
       
    83         }
       
    84     return KErrNone;
       
    85 
       
    86     }
       
    87 TInt CSPSettings::FindServiceIdsL( RIdArray& aServiceIds )
       
    88     {
       
    89     return KErrNone;
       
    90     }
       
    91 void CSPSettings::ConstructL()
       
    92     {
       
    93     }
       
    94 TInt CSPSettings::SettingsCountL()
       
    95     {
       
    96     return 0;
       
    97     }
       
    98 TInt CSPSettings::AddOrUpdatePropertyL( TServiceId /*aServiceId*/, 
       
    99         const CSPProperty& /*aProperty*/ )
       
   100     {
       
   101     return KErrNone;	
       
   102     }
       
   103 
       
   104 
       
   105 
       
   106