calendarengines/caldav/inc/CalDavTest.h
author Maximilian Odendahl <maximilian.odendahl@sun.com>
Fri, 05 Feb 2010 10:16:42 +0100
changeset 1 4927282092b4
child 6 5a04f2ceabfe
permissions -rw-r--r--
Bug 208: inital CalDAV support for Symbian
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
     1
/*
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
     2
* Copyright (c) 2010 Sun Microsystems, Inc. and/or its subsidiary(-ies).
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
     3
* All rights reserved.
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
     8
*
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
     9
* Initial Contributor:
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    10
* Maximilian Odendahl
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    11
*
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    12
* Contributors:
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    13
* 
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    14
* Description: Caldav Test Suite
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    15
*
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    16
*/
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    17
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    18
#ifndef __CALDAVTEST_H__
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    19
#define __CALDAVTEST_H__
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    20
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    21
//  Include Files
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    22
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    23
#include <e32base.h>
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    24
#include <e32cons.h>			// Console
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    25
#include <flogger.h>	
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    26
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    27
class CCalDavEngine;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    28
class CCalDavSession;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    29
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    30
class CalDavTest
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    31
	{
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    32
public:
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    33
	CalDavTest(CConsoleBase* console);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    34
	~CalDavTest();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    35
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    36
	void TestGeneralEngineL();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    37
	void TestEngineL(TInt aSucces, const TDesC8 &aUrl, const TDesC8 &aUser,
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    38
			const TDesC8 &aPassword, TBool aWebdavsync, TBool aCtag,
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    39
			TBool aEvent, TBool aTodo, TBool aFreeBusy, TBool aJournal);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    40
	void TestClientServerL(TInt aSucces, const TDesC8 &aUrl,
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    41
			const TDesC8 &aUser, const TDesC8 &aPassword);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    42
private:
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    43
	// test client server
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    44
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    45
	TInt ConfigureSessionL(TInt aSucces, const TDesC8 &aUrl,
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    46
			const TDesC8 &aUser, const TDesC8 &aPassword);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    47
	void OptionSession();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    48
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    49
	void Enabled(TBool aEnabled);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    50
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    51
	// test engine
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    52
	TInt EnableL(TInt aSucces, const TDesC8 &aUrl, const TDesC8 &aUser,
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    53
			const TDesC8 &aPassword);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    54
	// use caldav engine
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    55
	void SendL(const unsigned long localuid);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    56
	// use http call
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    57
	void SendL(TBool aVEvent);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    58
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    59
	void DownloadLGetL(const unsigned long localuid);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    60
	void DownloadLMultiGetL(const unsigned long localuid);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    61
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    62
	// use http call
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    63
	void DeleteServerL();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    64
	// use caldav engine
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    65
	void DeleteServerL(const unsigned long localuid);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    66
	void DeleteClientL(const TDesC8 &aUid);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    67
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    68
	void HeadL(TBool aExists, const TDesC8 &aUid);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    69
	void OptionsL();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    70
	void SyncL();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    71
	void DoesExistL(TBool aExists, const unsigned long localuid);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    72
	void DoesExistL(TBool aExists, const TDesC8 &aUID);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    73
	void CTagL(TBool aEqual);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    74
	void SynctokenL(TBool aEqual);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    75
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    76
	void MkCalendarL(TBool aSuccess, const TDesC8 &aName);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    77
	void DeleteCalendarL(const TDesC8 &aName);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    78
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    79
	void CalendarInfoL();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    80
	void GetUIDByUrl();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    81
	void GetBaseUrl();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    82
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    83
	void Write(const TDesC &aMessage);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    84
	void Write(TBool aSuccess, const char* aMessage);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    85
	void Write(TBool aSuccess, const TDesC &aMessage);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    86
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    87
	TBool iWebdavSync;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    88
	TBool iCtag;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    89
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    90
	TBool iVEVENT;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    91
	TBool iVTODO;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    92
	TBool iVJOURNAL;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    93
	TBool iVFREEBUSY;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    94
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    95
	CCalDavEngine* iEngine;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    96
	CCalDavSession* iSession;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    97
	CConsoleBase* iConsole;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    98
	RFileLogger iFileLogger;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    99
	};
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   100
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   101
GLDEF_C TInt E32Main();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   102
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   103
#endif  // __CALDAVTEST_H__