Tizen 2.0 Release
[pkgs/o/oma-ds-service.git] / include / service-engine / se_notification.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_Notification.h
20  *   @version                                                                   0.1
21  *   @brief                                                                             This file is the header file of interface of notification to UI
22  */
23
24 #ifndef SE_NOTIFICATION_H_
25 #define SE_NOTIFICATION_H_
26
27 #include <glib.h>
28 #include "service-engine/se_error.h"
29
30 /**
31  * @par Description: API to notify session process to UI
32  * This API can be used to notify session process
33  *
34  * @par Purpose:
35  * @par Typical use case:
36  * @par Method of function operation:
37  * @par Important notes:
38  * @param[in]           string type, profile dir name(identify profile in UI)
39  * @param[in]           string type, progress(DEFINE_SYNC_PROGRESS_NONE,
40  *                                                                      DEFINE_SYNC_INIT, DEFINE_SYNC_CONNECTING, DEFINE_SYNC_AUTHENTICATED,
41  *                                                                      DEFINE_SYNC_DONE, DEFINE_SYNC_ERROR)
42  * @param[in]           string type, error(DEFINE_ERROR_NONE, DEFINE_ERROR_CONNECTION, DEFINE_ERROR_SYNCHDR,
43  *                                                                      DEFINE_ERROR_INTERNAL, DEFINE_ERROR_SUSPENDED, DEFINE_ERROR_DB, DEFINE_ERROR_ABORT,
44  *                                                                      DEFINE_ERROR_SERVER, DEFINE_ERROR_MEMORY_FULL, DEFINE_ERROR_AUTHENTICATE,
45  *                                                                      DEFINE_ERROR_AUTOCONFIG_NOT_SUPPORT_BY_SERVER)
46  *
47  * @return                              SE_INTERNAL_OK on success
48  *                                                      SE_INTERNAL_NOT_DEFINED, SE_INTERNAL_NO_MEMORY, SE_INTERNAL_EVENT_ERROR on error
49  *
50  * @par Errors:
51  *
52  * @pre None.
53  * @post
54  * @see
55  * @remarks None.
56  *
57  * @par Sample Code:
58  * @code
59  * @endcode
60  */
61 se_error_type_e send_noti_session_process(char *profile, char *progress, char *error, char *sync_type);
62
63 /**
64  * @par Description: API to notify process update to UI
65  * This API can be used to notify process update
66  *
67  * @par Purpose:
68  * @par Typical use case:
69  * @par Method of function operation:
70  * @par Important notes:
71  * @param[in]           string type, profile dir name(identify profile in UI)
72  * @param[in]           string type, server sync type
73  * @param[in]           string type, datastore name
74  * @param[in]           string type, progressStatus(DEFINE_PROGRESS_NONE, DEFINE_PROGRESS_SUCCESS, DEFINE_FAILED_DB,
75  *                                                                      DEFINE_FAILED_DB_FORBIDDEN, DEFINE_FAILED_DB_ITEM, DEFINE_FAILED_DB_CONFIG, DEFINE_FAILED_DB_DEVICEFULL)
76  * @param[in]           string type, operationType(DEFINE_NOOP, DEFINE_ADD, DEFINE_DELETE, DEFINE_MOVE, DEFINE_COPY, DEFINE_REPLACE)
77  * @param[in]           int type, whether from server or from client
78  * @param[in]           int type, total number per operation
79  * @param[in]           int type, synced item number per operation
80  * @param[in]           int type, total number per db
81  * @param[in]           int type, synced item number per db
82  *
83  * @return                              SE_INTERNAL_OK on success
84  *                                                      SE_INTERNAL_NOT_DEFINED, SE_INTERNAL_NO_MEMORY, SE_INTERNAL_EVENT_ERROR on error
85  *
86  * @par Errors:
87  *
88  * @pre None.
89  * @post
90  * @see
91  * @remarks None.
92  *
93  * @par Sample Code:
94  * @code
95  * @endcode
96  */
97 se_error_type_e send_noti_process_update(char *profile_dir_name, char *sync_type, char *uri, char *progress_status, char *operation_type, int is_from_server, int total_per_operation, int synced_per_operation, int total_per_db, int synced_per_db);
98
99 #endif                          /* SE_NOTIFICATION_H_ */