summaryrefslogtreecommitdiff
path: root/include/service-engine/se_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/service-engine/se_common.h')
-rwxr-xr-xinclude/service-engine/se_common.h128
1 files changed, 128 insertions, 0 deletions
diff --git a/include/service-engine/se_common.h b/include/service-engine/se_common.h
new file mode 100755
index 0000000..108acef
--- /dev/null
+++ b/include/service-engine/se_common.h
@@ -0,0 +1,128 @@
+/*
+ * 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_Common.h
+ * @version 0.1
+ * @brief This file is the header file of enumeration and define used in SE
+ */
+
+#ifndef SE_COMMON_H_
+#define SE_COMMON_H_
+
+#define DEFINE_SYNC_PROGRESS_NONE "PROGRESS_NONE"
+#define DEFINE_SYNC_INIT "INIT"
+#define DEFINE_SYNC_CONNECTING "CONNECTING"
+#define DEFINE_SYNC_AUTHENTICATED "AUTHENTICATED"
+#define DEFINE_SYNC_DONE "DONE"
+#define DEFINE_SYNC_ERROR "ERROR"
+
+#define DEFINE_ERROR_NONE "ERROR_NONE"
+#define DEFINE_ERROR_CONNECTION "CONNECTION"
+#define DEFINE_ERROR_SYNCHDR "SYNCHDR"
+#define DEFINE_ERROR_INTERNAL "INTERNAL"
+#define DEFINE_ERROR_SUSPENDED "SUSPENDED"
+#define DEFINE_ERROR_DB "DB"
+#define DEFINE_ERROR_ABORT "ABORT"
+#define DEFINE_ERROR_SERVER "SERVER"
+#define DEFINE_ERROR_MEMORY_FULL "MEMORY_FULL"
+#define DEFINE_ERROR_AUTHENTICATE "AUTHENTICATE"
+#define DEFINE_ERROR_AUTOCONFIG_NOT_SUPPORT_BY_SERVER "AUTOCONFIG_NOT_SUPPORT_BY_SERVER"
+#define DEFINE_ERROR_LOW_BATTERY "LOW_BATTERY"
+
+#define DEFINE_PROGRESS_NONE "PROGRESS_NONE"
+#define DEFINE_PROGRESS_SUCCESS "PROGRESS_SUCCESS"
+#define DEFINE_FAILED_DB "FAILED_DB"
+#define DEFINE_FAILED_DB_FORBIDDEN "FAILED_DB_FORBIDDEN"
+#define DEFINE_FAILED_DB_ITEM "FAILED_DB_ITEM"
+#define DEFINE_FAILED_DB_CONFIG "FAILED_DB_CONFIG"
+#define DEFINE_FAILED_DB_DEVICEFULL "FAILED_DB_DEVICEFULL"
+
+#define DEFINE_NOOP "NOOP"
+#define DEFINE_ADD "ADD"
+#define DEFINE_DELETE "DELETE"
+#define DEFINE_MOVE "MOVE"
+#define DEFINE_COPY "COPY"
+#define DEFINE_REPLACE "REPLACE"
+
+#define DEFINE_DBSYNC_SUCCESS "success"
+#define DEFINE_DBSYNC_STOP "stop"
+#define DEFINE_DBSYNC_FAIL "fail"
+#define DEFINE_DBSYNC_NO "No"
+
+typedef enum {
+ PROGRESS_NONE = 0,
+ PROGRESS_INIT = 1,
+ PROGRESS_CONNECTING = 2,
+ PROGRESS_AUTHENTICATED = 3,
+ PROGRESS_DONE = 4,
+ PROGRESS_ERROR = 5
+} sync_progress_e;
+
+typedef enum {
+ ERROR_NONE = 0,
+ ERROR_CONNECTION = 1,
+ ERROR_SYNCHDR = 2,
+ ERROR_INTERNAL = 3,
+ ERROR_SUSPENDED = 4,
+ ERROR_DB = 5,
+ ERROR_ABORT = 6,
+ ERROR_SERVER = 7,
+ ERROR_MEMORY_FULL = 8,
+ ERROR_AUTHENTICATE = 9,
+ ERROR_AUTOCONFIG_NOT_SUPPORT_BY_SERVER = 10,
+ ERROR_LOW_BATTERY = 11
+} sync_error_e;
+
+typedef enum {
+ SYNC_PROGRESS_NONE = 0,
+ SYNC_PROGRESS_SUCCESS,
+ SYNC_FAILED_DB,
+ SYNC_FAILED_DB_FORBIDDEN,
+ SYNC_FAILED_DB_ITEM,
+ SYNC_FAILED_DB_CONFIG,
+ SYNC_FAILED_DB_DEVICEFULL
+} sync_progress_status_e;
+
+typedef enum {
+ OPERATION_NOOP = 0,
+ OPERATION_ADD,
+ OPERATION_DELETE,
+ OPERATION_MOVE,
+ OPERATION_COPY,
+ OPERATION_REPLACE
+} operation_type_e;
+
+typedef enum {
+ COMMAND_RESULT_INIT = 0,
+ COMMAND_RESULT_OK = 200, /*[R] OK exception */
+ COMMAND_RESULT_ADDED = 201, /*[AR] Item added exception */
+ COMMAND_RESULT_DELETE_PARTIAL = 206, /*[D] Partial content exception condition */
+ COMMAND_RESULT_DELETE_WITHOUT_ARCHIVE = 210, /*[D] Delete without archive exception */
+ COMMAND_RESULT_NOT_EXIST = 211, /*[D] Item not deleted exception */
+ COMMAND_RESULT_UNAUTHRIZED = 401, /*[ARD] Unauthorized exception */
+ COMMAND_RESULT_AUTHENTICATION_REQUIRED = 407, /*[ARD] Authentication required exception */
+ COMMAND_RESULT_INCOMPLETE = 412, /*[D] Incomplete command exception */
+ COMMAND_RESULT_UNSUPPORTED_TYPE = 415, /*[A] Unsupported media type or format exception */
+ COMMAND_RESULT_ALREADY_EXIST = 418, /*[A] Already exists exception */
+ COMMAND_RESULT_DEVICE_FULL = 420, /*[AR] Device full exception */
+ COMMAND_RESULT_PARTIAL_REPLACE_NOT_ACCEPTED = 426, /*[R] Partial item not accepted */
+ COMMAND_RESULT_NOT_EMPTY = 427, /*[D] Item not empty */
+ COMMAND_RESULT_COMMAND_FAIL = 500 /*[ARD] Command failed exception */
+} command_result_e;
+
+#endif /* SE_COMMON_H_ */