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 interface for utility function
43 #ifndef COMMON_UTIL_H_
44 #define COMMON_UTIL_H_
49 * @par Description: API to set value into config_tbl(key, value)
53 * @par Typical use case:
54 * @par Method of function operation:
55 * @par Important notes:
56 * @param[in] int type, account id
57 * @param[in] string type, key
58 * @param[in] string type, value(char *)
59 * @param[in] string type, type of value(string, int)
60 * @param[in] string type, name of access(SE, SA...)
63 * @return true on success
77 bool set_config_str(int accountID, char *key, char *value, char * type, char *accessName);
80 * @par Description: API to set value into config_tbl(key, value)
84 * @par Typical use case:
85 * @par Method of function operation:
86 * @par Important notes:
87 * @param[in] int type, account id
88 * @param[in] string type, key
89 * @param[in] int type, value(int)
90 * @param[in] string type, type of value(string, int)
91 * @param[in] string type, name of access(SE, SA...)
94 * @return true on success
108 bool set_config_int(int accountID, char *key, int value, char * type, char *accessName);
111 * @par Description: API to get value from config_tbl(key, value)
115 * @par Typical use case:
116 * @par Method of function operation:
117 * @par Important notes:
118 * @param[in] int type, account id
119 * @param[in] string type, key
120 * @param[out] string type, value
122 * @return true on success
136 bool get_config(int accountId, char *key, char **value);
139 * @par Description: API to get account ID from profileDirName(Sync1...)
143 * @par Typical use case:
144 * @par Method of function operation:
145 * @par Important notes:
146 * @param[in] string type, profileDirName(Sync1, Sync2...)
147 * @param[in] boolean type, already open agent db or not
150 * @return account ID (more than 1) on success
164 int get_accountid(char *profile, bool open);
168 * @brief convert sync type(UI-> Engine)
169 * @param[in] sync type(Full, Update both, Update to server, Update to phone, Refresh from server, Refresh from phone)
171 * @retval value of sync type Success
174 /*int convert_synctype_value(char *syncType_str);*/
175 /*char *convert_synctype_str(char *syncType_value);*/
176 #endif /* COMMON_UTIL_H_ */