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: Caldav server, follows Symbian client/server |
|
15 * architecture |
|
16 */ |
|
17 |
|
18 #ifndef CCALDAVSERVER_H |
|
19 #define CCALDAVSERVER_H |
|
20 |
|
21 #include <e32base.h> |
|
22 |
|
23 #include "caldavutils.h" |
|
24 |
|
25 class CCalDavEngineMgr; |
|
26 |
|
27 // needed for creating server thread. |
|
28 const TUint KDefaultHeapSize = 0x10000; |
|
29 |
|
30 //********************************** |
|
31 //CCalDavServer |
|
32 //********************************** |
|
33 class CCalDavServer : public CPolicyServer |
|
34 { |
|
35 public: |
|
36 static CCalDavServer* NewLC(); |
|
37 static TInt ThreadFunction(TAny* aStarted); |
|
38 static void PanicServer(TCalDavServPanic aPanic); |
|
39 CSession2 |
|
40 * NewSessionL(const TVersion& aVersion, const RMessage2& aMessage) const; |
|
41 public: |
|
42 |
|
43 TInt EnableL(const TDesC &aCalendar); |
|
44 TInt DisableL(const TDesC &aCalendar); |
|
45 |
|
46 TBool EnabledSyncL(const TDesC &aCalendar) const; |
|
47 |
|
48 // TODO: make these asynchronous |
|
49 TInt SyncL(const TDesC &aCalendar); |
|
50 TInt SyncAllL(); |
|
51 |
|
52 TPtrC8 UrlL(const TDesC &aCalendar); |
|
53 void SetUrlL(const TDesC &aCalendar, const TDesC8 &aUrl); |
|
54 |
|
55 TPtrC8 UsernameL(const TDesC &aCalendar); |
|
56 void SetUsernameL(const TDesC &aCalendar, const TDesC8 &aUsername); |
|
57 |
|
58 TPtrC8 PasswordL(const TDesC &aCalendar); |
|
59 void SetPasswordL(const TDesC &aCalendar, const TDesC8 &aPassword); |
|
60 |
|
61 TTimeIntervalMinutes SyncIntervalL(const TDesC &aCalendar) const; |
|
62 void SetSyncIntervalL(const TDesC &aCalendar, |
|
63 TTimeIntervalMinutes aSyncInterval); |
|
64 |
|
65 TTimeIntervalDays PastDaysL(const TDesC &aCalendar) const; |
|
66 void SetPastDaysL(const TDesC &aCalendar, TTimeIntervalDays aDays); |
|
67 |
|
68 TBool ImmediateSyncL(const TDesC &aCalendar) const; |
|
69 void SetImmediateSyncL(const TDesC &aCalendar, TBool aImmediateSyc); |
|
70 |
|
71 TBool KeepServerEntryL(const TDesC &aCalendar) const; |
|
72 void SetKeepServerEntryL(const TDesC &aCalendar, TBool aKeepServerEntry); |
|
73 |
|
74 private: |
|
75 |
|
76 private: |
|
77 static void ThreadFunctionL(); |
|
78 ~CCalDavServer(); |
|
79 CCalDavServer(); |
|
80 |
|
81 CCalDavEngineMgr* iMgr; |
|
82 |
|
83 protected: |
|
84 void ConstructL(); |
|
85 CCalDavServer(CActive::TPriority aActiveObjectPriority); |
|
86 }; |
|
87 |
|
88 #endif |
|