calendarengines/caldav/inc/caldavengine.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: main Caldav class, all magic happens here
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 _CALSTORE_H
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    19
#define _CALSTORE_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 <e32base.h>
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    22
#include <BADESCA.H>
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    23
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    24
#include <calchangecallback.h>
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    25
#include <calprogresscallback.h>
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    26
#include <calfilechangenotification.h>
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    27
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    28
#include <xmlengdomimplementation.h>
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    29
#include <xmlengdomparser.h>
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    30
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    31
#include "caldavutils.h"
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    32
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    33
class CCalSession;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    34
class CCalEntry;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    35
class CCalIter;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    36
class CCalEntryView;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    37
class CCalenExporter;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    38
class CCalenImporter;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    39
class CCalenInterimUtils2;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    40
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    41
class RXmlEngDOMImplementation;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    42
class RXmlEngDOMParser;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    43
class RXmlEngDocument;
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
class CHttpClient;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    46
class CalDavTest;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    47
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    48
// sync interval of 0 correspons to one minute
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    49
// 0 actually means to enable push connectivity once supported
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    50
#define DEFAULT_SYNC_MINUTES 		0
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    51
#define DEFAULT_PAST_DAYS			14
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    52
#define DEFAULT_IMMEDIATE_SYNC		ETrue
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    53
#define DEFAULT_KEEP_SERVER_ENTRY	EFalse
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    54
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    55
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    56
enum TLocalLoopAction
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    57
	{
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    58
		ELoopActionUpload, ELoopActionFillArray, ELoopActionDeleteLocal
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    59
	};
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    60
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
 *  CCalDavEngine
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    63
 * 
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    64
 */
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    65
class CCalDavEngine : public CBase, MCalProgressCallBack, MCalChangeCallBack2, MCalFileChangeObserver
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    66
	{
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    67
public:
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    68
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    69
	friend class CalDavTest;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    70
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    71
	~CCalDavEngine();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    72
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    73
	static CCalDavEngine* NewL(const TDesC& aCalendar);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    74
	static CCalDavEngine* NewLC(const TDesC& aCalendar);
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
	TInt EnableL();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    77
	void DisableL();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    78
	TBool EnabledSync();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    79
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    80
	TInt SyncL();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    81
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    82
	TInt MkcalendarL(const TDesC8 &aName);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    83
	TInt DeleteCalendarL(const TDesC8 &aName);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    84
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    85
	TPtrC CalendarName() const;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    86
	TPtrC8 Home() const;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    87
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    88
	TPtrC8 Url() const;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    89
	void SetUrlL(const TDesC8 &aUrl);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    90
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    91
	TPtrC8 User() const;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    92
	void SetUserL(const TDesC8 &aUser);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    93
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    94
	TPtrC8 Password() const;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    95
	void SetPasswordL(const TDesC8 &aPassword);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    96
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    97
	TTimeIntervalMinutes SyncInterval() const;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
    98
	void SetSyncIntervalL(TTimeIntervalMinutes aSyncInterval);
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
	TTimeIntervalDays PastDays() const;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   101
	void SetPastDaysL(TTimeIntervalDays aDays);
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
	TBool ImmediateSync() const;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   104
	void SetImmediateSyncL(TBool aImmediateSyc);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   105
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   106
	TBool KeepServerEntry() const;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   107
	void SetKeepServerEntryL(TBool aKeepServerEntry);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   108
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   109
	CPeriodic* Timer();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   110
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   111
	TPtrC8 SyncToken();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   112
	TPtrC8 CTag();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   113
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   114
private:
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   115
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   116
	CCalDavEngine();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   117
	void ConstructL(const TDesC& aCalendar);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   118
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   119
	void RegisterL();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   120
	HBufC8* GetCTagL();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   121
	HBufC8* GetSyncTokenL();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   122
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   123
	TInt InitL();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   124
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   125
	// Called during calendar entry view creation
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   126
	void Progress(TInt aPercentageCompleted);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   127
	void Completed(TInt aError);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   128
	TBool NotifyProgress();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   129
	void CalChangeNotification(RArray<TCalChangeEntry> &aChangeItems);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   130
	void CalendarInfoChangeNotificationL(RPointerArray<CCalFileChangeInfo>& aCalendarInfoChangeEntries);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   131
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   132
	void CalendarInfoL();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   133
	void SetCalendarInfoL(const TDesC8 &aKey, const TDesC8 &aValue);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   134
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   135
	void HandleCalendarInfoChangeL();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   136
	void HandleChangeL(MCalChangeCallBack2::TChangeType &aChangeType,
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   137
			MCalChangeCallBack2::TChangeEntryType &aEntryType,
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   138
			TCalLocalUid &aUid);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   139
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   140
	TBool ManualSyncL();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   141
	TBool WebDavSyncL();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   142
	TInt WebDavSyncReportL(TBool aSynctoken);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   143
	TBool UploadModifiedSinceDateL();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   144
	TBool ClientChangesL();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   145
	TBool ServerChangesL();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   146
	TInt DeleteRemovedEntriesOnServerL();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   147
	TInt LocalLoopL(TLocalLoopAction aAction);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   148
	
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   149
	TInt ListL();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   150
	TInt TimeReportL(TBool VEVENT, const TDesC8 &aStart, TBool aDelete = EFalse);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   151
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   152
	// server actions
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   153
	TInt UploadEntryL(const TCalLocalUid &aUid,
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   154
			MCalChangeCallBack2::TChangeType aChangeType,
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   155
			MCalChangeCallBack2::TChangeEntryType aEntryType);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   156
	TInt UploadEntryL(CCalEntry* aEntry,
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   157
			MCalChangeCallBack2::TChangeType aChangeType,
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   158
			MCalChangeCallBack2::TChangeEntryType aEntryType);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   159
	TInt DownloadEntryL(const TDesC8 &aUrl);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   160
	TInt DownloadEntryL(CDesC8Array* aArray);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   161
	TInt DeleteEntryL(const TCalLocalUid &aUid);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   162
	TInt DeleteEntryL(const TDesC8 &aUid);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   163
	TInt HeadL(const TDesC8 &aUID);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   164
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   165
	// local actions
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   166
	TInt AddModifyLocalEntryL(const TDesC8 &aUrl, const TDesC8 &aETag,
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   167
			CDesC8ArrayFlat* aArray);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   168
	TInt DeleteLocalEntryL(const TDesC8 &aUID);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   169
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   170
	TInt ParseResponsesDeleteL(const TDesC8 &aDocument);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   171
	TInt ParseResponsesL(RXmlEngDocument &aDocument, TBool aMultiget = EFalse);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   172
	TInt ParseResponsesL(const TDesC8 &aDocument, TBool aMultiget = EFalse);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   173
	
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   174
	unsigned long DoesEntryExistL(const TDesC8 &aUrl);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   175
	TPtrC8 GetUIDByUrl(const TDesC8 &aUrl);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   176
	TBool ETagMatchL(const TDesC8& aUrl, const TDesC8& aETag);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   177
	TInt StoreEntryL(const TDesC8 &aBuf, const TDesC8 &aEtag);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   178
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   179
	void SyncFailedL();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   180
	void SetLastSyncTimeL();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   181
	void SetSyncTokenL(HBufC8* aToken);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   182
	void SetCTagL(HBufC8* aToken);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   183
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   184
	void CheckCalendarInfoL(RXmlEngDocument &aDocument);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   185
	
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   186
	TBool GetOptionsL();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   187
	TInt GetCalendarUrlsL(CDesC8ArrayFlat *aArray);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   188
	void FindUrlsL(const TDesC8 &aDes, HBufC8 *&home, HBufC8 *&inbox,
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   189
			HBufC8 *&outbox);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   190
	void GetBaseUrl(const TDesC8 &aUrl);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   191
	HBufC8 * FindCalendarCollectionL(const TDesC8 &aUrl,
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   192
			CDesC8ArrayFlat *aArray);
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   193
	
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   194
	void DeleteCalObjects();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   195
	TInt CreateCalObjectsL();
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   196
	
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   197
	CCalSession* iCalSession;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   198
	CCalIter* iCalIter;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   199
	CCalEntryView* iCalEntryView;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   200
	CCalenExporter* iCalExporter;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   201
	CCalenImporter* iCalImporter;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   202
	CCalenInterimUtils2* iCalIntermimUtils2;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   203
	HBufC *iCalendar;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   204
	HBufC8 *iUrl;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   205
	HBufC8 *iBaseUrl;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   206
	HBufC8 *iHome;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   207
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   208
	TCalDAVOptions iOptions;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   209
	CHttpClient* iHttp;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   210
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   211
	RXmlEngDOMImplementation iDomImpl;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   212
	RXmlEngDOMParser iDomParser;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   213
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   214
	// when we get a callback with a localuid, the corresponding entry is already deleted
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   215
	// we therefore need a different way to map from localuid to global uid/filename
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   216
	// this can be completly removed when introducing a new callback,
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   217
	// which includes the to be deleted localuid
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   218
	RArray<TCalLocalUid> iLocalUidArray;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   219
	RArray<TBuf8<100> > iGlobalUidArray;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   220
	//
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   221
	RArray<TCalLocalUid> iDeletedEntries;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   222
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   223
	HBufC8 *iSynctoken;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   224
	HBufC8 *iCTag;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   225
	TBool iManualSync;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   226
	TCalTime iLastSyncTime;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   227
	TBool iFirstInit;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   228
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   229
	// Options
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   230
	TTimeIntervalMinutes iSyncInterval;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   231
	TTimeIntervalDays iPastDays;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   232
	TBool iImmediateSync;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   233
	TBool iKeepServerEntry;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   234
	TBool iEnabled;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   235
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   236
	CPeriodic* iTimer;
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   237
	};
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   238
4927282092b4 Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff changeset
   239
#endif // CALSTORE_H