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