calendarengines/caldav/inc/caldavserversession.h
branchRCL_3
changeset 87 6d3f83773253
parent 74 97232defd20e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarengines/caldav/inc/caldavserversession.h	Wed Oct 27 15:48:34 2010 +0100
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2010 Sun Microsystems, Inc. and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributor:
+* Maximilian Odendahl
+*
+* Contributors:
+* 
+* Description: Caldav server session, follows Symbian 
+* 				client/server architecture
+*
+*/
+
+#ifndef CCALDAVSERVERSESSION_H
+#define CCALDAVSERVERSESSION_H
+
+#include <e32base.h>
+
+class CCalDavServer;
+
+//**********************************
+//CCalDavServerSession
+//**********************************
+/**
+ This class represents a session with the  server.
+ Functions are provided to respond appropriately to client messages.
+ */
+class CCalDavServerSession : public CSession2
+	{
+public:
+	CCalDavServerSession(CCalDavServer &aServer);
+	void ServiceL(const RMessage2& aMessage);
+
+	void EnableL(const RMessage2& aMessage);
+	void DisableL(const RMessage2& aMessage);
+
+	void SyncL(const RMessage2& aMessage);
+	void SyncAllL(const RMessage2& aMessage);
+
+	void UrlL(const RMessage2& aMessage);
+	void SetUrlL(const RMessage2& aMessage);
+
+	void UsernameL(const RMessage2& aMessage);
+	void SetUsernameL(const RMessage2& aMessage);
+
+	void PasswordL(const RMessage2& aMessage);
+	void SetPasswordL(const RMessage2& aMessage);
+
+	void SyncIntervalL(const RMessage2& aMessage);
+	void SetSyncIntervalL(const RMessage2& aMessage);
+
+	void PastDaysL(const RMessage2& aMessage);
+	void SetPastDaysL(const RMessage2& aMessage);
+
+	void ImmediateSyncL(const RMessage2& aMessage);
+	void SetImmediateSyncL(const RMessage2& aMessage);
+
+	void KeepServerEntryL(const RMessage2& aMessage);
+	void SetKeepServerEntryL(const RMessage2& aMessage);
+
+	void EnabledSyncL(const RMessage2& aMessage);
+
+	// still there from symbian count example, not part of caldav 
+	void SetFromStringL(const RMessage2& aMessage);
+	void Increase();
+	void Decrease();
+	void IncreaseBy(const RMessage2& aMessage);
+	void DecreaseBy(const RMessage2& aMessage);
+	void CounterValueL(const RMessage2& aMessage);
+	void Reset();
+	/********************************************************/
+
+protected:
+	// panic the client
+	void PanicClient(const RMessage2& aMessage, TInt aPanic) const;
+
+private:
+	void DispatchMessageL(const RMessage2& aMessage);
+
+	CCalDavServer& rServer;
+	TInt iCount;
+
+	};
+
+#endif
+