sysstatemgmt/systemstatemgr/test/tcmn/inc/t_ssmstatemanager.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 // Copyright (c) 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:Wrapper for Testing RSsmStateManager class.
       
    14 //
       
    15 //
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @test
       
    21  @internalComponent - Internal Symbian test code
       
    22 */
       
    23 
       
    24 
       
    25 #ifndef __T_SSMSTATEMANAGER_H__
       
    26 #define __T_SSMSTATEMANAGER_H__
       
    27 
       
    28 #include <ssm/ssmstatemanager.h>
       
    29 #include <ssm/ssmstateawaresession.h>
       
    30 
       
    31 #include <test/testexecutestepbase.h>
       
    32 #include <test/datawrapper.h>
       
    33 
       
    34 class CTestRSsmStateManager : public CDataWrapper
       
    35     {
       
    36 public:
       
    37     static CTestRSsmStateManager* NewL();
       
    38     ~CTestRSsmStateManager();
       
    39 
       
    40     TBool DoCommandL(const TTEFFunction& aCommand, const TTEFSectionName& aSection, const TInt aAsyncErrorIndex);
       
    41 
       
    42     TAny* GetObject();
       
    43     void  SetObjectL(TAny* aAny);
       
    44     void  DisownObjectL();    
       
    45     
       
    46     void DoCmdNew();
       
    47     void DoCmdDestructor();
       
    48     void DoCmdConnect();
       
    49     void DoCmdRequestStateTransition(const TDesC& aSection, const TInt aAsyncErrorIndex);
       
    50     void DoCmdRequestStateTransitionCancel();
       
    51     void DoCmdClose();    
       
    52     
       
    53     //helper
       
    54     void DoCleanup();
       
    55     TBool MapToMainState( TPtrC& aGetMainState, TUint16& aMainState );
       
    56     TBool MapToSubState( TPtrC& aGetSubState, TUint16& aSubState );
       
    57 
       
    58 protected:
       
    59     CTestRSsmStateManager();
       
    60     void ConstructL();
       
    61 
       
    62     void RunL(CActive* aActive, TInt aIndex);
       
    63     void DoCancel(CActive* aActive, TInt aIndex);
       
    64 
       
    65 private:
       
    66     RSsmStateManager* iSsmStateManager;
       
    67     CActiveCallback* iActiveNotifyOnChange;
       
    68     };
       
    69 
       
    70 #endif // __T_SSMSTATEMANAGER_H__