sysstatemgmt/systemstatereferenceplugins/test/tclayer/src/tclayer_step_startersessionwithssm.cpp
changeset 63 09d657f1ee00
parent 0 4e1aa6a622a0
child 61 8cb079868133
equal deleted inserted replaced
54:072a9626b290 63:09d657f1ee00
     1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
    32 
    32 
    33 #include "tclayer_step_startersessionwithssm.h"
    33 #include "tclayer_step_startersessionwithssm.h"
    34 
    34 
    35 const TUint KRFStatusPropertyKey = 0x2001D2A9;
    35 const TUint KRFStatusPropertyKey = 0x2001D2A9;
    36 const TUid KRFStatusPropertyCategory = {0x2000D75B};
    36 const TUid KRFStatusPropertyCategory = {0x2000D75B};
       
    37 const TUint32 KMiscPluginPropertyKey = 0x2000E658;
    37 
    38 
    38 _LIT(KPolicyFilename,                   "rfstatusswppolicy.dll");
    39 _LIT(KPolicyFilename,                   "rfstatusswppolicy.dll");
    39 
    40 
    40 // Parameters
    41 // Parameters
    41 _LIT(KRTCTimeValidity,                  "RTCTimeValidity");
    42 _LIT(KRTCTimeValidity,                  "RTCTimeValidity");
    87 */
    88 */
    88 TBool CCLayerTestWrapperWithSsm::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
    89 TBool CCLayerTestWrapperWithSsm::DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex)
    89     {
    90     {
    90     __UHEAP_MARK;
    91     __UHEAP_MARK;
    91     
    92     
       
    93     TInt error = RProperty::Define(KRFStatusPropertyCategory, KMiscPluginPropertyKey, RProperty::EInt);
       
    94     if((KErrNone != error) && (KErrAlreadyExists != error))
       
    95         {
       
    96         ERR_PRINTF2(_L("Defining KMiscPluginPropertyKey failed with error %d"), error);
       
    97         User::Leave(error);
       
    98         }
       
    99     error = RProperty::Set(KRFStatusPropertyCategory, KMiscPluginPropertyKey, 1);
       
   100     if(KErrNone != error)
       
   101         {
       
   102         ERR_PRINTF2(_L("Setting KMiscPluginPropertyKey with value 1 failed with error %d"), error);
       
   103         User::Leave(error);
       
   104         }
    92     TBool ret = ETrue;
   105     TBool ret = ETrue;
    93     // Print out the parameters for debugging
   106     // Print out the parameters for debugging
    94     INFO_PRINTF2( _L("<font size=3 color=990000><b>aCommand = %S</b></font>"), &aCommand );
   107     INFO_PRINTF2( _L("<font size=3 color=990000><b>aCommand = %S</b></font>"), &aCommand );
    95     INFO_PRINTF3( _L("aSection = %S aAsyncErrorIndex = %D"), &aSection,aAsyncErrorIndex );
   108     INFO_PRINTF3( _L("aSection = %S aAsyncErrorIndex = %D"), &aSection,aAsyncErrorIndex );
    96     TRAPD(err, DoCommandProcessL(aCommand,aSection));
   109     TRAPD(err, DoCommandProcessL(aCommand,aSection));
    97     if(err != KErrNone)
   110     if(err != KErrNone)
    98         {
   111         {
    99         SetError(err);
   112         SetError(err);
   100         ret = EFalse;
   113         ret = EFalse;
   101         }
   114         }
   102     
   115     error = RProperty::Delete(KRFStatusPropertyCategory, KMiscPluginPropertyKey);
       
   116     if(KErrNone != error)
       
   117         {
       
   118         ERR_PRINTF2(_L("Deleting KMiscPluginPropertyKey failed with error %d"), error);
       
   119         User::Leave(error);
       
   120         }
   103     __UHEAP_MARKEND;
   121     __UHEAP_MARKEND;
   104     return ret;
   122     return ret;
   105     }
   123     }
   106 
   124 
   107 /*
   125 /*