upload tizen1.0 source
[pkgs/o/oma-ds-service.git] / include / ServiceEngine / SE_Common.h
1 /*
2  * oma-ds-service
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: JuHak Park <juhaki.park@samsung.com>,
7  *          JuneHyuk Lee <junhyuk7.lee@samsung.com>,
8  *          SunBong Ha <sunbong.ha@samsung.com>
9  *
10  * Licensed under the Apache License, Version 2.0 (the "License");
11  * you may not use this file except in compliance with the License.
12  * You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  *
22  */
23
24
25
26
27
28 /*
29  * For any sort of issue you concern as to this software,
30  * you may use following point of contact.
31  * All resources contributed on this software
32  * are orinigally written by S-Core Inc., a member of Samsung Group.
33  *
34  * SeongWon Shim <seongwon.shim@samsung.com>
35  */
36
37 /**
38  *   @SE_Common.h
39  *   @version                                                                   0.1
40  *   @brief                                                                             This file is the header file of enumeration and define used in SE
41  */
42
43 #ifndef SE_COMMON_H_
44 #define SE_COMMON_H_
45
46 #define DEFINE_SYNC_PROGRESS_NONE "PROGRESS_NONE"
47 #define DEFINE_SYNC_INIT "INIT"
48 #define DEFINE_SYNC_CONNECTING "CONNECTING"
49 #define DEFINE_SYNC_AUTHENTICATED "AUTHENTICATED"
50 #define DEFINE_SYNC_DONE "DONE"
51 #define DEFINE_SYNC_ERROR "ERROR"
52
53 #define DEFINE_ERROR_NONE "ERROR_NONE"
54 #define DEFINE_ERROR_CONNECTION "CONNECTION"
55 #define DEFINE_ERROR_SYNCHDR "SYNCHDR"
56 #define DEFINE_ERROR_INTERNAL "INTERNAL"
57 #define DEFINE_ERROR_SUSPENDED "SUSPENDED"
58 #define DEFINE_ERROR_DB "DB"
59 #define DEFINE_ERROR_ABORT "ABORT"
60 #define DEFINE_ERROR_SERVER "SERVER"
61 #define DEFINE_ERROR_MEMORY_FULL "MEMORY_FULL"
62 #define DEFINE_ERROR_AUTHENTICATE "AUTHENTICATE"
63 #define DEFINE_ERROR_AUTOCONFIG_NOT_SUPPORT_BY_SERVER "AUTOCONFIG_NOT_SUPPORT_BY_SERVER"
64
65 #define DEFINE_PROGRESS_NONE "PROGRESS_NONE"
66 #define DEFINE_PROGRESS_SUCCESS "PROGRESS_SUCCESS"
67 #define DEFINE_FAILED_DB "FAILED_DB"
68 #define DEFINE_FAILED_DB_FORBIDDEN "FAILED_DB_FORBIDDEN"
69 #define DEFINE_FAILED_DB_ITEM "FAILED_DB_ITEM"
70 #define DEFINE_FAILED_DB_CONFIG "FAILED_DB_CONFIG"
71 #define DEFINE_FAILED_DB_DEVICEFULL "FAILED_DB_DEVICEFULL"
72
73 #define DEFINE_NOOP "NOOP"
74 #define DEFINE_ADD "ADD"
75 #define DEFINE_DELETE "DELETE"
76 #define DEFINE_MOVE "MOVE"
77 #define DEFINE_COPY "COPY"
78 #define DEFINE_REPLACE "REPLACE"
79
80 #define DEFINE_DBSYNC_SUCCESS "success"
81 #define DEFINE_DBSYNC_STOP "stop"
82 #define DEFINE_DBSYNC_FAIL "fail"
83 #define DEFINE_DBSYNC_NO "No"
84
85 typedef enum {
86         PROGRESS_NONE = 0,
87         PROGRESS_INIT = 1,
88         PROGRESS_CONNECTING = 2,
89         PROGRESS_AUTHENTICATED = 3,
90         PROGRESS_DONE = 4,
91         PROGRESS_ERROR = 5
92 } SyncProgress;
93
94 typedef enum {
95         ERROR_NONE = 0,
96         ERROR_CONNECTION = 1,
97         ERROR_SYNCHDR = 2,
98         ERROR_INTERNAL = 3,
99         ERROR_SUSPENDED = 4,
100         ERROR_DB = 5,
101         ERROR_ABORT = 6,
102         ERROR_SERVER = 7,
103         ERROR_MEMORY_FULL = 8,
104         ERROR_AUTHENTICATE = 9,
105         ERROR_AUTOCONFIG_NOT_SUPPORT_BY_SERVER = 10
106 } SyncError;
107
108 typedef enum {
109         SYNC_PROGRESS_NONE = 0,
110         SYNC_PROGRESS_SUCCESS,
111         SYNC_FAILED_DB,
112         SYNC_FAILED_DB_FORBIDDEN,
113         SYNC_FAILED_DB_ITEM,
114         SYNC_FAILED_DB_CONFIG,
115         SYNC_FAILED_DB_DEVICEFULL
116 } SyncProgressStatus;
117
118 typedef enum {
119         OPERATION_NOOP = 0,
120         OPERATION_ADD,
121         OPERATION_DELETE,
122         OPERATION_MOVE,
123         OPERATION_COPY,
124         OPERATION_REPLACE
125 } OperationType;
126
127 typedef enum {
128         COMMAND_RESULT_INIT                                                                                             = 0,
129         COMMAND_RESULT_OK                                                                                                       = 200,  /*[R] OK exception*/
130         COMMAND_RESULT_ADDED                                                                                    = 201,  /*[AR] Item added exception*/
131         COMMAND_RESULT_DELETE_PARTIAL                                                           = 206,  /*[D] Partial content exception condition*/
132         COMMAND_RESULT_DELETE_WITHOUT_ARCHIVE                           = 210,  /*[D] Delete without archive exception*/
133         COMMAND_RESULT_NOT_EXIST                                                                                = 211,  /*[D] Item not deleted exception*/
134         COMMAND_RESULT_UNAUTHRIZED                                                              = 401,  /*[ARD] Unauthorized exception*/
135         COMMAND_RESULT_AUTHENTICATION_REQUIRED                  = 407,  /*[ARD] Authentication required exception*/
136         COMMAND_RESULT_INCOMPLETE                                                                       = 412,  /*[D] Incomplete command exception*/
137         COMMAND_RESULT_UNSUPPORTED_TYPE                                         = 415,  /*[A] Unsupported media type or format exception*/
138         COMMAND_RESULT_ALREADY_EXIST                                                            = 418,  /*[A] Already exists exception*/
139         COMMAND_RESULT_DEVICE_FULL                                                                      = 420,  /*[AR] Device full exception*/
140         COMMAND_RESULT_PARTIAL_REPLACE_NOT_ACCEPTED     = 426,  /*[R] Partial item not accepted*/
141         COMMAND_RESULT_NOT_EMPTY                                                                        = 427,  /*[D] Item not empty*/
142         COMMAND_RESULT_COMMAND_FAIL                                                             = 500   /*[ARD] Command failed exception*/
143 } CommandResult;
144
145
146 #endif /* SE_COMMON_H_ */