epoc32/include/caldavsession.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@4
     1
/*
williamr@4
     2
* Copyright (c) 2010 Sun Microsystems, Inc. and/or its subsidiary(-ies).
williamr@4
     3
* All rights reserved.
williamr@4
     4
* This component and the accompanying materials are made available
williamr@4
     5
* under the terms of "Eclipse Public License v1.0"
williamr@4
     6
* which accompanies this distribution, and is available
williamr@4
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@4
     8
*
williamr@4
     9
* Initial Contributor:
williamr@4
    10
* Maximilian Odendahl
williamr@4
    11
*
williamr@4
    12
* Contributors:
williamr@4
    13
* 
williamr@4
    14
* Description: 	Client API to connect to Caldav server
williamr@4
    15
*				Wrapper around RCalDavServer
williamr@4
    16
*/
williamr@4
    17
williamr@4
    18
#ifndef CCALDAVSESSION_H
williamr@4
    19
#define CCALDAVSESSION_H
williamr@4
    20
williamr@4
    21
// INCLUDES
williamr@4
    22
#include <e32std.h>
williamr@4
    23
#include <e32base.h>
williamr@4
    24
williamr@4
    25
class CCalDavSessionImpl;
williamr@4
    26
williamr@4
    27
/**
williamr@4
    28
 * @class CCalenCustomisation 
williamr@4
    29
 * @brief Client API to connect to the CalDAV server.
williamr@4
    30
 */
williamr@4
    31
NONSHARABLE_CLASS( CCalDavSession ) : public CBase
williamr@4
    32
	{
williamr@4
    33
public:
williamr@4
    34
	/** Allocates and constructs a session to the Calendar server.
williamr@4
    35
	 * @return Pointer to the newly created session.
williamr@4
    36
	 */
williamr@4
    37
	IMPORT_C static CCalDavSession* NewL();
williamr@4
    38
	/** 	Allocates and constructs a session to the Calendar server.
williamr@4
    39
	 @return Pointer to the newly created session.
williamr@4
    40
	 */
williamr@4
    41
	IMPORT_C static CCalDavSession* NewLC();
williamr@4
    42
	
williamr@4
    43
	/**
williamr@4
    44
	 * 	standard destructor, close session with CalDavServer
williamr@4
    45
	 */
williamr@4
    46
	IMPORT_C ~CCalDavSession();
williamr@4
    47
williamr@4
    48
	/**
williamr@4
    49
	 Enable access to a remote CalDAV server. At least url, 
williamr@4
    50
	 username and password need to be set first.
williamr@4
    51
	 
williamr@4
    52
	 @param aCalendar calendar to enable, must be internal filename in the form c:calendar
williamr@4
    53
	 */
williamr@4
    54
	IMPORT_C TInt Enable(const TDesC &aCalendar);
williamr@4
    55
	/**
williamr@4
    56
	 Disable access to a remote CalDAV server.
williamr@4
    57
	 
williamr@4
    58
	 @param aCalendar calendar to disable, must be internal filename in the form c:calendar
williamr@4
    59
	 */
williamr@4
    60
	IMPORT_C TInt Disable(const TDesC &aCalendar);
williamr@4
    61
williamr@4
    62
	/**
williamr@4
    63
	 On demand syncing of an enabled connection of one calendar file
williamr@4
    64
	 
williamr@4
    65
	 @param aCalendar calendar to enable, must be internal filename in the form c:calendar
williamr@4
    66
	 */
williamr@4
    67
	IMPORT_C TInt SyncL(const TDesC &aCalendar);
williamr@4
    68
	/**
williamr@4
    69
	 On demand syncing of all enabled connections 
williamr@4
    70
	 */
williamr@4
    71
	IMPORT_C TInt SyncAllL();
williamr@4
    72
williamr@4
    73
	/**
williamr@4
    74
	 Retrieve connection url
williamr@4
    75
	 
williamr@4
    76
	 @param aCalendar calendar for sync, must be internal filename in the form c:calendar
williamr@4
    77
	 @param aUrl url for the connection
williamr@4
    78
	 */
williamr@4
    79
	IMPORT_C TInt Url(const TDesC &aCalendar, TDes8 &aUrl);
williamr@4
    80
	/**
williamr@4
    81
	 Set connection url
williamr@4
    82
	 
williamr@4
    83
	 @param aCalendar calendar for sync, must be internal filename in the form c:calendar
williamr@4
    84
	 @param aUrl url for the url
williamr@4
    85
	 */
williamr@4
    86
	IMPORT_C TInt SetUrl(const TDesC &aCalendar, const TDesC8 &aUrl);
williamr@4
    87
williamr@4
    88
	/**
williamr@4
    89
	 Retrieve connection username
williamr@4
    90
	 
williamr@4
    91
	 @param aCalendar calendar for sync, must be internal filename in the form c:calendar
williamr@4
    92
	 @param aUsername username for the connection
williamr@4
    93
	 */
williamr@4
    94
williamr@4
    95
	IMPORT_C TInt Username(const TDesC &aCalendar, TDes8 &aUsername);
williamr@4
    96
	/**
williamr@4
    97
	 Set connection username
williamr@4
    98
	 
williamr@4
    99
	 @param aCalendar calendar for sync, must be internal filename in the form c:calendar
williamr@4
   100
	 @param aUsername username for the connection
williamr@4
   101
	 */
williamr@4
   102
	IMPORT_C TInt SetUsername(const TDesC &aCalendar, const TDesC8 &aUsername);
williamr@4
   103
williamr@4
   104
	/**
williamr@4
   105
	 Retrieve connection password
williamr@4
   106
	 
williamr@4
   107
	 @param aCalendar calendar for sync, must be internal filename in the form c:calendar
williamr@4
   108
	 @param aPassword password for the connection
williamr@4
   109
	 */
williamr@4
   110
williamr@4
   111
	IMPORT_C TInt Password(const TDesC &aCalendar, TDes8 &aPassword);
williamr@4
   112
	/**
williamr@4
   113
	 Set connection password
williamr@4
   114
	 
williamr@4
   115
	 @param aCalendar calendar for sync, must be internal filename in the form c:calendar
williamr@4
   116
	 @param aPassword password for the connection
williamr@4
   117
	 */
williamr@4
   118
	IMPORT_C TInt SetPassword(const TDesC &aCalendar, const TDesC8 &aPassword);
williamr@4
   119
	/**
williamr@4
   120
	 Retrieve synchonization interval
williamr@4
   121
	 
williamr@4
   122
	 @param aCalendar calendar for sync, must be internal filename in the form c:calendar
williamr@4
   123
	 @param aSyncInterval sync interval for the connection
williamr@4
   124
	 */
williamr@4
   125
williamr@4
   126
	IMPORT_C TInt SyncInterval(const TDesC &aCalendar,
williamr@4
   127
			TTimeIntervalMinutes& aSyncInterval);
williamr@4
   128
	/**
williamr@4
   129
	 Set synchonization interval
williamr@4
   130
	 
williamr@4
   131
	 @param aCalendar calendar for sync, must be internal filename in the form c:calendar
williamr@4
   132
	 @param aSyncInterval sync interval for the connection, value of zero minutes meaning 
williamr@4
   133
	 continuous connection
williamr@4
   134
	 */
williamr@4
   135
	IMPORT_C TInt SetSyncInterval(const TDesC &aCalendar,
williamr@4
   136
			TTimeIntervalMinutes aSyncInterval);
williamr@4
   137
williamr@4
   138
	/**
williamr@4
   139
	 Retrieve time range into past for synchronization
williamr@4
   140
	 
williamr@4
   141
	 @param aCalendar calendar for sync, must be internal filename in the form c:calendar
williamr@4
   142
	 @param aDays number of days into the past for the connection
williamr@4
   143
	 */
williamr@4
   144
	IMPORT_C TInt PastDays(const TDesC &aCalendar, TTimeIntervalDays &aDays);
williamr@4
   145
	/**
williamr@4
   146
	 Set time range into past for synchronization
williamr@4
   147
	 
williamr@4
   148
	 @param aCalendar calendar for sync, must be internal filename in the form c:calendar
williamr@4
   149
	 @param aDays number of days into the past for the connection
williamr@4
   150
	 */
williamr@4
   151
	IMPORT_C TInt SetPastDays(const TDesC &aCalendar, TTimeIntervalDays aDays);
williamr@4
   152
williamr@4
   153
	/**
williamr@4
   154
	 Retrieve immediate push of client changes
williamr@4
   155
	 
williamr@4
   156
	 @param aCalendar calendar for sync, must be internal filename in the form c:calendar
williamr@4
   157
	 @param aImmediateSync push client changes immediatly
williamr@4
   158
	 */
williamr@4
   159
	IMPORT_C TInt ImmediateSync(const TDesC &aCalendar, TBool &aImmediateSyc);
williamr@4
   160
	/**
williamr@4
   161
	 Set immediate push of client changes
williamr@4
   162
	 
williamr@4
   163
	 @param aCalendar calendar for sync, must be internal filename in the form c:calendar
williamr@4
   164
	 @param aImmediateSync push client changes immediatly
williamr@4
   165
	 */
williamr@4
   166
	IMPORT_C TInt SetImmediateSync(const TDesC &aCalendar, TBool aImmediateSyc);
williamr@4
   167
williamr@4
   168
	/**
williamr@4
   169
	 During a synchronisation conflict, either the server or client needs to win, default is the server
williamr@4
   170
	 
williamr@4
   171
	 @param aCalendar calendar for sync, must be internal filename in the form c:calendar
williamr@4
   172
	 @param aKeepServerEntry server or client wins during synchronisation
williamr@4
   173
	 */
williamr@4
   174
	IMPORT_C TInt KeepServerEntry(const TDesC &aCalendar,
williamr@4
   175
			TBool &aKeepServerEntry);
williamr@4
   176
	/**
williamr@4
   177
	 During a synchronisation conflict, either the server or client needs to win, which can be set here
williamr@4
   178
	 
williamr@4
   179
	 @param aCalendar calendar for sync, must be internal filename in the form c:calendar
williamr@4
   180
	 @param aKeepServerEntry server or client wins during synchronisation
williamr@4
   181
	 */
williamr@4
   182
	IMPORT_C TInt SetKeepServerEntry(const TDesC &aCalendar,
williamr@4
   183
			TBool aKeepServerEntry);
williamr@4
   184
williamr@4
   185
	/**
williamr@4
   186
	 Retrieve connection status
williamr@4
   187
	 
williamr@4
   188
	 @param aCalendar calendar for sync, must be internal filename in the form c:calendar
williamr@4
   189
	 @param aEnabledSync connection status
williamr@4
   190
	 */
williamr@4
   191
	IMPORT_C TInt EnabledSync(const TDesC &aCalendar, TBool &aEnabledSync);
williamr@4
   192
williamr@4
   193
private:
williamr@4
   194
williamr@4
   195
	CCalDavSession();
williamr@4
   196
	void ConstructL();
williamr@4
   197
williamr@4
   198
	CCalDavSessionImpl* iImpl;
williamr@4
   199
williamr@4
   200
	};
williamr@4
   201
williamr@4
   202
#endif // CCALDAVSESSION_H