author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 06 Jul 2010 14:12:40 +0300 | |
changeset 44 | 36f374c67aa8 |
parent 43 | 35b64624a9e7 |
child 47 | 5b14749788d7 |
child 52 | 12db4185673b |
permissions | -rw-r--r-- |
31 | 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 "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: CS general definitions |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
#ifndef __C_CSSERVER_DEFS_H__ |
|
20 |
#define __C_CSSERVER_DEFS_H__ |
|
21 |
||
22 |
// INCLUDES FILES |
|
23 |
||
24 |
// SYSTEM INCLUDES |
|
25 |
#include <e32base.h> |
|
26 |
#include <e32math.h> |
|
27 |
#include <s32strm.h> |
|
28 |
#include <s32mem.h> |
|
29 |
#include <e32def.h> |
|
30 |
||
31 |
//----------------------------------------------------------------------------- |
|
32 |
// Conversation Server Details |
|
33 |
//----------------------------------------------------------------------------- |
|
34 |
/** |
|
35 |
* Name of the conversation server. |
|
36 |
*/ |
|
37 |
_LIT(KCsServerName, "CsServer"); |
|
38 |
||
39 |
/** |
|
40 |
* Name of the conversation server executable. |
|
41 |
*/ |
|
42 |
_LIT(KCsServerExeName, "CsServer.exe"); |
|
43 |
||
44 |
/** |
|
45 |
* Conversation Server data plugin interface UID |
|
46 |
*/ |
|
47 |
const TUid KCsPluginInterfaceUid = { 0x2002A545 }; |
|
48 |
||
49 |
//----------------------------------------------------------------------------- |
|
50 |
// Conversation Server general constants |
|
51 |
//----------------------------------------------------------------------------- |
|
52 |
/** |
|
53 |
* Number of digits to compare (from right) for two phone numbers to match. |
|
54 |
*/ |
|
55 |
const TInt KDefaultGsmNumberMatchLength = 7; |
|
56 |
||
57 |
/** |
|
58 |
* Maximum internal buffer length used for IPC between conversation server and |
|
59 |
* clients. |
|
60 |
*/ |
|
61 |
const TInt KBufferMaxLen = 16000; // 16K |
|
62 |
||
63 |
/** |
|
64 |
* Maximum number of special conversations that are being reserved |
|
65 |
* |
|
66 |
*/ |
|
67 |
const TInt8 KMaxSpecialConversations = 3; |
|
68 |
||
69 |
//----------------------------------------------------------------------------- |
|
70 |
// Conversation Server event codes |
|
71 |
//----------------------------------------------------------------------------- |
|
72 |
const TUint32 KConversationEventNone = 0x00000000; |
|
73 |
const TUint32 KConversationListEventNew = 0x00000001; |
|
74 |
const TUint32 KConversationListEventUpdate = 0x00000002; |
|
75 |
const TUint32 KConversationListEventDelete = 0x00000004; |
|
76 |
const TUint32 KConversationEventNew = 0x00000008; |
|
77 |
const TUint32 KConversationEventUpdate = 0x00000010; |
|
78 |
const TUint32 KConversationEventDelete = 0x00000020; |
|
79 |
const TUint32 KConversationCachingEventStarted = 0x00000040; |
|
80 |
const TUint32 KConversationCachingEventCompleted = 0x00000080; |
|
81 |
const TUint32 KConversationCachingEventError = 0x00000100; |
|
82 |
const TUint32 KConversationEventListRefresh = 0x00000200; |
|
83 |
const TUint32 KConversationEventRefresh = 0x00000400; |
|
44
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
84 |
const TUint32 KConversationListEventPartialDelete = 0x00000800; |
31 | 85 |
|
86 |
//----------------------------------------------------------------------------- |
|
87 |
// Conversation Server caching status codes |
|
88 |
//----------------------------------------------------------------------------- |
|
89 |
const TUint8 KCachingStatusUnknown = 0x00; |
|
90 |
const TUint8 KCachingStatusStarted = 0x01; |
|
91 |
const TUint8 KCachingStatusCompleted = 0x02; |
|
92 |
const TUint8 KCachingStatusError = 0x04; |
|
93 |
||
94 |
//----------------------------------------------------------------------------- |
|
95 |
// Conversation Server special conversation codes |
|
96 |
//----------------------------------------------------------------------------- |
|
97 |
const TUint8 KUnknownConversationId = 0x00; |
|
98 |
const TUint8 KBluetoothMsgsConversationId = 0x01; |
|
99 |
const TUint8 KInfraRedMsgsConversationId = 0x02; |
|
100 |
||
101 |
//----------------------------------------------------------------------------- |
|
102 |
// Request commands to the conversation server |
|
103 |
//----------------------------------------------------------------------------- |
|
104 |
enum TCsServerRequestCommands |
|
105 |
{ |
|
106 |
EGetConversationList, |
|
107 |
EGetConversationUnreadList, |
|
108 |
EGetConversations, |
|
109 |
EGetTotalUnreadCount, |
|
110 |
ERequestChangeEvent, |
|
111 |
ERemoveChangeEvent, |
|
112 |
EGetCachingStatus, |
|
113 |
ESetConversationListChangeObserver, |
|
114 |
EResetConversationListChangeObserver, |
|
115 |
ESetConversationChangeObserver, |
|
116 |
EResetConversationChangeObserver, |
|
117 |
ESetCachingStatusObserver, |
|
118 |
EResetCachingStatusObserver, |
|
119 |
EShutdown, |
|
120 |
EUserDeleteConversation, |
|
121 |
EGetConversationId, |
|
122 |
EGetConversationIdFromAddress, |
|
123 |
EGetConversationFromMessageId, |
|
44
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
124 |
EUserMarkReadConversation, |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
125 |
EGetConversationFromConversationId, |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
126 |
EGetConversationFromConversationIdComplete |
31 | 127 |
}; |
128 |
||
129 |
//----------------------------------------------------------------------------- |
|
130 |
// Response commands from the conversation server |
|
131 |
//----------------------------------------------------------------------------- |
|
132 |
enum TCsServerResponseCommand |
|
133 |
{ |
|
134 |
EGetConversationListOperationComplete, |
|
135 |
EGetConversationOperationComplete, |
|
136 |
EGetConversationListBufferOverflow, |
|
137 |
EGetConversationBufferOverflow, |
|
138 |
EAddConversationListEvent, |
|
139 |
EDeleteConversationListEvent, |
|
140 |
EModifyConversationListEvent, |
|
141 |
EAddConversationEvent, |
|
142 |
EDeleteConversationEvent, |
|
44
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
143 |
EPartialDeleteConversationListEvent, |
31 | 144 |
EModifyConversationEvent, |
145 |
ECachingStartedEvent, |
|
146 |
ECachingCompletedEvent, |
|
147 |
ECachingErrorEvent, |
|
148 |
EInitRequestChange, //initiate request change request to server |
|
149 |
EUserDeleteConversationComplete, |
|
150 |
ERefreshConversationListEvent, |
|
151 |
ERefreshConversationEvent, |
|
152 |
EGetConversationIdComplete, |
|
153 |
EGetConversationIdFromAddressComplete, |
|
154 |
EGetConversationFromMessageIdComplete, |
|
155 |
EUserMarkReadConversationComplete |
|
156 |
}; |
|
157 |
||
158 |
//----------------------------------------------------------------------------- |
|
159 |
// Conversation Server data types |
|
160 |
//----------------------------------------------------------------------------- |
|
161 |
||
162 |
/** |
|
163 |
* Conversation Identifier |
|
164 |
*/ |
|
165 |
typedef TInt TCsConversationEntryID; |
|
166 |
||
167 |
/** |
|
168 |
* Direction of a conversation event. |
|
169 |
* @attention This enum can have values from 0 to 255 only. |
|
170 |
*/ |
|
171 |
enum |
|
172 |
{ |
|
173 |
ECsDirectionIncoming = 0, |
|
174 |
ECsDirectionOutgoing, |
|
175 |
ECsDirectionMissed, |
|
176 |
ECsDirectionUnknown |
|
177 |
}; |
|
178 |
||
179 |
/** |
|
180 |
* @typedef TCsDirection |
|
181 |
* typedef to denoting direction of a conversation event. |
|
182 |
*/ |
|
183 |
typedef TUint8 TCsDirection; |
|
184 |
||
185 |
/** |
|
186 |
* Type of a conversation event. |
|
187 |
* @attention This enum can have values from 0 to 255 only. |
|
188 |
*/ |
|
189 |
enum |
|
190 |
{ |
|
191 |
ECsSMS = 0, |
|
192 |
ECsMMS, |
|
193 |
ECsMmsNotification, |
|
194 |
ECsAudio, |
|
195 |
ECsBioMsg, |
|
196 |
ECsBlueTooth, |
|
197 |
ECsRingingTone, |
|
198 |
ECsProvisioning, |
|
199 |
ECsBioMsg_VCard, |
|
200 |
ECsBioMsg_VCal, |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
201 |
ECsBioMgs_NokiaService, |
31 | 202 |
ECsUnknown |
203 |
}; |
|
204 |
||
205 |
/** |
|
206 |
* @typedef TCsType |
|
207 |
* typedef denoting type of a conversation event. |
|
208 |
*/ |
|
209 |
typedef TUint8 TCsType; |
|
210 |
||
211 |
/** |
|
212 |
* Attributes associated with a conversation event. |
|
213 |
* These are bitmask values. |
|
214 |
* Use CCsConversationEntry::ChangeAttributes() to set/ change |
|
215 |
* @attention This enum can have values from 0 to 65535 only. |
|
216 |
*/ |
|
217 |
enum |
|
218 |
{ |
|
219 |
ECsAttributeNone = 0x0000, |
|
220 |
ECsAttributeNew = 0x0001, |
|
221 |
ECsAttributeDraft = 0x0002, |
|
222 |
ECsAttributeAttachment = 0x0004, // Attachment present |
|
223 |
ECsAttributeHighPriority = 0x0008, // Priority high |
|
224 |
ECsAttributeLowPriority = 0x0010, // Low high |
|
225 |
ECsAttributeUnread = 0x0020, // Unread |
|
226 |
ECsAttributeSent = 0x0040, |
|
227 |
ECsAttributeNewEntryAdded = 0x0080 // When a new entry added |
|
228 |
}; |
|
229 |
||
230 |
/** |
|
231 |
* @typedef TCsAttribute |
|
232 |
* typedef denoting attributes associated with a conversation event. |
|
233 |
*/ |
|
234 |
typedef TUint16 TCsAttribute; |
|
235 |
||
236 |
/** |
|
237 |
* Transit sending state of a conversation event. |
|
238 |
* @attention This enum can have values from 0 to 255 only. |
|
239 |
*/ |
|
240 |
enum |
|
241 |
{ |
|
242 |
ECsSendStateUnknown = 0, |
|
243 |
ECsSendStateUponRequest, |
|
244 |
ECsSendStateWaiting, |
|
245 |
ECsSendStateSending, |
|
246 |
ECsSendStateScheduled, |
|
247 |
ECsSendStateResend, |
|
248 |
ECsSendStateSuspended, |
|
249 |
ECsSendStateFailed, |
|
250 |
ECsSendStateSent, |
|
251 |
ECsSendStateNotApplicable |
|
252 |
}; |
|
253 |
||
254 |
/** |
|
255 |
* @typedef TCsSendState |
|
256 |
* typedef denoting transit sending state of a conversation event. |
|
257 |
*/ |
|
258 |
typedef TUint8 TCsSendState; |
|
259 |
||
260 |
/** |
|
261 |
* @typedef TCsMmsNotificationMsgState |
|
262 |
* @attention This enum can have values from 0 to 255 only. |
|
263 |
*/ |
|
264 |
||
265 |
enum |
|
266 |
{ |
|
267 |
EMsgStatusNull = 0, // unknown status |
|
268 |
EMsgStatusReadyForFetching = 1, // first state when received in inbox |
|
269 |
EMsgStatusRetrieving = 2, // when MM is fetching ongoin |
|
270 |
EMsgStatusForwarding = 3, // forwarding without retrival |
|
271 |
EMsgStatusForwarded = 4, // state after successful forwarding |
|
272 |
EMsgStatusWaiting = 5, // when settings changed manual->automatic |
|
273 |
EMsgStatusExpired = 6, // expired time has exceed |
|
274 |
EMsgStatusFailed = 7, // when fetching has failed (forwarding?) |
|
275 |
EMsgStatusDeleted = 8 // when msg deleted from server |
|
276 |
}; |
|
277 |
||
278 |
typedef TUint8 TCsMmsNotificationMsgState; |
|
279 |
||
280 |
/** |
|
281 |
* Constant for defining the contacts db |
|
282 |
* This shall be used for converting contact link to id's |
|
283 |
*/ |
|
284 |
_LIT(KVPbkDefaultCntDbURI, "cntdb://c:contacts.cdb"); //Phone Store |
|
285 |
||
286 |
/** |
|
287 |
* Internal offset used to identify SIM contacts. |
|
288 |
*/ |
|
289 |
const TInt KSimIdOffset = 99999; |
|
290 |
||
291 |
/** |
|
292 |
* @typedef TCsMsgPreviewProperty |
|
293 |
*/ |
|
294 |
||
295 |
enum |
|
296 |
{ |
|
43
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
297 |
EPreviewNone = 0x0000, |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
298 |
EPreviewImage = 0x0001, |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
299 |
EPreviewAudio = 0x0002, |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
300 |
EPreviewVideo = 0x0004, |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
301 |
EPreviewAttachment = 0x0008, |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
302 |
EPreviewForward = 0x0010, |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
303 |
EPreviewProtectedImage = 0x0020, |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
304 |
EPreviewProtectedAudio = 0x0040, |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
305 |
EPreviewProtectedVideo = 0x0080, |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
306 |
EPreviewCorruptedImage = 0x0100, |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
307 |
EPreviewCorruptedAudio = 0x0200, |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
308 |
EPreviewCorruptedVideo = 0x0400 |
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
309 |
}; |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
310 |
|
43
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
311 |
typedef TUint16 TCsMsgPreviewProperty; |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
312 |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
313 |
/** |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
314 |
* @typedef TCsPreviewMsgProcessingState |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
315 |
*/ |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
316 |
enum |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
317 |
{ |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
318 |
EPreviewMsgNotProcessed = 0, |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
319 |
EPreviewMsgProcessing = 1, |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
320 |
EPreviewMsgProcessed = 2 |
31 | 321 |
}; |
322 |
||
44
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
323 |
/** |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
324 |
@publishedAll |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
325 |
@released |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
326 |
|
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
327 |
Template class CleanupResetAndDestroy to clean up the array |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
328 |
of implementation information from the cleanup stack. |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
329 |
*/ |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
330 |
|
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
331 |
template <class T> |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
332 |
class CleanupResetAndDestroy |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
333 |
{ |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
334 |
public: |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
335 |
/** |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
336 |
Puts an item on the cleanup stack. |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
337 |
|
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
338 |
@param aRef |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
339 |
The implementation information to be put on the cleanup stack. |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
340 |
*/ |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
341 |
inline static void PushL(T& aRef); |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
342 |
inline static void PushL(T* aPointer); |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
343 |
private: |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
344 |
static void ResetAndDestroy(TAny *aPtr); |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
345 |
static void ResetAndDestroyDelete(TAny *aPtr); |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
346 |
}; |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
347 |
template <class T> |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
348 |
inline void CleanupResetAndDestroyPushL(T& aRef); |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
349 |
|
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
350 |
template <class T> |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
351 |
inline void CleanupResetAndDestroyPushL(T* aPointer); |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
352 |
|
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
353 |
template <class T> |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
354 |
inline void CleanupResetAndDestroy<T>::PushL(T& aRef) |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
355 |
{CleanupStack::PushL(TCleanupItem(&ResetAndDestroy,&aRef));} |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
356 |
|
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
357 |
template <class T> |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
358 |
inline void CleanupResetAndDestroy<T>::PushL(T* aPointer) |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
359 |
{CleanupStack::PushL(TCleanupItem(&ResetAndDestroyDelete,aPointer));} |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
360 |
|
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
361 |
template <class T> |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
362 |
void CleanupResetAndDestroy<T>::ResetAndDestroy(TAny *aPtr) |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
363 |
{(STATIC_CAST(T*,aPtr))->ResetAndDestroy();} |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
364 |
|
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
365 |
template <class T> |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
366 |
void CleanupResetAndDestroy<T>::ResetAndDestroyDelete(TAny *aPtr) |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
367 |
{ |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
368 |
(STATIC_CAST(T*,aPtr))->ResetAndDestroy(); |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
369 |
delete (STATIC_CAST(T*,aPtr)); |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
370 |
} |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
371 |
|
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
372 |
template <class T> |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
373 |
inline void CleanupResetAndDestroyPushL(T& aRef) |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
374 |
{CleanupResetAndDestroy<T>::PushL(aRef);} |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
375 |
|
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
376 |
template <class T> |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
377 |
inline void CleanupResetAndDestroyPushL(T* aPointer) |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
378 |
{CleanupResetAndDestroy<T>::PushL(aPointer);} |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
379 |
|
31 | 380 |
#endif // __C_CSSERVER_DEFS_H__ |
381 |
||
382 |
// End of file |