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