|
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: Definitions for WV Presence Attributes |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __PENGWVPRESENCEATTRIBUTES2_H |
|
19 #define __PENGWVPRESENCEATTRIBUTES2_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <E32std.h> |
|
23 |
|
24 |
|
25 //----------------------------------------------------------------------- |
|
26 // SUPPORTED WV PRESENCE ATTRIBUTES |
|
27 |
|
28 |
|
29 /** |
|
30 * Online status attribute. |
|
31 * |
|
32 * Supported in protocols: |
|
33 * - WV CSP 1.1 |
|
34 * - WV CSP 1.2 |
|
35 */ |
|
36 const TUint32 KUidPrAttrOnlineStatus = 0x10000001; |
|
37 |
|
38 |
|
39 /** |
|
40 * Client info attribute. |
|
41 * |
|
42 * Supported in protocols: |
|
43 * - WV CSP 1.1 |
|
44 * - WV CSP 1.2 |
|
45 */ |
|
46 const TUint32 KUidPrAttrClientInfo = 0x10000002; |
|
47 |
|
48 |
|
49 /** |
|
50 * Communication capabilities attribute. |
|
51 * |
|
52 * Supported in protocols: |
|
53 * - WV CSP 1.1 |
|
54 * - WV CSP 1.2 |
|
55 */ |
|
56 const TUint32 KUidPrAttrCommCap = 0x10000003; |
|
57 |
|
58 |
|
59 /** |
|
60 * User availability attribute. |
|
61 * |
|
62 * Supported in protocols: |
|
63 * - WV CSP 1.1 |
|
64 * - WV CSP 1.2 |
|
65 */ |
|
66 const TUint32 KUidPrAttrUserAvailability = 0x10000004; |
|
67 |
|
68 |
|
69 /** |
|
70 * Status text attribute. |
|
71 * |
|
72 * Supported in protocols: |
|
73 * - WV CSP 1.1 |
|
74 * - WV CSP 1.2 |
|
75 */ |
|
76 const TUint32 KUidPrAttrStatusText = 0x10000005; |
|
77 |
|
78 |
|
79 /** |
|
80 * StatusContent attribute. |
|
81 * |
|
82 * (Former KUidPrAttrMyLogoStatusContent) |
|
83 * |
|
84 * Supported in protocols: |
|
85 * - WV CSP 1.1 |
|
86 * - WV CSP 1.2 |
|
87 */ |
|
88 const TUint32 KUidPrAttrStatusContent = 0x10000006; |
|
89 |
|
90 |
|
91 /** |
|
92 * MyLogo thumbnail. |
|
93 * |
|
94 * Supported in protocols: |
|
95 * - WV CSP 1.1 |
|
96 * - WV CSP 1.2 |
|
97 */ |
|
98 const TUint32 KUidPrAttrMyLogoThumbnail = 0x10000007; |
|
99 |
|
100 |
|
101 /** |
|
102 * Infolink attribute. |
|
103 * |
|
104 * Supported in protocols: |
|
105 * - WV CSP 1.2 |
|
106 * |
|
107 * Infolink attribute support is variated |
|
108 * InfoLink support can be checked from: |
|
109 * 1) CenRep. See PresenceEngineInternalCRKeys.h and |
|
110 * KPEngVariationInfoLinkSupported key. Remeber |
|
111 * to check also protocol version from |
|
112 * WV Engine CenRep variation file. |
|
113 * |
|
114 * 2) Attribute store. See |
|
115 * CPEngAttributeStore2::AttributeTypeSupported() |
|
116 * Attribute store AttributeTypeSupported() method |
|
117 * combines both WV Engine protocol version and |
|
118 * InfoLink variation checks. |
|
119 */ |
|
120 const TUint32 KUidPrAttrInfoLink = 0x10000008; |
|
121 |
|
122 |
|
123 /** |
|
124 * Alias attribute. |
|
125 * Supported in protocols: WV CSP 1.1 and WV CSP 1.2 |
|
126 */ |
|
127 const TUint32 KUidPrAttrAlias = 0x10000009; |
|
128 |
|
129 |
|
130 |
|
131 |
|
132 |
|
133 |
|
134 |
|
135 |
|
136 |
|
137 //----------------------------------------------------------------------- |
|
138 // ATTRIBUTE DATA DEFINITIONS |
|
139 |
|
140 |
|
141 |
|
142 /** |
|
143 * Online Status. |
|
144 * (Attribute type KUidPrAttrOnlineStatus.) |
|
145 * |
|
146 * Online status indicates is the subscribed client |
|
147 * logged in to the Wireless Village server or not. |
|
148 * |
|
149 * |
|
150 * Integer data fields: |
|
151 * - EPEngOnlineStatus |
|
152 * Online status. Possible values enumerated |
|
153 * in TPEngWVOnlineStatusValues. Readonly value. |
|
154 * |
|
155 * @since 3.0 |
|
156 */ |
|
157 // Integer fields |
|
158 enum TPEngWVOnlineStatusIntegerFields |
|
159 { |
|
160 EPEngOnlineStatus = 0 |
|
161 }; |
|
162 |
|
163 // Enum values for EPEngOnlineStatus field |
|
164 enum TPEngWVOnlineStatusValues |
|
165 { |
|
166 EPEngOnlineStatusOffline = 0, //default value |
|
167 EPEngOnlineStatusOnline = 1 |
|
168 }; |
|
169 |
|
170 |
|
171 |
|
172 |
|
173 |
|
174 |
|
175 /** |
|
176 * Client info. |
|
177 * (Attribute type KUidPrAttrClientInfo.) |
|
178 * |
|
179 * Client info indicates to the subscriber information |
|
180 * about this particular client. This information |
|
181 * includes manufacturer, model, a user defined name, |
|
182 * the current language and a description of the client. |
|
183 * One enumerated field and five descriptive text fields. |
|
184 * |
|
185 * |
|
186 * NOTE!! This is a readonly attribute. |
|
187 * Client application can't set local values. |
|
188 * |
|
189 * Integer data fields: |
|
190 * - EPEngCliInfDeviceType. |
|
191 * Device type. Different values enumerated |
|
192 * in TPEngWVCliInfDeviceTypeValues. Readonly value. |
|
193 * |
|
194 * Unicode data fields: |
|
195 * - EPEngCliInfDeviceManufacturer. |
|
196 * Name of the device manufacturer. Free text, readonly. |
|
197 * |
|
198 * - EPEngCliInfClientProducer. |
|
199 * Name of the client application producer. Free text, readonly. |
|
200 * |
|
201 * - EPEngCliInfDeviceModel. |
|
202 * Model of the client device. Free text, readonly. |
|
203 * |
|
204 * - EPEngCliInfClientVersion. |
|
205 * Version of the client application. Free text, readonly. |
|
206 * |
|
207 * - EPEngCliInfClientLanguage. |
|
208 * Language setting of the client device. |
|
209 * ISO 639-2/T (three letter language code, or empty descriptor), readonly. |
|
210 * (Only language code length is validated.) |
|
211 * |
|
212 * @since 3.0 |
|
213 */ |
|
214 // DesC16 fields |
|
215 enum TPEngWVClientInfoDesC16Fields |
|
216 { |
|
217 EPEngCliInfDeviceManufacturer = 0, |
|
218 EPEngCliInfClientProducer = 1, |
|
219 EPEngCliInfDeviceModel = 2, |
|
220 EPEngCliInfClientVersion = 3, |
|
221 EPEngCliInfClientLanguage = 4 |
|
222 }; |
|
223 |
|
224 // Integer fields |
|
225 enum TPEngWVClientInfoIntegerFields |
|
226 { |
|
227 EPEngCliInfDeviceType = 0 |
|
228 }; |
|
229 |
|
230 // Enum values for EPEngCliInfDeviceType field |
|
231 enum TPEngWVCliInfDeviceTypeValues |
|
232 { |
|
233 EPEngCliDevTypeMobilePhone = 0, |
|
234 EPEngCliDevTypeComputer = 1, |
|
235 EPEngCliDevTypePDA = 2, |
|
236 EPEngCliDevTypeCLI = 3, |
|
237 EPEngCliDevTypeOther = 4 //default value |
|
238 }; |
|
239 |
|
240 |
|
241 |
|
242 |
|
243 |
|
244 |
|
245 /** |
|
246 * Communication capability. |
|
247 * (Attribute type KUidPrAttrCommCap.) |
|
248 * |
|
249 * The communication capability means the capability |
|
250 * of the device hosting the client for certain type |
|
251 * of user-to-user communication. |
|
252 * |
|
253 * One integer field and two descriptive text |
|
254 * fields in five field groups. |
|
255 * |
|
256 * Integer data fields: |
|
257 * - EPEngCommCapStatus. |
|
258 * The status of the communication client. Values |
|
259 * enumerated in TPEngWVCommunicationCapabilityValues. |
|
260 * |
|
261 * DesC16 data fields: |
|
262 * - EPEngCommCapContact. |
|
263 * Contact address of the communication client. |
|
264 * Free text. (not supported) |
|
265 * |
|
266 * - EPEngCommCapNote. |
|
267 * Free text describing the communication client. |
|
268 * (not supported) |
|
269 * |
|
270 * Field groups for integer & DesC16 data fields: |
|
271 * - EPEngCommCapIMClient |
|
272 * - EPEngCommCapCallClient (not supported) |
|
273 * - EPEngCommCapSmsClient (not supported) |
|
274 * - EPEngCommCapMmsClient (not supported) |
|
275 * - EPEngCommCapEmailClient (not supported) |
|
276 * |
|
277 * @since 3.0 |
|
278 */ |
|
279 //Field groups |
|
280 enum TPEngWVCommunicationCapabilitiesFieldGroups |
|
281 { |
|
282 EPEngCommCapIMClient = 0 ///< IM field group |
|
283 }; |
|
284 |
|
285 // Integer fields |
|
286 enum TPEngWVCommunicationCapabilitiesIntegerFields |
|
287 { |
|
288 EPEngCommCapStatus = 0 |
|
289 }; |
|
290 |
|
291 // Enum values for EPEngCommCapStatus field |
|
292 enum TPEngWVCommunicationCapabilityValues |
|
293 { |
|
294 EPEngCommCapStatusClosed = 0, //default value |
|
295 EPEngCommCapStatusOpen = 1 |
|
296 }; |
|
297 |
|
298 |
|
299 |
|
300 |
|
301 |
|
302 |
|
303 /** |
|
304 * User availability. |
|
305 * (Attribute type KUidPrAttrUserAvailability.) |
|
306 * |
|
307 * User availability status indicates how willing the publisher |
|
308 * is to start telephony or messaging conversation. |
|
309 * |
|
310 * Integer data field: |
|
311 * - EPEngUsrAvailability. |
|
312 * User availability. Status values are |
|
313 * enumerated in TPEngWVUserAvailabilityValues. |
|
314 * |
|
315 * @since 3.0 |
|
316 */ |
|
317 // Integer fields |
|
318 enum TPEngWVUserAvailabilityIntegerFields |
|
319 { |
|
320 EPEngUsrAvailability = 0 |
|
321 }; |
|
322 |
|
323 // Enum values from EPEngUsrAvailability field |
|
324 enum TPEngWVUserAvailabilityValues |
|
325 { |
|
326 EPEngUsrAvailabilityOffline = 0, //default value |
|
327 EPEngUsrAvailabilityDiscreet = 1, |
|
328 EPEngUsrAvailabilityOnline = 2 |
|
329 }; |
|
330 |
|
331 |
|
332 |
|
333 |
|
334 |
|
335 |
|
336 |
|
337 |
|
338 /** |
|
339 * Status text. |
|
340 * (Attribute type KUidPrAttrStatusText.) |
|
341 * |
|
342 * A short free form text description of user status. |
|
343 * |
|
344 * DesC16 data fields: |
|
345 * - EPEngStatusText. |
|
346 * The status text. Free text with max |
|
347 * KPEngMaxWVStatusTextLength length. |
|
348 * |
|
349 * @since 3.0 |
|
350 */ |
|
351 enum TPEngWVStatusTextDesC16Fields |
|
352 { |
|
353 EPEngStatusText = 0 |
|
354 }; |
|
355 |
|
356 const TInt KPEngMaxWVStatusTextLength = 40; |
|
357 |
|
358 |
|
359 |
|
360 |
|
361 |
|
362 |
|
363 |
|
364 |
|
365 /** |
|
366 * Status Content attribute. |
|
367 * (Attribute type KUidPrAttrStatusContent.) |
|
368 * |
|
369 * Status Content presents multimedia object that |
|
370 * the user has selected as personal status information. |
|
371 * |
|
372 * Currently only logo image (MyLogo) content is supported. |
|
373 * MyLogo is JPEG, GIF 87a or GIF 89a formatted image |
|
374 * with max 60x100 pixel size and 5 kB byte size after |
|
375 * BASE64 encoding. |
|
376 * |
|
377 * If client sets too big or wrong formatted image as MyLogo, |
|
378 * it is automaticly tried to converted to meet the MyLogo |
|
379 * requirements. Conversion can fail with: |
|
380 * - KErrPathNotFound: image file isn't found |
|
381 * - KErrNotSupported: tried image format not supported by the platform |
|
382 * - KErrTooBig: image byte size still too big after JPEG conversion |
|
383 * - or some other system-wide error code. |
|
384 * |
|
385 * |
|
386 * DesC16 fields: |
|
387 * - EPEngMakeMyLogoDirectContentFromFile |
|
388 * Command to generate new MyLogo direct content image |
|
389 * asynchronously from given image file. Data parameter |
|
390 * is image file filename. This field ID can be used |
|
391 * both with synchronous SetDataDesC16L() and asynchronous |
|
392 * SetDataDesC16AsyncL(). With synchronous SetDataDesC16L(), internal |
|
393 * asynchronous processing is masqueraded as modal request |
|
394 * with CActiveSchedulerWait and processing errors are |
|
395 * handled with leave. If empty filename is given, clears |
|
396 * existing logo. |
|
397 * |
|
398 * - EPEngMyLogoDirectContentSourceFileName |
|
399 * Gets the currently set MyLogo source file name. File name |
|
400 * is available only for user own setted MyLogo and if the set |
|
401 * was done with EPEngMakeMyLogoDirectContentFromFile. |
|
402 * In other cases empty buffer is returned. |
|
403 * |
|
404 * |
|
405 * DesC8 fields: |
|
406 * - EPEngMakeMyLogoDirectContentFromBuffer |
|
407 * Command to generate new MyLogo direct content image |
|
408 * asynchronously from given image data. Data parameter |
|
409 * is images full data. This field ID can be used both |
|
410 * with synchronous SetDataDesC8L() and asynchronous |
|
411 * SetDataDesC16AsyncL(). With synchronous SetDataDesC8L(), internal |
|
412 * asynchronous processing is masqueraded as modal request |
|
413 * with CActiveSchedulerWait and processing errors are |
|
414 * handled with leave. If empty buffer is given, clears |
|
415 * existing logo. |
|
416 * |
|
417 * - EPEngMyLogoDirectContentBuffer |
|
418 * Gets current MyLogo direct content image data. |
|
419 * If no logo is set, empty buffer is returned. |
|
420 * |
|
421 * NOTE!! Only one set request may be active at time. |
|
422 * |
|
423 * @since 3.0 |
|
424 */ |
|
425 |
|
426 // DesC16 fields. |
|
427 enum TPEngWVStatusContentDesC16Fields |
|
428 { |
|
429 EPEngMakeMyLogoDirectContentFromFile = 0, |
|
430 EPEngMyLogoDirectContentSourceFileName = 1 |
|
431 }; |
|
432 |
|
433 |
|
434 // DesC8 fields. |
|
435 enum TPEngWVStatusContentDesC8Fields |
|
436 { |
|
437 EPEngMakeMyLogoDirectContentFromBuffer = 1000, |
|
438 EPEngMyLogoDirectContentBuffer = 1001 |
|
439 }; |
|
440 |
|
441 |
|
442 // Max height for my logo image. |
|
443 const TInt KPEngWVMyLogoImageMaxHeight = 60; |
|
444 |
|
445 // Max width for my logo image. |
|
446 const TInt KPEngWVMyLogoImageMaxWidth = 100; |
|
447 |
|
448 // Max byte size for my logo image. |
|
449 const TInt KPEngWVMyLogoImageMaxByteSize = 3800; |
|
450 |
|
451 // Max byte size for BASE64 transfer encoded my logo image. |
|
452 const TInt KPEngWVMyLogoImageMaxEncodedByteSize = 5120; |
|
453 |
|
454 // My Logo mime types |
|
455 _LIT8( KPEngWVMyLogoMimeJpeg, "image/jpeg" ); |
|
456 _LIT8( KPEngWVMyLogoMimeImageGif, "image/gif" ); |
|
457 |
|
458 |
|
459 |
|
460 |
|
461 |
|
462 |
|
463 |
|
464 |
|
465 /** |
|
466 * MyLogo thumbnail attribute. |
|
467 * (Attribute type KUidPrAttrMyLogoThumbnail.) |
|
468 * |
|
469 * MyLogoThumbnail is a thumbnail image generated |
|
470 * locally on the terminal for the received MyLogo images. |
|
471 * |
|
472 * Thumbnails are generated by the platform specific |
|
473 * Presence Engine extension plugins and thus thumbnails |
|
474 * can have platform specific charasteristics like |
|
475 * heigth, width and image type. Thumbnails are generated |
|
476 * asynchronously, so their completion is notified through |
|
477 * common Presence Engine attribute notification systems. |
|
478 * Thumbnail attribute is local attribute |
|
479 * (TPEngAttributeOriginator::EPEngLocalAttribute) and |
|
480 * thus it can't be used in attribute lists nor published. |
|
481 * |
|
482 * DesC8 fields: |
|
483 * - EPEngMyLogoThumbnailDesC8Buf0 |
|
484 * - EPEngMyLogoThumbnailDesC8Buf1 |
|
485 * - EPEngMyLogoThumbnailDesC8Buf2 |
|
486 * 8 bit descriptor fields. Usage of these buffers |
|
487 * is up to extension plugin. |
|
488 * |
|
489 * |
|
490 * DesC16 fields: |
|
491 * - EPEngMyLogoThumbnailDesC16Buf0 |
|
492 * - EPEngMyLogoThumbnailDesC16Buf1 |
|
493 * - EPEngMyLogoThumbnailDesC16Buf2 |
|
494 * 16 bit descriptor fields. Usage of these buffers |
|
495 * is up to extension plugin. |
|
496 * |
|
497 * @since 3.0 |
|
498 */ |
|
499 // DesC8 fields. |
|
500 enum TPEngMyLogoThumbnailDesC8Fields |
|
501 { |
|
502 EPEngMyLogoThumbnailDesC8Buf0 = 0, |
|
503 EPEngMyLogoThumbnailDesC8Buf1 = 1, |
|
504 EPEngMyLogoThumbnailDesC8Buf2 = 2 |
|
505 }; |
|
506 |
|
507 |
|
508 // DesC16 fields. |
|
509 enum TPEngMyLogoThumbnailDesC16Fields |
|
510 { |
|
511 EPEngMyLogoThumbnailDesC16Buf0 = 1000, |
|
512 EPEngMyLogoThumbnailDesC16Buf1 = 1001, |
|
513 EPEngMyLogoThumbnailDesC16Buf2 = 1002 |
|
514 }; |
|
515 |
|
516 |
|
517 |
|
518 |
|
519 |
|
520 |
|
521 |
|
522 /** |
|
523 * Alias attribute. |
|
524 * (Attribute type KUidPrAttrAlias.) |
|
525 * |
|
526 * Alias attribute holds the users preferred nickname. |
|
527 * |
|
528 * DesC16 fields: |
|
529 * - EPEngAlias |
|
530 * Preferred alias for a contact. |
|
531 * |
|
532 * @since 3.0 |
|
533 */ |
|
534 // DesC16 fields. |
|
535 enum TPEngAliasDesC16Fields |
|
536 { |
|
537 EPEngAlias = 0 |
|
538 }; |
|
539 |
|
540 |
|
541 |
|
542 |
|
543 |
|
544 |
|
545 |
|
546 |
|
547 /** |
|
548 * Info Link. |
|
549 * (Attribute type KUidPrAttrInfoLink.) |
|
550 * |
|
551 * NOTE: InfoLink support is still under development, |
|
552 * and details provided here might get changed. |
|
553 * |
|
554 * Info Link attribute. |
|
555 * |
|
556 * DesC16 data fields: |
|
557 * - EPEngInfoLinkLink |
|
558 * The Info Link. |
|
559 * |
|
560 * - EPEngInfoLinkDesc |
|
561 * The link description. |
|
562 * |
|
563 * - EPEngInfoLinkMimeType |
|
564 * The link mime type. |
|
565 * |
|
566 * DesC16 data fields are holded in groups. |
|
567 * Group ID in the get and set methods is index to wanted group. |
|
568 * Indexing is zero based. Group count can be get with |
|
569 * EPEngInfoLinkOpGetGroupCount opcode. |
|
570 * |
|
571 * New group is created when in data set the group ID |
|
572 * is the current group count. Group can be deleted |
|
573 * with EPEngInfoLinkOpDeleteGroup opcode. Enumeration |
|
574 * value is the index of to be deleted group. If value |
|
575 * -1 is given, all existing groups are deleted. |
|
576 * |
|
577 * @since 3.0 |
|
578 */ |
|
579 // DesC16 fields. |
|
580 enum TPEngInfoLinkUnicodeFields |
|
581 { |
|
582 EPEngInfoLinkLink = 0, |
|
583 EPEngInfoLinkDesc = 1, |
|
584 EPEngInfoLinkMimeType = 2 |
|
585 }; |
|
586 |
|
587 //Pre defined operation groups |
|
588 enum TPEngInfoLinkGroups |
|
589 { |
|
590 EPEngInfoLinkOperations = -100 |
|
591 }; |
|
592 |
|
593 // Integer fields (opcodes) |
|
594 enum TPEngInfoLinkEnumOpCodes |
|
595 { |
|
596 EPEngInfoLinkOpGetGroupCount = 1, |
|
597 EPEngInfoLinkOpDeleteGroup = 2 |
|
598 }; |
|
599 |
|
600 |
|
601 |
|
602 #endif // __PENGWVPRESENCEATTRIBUTES2_H |
|
603 |
|
604 // End of File |
|
605 |
|
606 |