summaryrefslogtreecommitdiff
path: root/include/common
diff options
context:
space:
mode:
authorJinkun Jang <jinkun.jang@samsung.com>2013-03-13 01:51:48 +0900
committerJinkun Jang <jinkun.jang@samsung.com>2013-03-13 01:51:48 +0900
commitd6aa47559c38d7e20d6d6a7a3671fa48ed58b9eb (patch)
tree5fbc758662a7866e32ec1adcfd9149c71987549e /include/common
parent8fe192a924f295972402d46141e39b86241a1441 (diff)
downloadoma-ds-agent-d6aa47559c38d7e20d6d6a7a3671fa48ed58b9eb.tar.gz
oma-ds-agent-d6aa47559c38d7e20d6d6a7a3671fa48ed58b9eb.tar.bz2
oma-ds-agent-d6aa47559c38d7e20d6d6a7a3671fa48ed58b9eb.zip
Tizen 2.1 base
Diffstat (limited to 'include/common')
-rwxr-xr-xinclude/common/common_define.h1191
-rwxr-xr-xinclude/common/common_define_internal.h307
-rwxr-xr-xinclude/common/common_util.h187
-rwxr-xr-xinclude/common/common_vconf.h249
-rwxr-xr-xinclude/common/csc_keys.h50
5 files changed, 1984 insertions, 0 deletions
diff --git a/include/common/common_define.h b/include/common/common_define.h
new file mode 100755
index 0000000..4612b39
--- /dev/null
+++ b/include/common/common_define.h
@@ -0,0 +1,1191 @@
+/*
+ * 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.
+ */
+
+/**
+ * @Common_Define.h
+ * @version 0.1
+ * @brief This file is the header file of interface for common structure
+ */
+
+#ifndef COMMON_DEFINE_H_
+#define COMMON_DEFINE_H_
+
+#include "common_define_internal.h"
+
+/**
+ * @par Description: API to create datastore_info_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] string type, target uri
+ * @param[in] string type, source uri
+ * @param[out] Status structure
+ *
+ * @return datastore_info_s on success
+ * NULL on error
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+datastore_info_s *create_datastore_info(char *target, char *source);
+
+/**
+ * @par Description: API to free list of datastore_info_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] list of datastore_info_s structure
+ * @param[out]
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void free_datastore_infos(GList * datastore_infos);
+
+/**
+ * @par Description: API to free datastore_info_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] datastore_info_s structure
+ * @param[out]
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void free_datastore_info(datastore_info_s * datastore_info);
+
+/**
+ * @par Description: API to set sync type in datastore_info_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] datastore_info_s structure
+ * @param[in] enum type, sync type
+ * @param[out]
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void set_datastore_info_sync_type(datastore_info_s * datastore_info, alert_type_e sync_type);
+
+/**
+ * @par Description: API to set last anchor in datastore_info_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] datastore_info_s structure
+ * @param[in] string type, last anchor
+ * @param[out]
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void set_datastore_info_last_anchor(datastore_info_s * datastore_info, char *last_anchor);
+
+/**
+ * @par Description: API to set next anchor in datastore_info_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] datastore_info_s structure
+ * @param[in] string type, next anchor
+ * @param[out]
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void set_datastore_info_next_anchor(datastore_info_s * datastore_info, char *next_anchor);
+
+/**
+ * @par Description: API to set max_obj_size in datastore_info_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] datastore_info_s structure
+ * @param[in] unsigned int, max_obj_size
+ * @param[out]
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void set_datastore_info_max_obj_size(datastore_info_s * datastore_info, unsigned int max_obj_size);
+
+/**
+ * @par Description: API to create changed_item_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] enum type, change type of item
+ * @param[in] string type, luid of item
+ * @param[out]
+ *
+ * @return changed_item_s on success
+ * NULL on error
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+changed_item_s *create_changed_item(change_type_e type, char *luid);
+
+/**
+ * @par Description: API to free changed_item_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] changed_item_s structure
+ * @param[out]
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void free_changed_item(changed_item_s * changed_item);
+
+/**
+ * @par Description: API to set content type in changed_item_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] changed_item_s structure
+ * @param[in] string type, content type
+ * @param[out]
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void set_changed_item_content_type(changed_item_s * changed_item, char *content_type);
+
+/**
+ * @par Description: API to set data in changed_item_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] changed_item_s structure
+ * @param[in] string type, data
+ * @param[out]
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void set_changed_item_data(changed_item_s * changed_item, char *data);
+
+/**
+ * @par Description: API to set in changed_item_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] changed_item_s structure
+ * @param[in] datastore index(0=contacts, 1=calendar, 2= memo)
+ * @param[out]
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void set_changed_item_index_of_datastore(changed_item_s * changed_item, unsigned int indexOfDatastore);
+
+/**
+ * @par Description: API to create changed_datastore_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] string type, source uri
+ * @param[in] string type, target uri
+ * @param[in] int type, has numberOfChanges or not
+ * @param[in] unsigned int type, if numberOfChanges is true set count else set zero
+ * @param[out]
+ *
+ * @return changed_datastore_s on success
+ * NULL on error
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+changed_datastore_s *create_changed_datastore(char *source, char *target, int has_number_of_changes, unsigned int number_of_changes);
+
+/**
+ * @par Description: API to free list of changed_datastore_s
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] list of changed_datastore_s
+ * @param[out]
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void free_changed_datastores(GList * changed_datastores);
+
+/**
+ * @par Description: API to free changed_datastore_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] changed_datastore_s structure
+ * @param[out]
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void free_changed_datastore(changed_datastore_s * changed_datastore);
+
+/**
+ * @par Description: API to set changed_item in changed_datastore_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] changed_datastore_s structure
+ * @param[in] list of changed_item_s structure
+ * @param[out]
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void set_changed_datastore_changed_item(changed_datastore_s * changed_datastore, GList * changed_item);
+
+/**
+ * @par Description: API to add changed_item in changed_datastore_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] changed_datastore_s structure
+ * @param[in] changed_item_s structure
+ * @param[out]
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void add_changed_datastore_changed_item(changed_datastore_s * changed_datastore, changed_item_s * changed_item);
+
+/**
+ * @par Description: API to create applied_status_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] string type, luid of item
+ * @param[in] enum type, change type( CHANGE_ADD , CHANGE_REPLACE , CHANGE_DELETE)
+ * @param[in] int type, status code(200....)
+ * @param[out]
+ *
+ * @return applied_status_s on success
+ * NULL on error
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+applied_status_s *create_applied_status(char *luid, change_type_e change_type, int status);
+
+/**
+ * @par Description: API to free list of applied_status_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] list of applied_status_s structure
+ * @param[out]
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void free_applied_statuses(GList * applied_statuses);
+
+/**
+ * @par Description: API to free applied_status_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] applied_status_s structure
+ * @param[out]
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void free_applied_status(applied_status_s * applied_status);
+
+/**
+ * @par Description: API to create sending_status_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] source uri
+ * @param[in] target uri
+ * @param[out]
+ *
+ * @return sending_status_s on success
+ * NULL on error
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+sending_status_s *create_sending_status(char *source, char *target);
+
+/**
+ * @par Description: API to free list of sending_status_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] list of sending_status_s structure
+ * @param[out]
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void free_sending_statuses(GList * sending_statuses);
+
+/**
+ * @par Description: API to free sending_status_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] sending_status_s structure
+ * @param[out]
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void free_sending_status(sending_status_s * sending_status);
+
+/**
+ * @par Description: API to add applied_status_s in sending_status_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] sending_status_s structure
+ * @param[in] applied_status_s structure
+ * @param[out]
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void add_sending_status_applied_status(sending_status_s * sending_status, applied_status_s * applied_status);
+
+/**
+ * @par Description: API to create datastore_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] string type, target uri
+ * @param[in] string type, source uri
+ * @param[out]
+ *
+ * @return datastore_s on success
+ * NULL on error
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+datastore_s *create_datastore(char *target, char *source);
+
+/**
+ * @par Description: API to set content type infomation in datastore_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] datastore_s structure
+ * @param[in] int type, datastore_id(TYPE_CONTACT, TYPE_CALENDAR, TYPE_MEMO)
+ * @param[in] int type, folder_type_id(9, 8, 10)
+ * @param[out]
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void set_datastore_content_type_info(datastore_s * datastore, int datastore_id, int folder_type_id);
+
+/**
+ * @par Description: API to set account information in datastore_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] datastore_s structure
+ * @param[in] string type, account_id
+ * @param[in] string type, account_pw
+ * @param[out]
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void set_datastore_account_info(datastore_s * datastore, char *account_id, char *account_pw);
+
+/**
+ * @par Description: API to set client sync type in datastore_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] datastore_s structure
+ * @param[in] enum type, sync type
+ * @param[out]
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void set_datastore_client_sync_type(datastore_s * datastore, alert_type_e sync_type);
+
+/**
+ * @par Description: API to set server sync type in datastore_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] datastore_s structure
+ * @param[in] enum type, sync type
+ * @param[out]
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void set_datastore_server_sync_type(datastore_s * datastore, alert_type_e sync_type);
+
+/**
+ * @par Description: API to set client anchor in datastore_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] datastore_s structure
+ * @param[in] string type, last anchor
+ * @param[in] string type, next anchor
+ * @param[out]
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void set_datastore_client_anchor(datastore_s * datastore, char *last_anchor, char *next_anchor);
+
+/**
+ * @par Description: API to set client anchor in datastore_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] datastore_s structure
+ * @param[in] string type, last anchor
+ * @param[in] string type, next anchor
+ * @param[out]
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void set_datastore_server_anchor(datastore_s * datastore, char *last_anchor, char *next_anchor);
+
+/**
+ * @par Description: API to create sync_result_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] datastore_s structure
+ * @param[in] string type, last anchor
+ * @param[in] string type, next anchor
+ * @param[out]
+ *
+ * @return sync_result_s on success
+ * NULL on error
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+sync_result_s *create_sync_result();
+
+/**
+ * @par Description: API to duplicate sync_result_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] sync_result_s structure
+ * @param[out]
+ *
+ * @return sync_result_s on success
+ * NULL on error
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+sync_result_s *dup_sync_result(sync_result_s * org_sync_result);
+
+/**
+ * @par Description: API to set number of total item in sync_result_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] sync_result_s structure
+ * @param[in] number of total item
+ * @param[out]
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void set_number_of_change(sync_result_s * sync_result, unsigned int number_of_change);
+
+/**
+ * @par Description: API to set number of received item in sync_result_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] sync_result_s structure
+ * @param[in] number of received item
+ * @param[out]
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void add_receive_count(sync_result_s * sync_result, unsigned int received_count);
+
+/**
+ * @par Description: API to set number of add item in sync_result_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] sync_result_s structure
+ * @param[in] number of add item
+ * @param[out]
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void add_add_count(sync_result_s * sync_result, unsigned int add_cnt);
+
+/**
+ * @par Description: API to set number of replace item in sync_result_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] sync_result_s structure
+ * @param[in] number of replace item
+ * @param[out]
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void add_replace_count(sync_result_s * sync_result, unsigned int replace_cnt);
+
+/**
+ * @par Description: API to set number of delete item in sync_result_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] sync_result_s structure
+ * @param[in] number of delete item
+ * @param[out]
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void add_delete_count(sync_result_s * sync_result, unsigned int delete_cnt);
+
+/**
+ * @par Description: API to free PreSyncReturnObj structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] pre_sync_return_obj_s structure
+ * @param[out]
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void free_pre_sync_return_obj(pre_sync_return_obj_s * pre_sync_return_obj);
+
+/**
+ * @par Description: API to free sync_obj_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] sync_obj_s structure
+ * @param[out]
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void free_sync_obj(sync_obj_s * sync_obj);
+
+/**
+ * @par Description: API to free sync_return_obj_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] sync_return_obj_s structure
+ * @param[out]
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void free_sync_return_obj(sync_return_obj_s * sync_return_obj);
+
+/**
+ * @par Description: API to free datastore_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] datastore_s structure
+ * @param[out]
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void free_datastore(datastore_s * datastore);
+
+/**
+ * @par Description: API to free sync_category structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] sync_service_s structure
+ * @param[out]
+ *
+ * @return
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+void free_sync_service(sync_service_s * category);
+
+#endif /* COMMON_DEFINE_H_ */
diff --git a/include/common/common_define_internal.h b/include/common/common_define_internal.h
new file mode 100755
index 0000000..c3078de
--- /dev/null
+++ b/include/common/common_define_internal.h
@@ -0,0 +1,307 @@
+/*
+ * 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.
+ */
+
+/**
+ * @Common_Define_Internal.h
+ * @version 0.1
+ * @brief This file is the header file of defined common structure for using between SE and SA
+ */
+
+#ifndef COMMON_DEFINE_INTERNAL_H_
+#define COMMON_DEFINE_INTERNAL_H_
+
+#include <malloc.h>
+#include <stdio.h>
+#include <glib.h>
+#include <string.h>
+
+/* #define COMMUNICATION_TYPE SYNC_AGENT_PB_ENCODING_XML */
+#define COMMUNICATION_TYPE SYNC_AGENT_PB_ENCODING_WBXML_12
+
+#define TRANSPORT_TYPE 1 /*http */
+ /*#define TRANSPORT_TYPE "FW_MOBEX" *//*mobex -> does not support in OMA */
+
+#define NETWORK_TIMEOUT 60
+
+#define MAXIMUM_ACCOUNT_COUNT 5
+
+#define PKG_NAME "oma-ds-agent"
+#define DEFINE_PLATFORM 1
+#define LOW_BATTERY_LEVEL 10
+
+#define OMA_DS_MSG_PATH "/opt/usr/data/oma-ds/debug_msg"
+#define OMA_DS_CSC_CHECK_PATH "/opt/usr/data/oma-ds/csc_check"
+
+#define ELEMENT_TEXT_VCARD "text/x-vcard"
+#define ELEMENT_TEXT_VCARD_30 "text/vcard"
+#define ELEMENT_TEXT_VCAL "text/x-vcalendar"
+#define ELEMENT_TEXT_ICAL "text/calendar"
+#define ELEMENT_TEXT_PLAIN "text/plain"
+#define ELEMENT_TEXT_XCALLLOG "text/x-calllog"
+#define ELEMENT_TEXT_MESSAGE "text/x-vMessage"
+
+#define DEFINE_ALERT_UNKNOWN_STR "Unknown"
+#define DEFINE_ALERT_SLOW_SYNC_STR "Full"
+#define DEFINE_ALERT_TWO_WAY_STR "Update both"
+#define DEFINE_ALERT_ONE_WAY_FROM_CLIENT_STR "Update to server"
+#define DEFINE_ALERT_ONE_WAY_FROM_SERVER_STR "Update to phone"
+#define DEFINE_ALERT_REFRESH_FROM_SERVER_STR "Refresh from server"
+#define DEFINE_ALERT_REFRESH_FROM_CLIENT_STR "Refresh from phone"
+
+#define DEFINE_ALERT_SLOW_SYNC_VALUE "201"
+#define DEFINE_ALERT_TWO_WAY_VALUE "200"
+#define DEFINE_ALERT_ONE_WAY_FROM_CLIENT_VALUE "202"
+#define DEFINE_ALERT_ONE_WAY_FROM_SERVER_VALUE "204"
+#define DEFINE_ALERT_REFRESH_FROM_SERVER_VALUE "205"
+#define DEFINE_ALERT_REFRESH_FROM_CLIENT_VALUE "203"
+
+#define DEFINE_CONFIG_KEY_PROFILE_SERVER_ID "Server_id"
+#define DEFINE_CONFIG_KEY_PROFILE_SYNC_MODE "Sync_mode"
+#define DEFINE_CONFIG_KEY_PROFILE_SERVER_IP "Server_ip"
+#define DEFINE_CONFIG_KEY_PROFILE_NEXT_NONCE "Next_nonce"
+#define DEFINE_CONFIG_KEY_PROFILE_DIR_NAME "Dir_name"
+#define DEFINE_CONFIG_KEY_PROFILE_SYNCHRONISING "Synchronising"
+#define DEFINE_CONFIG_KEY_PROFILE_RESUME "Resume"
+#define DEFINE_CONFIG_KEY_PROFILE_NAME "Name"
+#define DEFINE_CONFIG_KEY_PROFILE_CLIENT_SYNC_TYPE "Client_Sync_type"
+#define DEFINE_CONFIG_KEY_PROFILE_SERVER_SYNC_TYPE "Server_Sync_type"
+#define DEFINE_CONFIG_KEY_PROFILE_SYNC_INTERVAL "Sync_interval"
+#define DEFINE_CONFIG_KEY_PROFILE_CATEGORY_CONTACTS "Contacts"
+#define DEFINE_CONFIG_KEY_PROFILE_CATEGORY_CALENDAR "Organizer"
+#define DEFINE_CONFIG_KEY_PROFILE_CATEGORY_MEMO "Memo"
+#define DEFINE_CONFIG_KEY_PROFILE_CATEGORY_CALLLOG "CallLog"
+#define DEFINE_CONFIG_KEY_PROFILE_CATEGORY_SOURCE "source"
+#define DEFINE_CONFIG_KEY_PROFILE_CATEGORY_TARGET "target"
+#define DEFINE_CONFIG_KEY_PROFILE_CATEGORY_ID "id"
+#define DEFINE_CONFIG_KEY_PROFILE_CATEGORY_PASSWORD "password"
+#define DEFINE_CONFIG_KEY_PROFILE_LAST_SESSION_STATUS "Last_session_status"
+#define DEFINE_CONFIG_KEY_PROFILE_LAST_SESSION_TIME "Last_session_time"
+#define DEFINE_CONFIG_KEY_PROFILE_STATISTICS_DBSYNCED "dbSynced"
+#define DEFINE_CONFIG_KEY_PROFILE_STATISTICS_LAST_TIME "last_session_time"
+#define DEFINE_CONFIG_KEY_PROFILE_STATISTICS_TOTAL "numberOfChanges"
+#define DEFINE_CONFIG_KEY_PROFILE_STATISTICS_NROFADD "add_count"
+#define DEFINE_CONFIG_KEY_PROFILE_STATISTICS_NROFDELETE "delete_count"
+#define DEFINE_CONFIG_KEY_PROFILE_STATISTICS_NROFREPLACE "replace_count"
+#define DEFINE_CONFIG_KEY_PROFILE_STATISTICS_SERVER "server"
+#define DEFINE_CONFIG_KEY_PROFILE_STATISTICS_CLIENT "client"
+#define DEFINE_CONFIG_KEY_PROFILE_ALARM_ID "Alarm_id"
+
+#define DEFINE_SYNC_MODE_MANUAL "Manual"
+#define DEFINE_SYNC_MODE_PUSH "Push"
+#define DEFINE_SYNC_MODE_PERIODIC "Periodic"
+
+#define DEFINE_SOURCE_CONTACT_URI "Contacts"
+#define DEFINE_SOURCE_CALENDAR_URI "Organizer"
+#define DEFINE_SOURCE_MEMO_URI "Memo"
+#define DEFINE_SOURCE_CALLLOG_URI "CallLog"
+
+#define DEFINE_DIVE_SERVER_URL_HTTPS "https://syn.samsungdive.com/sync"
+#define DEFINE_DIVE_SERVER_URL_HTTP "http://syn.samsungdive.com/sync"
+#define DEFINE_DIVE_SERVER_ID "syn.samsungdive.com"
+#define DEFINE_DIVE_DEFAULT_NEXT_NONCE "pcwds"
+
+typedef enum {
+ SYNC_SESSION_NOT_SYNCED_YET = -1,
+ SYNC_SESSION_FAILED = 0,
+ SYNC_SESSION_SUCCEEDED = 1,
+ SYNC_SESSION_STOPPED = 2,
+ SYNC_SESSION_SYNCHRONIZING = 3
+} sync_session_result_e;
+
+typedef enum {
+ ALERT_UNKNOWN = 0,
+ ALERT_DISPLAY = 100,
+ ALERT_TWO_WAY = 200,
+ ALERT_SLOW_SYNC = 201,
+ ALERT_ONE_WAY_FROM_CLIENT = 202,
+ ALERT_REFRESH_FROM_CLIENT = 203,
+ ALERT_ONE_WAY_FROM_SERVER = 204,
+ ALERT_REFRESH_FROM_SERVER = 205,
+ ALERT_TWO_WAY_BY_SERVER = 206,
+ ALERT_ONE_WAY_FROM_CLIENT_BY_SERVER = 207,
+ ALERT_REFRESH_FROM_CLIENT_BY_SERVER = 208,
+ ALERT_ONE_WAY_FROM_SERVER_BY_SERVER = 209,
+ ALERT_REFRESH_FROM_SERVER_BY_SERVER = 210,
+ ALERT_RESULT = 221,
+ ALERT_NEXT_MESSAGE = 222,
+ ALERT_NO_END_OF_DATA = 223,
+ ALERT_SUSPEND = 224,
+ ALERT_RESUME = 225,
+} alert_type_e;
+
+typedef enum {
+ CHANGE_UNKNOWN = 0,
+ CHANGE_ADD = 1,
+ CHANGE_REPLACE = 2,
+ CHANGE_DELETE = 3
+} change_type_e;
+
+typedef enum {
+ TYPE_CONTACT = 0,
+ TYPE_CALENDAR,
+ TYPE_MEMO,
+ TYPE_CALLLOG,
+
+ TYPE_SERVICE_COUNT
+} service_type_e;
+
+typedef enum {
+ COMMON_INIT = 0,
+ COMMON_OK = 100,
+ COMMON_MISCONFIGURATION = 200,
+ COMMON_AUTHENTICATION_ERROR = 201,
+ COMMON_NOT_FOUND = 202,
+ COMMON_NO_MEMORY = 203,
+ COMMON_INTERNAL_ERROR = 204,
+ COMMON_SERVER_ERROR = 205,
+ COMMON_CONNECTION_ERROR = 206,
+ COMMON_AUTOCONFIG_NOT_SUPPORT_BY_SERVER = 207,
+ COMMON_BUSY_SIGNALING = 208,
+ COMMON_SUSPEND_FAIL = 209,
+ COMMON_CANCEL = 300,
+} common_error_type_e;
+
+typedef struct {
+ sync_session_result_e session_result;
+ unsigned int number_of_change;
+ unsigned int received_count;
+ unsigned int add_count;
+ unsigned int replace_count;
+ unsigned int delete_count;
+} sync_result_s;
+
+/**
+ * @brief Data Store information
+ * relevant information about Data Store\n
+ *
+ */
+typedef struct {
+ int datastore_id; /**< plugin_type : TYPE_CONTACT, TYPE_CALENDAR, TYPE_MEMO, TYPE_CALL_LOG */
+ int folder_type_id; /**< folder type id 0 */
+ char *target; /**< target(server) URI */
+ char *source; /**< source(client) URI */
+ char *id; /**< account id */
+ char *pw; /**< account pw */
+ alert_type_e client_sync_type; /**< Sync Type(two-way, one-way ...) */
+ alert_type_e server_sync_type; /**< Sync Type(two-way, one-way ...) */
+ char *last_anchor_client; /**< Last Anchor of datastore for client side */
+ char *next_anchor_client; /**< Next Anchor of datastore for client side */
+ char *last_anchor_server; /**< Next Anchor of datastore for server side */
+ char *next_anchor_server; /**< Next Anchor of datastore for server side */
+ sync_result_s *client_sync_result;
+ sync_result_s *server_sync_result;
+} datastore_s;
+
+typedef struct {
+ char *target; /**< target(server) URI */
+ char *source; /**< source(client) URI */
+ alert_type_e sync_type; /**< Sync Type(two-way, one-way ...) */
+ char *last_anchor; /**< Last Anchor of datastore for client side */
+ char *next_anchor; /**< Next Anchor of datastore for client side */
+ unsigned int max_obj_size;
+} datastore_info_s;
+
+/**
+ @brief Third parameter of pre_sync function
+
+ Output data from pre_sync function\n
+ Data that need to be passed to Service Engine from Service Adapter result of pkg2
+
+ */
+typedef struct {
+ GList *datastore_info; /**< containing datastore_info structure*/
+ char *dev_id;
+} pre_sync_return_obj_s;
+
+/**
+ @brief a changed item(changelog)
+
+ */
+typedef struct {
+ change_type_e change_type; /**< type of changes (add, replace, delete, copy, move ..) */
+ char *luid; /**< luid of item */
+ char *content_type; /**< content type of data */
+ unsigned int index_of_datastore;
+ char *data; /**< data */
+} changed_item_s;
+
+/**
+ @brief item that are grouped by each Data Store
+
+ */
+typedef struct {
+ char *source; /**< source(client) URI */
+ char *target; /**< target(server) URI */
+ int need_sync_command;
+ unsigned int number_of_changes;
+ int has_number_of_changes;
+
+ GList *change_item; /**< containing changed_item all type */
+ GList *sent_item; /**< containing changed_item */
+} changed_datastore_s;
+
+/**
+ @brief result of applied command that from service engine or server
+
+ */
+typedef struct {
+ change_type_e change_type; /**< change type (add, replace, delete...) */
+ char *luid; /**< luid of item */
+ int status; /**< status of applied item */
+} applied_status_s;
+
+typedef struct {
+ char *source; /**< source(client) URI */
+ char *target; /**< target(server) URI */
+ GList *items; /**< containing appllied_status struct */
+} sending_status_s;
+
+/**
+ @brief second and third parameter of sync function
+
+ */
+typedef struct {
+ GList *changed_datastore; /**< containing changed_datastore structure when it's in SyncObj it will be command that client send to server */
+ GList *sending_status; /**< containing sending_status structure when it's in SyncObj status of add, replace, delete command from server */
+} sync_obj_s;
+
+typedef struct {
+ GList *changed_datastore; /**< containing changed_datastore structure when it's in SyncReturnObj command(add, relpace, delete) from server */
+ GList *status; /**< containing applied_status structure when it's in SyncReturnObj return to engine(status of add, replace, delete command that client sent to server)*/
+} sync_return_obj_s;
+
+typedef struct {
+ service_type_e service_type;
+ int enabled;
+ char *src_uri;
+ char *tgt_uri;
+ char *id;
+ char *password;
+} sync_service_s;
+
+typedef struct {
+ char *name;
+ char *accept;
+ char *id;
+ char *password;
+ char *auth_type;
+ char *auth_data;
+} resource_cp_s;
+
+extern datastore_s *datastoreinfo_per_content_type[4];
+
+#endif /* COMMON_DEFINE_INTERNAL_H_ */
diff --git a/include/common/common_util.h b/include/common/common_util.h
new file mode 100755
index 0000000..ce10a90
--- /dev/null
+++ b/include/common/common_util.h
@@ -0,0 +1,187 @@
+/*
+ * 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.
+ */
+
+/**
+ * @Common_Util.h
+ * @version 0.1
+ * @brief This file is the header file of interface for utility function
+ */
+
+#ifndef COMMON_UTIL_H_
+#define COMMON_UTIL_H_
+
+#include <stdbool.h>
+
+/**
+ * @par Description: API to create sync_agent_da_config_s structure
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] int type, account id
+ * @param[in] string type, key
+ * @param[in] string type, value(char *)
+ * @param[in] string type, type of value(string, int)
+ * @param[in] string type, name of access(SE, SA...)
+ * @param[out] sync_agent_da_config_s
+ *
+ * @return true on success
+ * false on error
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+bool create_config_str(int account_id, char *key, char *value, char *type, char *access_name, sync_agent_da_config_s ** config);
+
+/**
+ * @par Description: API to set value into config_tbl(key, value)
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] int type, account id
+ * @param[in] string type, key
+ * @param[in] string type, value(char *)
+ * @param[in] string type, type of value(string, int)
+ * @param[in] string type, name of access(SE, SA...)
+ * @param[out]
+ *
+ * @return true on success
+ * false on error
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+bool set_config_str(int account_id, char *key, char *value, char *type, char *access_name);
+
+/**
+ * @par Description: API to set value into config_tbl(key, value)
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] int type, account id
+ * @param[in] string type, key
+ * @param[in] int type, value(int)
+ * @param[in] string type, type of value(string, int)
+ * @param[in] string type, name of access(SE, SA...)
+ * @param[out]
+ *
+ * @return true on success
+ * false on error
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+bool set_config_int(int account_id, char *key, int value, char *type, char *access_name);
+
+/**
+ * @par Description: API to get value from config_tbl(key, value)
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] int type, account id
+ * @param[in] string type, key
+ * @param[out] string type, value
+ *
+ * @return true on success
+ * false on error
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+bool get_config(int account_id, char *key, char **value);
+
+/**
+ * @par Description: API to get account ID from profileDirName(Sync1...)
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] string type, profileDirName(Sync1, Sync2...)
+ * @param[in] boolean type, already open agent db or not
+ * @param[out]
+ *
+ * @return account ID (more than 1) on success
+ * -1 on error
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+int get_account_id(char *profile, bool open);
+
+/**
+ * @brief convert sync type(UI-> Engine)
+ * @param[in] sync type(Full, Update both, Update to server, Update to phone, Refresh from server, Refresh from phone)
+ * @return char *
+ * @retval value of sync type Success
+ * NULL Error
+ */
+/*int convert_synctype_value(char *syncType_str);*/
+/*char *convert_synctype_str(char *syncType_value);*/
+#endif /* COMMON_UTIL_H_ */
diff --git a/include/common/common_vconf.h b/include/common/common_vconf.h
new file mode 100755
index 0000000..19cbcd7
--- /dev/null
+++ b/include/common/common_vconf.h
@@ -0,0 +1,249 @@
+/*
+ * 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.
+ */
+
+/**
+ * @Common_Vconf.h
+ * @version 0.1
+ * @brief This file is the header file of defined vconf value
+ */
+
+#ifndef COMMON_VCONF_H_
+#define COMMON_VCONF_H_
+
+#include <stdbool.h>
+
+/**
+ * @par Description: API to get value(char*) from vconf
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] string type, base key
+ * @param[in] string type, key
+ * @param[out]
+ *
+ * @return value on success
+ * NULL on error
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+char *get_vconf_str(char *base_key, char *key);
+
+/**
+ * @par Description: API to get value(char*) from vconf
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] string type, key
+ * @param[out]
+ *
+ * @return value on success
+ * NULL on error
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+char *get_vconf_str_key(char *key);
+
+/**
+ * @par Description: API to get value(int) from vconf
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] string type, base key
+ * @param[in] string type, key
+ * @param[out] int type, value
+ *
+ * @return true on success
+ * false on error
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+bool get_vconf_int(char *base_key, char *key, int *value);
+
+/**
+ * @par Description: API to get value(int) from vconf
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] string type, key
+ * @param[out] int type, value
+ *
+ * @return true on success
+ * false on error
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+bool get_vconf_int_key(char *key, int *value);
+
+/**
+ * @par Description: API to set value(char*) into vconf
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] string type, basekey
+ * @param[in] string type, key
+ * @param[in] string type, value
+ *
+ * @return true on success
+ * false on error
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+bool set_vconf_str(char *base_key, char *key, char *value);
+
+/**
+ * @par Description: API to set value(char*) into vconf
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] string type, key
+ * @param[in] string type, value
+ *
+ * @return true on success
+ * false on error
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+bool set_vconf_str_key(char *key, char *value);
+
+/**
+ * @par Description: API to set value(int) into vconf
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] string type, basekey
+ * @param[in] string type, key
+ * @param[in] int type, value
+ *
+ * @return true on success
+ * false on error
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+bool set_vconf_int(char *base_key, char *key, int value);
+
+/**
+ * @par Description: API to set value(int) into vconf
+ *
+ *
+ * @par Purpose:
+ * @par Typical use case:
+ * @par Method of function operation:
+ * @par Important notes:
+ * @param[in] string type, key
+ * @param[in] int type, value
+ *
+ * @return true on success
+ * false on error
+ *
+ * @par Errors:
+ *
+ * @pre None.
+ * @post
+ * @see
+ * @remarks None.
+ *
+ * @par Sample Code:
+ * @code
+ * @endcode
+ */
+bool set_vconf_int_key(char *key, int value);
+
+#endif /* COMMON_VCONF_H_ */
diff --git a/include/common/csc_keys.h b/include/common/csc_keys.h
new file mode 100755
index 0000000..d34c3a3
--- /dev/null
+++ b/include/common/csc_keys.h
@@ -0,0 +1,50 @@
+/*
+ * 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.
+ */
+
+/**
+ * @CscKeys.h
+ * @version 0.1
+ * @brief This file is the header file of define for CSC keys
+ */
+
+#ifndef CSCKEYS_H_
+#define CSCKEYS_H_
+
+/* SyncML DS */
+#define CSC_VCONF_KEY_SYNCMLDS_NBDATASYNC "db/SyncML/oma-ds-agent/DS/Accounts/NbDataSync"
+#define CSC_VCONF_KEY_SYNCMLDS_NETWORK "db/SyncML/oma-ds-agent/DS/Accounts/Sync%d/NetworkName"
+#define CSC_VCONF_KEY_SYNCMLDS_VERSION "db/SyncML/oma-ds-agent/DS/Accounts/Sync%d/DSVersion"
+#define CSC_VCONF_KEY_SYNCMLDS_NAME "db/SyncML/oma-ds-agent/DS/Accounts/Sync%d/Name"
+#define CSC_VCONF_KEY_SYNCMLDS_ADDR "db/SyncML/oma-ds-agent/DS/Accounts/Sync%d/AppAddr/Addr"
+#define CSC_VCONF_KEY_SYNCMLDS_AUTHNAME "db/SyncML/oma-ds-agent/DS/Accounts/Sync%d/AuthInfo/Client/AuthName"
+#define CSC_VCONF_KEY_SYNCMLDS_AUTHPWD "db/SyncML/oma-ds-agent/DS/Accounts/Sync%d/AuthInfo/Client/AuthPWD"
+#define CSC_VCONF_KEY_SYNCMLDS_SYNCTYPE "db/SyncML/oma-ds-agent/DS/Accounts/Sync%d/GUI/SyncType"
+#define CSC_VCONF_KEY_SYNCMLDS_SYNCMODE "db/SyncML/oma-ds-agent/DS/Accounts/Sync%d/GUI/SyncMode"
+#define CSC_VCONF_KEY_SYNCMLDS_CONTACTS_ENABLED "db/SyncML/oma-ds-agent/DS/Accounts/Sync%d/Resource/Contacts/Enabled"
+#define CSC_VCONF_KEY_SYNCMLDS_CONTACTS_TGTURI "db/SyncML/oma-ds-agent/DS/Accounts/Sync%d/Resource/Contacts/TgtURI"
+#define CSC_VCONF_KEY_SYNCMLDS_CONTACTS_AUTHNAME "db/SyncML/oma-ds-agent/DS/Accounts/Sync%d/Resource/Contacts/AuthInfo/Server/AuthName"
+#define CSC_VCONF_KEY_SYNCMLDS_CONTACTS_AUTHPWD "db/SyncML/oma-ds-agent/DS/Accounts/Sync%d/Resource/Contacts/AuthInfo/Server/AuthPWD"
+#define CSC_VCONF_KEY_SYNCMLDS_CALENDAR_ENABLED "db/SyncML/oma-ds-agent/DS/Accounts/Sync%d/Resource/Calendar/Enabled"
+#define CSC_VCONF_KEY_SYNCMLDS_CALENDAR_TGTURI "db/SyncML/oma-ds-agent/DS/Accounts/Sync%d/Resource/Calendar/TgtURI"
+#define CSC_VCONF_KEY_SYNCMLDS_CALENDAR_AUTHNAME "db/SyncML/oma-ds-agent/DS/Accounts/Sync%d/Resource/Calendar/AuthInfo/Server/AuthName"
+#define CSC_VCONF_KEY_SYNCMLDS_CALENDAR_AUTHPWD "db/SyncML/oma-ds-agent/DS/Accounts/Sync%d/Resource/Calendar/AuthInfo/Server/AuthPWD"
+#define CSC_VCONF_KEY_SYNCMLDS_MEMO_ENABLED "db/SyncML/oma-ds-agent/DS/Accounts/Sync%d/Resource/Memo/Enabled"
+#define CSC_VCONF_KEY_SYNCMLDS_MEMO_TGTURI "db/SyncML/oma-ds-agent/DS/Accounts/Sync%d/Resource/Memo/TgtURI"
+#define CSC_VCONF_KEY_SYNCMLDS_MEMO_AUTHNAME "db/SyncML/oma-ds-agent/DS/Accounts/Sync%d/Resource/Memo/AuthInfo/Server/AuthName"
+#define CSC_VCONF_KEY_SYNCMLDS_MEMO_AUTHPWD "db/SyncML/oma-ds-agent/DS/Accounts/Sync%d/Resource/Memo/AuthInfo/Server/AuthPWD"
+
+#endif /* CSCKEYS_H_ */