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-- |
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: Caldav server, follows Symbian client/server |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
15 |
* architecture |
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 CCALDAVSERVER_H |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
19 |
#define CCALDAVSERVER_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 |
|
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
23 |
#include "caldavutils.h" |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
24 |
|
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
25 |
class CCalDavEngineMgr; |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
26 |
|
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
27 |
// needed for creating server thread. |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
28 |
const TUint KDefaultHeapSize = 0x10000; |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
29 |
|
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 |
//CCalDavServer |
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 CCalDavServer : public CPolicyServer |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
34 |
{ |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
35 |
public: |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
36 |
static CCalDavServer* NewLC(); |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
37 |
static TInt ThreadFunction(TAny* aStarted); |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
38 |
static void PanicServer(TCalDavServPanic aPanic); |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
39 |
CSession2 |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
40 |
* NewSessionL(const TVersion& aVersion, const RMessage2& aMessage) const; |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
41 |
public: |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
42 |
|
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
43 |
TInt EnableL(const TDesC &aCalendar); |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
44 |
TInt DisableL(const TDesC &aCalendar); |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
45 |
|
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
46 |
TBool EnabledSyncL(const TDesC &aCalendar) const; |
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 |
// TODO: make these asynchronous |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
49 |
TInt SyncL(const TDesC &aCalendar); |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
50 |
TInt SyncAllL(); |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
51 |
|
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
52 |
TPtrC8 UrlL(const TDesC &aCalendar); |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
53 |
void SetUrlL(const TDesC &aCalendar, const TDesC8 &aUrl); |
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 |
TPtrC8 UsernameL(const TDesC &aCalendar); |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
56 |
void SetUsernameL(const TDesC &aCalendar, const TDesC8 &aUsername); |
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 |
TPtrC8 PasswordL(const TDesC &aCalendar); |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
59 |
void SetPasswordL(const TDesC &aCalendar, const TDesC8 &aPassword); |
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 |
TTimeIntervalMinutes SyncIntervalL(const TDesC &aCalendar) const; |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
62 |
void SetSyncIntervalL(const TDesC &aCalendar, |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
63 |
TTimeIntervalMinutes aSyncInterval); |
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 |
TTimeIntervalDays PastDaysL(const TDesC &aCalendar) const; |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
66 |
void SetPastDaysL(const TDesC &aCalendar, TTimeIntervalDays aDays); |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
67 |
|
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
68 |
TBool ImmediateSyncL(const TDesC &aCalendar) const; |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
69 |
void SetImmediateSyncL(const TDesC &aCalendar, TBool aImmediateSyc); |
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 |
TBool KeepServerEntryL(const TDesC &aCalendar) const; |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
72 |
void SetKeepServerEntryL(const TDesC &aCalendar, TBool aKeepServerEntry); |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
73 |
|
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
74 |
private: |
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 |
private: |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
77 |
static void ThreadFunctionL(); |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
78 |
~CCalDavServer(); |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
79 |
CCalDavServer(); |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
80 |
|
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
81 |
CCalDavEngineMgr* iMgr; |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
82 |
|
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
83 |
protected: |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
84 |
void ConstructL(); |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
85 |
CCalDavServer(CActive::TPriority aActiveObjectPriority); |
4927282092b4
Bug 208: inital CalDAV support for Symbian
Maximilian Odendahl <maximilian.odendahl@sun.com>
parents:
diff
changeset
|
86 |
}; |
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 |
#endif |