localisation/apparchitecture/tef/TSTAPP.CPP
branchSymbian3
changeset 57 b8d18c84f71c
parent 6 c108117318cb
equal deleted inserted replaced
56:aa99f2208aad 57:b8d18c84f71c
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2007-2009 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 the License "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".
     7 //
     7 //
     8 // Initial Contributors:
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
     9 // Nokia Corporation - initial contribution.
    10 //
    10 //
    11 // Contributors:
    11 // Contributors:
    12 //
    12 //
    13 // Description:
    13 // Description:
    14 //
    14 // tstapp.cpp
    15 
    15 //
    16 
       
    17 
    16 
    18 /**
    17 /**
    19  @file
    18  @file tstapp.cpp
    20  @test
    19  @test
    21  @internalComponent - Internal Symbian test code 
    20  @internalComponent - Internal Symbian test code 
    22 */
    21 */
    23 
    22 
    24 #include <e32uid.h>
    23 #include <e32uid.h>
    25 #include <s32std.h>
    24 #include <s32std.h>
    26 #include <s32stor.h>
    25 #include <s32stor.h>
    27 #include <s32file.h>
    26 #include <s32file.h>
    28 #include <apgicnfl.h>
    27 #include <apgicnfl.h>
    29 #include <apfdef.h>
    28 #include "apfdef.h"
    30 #include "tstapp.h"
    29 #include "tstapp.h"
    31 #include <apfdef.h>
       
    32 #include <apgcli.h>
    30 #include <apgcli.h>
    33 
    31 
    34 #include <eikstart.h>
    32 #include <eikstart.h>
    35 #include <ecom.h>
    33 #include <ecom/ecom.h>
    36 #include <implementationproxy.h>
    34 #include <ecom/implementationproxy.h>
    37 
    35 
    38 _LIT(KTestAppCaption, "Test App");
    36 _LIT(KTestAppCaption, "Test App");
    39 _LIT(KTempFilePath, "c:\\system\\temp\\");
    37 _LIT(KTempFilePath, "c:\\system\\temp\\");
    40 _LIT(KTestAppIniFilePath, "c:\\system\\data\\tstapp.ini");
    38 _LIT(KTestAppIniFilePath, "c:\\system\\data\\tstapp.ini");
    41 
    39 
    64 	aTableCount=sizeof(ImplementationTable)/sizeof(ImplementationTable[0]);
    62 	aTableCount=sizeof(ImplementationTable)/sizeof(ImplementationTable[0]);
    65 	return ImplementationTable;
    63 	return ImplementationTable;
    66 	}
    64 	}
    67 
    65 
    68 
    66 
    69 /////////////////////////////////////////
    67 //
    70 // CBasicAppUi
    68 // CBasicAppUi
    71 /////////////////////////////////////////
    69 //
    72 
    70 
    73 void CBasicAppUi::ConstructL()
    71 void CBasicAppUi::ConstructL()
    74 	{
    72 	{
    75 	BaseConstructL(ENoAppResourceFile|ENoScreenFurniture);
    73 	BaseConstructL(ENoAppResourceFile|ENoScreenFurniture);
    76 	}
    74 	}
    77 	
    75 	
    78 /////////////////////////////////////////
    76 //
    79 // CTestApp
    77 // CTestApp
    80 /////////////////////////////////////////
    78 //
    81 
    79 
    82 CTestApp* CTestApp::NewL()
    80 CTestApp* CTestApp::NewL()
    83 // The gated function
    81 // The gated function
    84 //
    82 //
    85 	{
    83 	{
   148 	apaLsSession.GetAppCapability(aInfo, CTestApp::AppDllUid());
   146 	apaLsSession.GetAppCapability(aInfo, CTestApp::AppDllUid());
   149 	apaLsSession.Close();
   147 	apaLsSession.Close();
   150 	}
   148 	}
   151 
   149 
   152 
   150 
   153 /////////////////////////////////////////
   151 //
   154 // CTestAppDoc
   152 // CTestAppDoc
   155 /////////////////////////////////////////
   153 //
   156 
   154 
   157 CTestAppDoc* CTestAppDoc::NewL(CEikApplication& aApp)
   155 CTestAppDoc* CTestAppDoc::NewL(CEikApplication& aApp)
   158 	{
   156 	{
   159 	CTestAppDoc* self=new(ELeave) CTestAppDoc(aApp);
   157 	CTestAppDoc* self=new(ELeave) CTestAppDoc(aApp);
   160 	CleanupStack::PushL(self);
   158 	CleanupStack::PushL(self);
   304 
   302 
   305 	// store main in temp
   303 	// store main in temp
   306 	CStreamDictionary* streamDic=CStreamDictionary::NewL();
   304 	CStreamDictionary* streamDic=CStreamDictionary::NewL();
   307 	CleanupStack::PushL(streamDic);
   305 	CleanupStack::PushL(streamDic);
   308 	StoreL(*store,*streamDic);
   306 	StoreL(*store,*streamDic);
   309 	iStore->CommitL();
   307 	iStore->CommitL();  
   310 
   308 
   311 	// write root stream
   309 	// write root stream
   312 	Process()->WriteRootStreamL(*store,*streamDic,*Application());
   310 	Process()->WriteRootStreamL(*store,*streamDic,*Application());
   313 	CleanupStack::PopAndDestroy(); // streamDic
   311 	CleanupStack::PopAndDestroy(); // streamDic
   314 	// close the new store
   312 	// close the new store