summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJinkun Jang <jinkun.jang@samsung.com>2013-03-16 01:18:13 +0900
committerJinkun Jang <jinkun.jang@samsung.com>2013-03-16 01:18:13 +0900
commit2928ee51d097094087c5a6445bea90840f6f1db6 (patch)
tree2322cd9266510a98abd61e1a8d7fb9f593665eff /include
parentd6aa47559c38d7e20d6d6a7a3671fa48ed58b9eb (diff)
downloadoma-ds-agent-2928ee51d097094087c5a6445bea90840f6f1db6.tar.gz
oma-ds-agent-2928ee51d097094087c5a6445bea90840f6f1db6.tar.bz2
oma-ds-agent-2928ee51d097094087c5a6445bea90840f6f1db6.zip
merge with master
Diffstat (limited to 'include')
-rwxr-xr-xinclude/common/common_define_internal.h45
-rwxr-xr-xinclude/service-engine/se_account.h16
-rwxr-xr-xinclude/service-engine/se_common.h4
-rwxr-xr-xinclude/service-engine/se_notification.h7
-rwxr-xr-xinclude/service-engine/se_storage.h12
5 files changed, 65 insertions, 19 deletions
diff --git a/include/common/common_define_internal.h b/include/common/common_define_internal.h
index c3078de..4c1ed97 100755
--- a/include/common/common_define_internal.h
+++ b/include/common/common_define_internal.h
@@ -114,6 +114,15 @@
#define DEFINE_DIVE_SERVER_ID "syn.samsungdive.com"
#define DEFINE_DIVE_DEFAULT_NEXT_NONCE "pcwds"
+#define DEFINE_SYNC_INTERVAL_5_MINUTES_STR "5 minutes"
+#define DEFINE_SYNC_INTERVAL_15_MINUTES_STR "15 minutes"
+#define DEFINE_SYNC_INTERVAL_1_HOUR_STR "1 hour"
+#define DEFINE_SYNC_INTERVAL_4_HOURS_STR "4 hours"
+#define DEFINE_SYNC_INTERVAL_12_HOURS_STR "12 hours"
+#define DEFINE_SYNC_INTERVAL_1_DAY_STR "1 day"
+#define DEFINE_SYNC_INTERVAL_1_WEEK_STR "1 week"
+#define DEFINE_SYNC_INTERVAL_1_MONTH_STR "1 month"
+
typedef enum {
SYNC_SESSION_NOT_SYNCED_YET = -1,
SYNC_SESSION_FAILED = 0,
@@ -160,6 +169,40 @@ typedef enum {
} service_type_e;
typedef enum {
+ MODE_MANUAL = 0, /*Manual*/
+ MODE_PERIODIC = 1, /*Periodic*/
+ MODE_PUSH = 2, /*Push (SAN)*/
+ MODE_AUTOCONFIG = 3 /*Autoconfig*/
+} sync_mode_e;
+
+typedef enum {
+ SYNC_TYPE_FULL_SYNC = 0, /**< Full (Slow sync) */
+ SYNC_TYPE_UPDATE_BOTH = 1, /**< Update both */
+ SYNC_TYPE_UPDATE_TO_SERVER = 2, /**< Update to server */
+ SYNC_TYPE_UPDATE_TO_PHONE = 3, /**< Update to phone */
+ SYNC_TYPE_REFRESH_FROM_SERVER = 4, /**< Refresh from server */
+ SYNC_TYPE_REFRESH_FROM_PHONE = 5 /**< Refresh from phone */
+}sync_type_e;
+
+typedef enum {
+ SYNC_INTERVAL_5_MINUTES = 0, /**< 5 minutes */
+ SYNC_INTERVAL_15_MINUTES = 1, /**< 15 minutes */
+ SYNC_INTERVAL_1_HOUR = 2, /**< 1 hour */
+ SYNC_INTERVAL_4_HOURS = 3, /**< 4 hours */
+ SYNC_INTERVAL_12_HOURS = 4, /**< 12 hours */
+ SYNC_INTERVAL_1_DAY = 5, /**< 1 day */
+ SYNC_INTERVAL_1_WEEK = 6, /**< 1 week */
+ SYNC_INTERVAL_1_MONTH = 7 /**< 1 month */
+} sync_interval_e;
+
+typedef enum {
+ SRC_URI_CONTACT = 0, /**< Contacts */
+ SRC_URI_CALENDAR = 1, /**< Calendar */
+ SRC_URI_MEMO = 2, /**< Memo */
+ SRC_URI_CALLLOG = 3 /**< Calllog */
+} src_uri_e;
+
+typedef enum {
COMMON_INIT = 0,
COMMON_OK = 100,
COMMON_MISCONFIGURATION = 200,
@@ -287,7 +330,7 @@ typedef struct {
typedef struct {
service_type_e service_type;
int enabled;
- char *src_uri;
+ src_uri_e src_uri;
char *tgt_uri;
char *id;
char *password;
diff --git a/include/service-engine/se_account.h b/include/service-engine/se_account.h
index fc6563e..bae30a2 100755
--- a/include/service-engine/se_account.h
+++ b/include/service-engine/se_account.h
@@ -42,9 +42,9 @@
* @param[in] string type, server ip
* @param[in] string type, id
* @param[in] string type, password
- * @param[in] string type, sync mode
- * @param[in] string type, sync type
- * @param[in] string type, interval(for periodic)
+ * @param[in] int type, sync mode
+ * @param[in] int type, sync type
+ * @param[in] int type, interval(for periodic)
* @param[in] GList type, list of sync_service_s structure
* @param[out] int type, account id
*
@@ -62,7 +62,7 @@
* @code
* @endcode
*/
-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);
+bool add_profile(char *profile_name, char *addr, char *id, char *password, int sync_mode, int sync_type, int interval, GList * categories, int *account_id);
/**
* @par Description: API to add profile from csc
@@ -163,9 +163,9 @@ bool add_profile_dive(int *account_id);
* @param[in] string type, server ip
* @param[in] string type, id
* @param[in] string type, password
- * @param[in] string type, sync mode
- * @param[in] string type, sync type
- * @param[in] string type, interval(for periodic)
+ * @param[in] int type, sync mode
+ * @param[in] int type, sync type
+ * @param[in] int type, interval(for periodic)
* @param[in] GList type, list of sync_service_s structure
*
* @return true on success
@@ -182,7 +182,7 @@ bool add_profile_dive(int *account_id);
* @code
* @endcode
*/
-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);
+bool edit_profile(int account_id, char *profile_name, char *addr, char *id, char *password, int sync_mode, int sync_type, int interval, GList * categories);
/**
* @par Description: API to delete profile API
diff --git a/include/service-engine/se_common.h b/include/service-engine/se_common.h
index 108acef..7631ff8 100755
--- a/include/service-engine/se_common.h
+++ b/include/service-engine/se_common.h
@@ -29,6 +29,7 @@
#define DEFINE_SYNC_CONNECTING "CONNECTING"
#define DEFINE_SYNC_AUTHENTICATED "AUTHENTICATED"
#define DEFINE_SYNC_DONE "DONE"
+#define DEFINE_SYNC_CANCEL "CANCEL"
#define DEFINE_SYNC_ERROR "ERROR"
#define DEFINE_ERROR_NONE "ERROR_NONE"
@@ -70,7 +71,8 @@ typedef enum {
PROGRESS_CONNECTING = 2,
PROGRESS_AUTHENTICATED = 3,
PROGRESS_DONE = 4,
- PROGRESS_ERROR = 5
+ PROGRESS_CANCEL = 5,
+ PROGRESS_ERROR = 6
} sync_progress_e;
typedef enum {
diff --git a/include/service-engine/se_notification.h b/include/service-engine/se_notification.h
index 4789ba5..c0e6a14 100755
--- a/include/service-engine/se_notification.h
+++ b/include/service-engine/se_notification.h
@@ -36,6 +36,7 @@
* @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)
@@ -58,7 +59,7 @@
* @code
* @endcode
*/
-se_error_type_e send_noti_session_process(char *profile, char *progress, char *error, char *sync_type);
+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
@@ -69,7 +70,7 @@ se_error_type_e send_noti_session_process(char *profile, char *progress, char *e
* @par Method of function operation:
* @par Important notes:
* @param[in] string type, profile dir name(identify profile in UI)
- * @param[in] string type, server sync type
+ * @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)
@@ -94,6 +95,6 @@ se_error_type_e send_noti_session_process(char *profile, char *progress, char *e
* @code
* @endcode
*/
-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);
+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_ */
diff --git a/include/service-engine/se_storage.h b/include/service-engine/se_storage.h
index ecf45d6..5b29611 100755
--- a/include/service-engine/se_storage.h
+++ b/include/service-engine/se_storage.h
@@ -131,9 +131,9 @@ se_error_type_e write_sync_resource_info(int account_id, int content_type, int l
* @param[out] string type, server ip
* @param[out] string type, id
* @param[out] string type, password
- * @param[out] string type, sync mode
- * @param[out] string type, sync type
- * @param[out] string type, interval
+ * @param[out] int type, sync mode
+ * @param[out] int type, sync type
+ * @param[out] int type, interval
* @param[out] int type, last_session_status
* @param[out] int type, last_session_time
*
@@ -152,7 +152,7 @@ se_error_type_e write_sync_resource_info(int account_id, int content_type, int l
* @code
* @endcode
*/
-bool get_profile_data(int account_id, char **profile_name, char **addr, char **id, char **password, char **sync_mode, char **sync_type, char **interval, int *last_session_status, int *last_session_time);
+bool get_profile_data(int account_id, char **profile_name, char **addr, char **id, char **password, int *sync_mode, int *sync_type, int *interval, int *last_session_status, int *last_session_time);
/**
* @par Description: API to get profile datastore information(enable, source uri, target uri, id, password) from config_tbl
@@ -166,7 +166,7 @@ bool get_profile_data(int account_id, char **profile_name, char **addr, char **i
* @param[in] int type, account id
* @param[in] int type, content type(TYPE_CONTACT, TYPE_CALENDAR, TYPE_MEMO)
* @param[out] string type, enabled
- * @param[out] string type, source uri
+ * @param[out] int type, source uri
* @param[out] string type, target uri
* @param[out] string type, id
* @param[out] string type, password
@@ -185,7 +185,7 @@ bool get_profile_data(int account_id, char **profile_name, char **addr, char **i
* @code
* @endcode
*/
-bool get_profile_sync_category(int account_id, int content_type, int *enabled, char **src_uri, char **tgt_uri, char **id, char **password);
+bool get_profile_sync_category(int account_id, int content_type, int *enabled, int *src_uri, char **tgt_uri, char **id, char **password);
/**
* @par Description: API to get profile sync statistics for each content type from config_tbl