1 /* |
|
2 * Copyright (c) 2006, 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: Interface for identity object. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef MyXMPPSettingApiStub_H |
|
19 #define MyXMPPSettingApiStub_H |
|
20 #include <e32base.h> |
|
21 |
|
22 class CXmppSettingsApi : public CBase |
|
23 { |
|
24 |
|
25 public: |
|
26 |
|
27 /** |
|
28 * Two-phased constructor. |
|
29 */ |
|
30 static CXmppSettingsApi* NewL(); |
|
31 |
|
32 /** |
|
33 * Two-phased constructor. |
|
34 */ |
|
35 static CXmppSettingsApi* NewLC(); |
|
36 |
|
37 /** |
|
38 * Destructors. |
|
39 */ |
|
40 virtual ~CXmppSettingsApi(); |
|
41 |
|
42 |
|
43 public: |
|
44 |
|
45 /** |
|
46 * Creates new settings record. |
|
47 * |
|
48 * @since S60 5.0 |
|
49 * @param aSettingsRecordId On return contains the new setting id. |
|
50 */ |
|
51 IMPORT_C void CreateSettingsRecordL( TUint32& aSettingsRecordId ); |
|
52 |
|
53 /** |
|
54 * Removes Settings record using given settings record id. |
|
55 * |
|
56 * @since S60 5.0 |
|
57 * @param aSettingsRecordId Setting id to be removed. |
|
58 */ |
|
59 IMPORT_C void RemoveSettingsRecordL( TUint32 aSettingsRecordId ); |
|
60 |
|
61 /** |
|
62 * Returns default settings record id. |
|
63 * |
|
64 * @since S60 5.0 |
|
65 * @param aSettingsRecordId On return contains the setting id. |
|
66 */ |
|
67 IMPORT_C void DefaultSettingsRecordL( TUint32& aSettingsRecordId ); |
|
68 |
|
69 /** |
|
70 * Fills the array with settings ids. If there is none, array |
|
71 * is zero length. |
|
72 * |
|
73 * @since S60 5.0 |
|
74 * @param aArray Array is filled with setting ids. |
|
75 */ |
|
76 IMPORT_C void GetSettingsRecordIdArrayL( RArray<TUint32>& aArray ); |
|
77 |
|
78 /** |
|
79 * Sets value of the param. If ParamName is not found, it creates new. |
|
80 * |
|
81 * @since S60 5.0 |
|
82 * @param aSettingsRecordId Setting id of interest. |
|
83 * @param aAttrName Parameters name. |
|
84 * @param aAttrValue Parameters value. |
|
85 */ |
|
86 IMPORT_C void SetParamL( TUint32 aSettingsRecordId, |
|
87 const TDesC& aAttrName, |
|
88 const TDesC& aAttrValue ); |
|
89 |
|
90 /** |
|
91 * Sets value of the param. If ParamName is not found, it creates new. |
|
92 * |
|
93 * @since S60 5.0 |
|
94 * @param aSettingsRecordId Setting id of interest. |
|
95 * @param aAttrName Parameters name. |
|
96 * @param aAttrValue Parameters value. |
|
97 */ |
|
98 IMPORT_C void SetParamL( TUint32 aSettingsRecordId, |
|
99 const TDesC& aAttrName, |
|
100 TInt aAttrValue ); |
|
101 |
|
102 /** |
|
103 * Gets value of the param. |
|
104 * - KErrNotFound if setting collection or Param is not found. |
|
105 * |
|
106 * @since S60 5.0 |
|
107 * @param aSettingsRecordId Setting id of interest. |
|
108 * @param aAttrName Parameters name. |
|
109 * @param aAttrValue On return, contains the param value. |
|
110 */ |
|
111 IMPORT_C void GetParamL( TUint32 aSettingsRecordId, |
|
112 const TDesC& aAttrName, |
|
113 TDes& aAttrValue ); |
|
114 |
|
115 /** |
|
116 * Gets value of the param. |
|
117 * - KErrNotFound if setting collection or Param is not found. |
|
118 * |
|
119 * @since S60 5.0 |
|
120 * @param aSettingsRecordId Setting id of interest. |
|
121 * @param aAttrName Parameters name. |
|
122 * @param aAttrValue On return, contains the param value. |
|
123 */ |
|
124 IMPORT_C void GetParamL( TUint32 aSettingsRecordId, |
|
125 const TDesC& aAttrName, |
|
126 TInt& aAttrValue ); |
|
127 |
|
128 /** |
|
129 * Removes this param from this Settings record. |
|
130 * - KErrNotFound If Settings record or param is not found. |
|
131 * |
|
132 * @since S60 5.0 |
|
133 * @param aSettingsRecordId Setting id. |
|
134 * @param aAttrName Parameters name. |
|
135 */ |
|
136 IMPORT_C void RemoveParamL( TUint32 aSettingsRecordId, |
|
137 const TDesC& aAttrName ); |
|
138 |
|
139 |
|
140 /** |
|
141 * This method does checks before setting or getting values. |
|
142 * |
|
143 * @since S60 5.0 |
|
144 * @param aSettingsRecordId Setting id to be changed. |
|
145 * @param aAttrName Parameters name. |
|
146 * @param aCreateColumnIfNotExist Should new column be created if it is not |
|
147 * founded (by aAttrName). |
|
148 * @param aTheKey On return contains key to be created/changed. |
|
149 */ |
|
150 IMPORT_C void GetRepositoryKeyL( TUint32 aSettingsRecordId, |
|
151 const TDesC& aAttrName, |
|
152 TBool aCreateColumnIfNotExist, |
|
153 TUint32& aTheKey ); |
|
154 |
|
155 |
|
156 private: |
|
157 |
|
158 }; |
|
159 |
|
160 |
|
161 #endif // MyXMPPSettingApiStub_H |
|