19
|
1 |
/*
|
|
2 |
* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of the License "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 Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef __CALENDARDELETEENTRY_H
|
|
20 |
#define __CALENDARDELETEENTRY_H
|
|
21 |
|
|
22 |
class CAsyncRequestObserver;
|
|
23 |
|
|
24 |
|
|
25 |
/**
|
|
26 |
* This class provides functionality for deleting calendar entries.
|
|
27 |
*/
|
|
28 |
class CCalendarDeleteEntry : public CCalendarASyncRequest/*, public CActive*/
|
|
29 |
{
|
|
30 |
|
|
31 |
/**
|
|
32 |
* TDeleteOption enum represents the delete options.
|
|
33 |
*/
|
|
34 |
enum TDeleteOption
|
|
35 |
{
|
|
36 |
EDeleteAll = 0,
|
|
37 |
EDeleteGUid,
|
|
38 |
EDeleteLUid,
|
|
39 |
EDeleteTimeRange,
|
|
40 |
EDeleteTmRngGUid,
|
|
41 |
EDeleteTmRngLUid
|
|
42 |
};
|
|
43 |
|
|
44 |
public:
|
|
45 |
|
|
46 |
/**
|
|
47 |
* Two-phased constructor.
|
|
48 |
* @param CCalendarSessionInfo* a calendar session information.
|
|
49 |
* @param aFilter* Filter object. Function takes the ownership.
|
|
50 |
* @param MCalCallbackBase*
|
|
51 |
*/
|
|
52 |
static CCalendarDeleteEntry* NewL( CCalendarSessionInfo* aSessionInfo,
|
|
53 |
CCalendarFilter* aFilter,
|
|
54 |
CAsyncRequestObserver* aAsyncRequestObserver = NULL,
|
|
55 |
MCalCallbackBase* aNotifyCallback = NULL );
|
|
56 |
|
|
57 |
/**
|
|
58 |
* Destructor.
|
|
59 |
*/
|
|
60 |
virtual ~CCalendarDeleteEntry();
|
|
61 |
|
|
62 |
/**
|
|
63 |
* Delete Entries
|
|
64 |
*/
|
|
65 |
void DeleteL();
|
|
66 |
|
|
67 |
private:
|
|
68 |
|
|
69 |
/**
|
|
70 |
* Default constructor.
|
|
71 |
* @param aSessionInfo It is an object of CCalSession Class which
|
|
72 |
* represents a channel of communication between a client thread
|
|
73 |
* and the calendar Server thread .
|
|
74 |
* @param aNotifyCallback It is a callback notification
|
|
75 |
*/
|
|
76 |
CCalendarDeleteEntry( CCalendarSessionInfo* aSessionInfo,
|
|
77 |
CAsyncRequestObserver* aAsyncRequestObserver = NULL,
|
|
78 |
MCalCallbackBase* aNotifyCallback = NULL );
|
|
79 |
|
|
80 |
void ConstructL( CCalendarFilter* aFilter );
|
|
81 |
/**
|
|
82 |
* Initializes delete option based in input filter
|
|
83 |
*/
|
|
84 |
void InitializeDeleteOptionL();
|
|
85 |
|
|
86 |
/**
|
|
87 |
* Start Deleting Entries
|
|
88 |
*/
|
|
89 |
void StartDeleteL();
|
|
90 |
|
|
91 |
/**
|
|
92 |
* Delete All Entries with in calendar
|
|
93 |
*/
|
|
94 |
void DeleteAllL();
|
|
95 |
|
|
96 |
/**
|
|
97 |
* Delete Entries based in GlobalUid/LocalUid
|
|
98 |
* @param aLocalUid Deletion will Local Uid based if this is true.
|
|
99 |
*/
|
|
100 |
void DeleteUidL( TBool aLocalUid );
|
|
101 |
|
|
102 |
/**
|
|
103 |
* Delete Instances based on Time Range
|
|
104 |
*/
|
|
105 |
void DeleteTimeRangeL();
|
|
106 |
|
|
107 |
/**
|
|
108 |
* Delete Instances based on Time Range and Global Uid
|
|
109 |
*/
|
|
110 |
void DeleteTimeRangeWithGlobalUidL();
|
|
111 |
|
|
112 |
/**
|
|
113 |
* Delete Instances based on Time Range and Local Uid
|
|
114 |
*/
|
|
115 |
void DeleteTimeRangeWithLocalUidL();
|
|
116 |
|
|
117 |
/**
|
|
118 |
* Inherited from CActive class
|
|
119 |
*/
|
|
120 |
virtual void DoCancel();
|
|
121 |
|
|
122 |
/**
|
|
123 |
* Inherited from CActive class
|
|
124 |
*/
|
|
125 |
virtual void RunL();
|
|
126 |
|
|
127 |
/**
|
|
128 |
* Activates the request and call SetActive() function
|
|
129 |
*/
|
|
130 |
void ActivateRequest(TInt aReason);
|
|
131 |
|
|
132 |
/**
|
|
133 |
* Gives the result for notification request.
|
|
134 |
*/
|
|
135 |
void NotifyRequestResult(TInt aReason);
|
|
136 |
|
|
137 |
private:
|
|
138 |
|
|
139 |
/**
|
|
140 |
* Calendar server session
|
|
141 |
* Not own.
|
|
142 |
*/
|
|
143 |
CCalendarSessionInfo* iSessionInfo;
|
|
144 |
|
|
145 |
/**
|
|
146 |
* Callback Object
|
|
147 |
*/
|
|
148 |
MCalCallbackBase* iNotifyCallback;
|
|
149 |
|
|
150 |
/**
|
|
151 |
* Filter Object
|
|
152 |
*/
|
|
153 |
CCalendarFilter* iFilter;
|
|
154 |
|
|
155 |
/**
|
|
156 |
* Asynchronous request observer, Used to get infromed of completion or request
|
|
157 |
*/
|
|
158 |
CAsyncRequestObserver* iAsyncRequestObserver;
|
|
159 |
|
|
160 |
/**
|
|
161 |
* Delete option selected, derived from Filter
|
|
162 |
*/
|
|
163 |
TDeleteOption iDeleteOption;
|
|
164 |
};
|
|
165 |
|
|
166 |
|
|
167 |
|
|
168 |
|
|
169 |
#endif __CALENDARDELETEENTRY_H |