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,
|
|
197 |
ECsUnknown
|
|
198 |
};
|
|
199 |
|
|
200 |
/**
|
|
201 |
* @typedef TCsType
|
|
202 |
* typedef denoting type of a conversation event.
|
|
203 |
*/
|
|
204 |
typedef TUint8 TCsType;
|
|
205 |
|
|
206 |
/**
|
|
207 |
* Attributes associated with a conversation event.
|
|
208 |
* These are bitmask values.
|
|
209 |
* Use CCsConversationEntry::ChangeAttributes() to set/ change
|
|
210 |
* @attention This enum can have values from 0 to 65535 only.
|
|
211 |
*/
|
|
212 |
enum
|
|
213 |
{
|
|
214 |
ECsAttributeNone = 0x0000,
|
|
215 |
ECsAttributeNew = 0x0001,
|
|
216 |
ECsAttributeDraft = 0x0002,
|
|
217 |
ECsAttributeAttachment = 0x0004, // Attachment present
|
|
218 |
ECsAttributeHighPriority = 0x0008, // Priority high
|
|
219 |
ECsAttributeLowPriority = 0x0010, // Low high
|
|
220 |
ECsAttributeUnread = 0x0020, // Unread
|
|
221 |
ECsAttributeSent = 0x0040,
|
|
222 |
ECsAttributeNewEntryAdded = 0x0080 // When a new entry added
|
|
223 |
};
|
|
224 |
|
|
225 |
/**
|
|
226 |
* @typedef TCsAttribute
|
|
227 |
* typedef denoting attributes associated with a conversation event.
|
|
228 |
*/
|
|
229 |
typedef TUint16 TCsAttribute;
|
|
230 |
|
|
231 |
/**
|
|
232 |
* Transit sending state of a conversation event.
|
|
233 |
* @attention This enum can have values from 0 to 255 only.
|
|
234 |
*/
|
|
235 |
enum
|
|
236 |
{
|
|
237 |
ECsSendStateUnknown = 0,
|
|
238 |
ECsSendStateUponRequest,
|
|
239 |
ECsSendStateWaiting,
|
|
240 |
ECsSendStateSending,
|
|
241 |
ECsSendStateScheduled,
|
|
242 |
ECsSendStateResend,
|
|
243 |
ECsSendStateSuspended,
|
|
244 |
ECsSendStateFailed,
|
|
245 |
ECsSendStateSent,
|
|
246 |
ECsSendStateNotApplicable
|
|
247 |
};
|
|
248 |
|
|
249 |
/**
|
|
250 |
* @typedef TCsSendState
|
|
251 |
* typedef denoting transit sending state of a conversation event.
|
|
252 |
*/
|
|
253 |
typedef TUint8 TCsSendState;
|
|
254 |
|
|
255 |
/**
|
|
256 |
* @typedef TCsMmsNotificationMsgState
|
|
257 |
* @attention This enum can have values from 0 to 255 only.
|
|
258 |
*/
|
|
259 |
|
|
260 |
enum
|
|
261 |
{
|
|
262 |
EMsgStatusNull = 0, // unknown status
|
|
263 |
EMsgStatusReadyForFetching = 1, // first state when received in inbox
|
|
264 |
EMsgStatusRetrieving = 2, // when MM is fetching ongoin
|
|
265 |
EMsgStatusForwarding = 3, // forwarding without retrival
|
|
266 |
EMsgStatusForwarded = 4, // state after successful forwarding
|
|
267 |
EMsgStatusWaiting = 5, // when settings changed manual->automatic
|
|
268 |
EMsgStatusExpired = 6, // expired time has exceed
|
|
269 |
EMsgStatusFailed = 7, // when fetching has failed (forwarding?)
|
|
270 |
EMsgStatusDeleted = 8 // when msg deleted from server
|
|
271 |
};
|
|
272 |
|
|
273 |
typedef TUint8 TCsMmsNotificationMsgState;
|
|
274 |
|
|
275 |
/**
|
|
276 |
* Constant for defining the contacts db
|
|
277 |
* This shall be used for converting contact link to id's
|
|
278 |
*/
|
|
279 |
_LIT(KVPbkDefaultCntDbURI, "cntdb://c:contacts.cdb"); //Phone Store
|
|
280 |
|
|
281 |
/**
|
|
282 |
* Internal offset used to identify SIM contacts.
|
|
283 |
*/
|
|
284 |
const TInt KSimIdOffset = 99999;
|
|
285 |
|
|
286 |
/**
|
|
287 |
* @typedef TCsMsgPreviewProperty
|
|
288 |
*/
|
|
289 |
|
|
290 |
enum
|
|
291 |
{
|
|
292 |
EPreviewNone = 0x00,
|
|
293 |
EPreviewImage = 0x01,
|
|
294 |
EPreviewAudio = 0x02,
|
|
295 |
EPreviewVideo = 0x04,
|
|
296 |
EPreviewAttachment = 0x08
|
|
297 |
};
|
|
298 |
|
|
299 |
typedef TUint8 TCsMsgPreviewProperty;
|
|
300 |
|
|
301 |
#endif // __C_CSSERVER_DEFS_H__
|
|
302 |
|
|
303 |
// End of file
|