calendarengines/caldav/inc/CalDavTest.h
branchRCL_3
changeset 87 6d3f83773253
parent 74 97232defd20e
equal deleted inserted replaced
86:ed599363c2d7 87:6d3f83773253
       
     1 /*
       
     2 * Copyright (c) 2010 Sun Microsystems, Inc. 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 Contributor:
       
    10 * Maximilian Odendahl
       
    11 *
       
    12 * Contributors:
       
    13 * 
       
    14 * Description: Caldav Test Suite
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef __CALDAVTEST_H__
       
    19 #define __CALDAVTEST_H__
       
    20 
       
    21 //  Include Files
       
    22 
       
    23 #include <e32base.h>
       
    24 #include <e32cons.h>			// Console
       
    25 #include <flogger.h>	
       
    26 
       
    27 class CCalDavEngine;
       
    28 class CCalDavSession;
       
    29 
       
    30 class CalDavTest
       
    31 	{
       
    32 public:
       
    33 	CalDavTest(CConsoleBase* console);
       
    34 	~CalDavTest();
       
    35 
       
    36 	void TestGeneralEngineL();
       
    37 	void TestEngineL(TInt aSucces, const TDesC8 &aUrl, const TDesC8 &aUser,
       
    38 			const TDesC8 &aPassword, TBool aWebdavsync, TBool aCtag,
       
    39 			TBool aEvent, TBool aTodo, TBool aFreeBusy, TBool aJournal);
       
    40 	void TestClientServerL(TInt aSucces, const TDesC8 &aUrl,
       
    41 			const TDesC8 &aUser, const TDesC8 &aPassword);
       
    42 private:
       
    43 	// test client server
       
    44 
       
    45 	TInt ConfigureSessionL(TInt aSucces, const TDesC8 &aUrl,
       
    46 			const TDesC8 &aUser, const TDesC8 &aPassword);
       
    47 	void OptionSession();
       
    48 
       
    49 	void Enabled(TBool aEnabled);
       
    50 
       
    51 	// test engine
       
    52 	TInt EnableL(TInt aSucces, const TDesC8 &aUrl, const TDesC8 &aUser,
       
    53 			const TDesC8 &aPassword);
       
    54 	// use caldav engine
       
    55 	void SendL(const unsigned long localuid);
       
    56 	// use http call
       
    57 	void SendL(TBool aVEvent);
       
    58 
       
    59 	void DownloadLGetL(const unsigned long localuid);
       
    60 	void DownloadLMultiGetL(const unsigned long localuid);
       
    61 
       
    62 	// use http call
       
    63 	void DeleteServerL();
       
    64 	// use caldav engine
       
    65 	void DeleteServerL(const unsigned long localuid);
       
    66 	void DeleteClientL(const TDesC8 &aUid);
       
    67 
       
    68 	void HeadL(TBool aExists, const TDesC8 &aUid);
       
    69 	void OptionsL();
       
    70 	void SyncL();
       
    71 	void DoesExistL(TBool aExists, const unsigned long localuid);
       
    72 	void DoesExistL(TBool aExists, const TDesC8 &aUID);
       
    73 	void CTagL(TBool aEqual);
       
    74 	void SynctokenL(TBool aEqual);
       
    75 
       
    76 	void MkCalendarL(TBool aSuccess, const TDesC8 &aName);
       
    77 	void DeleteCalendarL(const TDesC8 &aName);
       
    78 
       
    79 	void CalendarInfoL();
       
    80 	void GetUIDByUrl();
       
    81 	void GetBaseUrl();
       
    82 
       
    83 	void Write(const TDesC &aMessage);
       
    84 	void Write(TBool aSuccess, const char* aMessage);
       
    85 	void Write(TBool aSuccess, const TDesC &aMessage);
       
    86 
       
    87 	TBool iWebdavSync;
       
    88 	TBool iCtag;
       
    89 
       
    90 	TBool iVEVENT;
       
    91 	TBool iVTODO;
       
    92 	TBool iVJOURNAL;
       
    93 	TBool iVFREEBUSY;
       
    94 
       
    95 	CCalDavEngine* iEngine;
       
    96 	CCalDavSession* iSession;
       
    97 	CConsoleBase* iConsole;
       
    98 	RFileLogger iFileLogger;
       
    99 	};
       
   100 
       
   101 GLDEF_C TInt E32Main();
       
   102 
       
   103 #endif  // __CALDAVTEST_H__