Tizen 2.0 Release
[pkgs/o/oma-ds-service.git] / include / service-engine / se_account.h
1 /*
2  * oma-ds-agent
3  * Copyright (c) 2012 Samsung Electronics Co., Ltd.
4  *
5  * Licensed under the Apache License, Version 2.0 (the License);
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17
18 /**
19  *   @SE_Account.h
20  *   @version                                                                   0.1
21  *   @brief                                                                             This file is the header file of interface of account
22  */
23
24 #ifndef SE_ACCOUNT_H_
25 #define SE_ACCOUNT_H_
26
27 #include <glib.h>
28 #include <stdbool.h>
29 #include "common/common_define.h"
30
31 /**
32  * @par Description: API to add profile API
33  * This API can be used to add profile
34  * This API is part of API for UI
35  *
36  * @par Purpose:
37  * @par Typical use case:
38  * @par Method of function operation:
39  * @par Important notes:
40  * @param[in]           string type, profile_dir_name(identify profile in UI)
41  * @param[in]           string type, profile name
42  * @param[in]           string type, server ip
43  * @param[in]           string type, id
44  * @param[in]           string type, password
45  * @param[in]           string type, sync mode
46  * @param[in]           string type, sync type
47  * @param[in]           string type, interval(for periodic)
48  * @param[in]           GList type, list of sync_service_s structure
49  * @param[out]          int type, account id
50  *
51  * @return                              true on success
52  *                                                      false on error
53  *
54  * @par Errors:
55  *
56  * @pre None.
57  * @post
58  * @see
59  * @remarks None.
60  *
61  * @par Sample Code:
62  * @code
63  * @endcode
64  */
65 bool add_profile(char *profile_dir_name, char *profile_name, char *addr, char *id, char *password, char *sync_mode, char *sync_type, char *interval, GList * categories, int *account_id);
66
67 /**
68  * @par Description: API to add profile from csc
69  * This API can be used to add profile from csc(vconf)
70  *
71  * @par Purpose:
72  * @par Typical use case:
73  * @par Method of function operation:
74  * @par Important notes:
75  * @param[in]           int type, index of profile
76  *
77  * @return                              1 on success
78  *                                                      0 on error
79  *
80  * @par Errors:
81  *
82  * @pre None.
83  * @post
84  * @see
85  * @remarks None.
86  *
87  * @par Sample Code:
88  * @code
89  * @endcode
90  */
91 bool add_profile_csc(int index);
92
93 /**
94  * @par Description: API to add profile API
95  * This API can be used to add profile
96  * This API is part of API for UI
97  *
98  * @par Purpose:
99  * @par Typical use case:
100  * @par Method of function operation:
101  * @par Important notes:
102  * @param[in]           string type, profile name
103  * @param[in]           string type, server ip
104  * @param[in]           string type, id
105  * @param[in]           string type, password
106  * @param[in]           GList type, list of resource_cp structure
107  * @param[out]          int type, account id
108  *
109  * @return                              true on success
110  *                                                      false on error
111  *
112  * @par Errors:
113  *
114  * @pre None.
115  * @post
116  * @see
117  * @remarks None.
118  *
119  * @par Sample Code:
120  * @code
121  * @endcode
122  */
123 bool add_profile_cp(char *profile_name, char *addr, char *id, char *password, GList * categories, int *account_id);
124
125 /**
126  * @par Description: API to add profile for call log sync
127  * This API can be used to add profile
128  * This API is part of API for call log sync
129  *
130  * @par Purpose:
131  * @par Typical use case:
132  * @par Method of function operation:
133  * @par Important notes:
134  * @param[out]          int type, account_id
135  *
136  * @return                              true on success
137  *                                                      false on error
138  *
139  * @par Errors:
140  *
141  * @pre None.
142  * @post
143  * @see
144  * @remarks None.
145  *
146  * @par Sample Code:
147  * @code
148  * @endcode
149  */
150 bool add_profile_dive(int *account_id);
151
152 /**
153  * @par Description: API to edit profile API
154  * This API can be used to edit profile
155  * This API is part of API for UI
156  *
157  * @par Purpose:
158  * @par Typical use case:
159  * @par Method of function operation:
160  * @par Important notes:
161  * @param[in]           int type, account id
162  * @param[in]           string type, profile name
163  * @param[in]           string type, server ip
164  * @param[in]           string type, id
165  * @param[in]           string type, password
166  * @param[in]           string type, sync mode
167  * @param[in]           string type, sync type
168  * @param[in]           string type, interval(for periodic)
169  * @param[in]           GList type, list of sync_service_s structure
170  *
171  * @return                              true on success
172  *                                                      false on error
173  *
174  * @par Errors:
175  *
176  * @pre None.
177  * @post
178  * @see
179  * @remarks None.
180  *
181  * @par Sample Code:
182  * @code
183  * @endcode
184  */
185 bool edit_profile(int account_id, char *profile_name, char *addr, char *id, char *password, char *sync_mode, char *sync_type, char *interval, GList * categories);
186
187 /**
188  * @par Description: API to delete profile API
189  * This API can be used to delete profile
190  * This API is part of API for UI
191  *
192  * @par Purpose:
193  * @par Typical use case:
194  * @par Method of function operation:
195  * @par Important notes:
196  * @param[in]           GList type, list of account id
197  *
198  * @return                              true on success
199  *                                                      false on error
200  *
201  * @par Errors:
202  *
203  * @pre None.
204  * @post
205  * @see
206  * @remarks None.
207  *
208  * @par Sample Code:
209  * @code
210  * @endcode
211  */
212 bool delete_profiles(GList * profiles);
213
214 /**
215  * @par Description: API to delete profile for call log sync
216  * This API can be used to delete profile
217  * This API is part of API for call log sync
218  *
219  * @par Purpose:
220  * @par Typical use case:
221  * @par Method of function operation:
222  * @par Important notes:
223  *
224  * @return                              true on success
225  *                                                      false on error
226  *
227  * @par Errors:
228  *
229  * @pre None.
230  * @post
231  * @see
232  * @remarks None.
233  *
234  * @par Sample Code:
235  * @code
236  * @endcode
237  */
238 bool delete_profile_dive();
239
240 /**
241  * @par Description: API to delete profile
242  * This API can be used to delete profile
243  *
244  * @par Purpose:
245  * @par Typical use case:
246  * @par Method of function operation:
247  * @par Important notes:
248  *
249  * @return                              true on success
250  *                                                      false on error
251  *
252  * @par Errors:
253  *
254  * @pre None.
255  * @post
256  * @see
257  * @remarks None.
258  *
259  * @par Sample Code:
260  * @code
261  * @endcode
262  */
263 bool delete_profile(char *access_name);
264
265 /**
266  * @par Description: API to delete all profiles
267  * This API can be used to delete all profiles
268  *
269  * @par Purpose:
270  * @par Typical use case:
271  * @par Method of function operation:
272  * @par Important notes:
273  *
274  * @return                              true on success
275  *                                                      false on error
276  *
277  * @par Errors:
278  *
279  * @pre None.
280  * @post
281  * @see
282  * @remarks None.
283  *
284  * @par Sample Code:
285  * @code
286  * @endcode
287  */
288 bool delete_all_profiles();
289
290 /**
291  * @par Description: API to get profile directory name of synchronizing account
292  * This API can be used to get profile directory name
293  *
294  * @par Purpose:
295  * @par Typical use case:
296  * @par Method of function operation:
297  * @par Important notes:
298  * @param[out]          string type, profile_dir_name(identify profile in UI)
299  * @param[out]          string type, sync_type(determined by server)
300  *
301  * @return                              true on success
302  *                                                      false on error
303  *
304  * @par Errors:
305  *
306  * @pre None.
307  * @post
308  * @see
309  * @remarks None.
310  *
311  * @par Sample Code:
312  * @code
313  * @endcode
314  */
315 bool get_synchronising_profile(char **profile_dir_name, char **sync_type);
316
317 /**
318  * @par Description: API to delete all agent default table(except id_provider_tbl, id_page_tbl)
319  * This API can be used to delete all agent default table
320  *
321  * @par Purpose:
322  * @par Typical use case:
323  * @par Method of function operation:
324  * @par Important notes:
325  *
326  * @return                              true on success
327  *                                                      false on error
328  *
329  * @par Errors:
330  *
331  * @pre None.
332  * @post
333  * @see
334  * @remarks None.
335  *
336  * @par Sample Code:
337  * @code
338  * @endcode
339  */
340 bool delete_all_agent_default_table();
341
342 #endif                          /* SE_ACCOUNT_H_ */