phonebookengines/contactsmodel/tsrc/Integration/TestStartUp/inc/TestStartUpServer.h
changeset 0 e686773b3f54
child 24 0ba2181d7c28
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     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 #ifndef __TESTSTARTUPSERVER_H__
       
    21 #define __TESTSTARTUPSERVER_H__
       
    22 
       
    23 #include <test/testexecutestepbase.h>
       
    24 #include <e32base.h>
       
    25 #include <cntviewbase.h>
       
    26 #include <cntviewstore.h>
       
    27 #include <centralrepository.h>
       
    28 #include <test/testexecuteserverbase.h>
       
    29 
       
    30 #include <cntdb.h>
       
    31 #include <cntitem.h>
       
    32 #include <cntfield.h>
       
    33 #include <cntfldst.h>
       
    34 
       
    35 const TInt KMaxTagLen = 255;
       
    36 
       
    37 //Test Step Names used in script files
       
    38 _LIT(KTestGetSetViewSettingStep, "TestGetSetViewSettingStep");
       
    39 _LIT(KTestStartUpExeStep,        "TestStartUpExeStep");
       
    40 _LIT(KTestTermStartUpExeStep,    "TestTermStart");
       
    41 _LIT(KTestContactsDbStep,        "TestCntsDbStep");
       
    42 
       
    43 //Default View settings and API actions
       
    44 _LIT(KApiActionTag,              "ApiAction");
       
    45 _LIT(KApiGet,                    "GetDefaultViewSettings");
       
    46 _LIT(KApiSet,                    "SetNewDefaultViewSettings");
       
    47 _LIT(KApiAppend,                 "AppendNewViewSetting");
       
    48 _LIT(KApiDelete,                 "DeleteViewSettings");
       
    49 _LIT(KApiOOMGet,                 "OutOfMemoryTestsForGetAPI");
       
    50 _LIT(KApiOOMSet,                 "OutOfMemoryTestsForSetAPI");
       
    51 _LIT(KNoOfViewsTag,              "NumberofViews");
       
    52 _LIT(KViewNameTag,               "ViewName");
       
    53 _LIT(KViewPreferanceTag,         "ViewPreferance");
       
    54 _LIT(KViewTypeTag,               "ViewType");
       
    55 _LIT(KFirstSortOrderTag,         "FirstViewSortOrder");
       
    56 _LIT(KSecondSortOrderTag,        "SecondViewSortOrder");
       
    57 _LIT(KThirdSortOrderTag,         "ThirdViewSortOrder");
       
    58 _LIT(KPluginNameTag,             "SortPluginName");
       
    59 
       
    60 //Contacts server startup and process control
       
    61 _LIT(KStartupActionTag,          "StartupAction");
       
    62 _LIT(KLaunch,                    "LaunchProcess");
       
    63 _LIT(KTerminate,                 "TerminateProcess");
       
    64 _LIT(KCheck,                     "CheckProcess");
       
    65 _LIT(KStartupnameTag,            "StartupExeName");
       
    66 _LIT(KExitTypeTag,               "StartUpExitType");
       
    67 _LIT(KExitReasonTag,             "StartUpExitReason");
       
    68 _LIT(KModeTag,                   "Mode");
       
    69 
       
    70 //Contacts database actions
       
    71 _LIT(KCntDbActionTag,            "ContactsDbAction");
       
    72 _LIT(KCreateDb,                  "CreateDefCntsDb");
       
    73 _LIT(KOpenDb,                    "OpenDefCntsDb");
       
    74 _LIT(KReplaceDb,                 "ReplaceDefCntsDb");
       
    75 _LIT(KAddItemsDb,                "AddItemstoCntsDb");
       
    76 _LIT(KDeleteDb,                  "DeleteDefCntsDb");
       
    77 _LIT(KCheckCntViewDefs,          "CheckExistingViewDefsInCntsServer");
       
    78 _LIT(KNoOfCntsTag,               "NumberOfContacts");
       
    79 
       
    80 class CTestStartUpServer : public CTestServer
       
    81 	{
       
    82 public:
       
    83 	static CTestStartUpServer* NewL();
       
    84 	virtual CTestStep* CreateTestStep(const TDesC& aStepName);
       
    85     inline RFs& Fs();
       
    86      
       
    87     TInt LaunchCntsStartUpExe(TPtrC aStartUpExeName, TPtrC aServerMode);
       
    88     void TermCntsStartUpExe();
       
    89     TBool CheckCntsStartUpExe(TExitType aExitTypeFromIni, TInt aExitReasonFromIni);
       
    90 
       
    91 private:
       
    92 	RFs iFs;
       
    93 	RProcess iStartUpProcess;
       
    94 	};
       
    95 	
       
    96 
       
    97 inline RFs& CTestStartUpServer::Fs()
       
    98     {
       
    99     return iFs;
       
   100     }
       
   101 
       
   102 #endif