upload tizen1.0 source
[pkgs/o/oma-ds-service.git] / include / ServiceEngine / SE_Account.h
1 /*
2  * oma-ds-service
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: JuHak Park <juhaki.park@samsung.com>,
7  *          JuneHyuk Lee <junhyuk7.lee@samsung.com>,
8  *          SunBong Ha <sunbong.ha@samsung.com>
9  *
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
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
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.
21  *
22  */
23
24
25
26
27
28 /*
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.
33  *
34  * SeongWon Shim <seongwon.shim@samsung.com>
35  */
36
37 /**
38  *   @SE_Account.h
39  *   @version                                                                   0.1
40  *   @brief                                                                             This file is the header file of interface of account
41  */
42
43 #ifndef SE_ACCOUNT_H_
44 #define SE_ACCOUNT_H_
45
46 #include <glib.h>
47 #include <stdbool.h>
48 #include "Common/Common_Define.h"
49
50 /**
51  * @par Description: API to add or edit profile
52  * This API can be used to add or edit profile from vconf
53  *
54  * @par Purpose:
55  * @par Typical use case:
56  * @par Method of function operation:
57  * @par Important notes:
58  * @param[in]           string type, profileDirName(identify profile in UI)
59  * @param[in]           int type, whether add or edit
60  *
61  * @return                              1 on success
62  *                                                      0 on error
63  *
64  * @par Errors:
65  *
66  * @pre None.
67  * @post
68  * @see
69  * @remarks None.
70  *
71  * @par Sample Code:
72  * @code
73  * @endcode
74  */
75 /*TODO have to be removed after removing vconf*/
76 int update_all_config(char *profile,  bool isAdd, int *accountId);
77
78 /**
79  * @par Description: API to add profile from csc
80  * This API can be used to add profile from csc(vconf)
81  *
82  * @par Purpose:
83  * @par Typical use case:
84  * @par Method of function operation:
85  * @par Important notes:
86  * @param[in]           int type, index of profile
87  *
88  * @return                              1 on success
89  *                                                      0 on error
90  *
91  * @par Errors:
92  *
93  * @pre None.
94  * @post
95  * @see
96  * @remarks None.
97  *
98  * @par Sample Code:
99  * @code
100  * @endcode
101  */
102 int add_profile_csc(int index);
103
104 /**
105  * @par Description: API to add profile API
106  * This API can be used to add profile
107  * This API is part of API for UI
108  *
109  * @par Purpose:
110  * @par Typical use case:
111  * @par Method of function operation:
112  * @par Important notes:
113  * @param[in]           string type, profile name
114  * @param[in]           string type, server ip
115  * @param[in]           string type, id
116  * @param[in]           string type, password
117  * @param[in]           GList type, list of resource_cp structure
118  * @param[out]          int type, account id
119  *
120  * @return                              true on success
121  *                                                      false on error
122  *
123  * @par Errors:
124  *
125  * @pre None.
126  * @post
127  * @see
128  * @remarks None.
129  *
130  * @par Sample Code:
131  * @code
132  * @endcode
133  */
134 bool add_profile_cp(char *profileName, char *addr, char *id, char *password, GList *categories, int *accountId);
135
136
137 /**
138  * @par Description: API to add profile API
139  * This API can be used to add profile
140  * This API is part of API for UI
141  *
142  * @par Purpose:
143  * @par Typical use case:
144  * @par Method of function operation:
145  * @par Important notes:
146  * @param[in]           string type, profileDirName(identify profile in UI)
147  * @param[in]           string type, profile name
148  * @param[in]           string type, server ip
149  * @param[in]           string type, id
150  * @param[in]           string type, password
151  * @param[in]           string type, sync mode
152  * @param[in]           string type, sync type
153  * @param[in]           string type, interval(for periodic)
154  * @param[in]           GList type, list of sync_category structure
155  * @param[out]          int type, account id
156  *
157  * @return                              true on success
158  *                                                      false on error
159  *
160  * @par Errors:
161  *
162  * @pre None.
163  * @post
164  * @see
165  * @remarks None.
166  *
167  * @par Sample Code:
168  * @code
169  * @endcode
170  */
171 bool add_profile(char *profileDirName, char *profileName, char *addr, char *id,
172                 char *password, char *syncMode, char *syncType,
173                 char *interval, GList *categories, int *accountId);
174
175 /**
176  * @par Description: API to edit profile API
177  * This API can be used to edit profile
178  * This API is part of API for UI
179  *
180  * @par Purpose:
181  * @par Typical use case:
182  * @par Method of function operation:
183  * @par Important notes:
184  * @param[in]           int type, account id
185  * @param[in]           string type, profile name
186  * @param[in]           string type, server ip
187  * @param[in]           string type, id
188  * @param[in]           string type, password
189  * @param[in]           string type, sync mode
190  * @param[in]           string type, sync type
191  * @param[in]           string type, interval(for periodic)
192  * @param[in]           GList type, list of sync_category structure
193  *
194  * @return                              true on success
195  *                                                      false on error
196  *
197  * @par Errors:
198  *
199  * @pre None.
200  * @post
201  * @see
202  * @remarks None.
203  *
204  * @par Sample Code:
205  * @code
206  * @endcode
207  */
208 bool edit_profile(int accountId, char *profileName, char *addr, char *id,
209                 char *password, char *syncMode, char *syncType, char *interval, GList *categories);
210
211
212 /**
213  * @par Description: API to delete profile API
214  * This API can be used to delete profile
215  * This API is part of API for UI
216  *
217  * @par Purpose:
218  * @par Typical use case:
219  * @par Method of function operation:
220  * @par Important notes:
221  * @param[in]           GList type, list of account id
222  *
223  * @return                              true on success
224  *                                                      false on error
225  *
226  * @par Errors:
227  *
228  * @pre None.
229  * @post
230  * @see
231  * @remarks None.
232  *
233  * @par Sample Code:
234  * @code
235  * @endcode
236  */
237 bool delete_profiles(GList *profiles);
238
239 /**
240  * @par Description: API to get profile directory name of synchronizing account
241  * This API can be used to get profile directory name
242  *
243  * @par Purpose:
244  * @par Typical use case:
245  * @par Method of function operation:
246  * @par Important notes:
247  * @param[out]          string type, profileDirName(identify profile in UI)
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 get_synchronising_profile(char **profile);
264
265
266 /**
267  * @par Description: API to add profile for call log sync
268  * This API can be used to add profile
269  * This API is part of API for call log sync
270  *
271  * @par Purpose:
272  * @par Typical use case:
273  * @par Method of function operation:
274  * @par Important notes:
275  * @param[out]          int type, accountId
276  *
277  * @return                              true on success
278  *                                                      false on error
279  *
280  * @par Errors:
281  *
282  * @pre None.
283  * @post
284  * @see
285  * @remarks None.
286  *
287  * @par Sample Code:
288  * @code
289  * @endcode
290  */
291 bool add_profile_calllog(int *accountId);
292
293
294 /**
295  * @par Description: API to delete profile for call log sync
296  * This API can be used to delete profile
297  * This API is part of API for call log sync
298  *
299  * @par Purpose:
300  * @par Typical use case:
301  * @par Method of function operation:
302  * @par Important notes:
303  *
304  * @return                              true on success
305  *                                                      false on error
306  *
307  * @par Errors:
308  *
309  * @pre None.
310  * @post
311  * @see
312  * @remarks None.
313  *
314  * @par Sample Code:
315  * @code
316  * @endcode
317  */
318 bool delete_profile_calllog();
319
320
321 /**
322  * @par Description: API to delete profile
323  * This API can be used to delete profile
324  *
325  * @par Purpose:
326  * @par Typical use case:
327  * @par Method of function operation:
328  * @par Important notes:
329  *
330  * @return                              true on success
331  *                                                      false on error
332  *
333  * @par Errors:
334  *
335  * @pre None.
336  * @post
337  * @see
338  * @remarks None.
339  *
340  * @par Sample Code:
341  * @code
342  * @endcode
343  */
344 bool delete_profile(char *access_name);
345
346 #endif /* SE_ACCOUNT_H_ */