1 /* |
|
2 * Copyright (c) 2009-2010 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 handler for VoIP XML processor |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef VOIPXMLPRESENCEHANDLER_H |
|
20 #define VOIPXMLPRESENCEHANDLER_H |
|
21 |
|
22 #include <pressettingsset.h> |
|
23 |
|
24 class TPresSettingsSet; |
|
25 |
|
26 /** |
|
27 * VoipXmlPresenceHandler |
|
28 * Presence handler class. |
|
29 * |
|
30 * @lib voipxmlprocessor.lib |
|
31 * @since S60 v5.0 |
|
32 */ |
|
33 class CVoipXmlPresenceHandler : public CBase |
|
34 { |
|
35 #ifdef _DEBUG |
|
36 friend class UT_CVoipXmlPresenceHandler; |
|
37 friend class UT_CVoipXmlParamHandler; |
|
38 #endif |
|
39 |
|
40 public: |
|
41 |
|
42 static CVoipXmlPresenceHandler* NewL(); |
|
43 ~CVoipXmlPresenceHandler(); |
|
44 |
|
45 public: |
|
46 |
|
47 /** |
|
48 * Sets XDM setting. |
|
49 * |
|
50 * @since S60 v5.0 |
|
51 * @param aParam Parameter to be set. |
|
52 * @param aValue Value of the setting. |
|
53 */ |
|
54 void SetSetting( TInt aParam, const TDesC& aValue ); |
|
55 |
|
56 /** |
|
57 * Stores settings to 'XDM registry', i.e. creates an XDM collection. |
|
58 * |
|
59 * @since S60 v5.0 |
|
60 * @return KErrNone if successful, |
|
61 * KErrNotSupported if no settings to be stored, |
|
62 * KErrCompletion if settings could not be stored. |
|
63 */ |
|
64 TInt StoreSettings(); |
|
65 |
|
66 /** |
|
67 * Returns the settings ID. |
|
68 * |
|
69 * @since S60 v5.0 |
|
70 * @return XDM settings ID. |
|
71 */ |
|
72 TUint32 SettingsId(); |
|
73 |
|
74 /** |
|
75 * Gives linkage information. |
|
76 * |
|
77 * @since S60 v5.0 |
|
78 * @param aType Type of settings. |
|
79 * @param aSettingsId Settings ID. |
|
80 */ |
|
81 void LinkSettings( TInt aType, TUint32 aSettingsId ); |
|
82 |
|
83 /** |
|
84 * Finalizes settings, i.e. stores the profile with linkage information. |
|
85 * |
|
86 * @since S60 v5.0 |
|
87 * @return KErrNone if successful, |
|
88 * KErrGeneral if settings could not be finalized. |
|
89 */ |
|
90 TInt FinalizeSettings(); |
|
91 |
|
92 private: |
|
93 |
|
94 /** |
|
95 * Creates a provider name for Presence profile. aName is used |
|
96 * and replaced with a parenthised ordered number if the name is |
|
97 * already found in Presence storage. |
|
98 * |
|
99 * @since S60 v5.0 |
|
100 * @param aName Provider name to be set. |
|
101 */ |
|
102 void CreateProviderNameL( TDes& aName ); |
|
103 |
|
104 private: |
|
105 |
|
106 CVoipXmlPresenceHandler(); |
|
107 void ConstructL(); |
|
108 |
|
109 private: |
|
110 |
|
111 /** |
|
112 * XDM settings collection object. |
|
113 * Own. |
|
114 */ |
|
115 TPresSettingsSet iProfile; |
|
116 |
|
117 /** |
|
118 * Tells if any settings have been set to temporary profile. |
|
119 */ |
|
120 TBool iSettingsSet; |
|
121 |
|
122 /** |
|
123 * XDM collection ID. |
|
124 */ |
|
125 TUint32 iProfileId; |
|
126 }; |
|
127 |
|
128 #endif // VOIPXMLPRESENCEHANDLER_H |
|
129 |
|
130 // End of file. |
|