|
1 /* |
|
2 * Copyright (c) 2004 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: Presence Engine consts to be used by the clients. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __PENGPRESENCEENGINECONSTS2_H |
|
19 #define __PENGPRESENCEENGINECONSTS2_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <E32Def.h> |
|
23 |
|
24 |
|
25 |
|
26 // CONSTANTS |
|
27 |
|
28 /** |
|
29 * Max length definitions for NWSessionSlotID |
|
30 * sub-parts and other related ID's. |
|
31 * @since 3.0 |
|
32 */ |
|
33 _LIT( KPengWVIDPrefix, "wv:" ); |
|
34 const TInt KPEngAttrWVIdPrefixLength = 3; |
|
35 |
|
36 const TInt KWVRequestResponseResultCode = 200; |
|
37 const TInt KPEngMaxServiceAddressLength = 256; |
|
38 const TInt KPEngMaxUserIdLength = 50; |
|
39 const TInt KPEngMaxAppIdLength = 10; |
|
40 const TInt KPEngMaxNWSessionOwnerID = 10; |
|
41 |
|
42 |
|
43 |
|
44 /** |
|
45 * Unknown search element. |
|
46 * @since 3.0 |
|
47 */ |
|
48 const TInt KPEngNullSearchElement = -1; |
|
49 |
|
50 |
|
51 |
|
52 /** |
|
53 * NULL attribute type. |
|
54 * |
|
55 * @since 3.0 |
|
56 */ |
|
57 const TUint32 KPEngNullAttributeType = 0x0; |
|
58 |
|
59 |
|
60 |
|
61 |
|
62 /** |
|
63 * User own presence ID. |
|
64 * |
|
65 * Following lit is used to identify user own |
|
66 * presence attributes, e.g. when requesting |
|
67 * attribute notifications. |
|
68 * |
|
69 * @since 3.0 |
|
70 */ |
|
71 _LIT( KPEngUserOwnPresenceId, "" ); |
|
72 |
|
73 |
|
74 /** |
|
75 * NWSessionSlot Application ID: IM |
|
76 * |
|
77 * This is used with CPEngNWSessionSlotID2 to |
|
78 * identify that IM application is using the |
|
79 * NWSessionSlot. |
|
80 * |
|
81 * @since 3.0 |
|
82 */ |
|
83 _LIT( KPEngAppIdIM, "IM" ); |
|
84 |
|
85 |
|
86 /** |
|
87 * NWSessionSlot Application ID: PEC |
|
88 * |
|
89 * This is used with CPEngNWSessionSlotID2 to |
|
90 * identify that PEC applications are using the |
|
91 * NWSessionSlot. |
|
92 * |
|
93 * @since 3.0 |
|
94 */ |
|
95 _LIT( KPEngAppIdPEC, "PEC" ); |
|
96 |
|
97 |
|
98 |
|
99 |
|
100 |
|
101 |
|
102 // EVENT AND OPERATION ENUMERATIONS |
|
103 |
|
104 |
|
105 /** |
|
106 * NWSessionSlot event enumeration. |
|
107 * |
|
108 * @since 3.0 |
|
109 */ |
|
110 enum TPEngNWSessionSlotEvent |
|
111 { |
|
112 //Pseudo empty event |
|
113 EPEngEventNone = 0, |
|
114 |
|
115 //New slot created |
|
116 EPEngEventNWSessionSlotCreated = 1, |
|
117 |
|
118 //Slot configured |
|
119 EPEngEventNWSessionSlotChanged = 2, |
|
120 |
|
121 //Slot removed |
|
122 EPEngEventNWSessionSlotRemoved = 3, |
|
123 |
|
124 //Network Presence Session opened from the slot |
|
125 EPEngEventAppNWPresenceSessionOpened = 4, |
|
126 |
|
127 //Network Presence Session closed from the slot |
|
128 EPEngEventAppNWPresenceSessionClosed = 5, |
|
129 |
|
130 //Network Server closed session |
|
131 EPEngEventNWSessionClosedByServer = 6, |
|
132 |
|
133 //Network Presence Session transport signalled event |
|
134 //EventInt and EventDes describe further the actual event |
|
135 EPEngEventNWSessionTransport = 7 |
|
136 }; |
|
137 |
|
138 |
|
139 |
|
140 |
|
141 |
|
142 /** |
|
143 * NWSessionSlot state enumeration. |
|
144 * |
|
145 * @since 3.0 |
|
146 */ |
|
147 enum TPEngNWSessionSlotState |
|
148 { |
|
149 // No network presence session open from NWSessionSlot. |
|
150 EPEngNWPresenceSessionClosed = 1, |
|
151 |
|
152 // Application network presence session open from NWSessionSlot. |
|
153 EPEngNWPresenceSessionOpen = 2 |
|
154 }; |
|
155 |
|
156 |
|
157 |
|
158 |
|
159 |
|
160 |
|
161 |
|
162 /** |
|
163 * NWSessionSlot operation ID's. |
|
164 * |
|
165 * These NWSessionSlot operation IDs are visible for clients in: |
|
166 * 1) Transaction result entries, see |
|
167 * - MPEngTransactionStatus2 |
|
168 * |
|
169 * 2) Operation event callbacks, see |
|
170 * - MPEngNWSessionOperationObserver2 |
|
171 * |
|
172 * Internally Presence Engine uses these ID's |
|
173 * to manage NWSessionSlot operations. |
|
174 * |
|
175 * @since 3.0 |
|
176 */ |
|
177 enum TPEngNWSessionSlotOperations |
|
178 { |
|
179 //Presence network session opening operation |
|
180 EPEngNWSSOpNWSessionOpen = 1, |
|
181 |
|
182 |
|
183 //Presence network session closing operation |
|
184 EPEngNWSSOpNWSessionClose = 2 |
|
185 }; |
|
186 |
|
187 |
|
188 |
|
189 |
|
190 |
|
191 |
|
192 |
|
193 /** |
|
194 * Transaction operation ID's. |
|
195 * |
|
196 * These transaction operation IDs are visible for clients in: |
|
197 * 1) Transaction result entries, see |
|
198 * - MPEngTransactionStatus2 |
|
199 * |
|
200 * 2) Operation event callbacks, see |
|
201 * - MPEngContactListTransactionObserver2 |
|
202 * - MPEngAttributeListTransactionObserver2 |
|
203 * - MPEngAttributeTransactionObserver2 |
|
204 * |
|
205 * Internally Presence Engine uses these ID's |
|
206 * to manage transaction operations. |
|
207 * |
|
208 * @since 3.0 |
|
209 */ |
|
210 enum TPEngTransactionOperation |
|
211 { |
|
212 //Publish own presence attributes |
|
213 EPEngTransOpOwnAttributePublish = 51, |
|
214 |
|
215 //Fetch Presence Attributes to cache |
|
216 EPEngTransOpAttributeFetchToCache = 52, |
|
217 |
|
218 //Fetch Presence Attributes to objects |
|
219 EPEngTransOpAttributeFetchToObjects = 53, |
|
220 |
|
221 |
|
222 |
|
223 // Synchronize Attribute base things, default attribute list |
|
224 EPEngTransOpAttrListBaseSynchronize = 101, |
|
225 |
|
226 // Sychronize attribut elist for contact list |
|
227 EPEngTransOpAttrListSyncForCntList = 102, |
|
228 |
|
229 //Publish Attribute lists |
|
230 EPEngTransOpAttrListPublish = 103, |
|
231 |
|
232 |
|
233 //Synchronize Contact List base things (list of lists) |
|
234 EPEngTransOpCntListBaseSync = 150, |
|
235 |
|
236 //Update contact list |
|
237 EPEngTransOpCntListUpdateList = 151, |
|
238 |
|
239 //Synchronize contact list |
|
240 EPEngTransOpCntListSyncList = 152, |
|
241 |
|
242 //Network search start |
|
243 EPEngTransOpNetworkSearchStart = 200, |
|
244 |
|
245 //Network continue search |
|
246 EPEngTransOpNetworkSearchContinue = 201, |
|
247 |
|
248 //Network search stop |
|
249 EPEngTransOpNetworkSearchStop = 202, |
|
250 |
|
251 // Respond to Autorization Requests |
|
252 EPEngTransOpAuthorizationResponse = 250 |
|
253 }; |
|
254 |
|
255 |
|
256 |
|
257 |
|
258 |
|
259 #endif //__PENGPRESENCEENGINECONSTS2_H |
|
260 |
|
261 |