|
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: presence_avalability text |
|
15 * |
|
16 */ |
|
17 #ifndef __AVABILITYTEXT_H |
|
18 #define __AVABILITYTEXT_H |
|
19 |
|
20 //availability text to be used with MPresenceBuddyInfo2::EBusy. |
|
21 //changed status values to sync with icons ids available in the branddata |
|
22 _LIT(KAwayState,"away"); |
|
23 _LIT(KOnPhoneState,"onmobile"); |
|
24 _LIT(KDndState,"dnd"); |
|
25 |
|
26 //availability text to be used with MPresenceBuddyInfo2::EUnknownAvailability. |
|
27 _LIT(KInvisibleState,"offline"); |
|
28 |
|
29 //Extension key-value to be used with MPresenceBuddyInfo2. |
|
30 //Extension Keys |
|
31 _LIT(KExtensionKey,"ExtensionKey"); |
|
32 |
|
33 //Extension Values. |
|
34 _LIT8(KPendingRequestExtensionValue,"pending"); |
|
35 _LIT8(KBlockedExtensionValue,"block"); |
|
36 _LIT8(KServiceExtensionValue,"ServiceOut"); |
|
37 _LIT8(KCallForwardExtensionValue,"CallForward"); |
|
38 |
|
39 /* |
|
40 =========================Example For BUSY States ============================= |
|
41 MPresenceBuddyInfo2* buddyPresInfo = MPresenceBuddyInfo2::NewLC(); |
|
42 |
|
43 //This will set presence status as On phone |
|
44 buddyPresInfo->SetAvailabilityL( MPresenceBuddyInfo2::EBusy,KOnPhoneState); |
|
45 |
|
46 //This will set presence status as Away |
|
47 buddyPresInfo->SetAvailabilityL( MPresenceBuddyInfo2::EBusy,KAwayState); |
|
48 |
|
49 //This will set presence status as do not disture |
|
50 buddyPresInfo->SetAvailabilityL( MPresenceBuddyInfo2::EBusy,KDndState); |
|
51 |
|
52 NOTE:: if TDesC& aAvailabilityText(second arg) is other then mentioned and |
|
53 TAvailabilityValues aAvailability is MPresenceBuddyInfo2::EBusy |
|
54 then presence will be BUSY. |
|
55 ============================================================================== |
|
56 */ |
|
57 |
|
58 /* |
|
59 =========================Example For INVISIBLE State=========================== |
|
60 MPresenceBuddyInfo2* buddyPresInfo = MPresenceBuddyInfo2::NewLC(); |
|
61 |
|
62 //This will set presence status as Invisible. |
|
63 buddyPresInfo->SetAvailabilityL( MPresenceBuddyInfo2::EUnknownAvailability,KInvisibleState); |
|
64 |
|
65 NOTE:: if TDesC& aAvailabilityText(second arg) is other then mentioned and |
|
66 TAvailabilityValues aAvailability is MPresenceBuddyInfo2::EUnknownAvailability |
|
67 then presence will be UNKNOWN. |
|
68 |
|
69 ============================================================================== |
|
70 */ |
|
71 |
|
72 /* |
|
73 =========================Example For BLOCKED And PENDING State================= |
|
74 MPresenceBuddyInfo2* buddyPresInfo = MPresenceBuddyInfo2::NewLC(); |
|
75 |
|
76 //This will set presence status as pending |
|
77 buddyPresInfo->SetAnyFieldL( KExtensionKey, KPendingRequestExtensionValue ); |
|
78 |
|
79 //This will set presence status as blocked |
|
80 buddyPresInfo->SetAnyFieldL( KExtensionKey, KBlockedExtensionValue ); |
|
81 |
|
82 NOTE:: if TDesC8& aValue(second arg) is other then mentioned then the(blocked) |
|
83 and pending states will not be shown |
|
84 provided the prnding and blocked state are not required at the smae time. |
|
85 ============================================================================== |
|
86 */ |
|
87 |
|
88 /* |
|
89 =========================Example For ServiceOut And CallForward State================= |
|
90 MPresenceBuddyInfo2* buddyPresInfo = MPresenceBuddyInfo2::NewLC(); |
|
91 |
|
92 //This will set presence status as CallForward |
|
93 buddyPresInfo->SetAnyFieldL( KExtensionKey, KCallForwardExtensionValue ); |
|
94 |
|
95 //This will set presence status as ServiceOut |
|
96 buddyPresInfo->SetAnyFieldL( KExtensionKey, KServiceOutExtensionValue ); |
|
97 |
|
98 NOTE:: if TDesC8& aValue(second arg) is other then mentioned then the(blocked) |
|
99 and pending states will not be shown |
|
100 provided the prnding and blocked state are not required at the smae time. |
|
101 ============================================================================== |
|
102 */ |
|
103 #endif //__AVABILITYTEXT_H |
|
104 |
|
105 // End of File |