3 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * Licensed under the Apache License, Version 2.0 (the License);
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
21 * @brief This file is the header file of defined structure and enumeration used in SA
33 #include "service-adapter/sa_error.h"
35 #define DEFINE_PROTOCOL_TYPE "OMA_DS"
37 #define ELEMENT_DEVINF_10 "./devinf10"
38 #define ELEMENT_DEVINF_11 "./devinf11"
39 #define ELEMENT_DEVINF_12 "./devinf12"
41 #define ELEMENT_DEVINF_XML "application/vnd.syncml-devinf+xml"
42 #define ELEMENT_DEVINF_WBXML "application/vnd.syncml-devinf+wbxml"
43 #define ELEMENT_WBXML "application/vnd.syncml+wbxml"
44 #define ELEMENT_XML "application/vnd.syncml+xml"
46 #define ELEMENT_AUTH_BASIC "syncml:auth-basic"
47 #define ELEMENT_AUTH_MD5 "syncml:auth-md5"
48 #define ELEMENT_FORMAT_BASE64 "b64"
50 #define OMA_DS_HTTP_DEFAULT_CLIENT_MAX_MSG_SIZE 1024*12
51 #define OMA_DS_HTTP_DEFAULT_CLIENT_MAX_OBJ_SIZE 1024*1024
53 /*#define OMA_DS_HTTP_DEFAULT_SERVER_MAX_MSG_SIZE 61440*/
54 #define OMA_DS_HTTP_DEFAULT_SERVER_MAX_MSG_SIZE 1024*5
56 typedef struct item item_s;
57 typedef struct status status_s;
58 typedef struct command command_s;
59 typedef struct anchor anchor_s;
60 typedef struct location location_s;
61 typedef struct cred cred_s;
62 typedef struct syncml syncml_s;
63 typedef struct sync_hdr sync_hdr_s;
64 typedef struct chal chal_s;
65 typedef struct devinf devinf_s;
66 typedef struct devinf_datastore devinf_datastore_s;
67 typedef struct devinf_content_type devinf_content_type_s;
68 typedef struct devinf_ct_cap devinf_ct_cap_s;
69 typedef struct devinf_property devinf_property_s;
70 typedef struct devinf_prop_param devinf_prop_param_s;
71 typedef struct filter_cap filter_cap_s;
72 typedef struct session session_s;
73 typedef struct command_status command_status_s;
74 typedef struct mem mem_s;
84 PROTOCOL_TYPE_UNKNOWN = 0,
89 COMMAND_TYPE_UNKNOWN = 0,
90 COMMAND_TYPE_ALERT = 1,
91 COMMAND_TYPE_SYNC_START = 2,
92 COMMAND_TYPE_SYNC_END = 3,
94 COMMAND_TYPE_HEADER = 5,
96 COMMAND_TYPE_REPLACE = 7,
97 COMMAND_TYPE_DELETE = 8,
99 COMMAND_TYPE_GET = 10,
100 COMMAND_TYPE_RESULTS = 11
104 AUTH_TYPE_UNKNOWN = 0,
110 FORMAT_TYPE_UNKNOWN = 0,
111 FORMAT_TYPE_BASE64 = 1
115 DEVINF_VERSION_UNKNOWN = 0,
116 DEVINF_VERSION_10 = 1,
117 DEVINF_VERSION_11 = 2,
118 DEVINF_VERSION_12 = 3
122 DEVINF_DEVTYPE_UNKNOWN,
123 DEVINF_DEVTYPE_PAGER,
124 DEVINF_DEVTYPE_HANDHELD,
126 DEVINF_DEVTYPE_PHONE,
127 DEVINF_DEVTYPE_SMARTPHONE,
128 DEVINF_DEVTYPE_SERVER,
129 DEVINF_DEVTYPE_WORKSTATION
133 DEVINF_SYNCTYPE_UNKNOWN = 0,
134 DEVINF_SYNCTYPE_TWO_WAY = 1,
135 DEVINF_SYNCTYPE_SLOW_SYNC = 1 << 1,
136 DEVINF_SYNCTYPE_ONE_WAY_FROM_CLIENT = 1 << 2,
137 DEVINF_SYNCTYPE_REFRESH_FROM_CLIENT = 1 << 3,
138 DEVINF_SYNCTYPE_ONE_WAY_FROM_SERVER = 1 << 4,
139 DEVINF_SYNCTYPE_REFRESH_FROM_SERVER = 1 << 5,
140 DEVINF_SYNCTYPE_SERVER_ALERTED_SYNC = 1 << 6
159 #endif /* SA_DEFINE_H_ */