buildverification/autosmoketest/agenda/Inc/TestAgendaBase.h
branchGCC_SURGE
changeset 17 03d9ade4748d
parent 14 5d7fec11a5ce
parent 15 5b5908ec640f
equal deleted inserted replaced
14:5d7fec11a5ce 17:03d9ade4748d
     1 // Copyright (c) 2004-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:
       
    14 // This contains CTestAgendaBase which is the base class for all
       
    15 // the Psd Agx suite test steps
       
    16 // 
       
    17 //
       
    18 
       
    19 #ifndef TEST_AGENDA_BASE_H
       
    20 #define TEST_AGENDA_BASE_H
       
    21 
       
    22 #include <test/testexecutestepbase.h>
       
    23 #include <calentryview.h>
       
    24 #include <gdi.h>
       
    25 
       
    26 
       
    27 
       
    28 //forward declarations
       
    29 class CCalSession;
       
    30 
       
    31 #define KMaxDateStringLength	30
       
    32 #define KMaxTimeStringLength	30
       
    33 
       
    34 #define KMaxDateStringLength	30
       
    35 #define KMaxTimeStringLength	30
       
    36 
       
    37 class CTestAgendaPicture :public MPictureFactory
       
    38 /**
       
    39 *  Picture class for the agenda model
       
    40 */
       
    41 {
       
    42 /**************************************************************
       
    43 * An object of this class is used for setting the picture factory
       
    44 * of an Agenda model, although our code does not use any of the
       
    45 * functionality provided by this class, it is created with empty
       
    46 * implementation and set to satisfy the compiler as it uses
       
    47 * an assert macro to check if this object is set before saving
       
    48 * the agenda model entries into a file
       
    49 *************************************************************/
       
    50 
       
    51 public:
       
    52 	CTestAgendaPicture();
       
    53 	virtual ~CTestAgendaPicture();
       
    54 	virtual void NewPictureL(TPictureHeader& aHeader,const CStreamStore& aDeferredPictureStore)const;
       
    55 };
       
    56 
       
    57 
       
    58 class CTestAgendaBase : public CTestStep
       
    59 {
       
    60 public:
       
    61 	CTestAgendaBase();
       
    62 	~CTestAgendaBase();
       
    63 
       
    64 	virtual enum TVerdict	doTestStepPreambleL();
       
    65 	virtual enum TVerdict	doTestStepPostambleL();
       
    66 
       
    67 	CCalSession& CTestAgendaBase::CalSession();
       
    68 	void SetCalEntryView(CCalEntryView* calEntryViewPtr);
       
    69 
       
    70 protected:
       
    71 	void	CreateDatabaseL();
       
    72 	void	OpenDatabaseL();
       
    73 	void	CleanupDatabase();
       
    74 
       
    75 private:
       
    76 	CActiveScheduler*	iSchedular;
       
    77 	TBool				iEnteredBlocked;
       
    78 	TBool				iExitedBlocked;
       
    79 
       
    80 protected:
       
    81     RFs					iFs;
       
    82 	TBool				iSessionConnected;
       
    83 	CCalEntryView*      iCalEntryViewBase;
       
    84 	/**
       
    85 	To store the models entries
       
    86 	*/
       
    87 	CFileStore*			iStore;
       
    88 	CCalSession*        iCalSession;
       
    89 };
       
    90 
       
    91 #endif /* TEST_AGENDA_BASE_H */