author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 23 Jun 2010 18:09:17 +0300 | |
changeset 43 | 35b64624a9e7 |
parent 34 | 84197e66a4bd |
child 44 | 36f374c67aa8 |
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; |
|
84 |
||
85 |
//----------------------------------------------------------------------------- |
|
86 |
// Conversation Server caching status codes |
|
87 |
//----------------------------------------------------------------------------- |
|
88 |
const TUint8 KCachingStatusUnknown = 0x00; |
|
89 |
const TUint8 KCachingStatusStarted = 0x01; |
|
90 |
const TUint8 KCachingStatusCompleted = 0x02; |
|
91 |
const TUint8 KCachingStatusError = 0x04; |
|
92 |
||
93 |
//----------------------------------------------------------------------------- |
|
94 |
// Conversation Server special conversation codes |
|
95 |
//----------------------------------------------------------------------------- |
|
96 |
const TUint8 KUnknownConversationId = 0x00; |
|
97 |
const TUint8 KBluetoothMsgsConversationId = 0x01; |
|
98 |
const TUint8 KInfraRedMsgsConversationId = 0x02; |
|
99 |
||
100 |
//----------------------------------------------------------------------------- |
|
101 |
// Request commands to the conversation server |
|
102 |
//----------------------------------------------------------------------------- |
|
103 |
enum TCsServerRequestCommands |
|
104 |
{ |
|
105 |
EGetConversationList, |
|
106 |
EGetConversationUnreadList, |
|
107 |
EGetConversations, |
|
108 |
EGetTotalUnreadCount, |
|
109 |
ERequestChangeEvent, |
|
110 |
ERemoveChangeEvent, |
|
111 |
EGetCachingStatus, |
|
112 |
ESetConversationListChangeObserver, |
|
113 |
EResetConversationListChangeObserver, |
|
114 |
ESetConversationChangeObserver, |
|
115 |
EResetConversationChangeObserver, |
|
116 |
ESetCachingStatusObserver, |
|
117 |
EResetCachingStatusObserver, |
|
118 |
EShutdown, |
|
119 |
EUserDeleteConversation, |
|
120 |
EGetConversationId, |
|
121 |
EGetConversationIdFromAddress, |
|
122 |
EGetConversationFromMessageId, |
|
123 |
EUserMarkReadConversation |
|
124 |
}; |
|
125 |
||
126 |
//----------------------------------------------------------------------------- |
|
127 |
// Response commands from the conversation server |
|
128 |
//----------------------------------------------------------------------------- |
|
129 |
enum TCsServerResponseCommand |
|
130 |
{ |
|
131 |
EGetConversationListOperationComplete, |
|
132 |
EGetConversationOperationComplete, |
|
133 |
EGetConversationListBufferOverflow, |
|
134 |
EGetConversationBufferOverflow, |
|
135 |
EAddConversationListEvent, |
|
136 |
EDeleteConversationListEvent, |
|
137 |
EModifyConversationListEvent, |
|
138 |
EAddConversationEvent, |
|
139 |
EDeleteConversationEvent, |
|
140 |
EModifyConversationEvent, |
|
141 |
ECachingStartedEvent, |
|
142 |
ECachingCompletedEvent, |
|
143 |
ECachingErrorEvent, |
|
144 |
EInitRequestChange, //initiate request change request to server |
|
145 |
EUserDeleteConversationComplete, |
|
146 |
ERefreshConversationListEvent, |
|
147 |
ERefreshConversationEvent, |
|
148 |
EGetConversationIdComplete, |
|
149 |
EGetConversationIdFromAddressComplete, |
|
150 |
EGetConversationFromMessageIdComplete, |
|
151 |
EUserMarkReadConversationComplete |
|
152 |
}; |
|
153 |
||
154 |
//----------------------------------------------------------------------------- |
|
155 |
// Conversation Server data types |
|
156 |
//----------------------------------------------------------------------------- |
|
157 |
||
158 |
/** |
|
159 |
* Conversation Identifier |
|
160 |
*/ |
|
161 |
typedef TInt TCsConversationEntryID; |
|
162 |
||
163 |
/** |
|
164 |
* Direction of a conversation event. |
|
165 |
* @attention This enum can have values from 0 to 255 only. |
|
166 |
*/ |
|
167 |
enum |
|
168 |
{ |
|
169 |
ECsDirectionIncoming = 0, |
|
170 |
ECsDirectionOutgoing, |
|
171 |
ECsDirectionMissed, |
|
172 |
ECsDirectionUnknown |
|
173 |
}; |
|
174 |
||
175 |
/** |
|
176 |
* @typedef TCsDirection |
|
177 |
* typedef to denoting direction of a conversation event. |
|
178 |
*/ |
|
179 |
typedef TUint8 TCsDirection; |
|
180 |
||
181 |
/** |
|
182 |
* Type of a conversation event. |
|
183 |
* @attention This enum can have values from 0 to 255 only. |
|
184 |
*/ |
|
185 |
enum |
|
186 |
{ |
|
187 |
ECsSMS = 0, |
|
188 |
ECsMMS, |
|
189 |
ECsMmsNotification, |
|
190 |
ECsAudio, |
|
191 |
ECsBioMsg, |
|
192 |
ECsBlueTooth, |
|
193 |
ECsRingingTone, |
|
194 |
ECsProvisioning, |
|
195 |
ECsBioMsg_VCard, |
|
196 |
ECsBioMsg_VCal, |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
197 |
ECsBioMgs_NokiaService, |
31 | 198 |
ECsUnknown |
199 |
}; |
|
200 |
||
201 |
/** |
|
202 |
* @typedef TCsType |
|
203 |
* typedef denoting type of a conversation event. |
|
204 |
*/ |
|
205 |
typedef TUint8 TCsType; |
|
206 |
||
207 |
/** |
|
208 |
* Attributes associated with a conversation event. |
|
209 |
* These are bitmask values. |
|
210 |
* Use CCsConversationEntry::ChangeAttributes() to set/ change |
|
211 |
* @attention This enum can have values from 0 to 65535 only. |
|
212 |
*/ |
|
213 |
enum |
|
214 |
{ |
|
215 |
ECsAttributeNone = 0x0000, |
|
216 |
ECsAttributeNew = 0x0001, |
|
217 |
ECsAttributeDraft = 0x0002, |
|
218 |
ECsAttributeAttachment = 0x0004, // Attachment present |
|
219 |
ECsAttributeHighPriority = 0x0008, // Priority high |
|
220 |
ECsAttributeLowPriority = 0x0010, // Low high |
|
221 |
ECsAttributeUnread = 0x0020, // Unread |
|
222 |
ECsAttributeSent = 0x0040, |
|
223 |
ECsAttributeNewEntryAdded = 0x0080 // When a new entry added |
|
224 |
}; |
|
225 |
||
226 |
/** |
|
227 |
* @typedef TCsAttribute |
|
228 |
* typedef denoting attributes associated with a conversation event. |
|
229 |
*/ |
|
230 |
typedef TUint16 TCsAttribute; |
|
231 |
||
232 |
/** |
|
233 |
* Transit sending state of a conversation event. |
|
234 |
* @attention This enum can have values from 0 to 255 only. |
|
235 |
*/ |
|
236 |
enum |
|
237 |
{ |
|
238 |
ECsSendStateUnknown = 0, |
|
239 |
ECsSendStateUponRequest, |
|
240 |
ECsSendStateWaiting, |
|
241 |
ECsSendStateSending, |
|
242 |
ECsSendStateScheduled, |
|
243 |
ECsSendStateResend, |
|
244 |
ECsSendStateSuspended, |
|
245 |
ECsSendStateFailed, |
|
246 |
ECsSendStateSent, |
|
247 |
ECsSendStateNotApplicable |
|
248 |
}; |
|
249 |
||
250 |
/** |
|
251 |
* @typedef TCsSendState |
|
252 |
* typedef denoting transit sending state of a conversation event. |
|
253 |
*/ |
|
254 |
typedef TUint8 TCsSendState; |
|
255 |
||
256 |
/** |
|
257 |
* @typedef TCsMmsNotificationMsgState |
|
258 |
* @attention This enum can have values from 0 to 255 only. |
|
259 |
*/ |
|
260 |
||
261 |
enum |
|
262 |
{ |
|
263 |
EMsgStatusNull = 0, // unknown status |
|
264 |
EMsgStatusReadyForFetching = 1, // first state when received in inbox |
|
265 |
EMsgStatusRetrieving = 2, // when MM is fetching ongoin |
|
266 |
EMsgStatusForwarding = 3, // forwarding without retrival |
|
267 |
EMsgStatusForwarded = 4, // state after successful forwarding |
|
268 |
EMsgStatusWaiting = 5, // when settings changed manual->automatic |
|
269 |
EMsgStatusExpired = 6, // expired time has exceed |
|
270 |
EMsgStatusFailed = 7, // when fetching has failed (forwarding?) |
|
271 |
EMsgStatusDeleted = 8 // when msg deleted from server |
|
272 |
}; |
|
273 |
||
274 |
typedef TUint8 TCsMmsNotificationMsgState; |
|
275 |
||
276 |
/** |
|
277 |
* Constant for defining the contacts db |
|
278 |
* This shall be used for converting contact link to id's |
|
279 |
*/ |
|
280 |
_LIT(KVPbkDefaultCntDbURI, "cntdb://c:contacts.cdb"); //Phone Store |
|
281 |
||
282 |
/** |
|
283 |
* Internal offset used to identify SIM contacts. |
|
284 |
*/ |
|
285 |
const TInt KSimIdOffset = 99999; |
|
286 |
||
287 |
/** |
|
288 |
* @typedef TCsMsgPreviewProperty |
|
289 |
*/ |
|
290 |
||
291 |
enum |
|
292 |
{ |
|
43
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
293 |
EPreviewNone = 0x0000, |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
294 |
EPreviewImage = 0x0001, |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
295 |
EPreviewAudio = 0x0002, |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
296 |
EPreviewVideo = 0x0004, |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
297 |
EPreviewAttachment = 0x0008, |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
298 |
EPreviewForward = 0x0010, |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
299 |
EPreviewProtectedImage = 0x0020, |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
300 |
EPreviewProtectedAudio = 0x0040, |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
301 |
EPreviewProtectedVideo = 0x0080, |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
302 |
EPreviewCorruptedImage = 0x0100, |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
303 |
EPreviewCorruptedAudio = 0x0200, |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
304 |
EPreviewCorruptedVideo = 0x0400 |
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
305 |
}; |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
306 |
|
43
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
307 |
typedef TUint16 TCsMsgPreviewProperty; |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
308 |
|
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 |
* @typedef TCsPreviewMsgProcessingState |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
311 |
*/ |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
312 |
enum |
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 |
EPreviewMsgNotProcessed = 0, |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
315 |
EPreviewMsgProcessing = 1, |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
316 |
EPreviewMsgProcessed = 2 |
31 | 317 |
}; |
318 |
||
319 |
#endif // __C_CSSERVER_DEFS_H__ |
|
320 |
||
321 |
// End of file |