testfws/testexecmdw/tef/scriptengine/inc/scriptengine.inl
changeset 2 73b88125830c
equal deleted inserted replaced
1:6edeef394eb7 2:73b88125830c
       
     1 /*
       
     2 * Copyright (c) 2005-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: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 inline CConsoleBase& RConsoleLogger::Console() const
       
    22 	{return iConsole;}
       
    23 
       
    24 ///////
       
    25 
       
    26 inline RScriptTestServ::RScriptTestServ() : iSharedData(EFalse), iSessionCount(0)
       
    27 	{}
       
    28 
       
    29 inline TBool RScriptTestServ::SharedData() const
       
    30 	{return iSharedData;}
       
    31 
       
    32 inline TInt RScriptTestServ::SessionCount() const
       
    33 	{return iSessionCount;}
       
    34 
       
    35 inline void RScriptTestServ::AddSession()
       
    36 	{iSessionCount++;}
       
    37 
       
    38 inline void RScriptTestServ::RemoveSession()
       
    39 	{iSessionCount--;}
       
    40 
       
    41 ///////
       
    42 
       
    43 inline void RScriptTestSession::Close()
       
    44 	{
       
    45 	iServ->RemoveSession();
       
    46 	RTestSession::Close();
       
    47 	}
       
    48 
       
    49 ///////
       
    50 
       
    51 inline CActiveBase::CActiveBase() : CActive(EPriorityStandard)
       
    52 	{CActiveScheduler::Add(this);}
       
    53 
       
    54 /**
       
    55  * Abstract class methods for priming, kicking and completing active objects. 
       
    56  */
       
    57 inline void CActiveBase::Kick()
       
    58 /**
       
    59  * Self Kick an active object into its RunL()
       
    60  */
       
    61 	{
       
    62 	Prime();
       
    63 	Complete(KErrNone);
       
    64 	}
       
    65 
       
    66 inline void CActiveBase::Prime()
       
    67 /**
       
    68  * Self Prime an Active Object for completion
       
    69  */
       
    70 	{
       
    71 	iStatus = KRequestPending;
       
    72 	if(!IsActive())
       
    73 		SetActive();
       
    74 	}
       
    75 
       
    76 inline void CActiveBase::Complete(TInt aErr)
       
    77 /**
       
    78  * @param aErr - Error code to complete the Active Object 
       
    79  *
       
    80  * Self Complete an Active Object 
       
    81  */
       
    82 	{
       
    83 	TRequestStatus* status = &iStatus;
       
    84 	User::RequestComplete(status,aErr);
       
    85 	}
       
    86 
       
    87 
       
    88 inline CActiveBase::~CActiveBase()
       
    89 	{}
       
    90 
       
    91 ///////
       
    92 inline void CScriptActive::ChildCompletion(TInt aErr)
       
    93 /**
       
    94  * @param aErr - Error code to complete the Active Object
       
    95  * @param aChild - Child object whose work is done
       
    96  * Callback from the child.
       
    97  * Self complete.
       
    98  */
       
    99 	{
       
   100 	Complete(aErr);
       
   101 	}
       
   102 
       
   103 inline CScriptActive::~CScriptActive()
       
   104 	{}
       
   105 
       
   106 inline CScriptActive::CScriptActive()
       
   107 	{}
       
   108 
       
   109 ///////
       
   110 
       
   111 inline CTestExecuteLogger& CScriptMaster::Logger() const
       
   112 	{return iLogger;}
       
   113 
       
   114 inline RConsoleLogger& CScriptMaster::ConsoleLogger() const
       
   115 	{return iConsoleLogger;}
       
   116 
       
   117 inline void CScriptMaster::DoCancel()
       
   118 	{}
       
   119 
       
   120 ///////
       
   121 inline CTestExecuteLogger& CScriptControl::Logger() const
       
   122 	{return iLogger;}
       
   123 
       
   124 inline RConsoleLogger& CScriptControl::ConsoleLogger() const
       
   125 	{return iConsoleLogger;}
       
   126 
       
   127 inline void CScriptControl::DoCancel()
       
   128 	{}
       
   129 
       
   130 ///////
       
   131 
       
   132 inline void CTaskTimer::ConstructL()
       
   133 	{CTimer::ConstructL();}
       
   134 
       
   135 ///////
       
   136 
       
   137 inline const CTestExecuteLogger& CTaskControlBase::Logger() const
       
   138 	{return iLogger;}
       
   139 
       
   140 inline void CTaskControlBase::SetTaskComplete(TBool aTaskCanComplete)
       
   141 	{
       
   142 	iTaskCanComplete = aTaskCanComplete;
       
   143 	}
       
   144 
       
   145 ///////
       
   146 
       
   147 void CClientControl::DoCancel()
       
   148 	{}
       
   149 
       
   150 ///////
       
   151 
       
   152 void CProgramControl::DoCancel()
       
   153 	{}
       
   154 
       
   155 ///////
       
   156