uiacceltk/hitchcock/coretoolkit/inc/huistatictlsdata.h
branchRCL_3
changeset 10 88b23e2e82e1
parent 0 15bf7259bb7c
child 31 1b6909418757
equal deleted inserted replaced
8:10534483575f 10:88b23e2e82e1
    20 
    20 
    21 #ifndef __HUISTATICTLSDATA_H__
    21 #ifndef __HUISTATICTLSDATA_H__
    22 #define __HUISTATICTLSDATA_H__
    22 #define __HUISTATICTLSDATA_H__
    23 
    23 
    24 
    24 
       
    25 // For testing purposes, insert additional test data into TLS.
       
    26 // Notice, that TTlsData object is inserted into TLS. So, test
       
    27 // object needs to be added into TTLSData and not inserted directly
       
    28 // into TLS.
       
    29 #define AMT_CONTROL() static_cast<TTlsData*>(Dll::Tls())->iAlfModuleTestDataControl
       
    30 #include "alfmoduletest.h"
       
    31 
       
    32 
    25 LOCAL_D const TInt KMaxClocks = 10;
    33 LOCAL_D const TInt KMaxClocks = 10;
    26 
    34 
    27 
    35 
    28 class TFakeProbe;
    36 class TFakeProbe;
    29 class CAppFwProxy;
    37 class CAppFwProxy;
   107     RPointerArray<RWindowGroup> iWindowGroups;
   115     RPointerArray<RWindowGroup> iWindowGroups;
   108     RPointerArray<CWsScreenDevice> iScreenDevices;    
   116     RPointerArray<CWsScreenDevice> iScreenDevices;    
   109     RFs* iFs;
   117     RFs* iFs;
   110     
   118     
   111     CAppFwProxy* iAppFwProxy;
   119     CAppFwProxy* iAppFwProxy;
   112    
   120 
       
   121 #ifdef USE_MODULE_TEST_HOOKS_FOR_ALF
       
   122     // For testing purposes, test data needs to be included into TLS object.
       
   123     CAlfModuleTestDataControl* iAlfModuleTestDataControl;
       
   124 #endif
       
   125 
   113     CWsScreenDevice* WsScreenDevice(TInt aScreenNumber)
   126     CWsScreenDevice* WsScreenDevice(TInt aScreenNumber)
   114         {
   127         {
   115         if (aScreenNumber < iScreenDevices.Count())
   128         if (aScreenNumber < iScreenDevices.Count())
   116             {
   129             {
   117             return iScreenDevices[aScreenNumber];
   130             return iScreenDevices[aScreenNumber];
   136         {  
   149         {  
   137         }
   150         }
   138                 
   151                 
   139      void DoInitL()
   152      void DoInitL()
   140         {
   153         {
       
   154 #ifdef USE_MODULE_TEST_HOOKS_FOR_ALF
       
   155     // For testing purposes, test data needs to be included into TTlsData object because
       
   156     // TTlsData object itself is inserted into TLS.
       
   157     iAlfModuleTestDataControl = new(ELeave) CAlfModuleTestDataControl();
       
   158     User::LeaveIfError( iAlfModuleTestDataControl->OpenGlobalObjects() );
       
   159 #endif
       
   160 
   141         CCoeEnv* coe = CCoeEnv::Static();
   161         CCoeEnv* coe = CCoeEnv::Static();
   142         if (coe)
   162         if (coe)
   143             {
   163             {
   144             iWsSession = &coe->WsSession();
   164             iWsSession = &coe->WsSession();
   145             iFs = &coe->FsSession();
   165             iFs = &coe->FsSession();
   204             iFs->Close();        
   224             iFs->Close();        
   205         delete iFs;
   225         delete iFs;
   206         iFs = 0;
   226         iFs = 0;
   207 
   227 
   208         RFbsSession::Disconnect();
   228         RFbsSession::Disconnect();
       
   229         
       
   230 #ifdef USE_MODULE_TEST_HOOKS_FOR_ALF
       
   231         delete iAlfModuleTestDataControl;
       
   232         iAlfModuleTestDataControl = NULL;
       
   233 #endif        
   209         }
   234         }
   210     };
   235     };
   211 
   236 
   212 
   237 
   213 #endif
   238 #endif