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.
     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: 	Client API to connect to Caldav server
    15 *				Wrapper around RCalDavServer
    16 */
    17 
    18 #ifndef CCALDAVSESSION_H
    19 #define CCALDAVSESSION_H
    20 
    21 // INCLUDES
    22 #include <e32std.h>
    23 #include <e32base.h>
    24 
    25 class CCalDavSessionImpl;
    26 
    27 /**
    28  * @class CCalenCustomisation 
    29  * @brief Client API to connect to the CalDAV server.
    30  */
    31 NONSHARABLE_CLASS( CCalDavSession ) : public CBase
    32 	{
    33 public:
    34 	/** Allocates and constructs a session to the Calendar server.
    35 	 * @return Pointer to the newly created session.
    36 	 */
    37 	IMPORT_C static CCalDavSession* NewL();
    38 	/** 	Allocates and constructs a session to the Calendar server.
    39 	 @return Pointer to the newly created session.
    40 	 */
    41 	IMPORT_C static CCalDavSession* NewLC();
    42 	
    43 	/**
    44 	 * 	standard destructor, close session with CalDavServer
    45 	 */
    46 	IMPORT_C ~CCalDavSession();
    47 
    48 	/**
    49 	 Enable access to a remote CalDAV server. At least url, 
    50 	 username and password need to be set first.
    51 	 
    52 	 @param aCalendar calendar to enable, must be internal filename in the form c:calendar
    53 	 */
    54 	IMPORT_C TInt Enable(const TDesC &aCalendar);
    55 	/**
    56 	 Disable access to a remote CalDAV server.
    57 	 
    58 	 @param aCalendar calendar to disable, must be internal filename in the form c:calendar
    59 	 */
    60 	IMPORT_C TInt Disable(const TDesC &aCalendar);
    61 
    62 	/**
    63 	 On demand syncing of an enabled connection of one calendar file
    64 	 
    65 	 @param aCalendar calendar to enable, must be internal filename in the form c:calendar
    66 	 */
    67 	IMPORT_C TInt SyncL(const TDesC &aCalendar);
    68 	/**
    69 	 On demand syncing of all enabled connections 
    70 	 */
    71 	IMPORT_C TInt SyncAllL();
    72 
    73 	/**
    74 	 Retrieve connection url
    75 	 
    76 	 @param aCalendar calendar for sync, must be internal filename in the form c:calendar
    77 	 @param aUrl url for the connection
    78 	 */
    79 	IMPORT_C TInt Url(const TDesC &aCalendar, TDes8 &aUrl);
    80 	/**
    81 	 Set connection url
    82 	 
    83 	 @param aCalendar calendar for sync, must be internal filename in the form c:calendar
    84 	 @param aUrl url for the url
    85 	 */
    86 	IMPORT_C TInt SetUrl(const TDesC &aCalendar, const TDesC8 &aUrl);
    87 
    88 	/**
    89 	 Retrieve connection username
    90 	 
    91 	 @param aCalendar calendar for sync, must be internal filename in the form c:calendar
    92 	 @param aUsername username for the connection
    93 	 */
    94 
    95 	IMPORT_C TInt Username(const TDesC &aCalendar, TDes8 &aUsername);
    96 	/**
    97 	 Set connection username
    98 	 
    99 	 @param aCalendar calendar for sync, must be internal filename in the form c:calendar
   100 	 @param aUsername username for the connection
   101 	 */
   102 	IMPORT_C TInt SetUsername(const TDesC &aCalendar, const TDesC8 &aUsername);
   103 
   104 	/**
   105 	 Retrieve connection password
   106 	 
   107 	 @param aCalendar calendar for sync, must be internal filename in the form c:calendar
   108 	 @param aPassword password for the connection
   109 	 */
   110 
   111 	IMPORT_C TInt Password(const TDesC &aCalendar, TDes8 &aPassword);
   112 	/**
   113 	 Set connection password
   114 	 
   115 	 @param aCalendar calendar for sync, must be internal filename in the form c:calendar
   116 	 @param aPassword password for the connection
   117 	 */
   118 	IMPORT_C TInt SetPassword(const TDesC &aCalendar, const TDesC8 &aPassword);
   119 	/**
   120 	 Retrieve synchonization interval
   121 	 
   122 	 @param aCalendar calendar for sync, must be internal filename in the form c:calendar
   123 	 @param aSyncInterval sync interval for the connection
   124 	 */
   125 
   126 	IMPORT_C TInt SyncInterval(const TDesC &aCalendar,
   127 			TTimeIntervalMinutes& aSyncInterval);
   128 	/**
   129 	 Set synchonization interval
   130 	 
   131 	 @param aCalendar calendar for sync, must be internal filename in the form c:calendar
   132 	 @param aSyncInterval sync interval for the connection, value of zero minutes meaning 
   133 	 continuous connection
   134 	 */
   135 	IMPORT_C TInt SetSyncInterval(const TDesC &aCalendar,
   136 			TTimeIntervalMinutes aSyncInterval);
   137 
   138 	/**
   139 	 Retrieve time range into past for synchronization
   140 	 
   141 	 @param aCalendar calendar for sync, must be internal filename in the form c:calendar
   142 	 @param aDays number of days into the past for the connection
   143 	 */
   144 	IMPORT_C TInt PastDays(const TDesC &aCalendar, TTimeIntervalDays &aDays);
   145 	/**
   146 	 Set time range into past for synchronization
   147 	 
   148 	 @param aCalendar calendar for sync, must be internal filename in the form c:calendar
   149 	 @param aDays number of days into the past for the connection
   150 	 */
   151 	IMPORT_C TInt SetPastDays(const TDesC &aCalendar, TTimeIntervalDays aDays);
   152 
   153 	/**
   154 	 Retrieve immediate push of client changes
   155 	 
   156 	 @param aCalendar calendar for sync, must be internal filename in the form c:calendar
   157 	 @param aImmediateSync push client changes immediatly
   158 	 */
   159 	IMPORT_C TInt ImmediateSync(const TDesC &aCalendar, TBool &aImmediateSyc);
   160 	/**
   161 	 Set immediate push of client changes
   162 	 
   163 	 @param aCalendar calendar for sync, must be internal filename in the form c:calendar
   164 	 @param aImmediateSync push client changes immediatly
   165 	 */
   166 	IMPORT_C TInt SetImmediateSync(const TDesC &aCalendar, TBool aImmediateSyc);
   167 
   168 	/**
   169 	 During a synchronisation conflict, either the server or client needs to win, default is the server
   170 	 
   171 	 @param aCalendar calendar for sync, must be internal filename in the form c:calendar
   172 	 @param aKeepServerEntry server or client wins during synchronisation
   173 	 */
   174 	IMPORT_C TInt KeepServerEntry(const TDesC &aCalendar,
   175 			TBool &aKeepServerEntry);
   176 	/**
   177 	 During a synchronisation conflict, either the server or client needs to win, which can be set here
   178 	 
   179 	 @param aCalendar calendar for sync, must be internal filename in the form c:calendar
   180 	 @param aKeepServerEntry server or client wins during synchronisation
   181 	 */
   182 	IMPORT_C TInt SetKeepServerEntry(const TDesC &aCalendar,
   183 			TBool aKeepServerEntry);
   184 
   185 	/**
   186 	 Retrieve connection status
   187 	 
   188 	 @param aCalendar calendar for sync, must be internal filename in the form c:calendar
   189 	 @param aEnabledSync connection status
   190 	 */
   191 	IMPORT_C TInt EnabledSync(const TDesC &aCalendar, TBool &aEnabledSync);
   192 
   193 private:
   194 
   195 	CCalDavSession();
   196 	void ConstructL();
   197 
   198 	CCalDavSessionImpl* iImpl;
   199 
   200 	};
   201 
   202 #endif // CCALDAVSESSION_H