4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: JuHak Park <juhaki.park@samsung.com>,
7 * JuneHyuk Lee <junhyuk7.lee@samsung.com>,
8 * SunBong Ha <sunbong.ha@samsung.com>
10 * Licensed under the Apache License, Version 2.0 (the "License");
11 * you may not use this file except in compliance with the License.
12 * You may obtain a copy of the License at
14 * http://www.apache.org/licenses/LICENSE-2.0
16 * Unless required by applicable law or agreed to in writing, software
17 * distributed under the License is distributed on an "AS IS" BASIS,
18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 * See the License for the specific language governing permissions and
20 * limitations under the License.
29 * For any sort of issue you concern as to this software,
30 * you may use following point of contact.
31 * All resources contributed on this software
32 * are orinigally written by S-Core Inc., a member of Samsung Group.
34 * SeongWon Shim <seongwon.shim@samsung.com>
40 * @brief This file is the header file of defined vconf value
43 #ifndef COMMON_VCONF_H_
44 #define COMMON_VCONF_H_
48 /*TODO have to be removed after removing vconf*/
49 /*! Here are some global macros representing Settings Paths for AS/DS/DM*/
50 #define AS_SETTINGS_PATH "db/Apps/ActiveSync-service"
51 #define DS_SETTINGS_DEFAULT_PATH "db/syncml-service/DS"
52 #define DS_SETTINGS_PATH DS_SETTINGS_DEFAULT_PATH"/Accounts"
53 #define DM_SETTINGS_PATH "db/syncml-service/DM"
55 /* Vconf key names for SyncML DS profile setting.*/
56 #define DS_SETTING_CONTACT_CHANGETIME "/Contact/ChangeTime" /*int*/
57 #define DS_SETTING_CALENDAR_CHANGETIME "/Calendar/ChangeTime" /*int*/
58 #define DS_SETTING_MEMO_CHANGETIME "/Note/ChangeTime" /*int*/
60 #define DS_SETTING_FILE_CHANGETIME "/File/ChangeTime" /*int*/
62 /* Keys for each profile */
63 #define DS_SETTING_NAME "/Name" /*string*/
64 #define DS_SETTING_ADDRTYPE "/AppAddr/AddrType" /*int*/
65 #define DS_SETTING_ADDR "/AppAddr/Addr" /*string*/
66 #define DS_SETTING_PORTNBR "/AppAddr/PortNbr" /*int*/
67 #define DS_SETTING_CLIENT_AUTHNONCE "/AuthInfo/Client/AuthNonce" /*string*/
68 #define DS_SETTING_CLIENT_AUTHTYPE "/AuthInfo/Client/AuthType" /*int*/
69 #define DS_SETTING_CLIENT_AUTHPWD "/AuthInfo/Client/AuthPWD" /*string*/
70 #define DS_SETTING_CLIENT_AUTHNAME "/AuthInfo/Client/AuthName" /*string*/
71 #define DS_SETTING_LASTSESSIONTIME "/GUI/LastSessionTime" /*int*/
72 #define DS_SETTING_LASTSESSIONSTATUS "/GUI/LastSessionStatus" /*int*/
73 #define DS_SETTING_SYNCMODE "/GUI/SyncMode" /*string*/
74 #define DS_SETTING_INTERVAL "/GUI/Interval" /*string*/
75 #define DS_SETTING_SYNCTYPE "/GUI/SyncType" /*string*/
76 #define DS_SETTING_AUTOSYNC_BEGINTIME "/GUI/AutoSync/BeginTime" /*int*/
77 /* Keys for each resource type */
79 #define DS_SETTING_CONTACT_ENABLED "/Resource/Contacts/Enabled" /*int*/
80 #define DS_SETTING_CONTACT_TGTURI "/Resource/Contacts/TgtURI" /*string*/
81 #define DS_SETTING_CONTACT_SRCURI "/Resource/Contacts/SrcURI" /*string*/
82 #define DS_SETTING_CONTACT_MEMSYNC "/Resource/Contacts/MemSync" /*string*/
83 #define DS_SETTING_CONTACT_MEMSYNCBACKUP "/Resource/Contacts/MemSync_backup" /*string*/
84 #define DS_SETTING_CONTACT_AUTHNONCE "/Resource/Contacts/AuthInfo/Client/AuthNonce" /*string*/
85 #define DS_SETTING_CONTACT_AUTHTYPE "/Resource/Contacts/AuthInfo/Client/AuthType" /*int*/
86 #define DS_SETTING_CONTACT_AUTHPWD "/Resource/Contacts/AuthInfo/Client/AuthPWD" /*string*/
87 #define DS_SETTING_CONTACT_AUTHNAME "/Resource/Contacts/AuthInfo/Client/AuthName" /*string*/
88 #define DS_SETTING_CONTACT_DBSYNCED "/Resource/Contacts/Statistics/DBSynced" /*string*/
89 #define DS_SETTING_CONTACT_LASTANCHOR "/Resource/Contacts/Statistics/LastAnchor" /*string*/
90 #define DS_SETTING_CONTACT_LASTSESSIONTIME "/Resource/Contacts/Statistics/LastSessionTime" /*int*/
91 #define DS_SETTING_CONTACT_C2S_TOTAL "/Resource/Contacts/Statistics/Client2Server_Total" /*int*/
92 #define DS_SETTING_CONTACT_S2C_TOTAL "/Resource/Contacts/Statistics/Server2Client_Total" /*int*/
93 #define DS_SETTING_CONTACT_C2S_REPLACE "/Resource/Contacts/Statistics/Client2Server_NrOfReplace" /*int*/
94 #define DS_SETTING_CONTACT_S2C_REPLACE "/Resource/Contacts/Statistics/Server2Client_NrOfReplace" /*int*/
95 #define DS_SETTING_CONTACT_C2S_ADD "/Resource/Contacts/Statistics/Client2Server_NrOfAdd" /*int*/
96 #define DS_SETTING_CONTACT_S2C_ADD "/Resource/Contacts/Statistics/Server2Client_NrOfAdd" /*int*/
97 #define DS_SETTING_CONTACT_S2C_DELETE "/Resource/Contacts/Statistics/Server2Client_NrOfDelete" /*int*/
98 #define DS_SETTING_CONTACT_C2S_DELETE "/Resource/Contacts/Statistics/Client2Server_NrOfDelete" /*int*/
100 #define DS_SETTING_CALENDAR_ENABLED "/Resource/Organizer/Enabled" /*int*/
101 #define DS_SETTING_CALENDAR_TGTURI "/Resource/Organizer/TgtURI" /*string*/
102 #define DS_SETTING_CALENDAR_SRCURI "/Resource/Organizer/SrcURI" /*string*/
103 #define DS_SETTING_CALENDAR_AUTHNONCE "/Resource/Organizer/AuthInfo/Client/AuthNonce" /*string*/
104 #define DS_SETTING_CALENDAR_AUTHTYPE "/Resource/Organizer/AuthInfo/Client/AuthType" /*int*/
105 #define DS_SETTING_CALENDAR_AUTHPWD "/Resource/Organizer/AuthInfo/Client/AuthPWD" /*string*/
106 #define DS_SETTING_CALENDAR_AUTHNAME "/Resource/Organizer/AuthInfo/Client/AuthName" /*string*/
107 #define DS_SETTING_CALENDAR_DBSYNCED "/Resource/Organizer/Statistics/DBSynced" /*string*/
108 #define DS_SETTING_CALENDAR_LASTANCHOR "/Resource/Organizer/Statistics/LastAnchor" /*string*/
109 #define DS_SETTING_CALENDAR_LASTSESSIONTIME "/Resource/Organizer/Statistics/LastSessionTime" /*int*/
110 #define DS_SETTING_CALENDAR_C2S_TOTAL "/Resource/Organizer/Statistics/Client2Server_Total" /*int*/
111 #define DS_SETTING_CALENDAR_S2C_TOTAL "/Resource/Organizer/Statistics/Server2Client_Total" /*int*/
112 #define DS_SETTING_CALENDAR_C2S_REPLACE "/Resource/Organizer/Statistics/Client2Server_NrOfReplace" /*int*/
113 #define DS_SETTING_CALENDAR_S2C_REPLACE "/Resource/Organizer/Statistics/Server2Client_NrOfReplace" /*int*/
114 #define DS_SETTING_CALENDAR_C2S_ADD "/Resource/Organizer/Statistics/Client2Server_NrOfAdd" /*int*/
115 #define DS_SETTING_CALENDAR_S2C_ADD "/Resource/Organizer/Statistics/Server2Client_NrOfAdd" /*int*/
116 #define DS_SETTING_CALENDAR_S2C_DELETE "/Resource/Organizer/Statistics/Server2Client_NrOfDelete" /*int*/
117 #define DS_SETTING_CALENDAR_C2S_DELETE "/Resource/Organizer/Statistics/Client2Server_NrOfDelete" /*int*/
119 #define DS_SETTING_MEMO_ENABLED "/Resource/Memo/Enabled" /*int*/
120 #define DS_SETTING_MEMO_TGTURI "/Resource/Memo/TgtURI" /*string*/
121 #define DS_SETTING_MEMO_SRCURI "/Resource/Memo/SrcURI" /*string*/
122 #define DS_SETTING_MEMO_AUTHNONCE "/Resource/Memo/AuthInfo/Client/AuthNonce" /*string*/
123 #define DS_SETTING_MEMO_AUTHTYPE "/Resource/Memo/AuthInfo/Client/AuthType" /*int*/
124 #define DS_SETTING_MEMO_AUTHPWD "/Resource/Memo/AuthInfo/Client/AuthPWD" /*string*/
125 #define DS_SETTING_MEMO_AUTHNAME "/Resource/Memo/AuthInfo/Client/AuthName" /*string*/
126 #define DS_SETTING_MEMO_DBSYNCED "/Resource/Memo/Statistics/DBSynced" /*string*/
127 #define DS_SETTING_MEMO_LASTANCHOR "/Resource/Memo/Statistics/LastAnchor" /*string*/
128 #define DS_SETTING_MEMO_LASTSESSIONTIME "/Resource/Memo/Statistics/LastSessionTime" /*int*/
129 #define DS_SETTING_MEMO_C2S_TOTAL "/Resource/Memo/Statistics/Client2Server_Total" /*int*/
130 #define DS_SETTING_MEMO_S2C_TOTAL "/Resource/Memo/Statistics/Server2Client_Total" /*int*/
131 #define DS_SETTING_MEMO_C2S_REPLACE "/Resource/Memo/Statistics/Client2Server_NrOfReplace" /*int*/
132 #define DS_SETTING_MEMO_S2C_REPLACE "/Resource/Memo/Statistics/Server2Client_NrOfReplace" /*int*/
133 #define DS_SETTING_MEMO_C2S_ADD "/Resource/Memo/Statistics/Client2Server_NrOfAdd" /*int*/
134 #define DS_SETTING_MEMO_S2C_ADD "/Resource/Memo/Statistics/Server2Client_NrOfAdd" /*int*/
135 #define DS_SETTING_MEMO_S2C_DELETE "/Resource/Memo/Statistics/Server2Client_NrOfDelete" /*int*/
136 #define DS_SETTING_MEMO_C2S_DELETE "/Resource/Memo/Statistics/Client2Server_NrOfDelete" /*int*/
138 #define DS_SETTING_FILE_ENABLED "/Resource/File/Enabled" /*int*/
139 #define DS_SETTING_FILE_TGTURI "/Resource/File/TgtURI" /*string*/
140 #define DS_SETTING_FILE_SRCURI "/Resource/File/SrcURI" /*string*/
141 #define DS_SETTING_FILE_AUTHNONCE "/Resource/File/AuthInfo/Client/AuthNonce" /*string*/
142 #define DS_SETTING_FILE_AUTHTYPE "/Resource/File/AuthInfo/Client/AuthType" /*int*/
143 #define DS_SETTING_FILE_AUTHPWD "/Resource/File/AuthInfo/Client/AuthPWD" /*string*/
144 #define DS_SETTING_FILE_AUTHNAME "/Resource/File/AuthInfo/Client/AuthName" /*string*/
145 #define DS_SETTING_FILE_DBSYNCED "/Resource/File/Statistics/DBSynced" /*string*/
146 #define DS_SETTING_FILE_LASTANCHOR "/Resource/File/Statistics/LastAnchor" /*string*/
147 #define DS_SETTING_FILE_LASTSESSIONTIME "/Resource/File/Statistics/LastSessionTime" /*int*/
148 #define DS_SETTING_FILE_C2S_TOTAL "/Resource/File/Statistics/Client2Server_Total" /*int*/
149 #define DS_SETTING_FILE_S2C_TOTAL "/Resource/File/Statistics/Server2Client_Total" /*int*/
150 #define DS_SETTING_FILE_C2S_REPLACE "/Resource/File/Statistics/Client2Server_NrOfReplace" /*int*/
151 #define DS_SETTING_FILE_S2C_REPLACE "/Resource/File/Statistics/Server2Client_NrOfReplace" /*int*/
152 #define DS_SETTING_FILE_C2S_ADD "/Resource/File/Statistics/Client2Server_NrOfAdd" /*int*/
153 #define DS_SETTING_FILE_S2C_ADD "/Resource/File/Statistics/Server2Client_NrOfAdd" /*int*/
154 #define DS_SETTING_FILE_S2C_DELETE "/Resource/File/Statistics/Server2Client_NrOfDelete" /*int*/
155 #define DS_SETTING_FILE_C2S_DELETE "/Resource/File/Statistics/Client2Server_NrOfDelete" /*int*/
157 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
160 * @par Description: API to get value(char*) from vconf
164 * @par Typical use case:
165 * @par Method of function operation:
166 * @par Important notes:
167 * @param[in] string type, base key
168 * @param[in] string type, key
171 * @return value on success
185 char *get_vconf_str(char *baseKey, char *key);
188 * @par Description: API to get value(char*) from vconf
192 * @par Typical use case:
193 * @par Method of function operation:
194 * @par Important notes:
195 * @param[in] string type, key
198 * @return value on success
212 char *get_vconf_str_key(char *key);
215 * @par Description: API to get value(int) from vconf
219 * @par Typical use case:
220 * @par Method of function operation:
221 * @par Important notes:
222 * @param[in] string type, base key
223 * @param[in] string type, key
224 * @param[out] int type, value
226 * @return true on success
240 bool get_vconf_int(char *baseKey, char *key, int *value);
244 * @par Description: API to get value(int) from vconf
248 * @par Typical use case:
249 * @par Method of function operation:
250 * @par Important notes:
251 * @param[in] string type, key
252 * @param[out] int type, value
254 * @return true on success
268 bool get_vconf_Int_key(char *key, int *value);
272 * @par Description: API to set value(char*) into vconf
276 * @par Typical use case:
277 * @par Method of function operation:
278 * @par Important notes:
279 * @param[in] string type, basekey
280 * @param[in] string type, key
281 * @param[in] string type, value
283 * @return true on success
297 bool set_vconf_str(char *baseKey, char *key, char *value);
300 * @par Description: API to set value(char*) into vconf
304 * @par Typical use case:
305 * @par Method of function operation:
306 * @par Important notes:
307 * @param[in] string type, key
308 * @param[in] string type, value
310 * @return true on success
324 bool set_vconf_str_key(char *key, char *value);
327 * @par Description: API to set value(int) into vconf
331 * @par Typical use case:
332 * @par Method of function operation:
333 * @par Important notes:
334 * @param[in] string type, basekey
335 * @param[in] string type, key
336 * @param[in] int type, value
338 * @return true on success
352 bool set_vconf_int(char *baseKey, char *key, int value);
355 * @par Description: API to set value(int) into vconf
359 * @par Typical use case:
360 * @par Method of function operation:
361 * @par Important notes:
362 * @param[in] string type, key
363 * @param[in] int type, value
365 * @return true on success
379 bool set_vconf_int_key(char *key, int value);
381 #endif /* COMMON_VCONF_H_ */