summaryrefslogtreecommitdiff
path: root/include/service-engine/se_notification.h
blob: c0e6a1400278335f504eced321f7b44490580900 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/*
 * oma-ds-agent
 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the License);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 *   @SE_Notification.h
 *   @version									0.1
 *   @brief										This file is the header file of interface of notification to UI
 */

#ifndef SE_NOTIFICATION_H_
#define SE_NOTIFICATION_H_

#include <glib.h>
#include "service-engine/se_error.h"

/**
 * @par Description: API to notify session process to UI
 * This API can be used to notify session process
 *
 * @par Purpose:
 * @par Typical use case:
 * @par Method of function operation:
 * @par Important notes:
 * @param[in]		string type, profile dir name(identify profile in UI)
 * @param[in]		int type, server sync type
 * @param[in]		string type, progress(DEFINE_SYNC_PROGRESS_NONE,
 *									DEFINE_SYNC_INIT, DEFINE_SYNC_CONNECTING, DEFINE_SYNC_AUTHENTICATED,
 *									DEFINE_SYNC_DONE, DEFINE_SYNC_ERROR)
 * @param[in]		string type, error(DEFINE_ERROR_NONE, DEFINE_ERROR_CONNECTION, DEFINE_ERROR_SYNCHDR,
 *									DEFINE_ERROR_INTERNAL, DEFINE_ERROR_SUSPENDED, DEFINE_ERROR_DB, DEFINE_ERROR_ABORT,
 *									DEFINE_ERROR_SERVER, DEFINE_ERROR_MEMORY_FULL, DEFINE_ERROR_AUTHENTICATE,
 *									DEFINE_ERROR_AUTOCONFIG_NOT_SUPPORT_BY_SERVER)
 *
 * @return				SE_INTERNAL_OK on success
 *							SE_INTERNAL_NOT_DEFINED, SE_INTERNAL_NO_MEMORY, SE_INTERNAL_EVENT_ERROR on error
 *
 * @par Errors:
 *
 * @pre None.
 * @post
 * @see
 * @remarks None.
 *
 * @par Sample Code:
 * @code
 * @endcode
 */
se_error_type_e send_noti_session_process(char *profile, int sync_type, char *progress, char *error);

/**
 * @par Description: API to notify process update to UI
 * This API can be used to notify process update
 *
 * @par Purpose:
 * @par Typical use case:
 * @par Method of function operation:
 * @par Important notes:
 * @param[in]		string type, profile dir name(identify profile in UI)
 * @param[in]		int type, server sync type
 * @param[in]		string type, datastore name
 * @param[in]		string type, progressStatus(DEFINE_PROGRESS_NONE, DEFINE_PROGRESS_SUCCESS, DEFINE_FAILED_DB,
 *									DEFINE_FAILED_DB_FORBIDDEN, DEFINE_FAILED_DB_ITEM, DEFINE_FAILED_DB_CONFIG, DEFINE_FAILED_DB_DEVICEFULL)
 * @param[in]		string type, operationType(DEFINE_NOOP, DEFINE_ADD, DEFINE_DELETE, DEFINE_MOVE, DEFINE_COPY, DEFINE_REPLACE)
 * @param[in]		int type, whether from server or from client
 * @param[in]		int type, total number per operation
 * @param[in]		int type, synced item number per operation
 * @param[in]		int type, total number per db
 * @param[in]		int type, synced item number per db
 *
 * @return				SE_INTERNAL_OK on success
 *							SE_INTERNAL_NOT_DEFINED, SE_INTERNAL_NO_MEMORY, SE_INTERNAL_EVENT_ERROR on error
 *
 * @par Errors:
 *
 * @pre None.
 * @post
 * @see
 * @remarks None.
 *
 * @par Sample Code:
 * @code
 * @endcode
 */
se_error_type_e send_noti_process_update(char *profile_dir_name, int sync_type, int 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);

#endif				/* SE_NOTIFICATION_H_ */