upload tizen1.0 source
[pkgs/o/oma-ds-service.git] / include / ServiceEngine / SE_Notification.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_Notification.h
39  *   @version                                                                   0.1
40  *   @brief                                                                             This file is the header file of interface of notification to UI
41  */
42
43 #ifndef SE_NOTIFICATION_H_
44 #define SE_NOTIFICATION_H_
45
46 #include <glib.h>
47 #include "ServiceEngine/SE_Error.h"
48
49 /**
50  * @par Description: API to notify auto configure results to UI
51  * This API can be used to notify auto configure results(list of candidate of datastore name)
52  *
53  * @par Purpose:
54  * @par Typical use case:
55  * @par Method of function operation:
56  * @par Important notes:
57  * @param[in]           string type, profileDirName(identify profile in UI)
58  * @param[in]           GList type, double pointer
59  *
60  * @return                              SE_INTERNAL_OK on success
61  *                                                      SE_INTERNAL_NOT_DEFINED, SE_INTERNAL_NO_MEMORY, SE_INTERNAL_EVENT_ERROR on error
62  *
63  * @par Errors:
64  *
65  * @pre None.
66  * @post
67  * @see
68  * @remarks None.
69  *
70  * @par Sample Code:
71  * @code
72  * @endcode
73  */
74 SE_ErrorType send_noti_auto_configure(char *profileDirName, GList *configure);
75
76 /**
77  * @par Description: API to notify sync status to UI
78  * This API can be used to notify sync status
79  * If there is a any profile which is synchronizing pass syncDirName, but not any profiles pass NULL
80  *
81  * @par Purpose:
82  * @par Typical use case:
83  * @par Method of function operation:
84  * @par Important notes:
85  * @param[in]           string type, profileDirName(identify profile in UI)
86  *
87  * @return                              SE_INTERNAL_OK on success
88  *                                                      SE_INTERNAL_NO_MEMORY, SE_INTERNAL_EVENT_ERROR on error
89  *
90  * @par Errors:
91  *
92  * @pre None.
93  * @post
94  * @see
95  * @remarks None.
96  *
97  * @par Sample Code:
98  * @code
99  * @endcode
100  */
101 SE_ErrorType send_noti_sync_status(char *profileDirName);
102
103 /**
104  * @par Description: API to notify session process to UI
105  * This API can be used to notify session process
106  *
107  * @par Purpose:
108  * @par Typical use case:
109  * @par Method of function operation:
110  * @par Important notes:
111  * @param[in]           string type, profileDirName(identify profile in UI)
112  * @param[in]           string type, progress(DEFINE_SYNC_PROGRESS_NONE,
113  *                                                                      DEFINE_SYNC_INIT, DEFINE_SYNC_CONNECTING, DEFINE_SYNC_AUTHENTICATED,
114  *                                                                      DEFINE_SYNC_DONE, DEFINE_SYNC_ERROR)
115  * @param[in]           string type, error(DEFINE_ERROR_NONE, DEFINE_ERROR_CONNECTION, DEFINE_ERROR_SYNCHDR,
116  *                                                                      DEFINE_ERROR_INTERNAL, DEFINE_ERROR_SUSPENDED, DEFINE_ERROR_DB, DEFINE_ERROR_ABORT,
117  *                                                                      DEFINE_ERROR_SERVER, DEFINE_ERROR_MEMORY_FULL, DEFINE_ERROR_AUTHENTICATE,
118  *                                                                      DEFINE_ERROR_AUTOCONFIG_NOT_SUPPORT_BY_SERVER)
119  *
120  * @return                              SE_INTERNAL_OK on success
121  *                                                      SE_INTERNAL_NOT_DEFINED, SE_INTERNAL_NO_MEMORY, SE_INTERNAL_EVENT_ERROR 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 SE_ErrorType send_noti_session_process(char *profileDirName, char *progress, char *error);
135
136 /**
137  * @par Description: API to notify process update to UI
138  * This API can be used to notify process update
139  *
140  * @par Purpose:
141  * @par Typical use case:
142  * @par Method of function operation:
143  * @par Important notes:
144  * @param[in]           string type, profileDirName(identify profile in UI)
145  * @param[in]           string type, datastore name
146  * @param[in]           string type, progressStatus(DEFINE_PROGRESS_NONE, DEFINE_PROGRESS_SUCCESS, DEFINE_FAILED_DB,
147  *                                                                      DEFINE_FAILED_DB_FORBIDDEN, DEFINE_FAILED_DB_ITEM, DEFINE_FAILED_DB_CONFIG, DEFINE_FAILED_DB_DEVICEFULL)
148  * @param[in]           string type, operationType(DEFINE_NOOP, DEFINE_ADD, DEFINE_DELETE, DEFINE_MOVE, DEFINE_COPY, DEFINE_REPLACE)
149  * @param[in]           int type, whether from server or from client
150  * @param[in]           int type, total number per operation
151  * @param[in]           int type, synced item number per operation
152  * @param[in]           int type, total number per db
153  * @param[in]           int type, synced item number per db
154  *
155  * @return                              SE_INTERNAL_OK on success
156  *                                                      SE_INTERNAL_NOT_DEFINED, SE_INTERNAL_NO_MEMORY, SE_INTERNAL_EVENT_ERROR on error
157  *
158  * @par Errors:
159  *
160  * @pre None.
161  * @post
162  * @see
163  * @remarks None.
164  *
165  * @par Sample Code:
166  * @code
167  * @endcode
168  */
169 SE_ErrorType send_noti_process_update(char *profileDirName, char *uri, char *progressStatus,
170                 char *operationType, int isFromServer, int totalPerOperation, int syncedPerOperation, int totalPerDb, int syncedPerDb);
171
172 #endif /* SE_NOTIFICATION_H_ */