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.
23 #endif /* __cplusplus */
27 * @brief Definition of framework codes for device manager module
30 /** @addtogroup device_manager
34 #define DEVICE_MANAGER_MO_BOOL_TRUE "T"
35 #define DEVICE_MANAGER_MO_BOOL_FALSE "F"
38 * @brief Enumerations of sync_agent_dm_mo_type_e
41 SYNC_AGENT_DM_MO_TYPE_DMACC = 0, /**< dm acc type*/
42 SYNC_AGENT_DM_MO_TYPE_DEVINFO = 1, /**< device info type*/
43 SYNC_AGENT_DM_MO_TYPE_DEVDETAIL = 2,
44 /**< device detail type*/
45 SYNC_AGENT_DM_MO_TYPE_FUMO = 4, /**< fumo type*/
46 SYNC_AGENT_DM_MO_TYPE_LAWMO = 8, /**< lawmo type*/
47 SYNC_AGENT_DM_MO_TYPE_SCOMO = 16, /**< scomo type*/
48 SYNC_AGENT_DM_MO_TYPE_NO_TYPE = 32 /**< mo no type*/
49 } sync_agent_dm_mo_type_e;
51 #define DEVICE_MANAGER_MO_ACCESSTYPE_CNT 6
54 * @brief Enumerations of sync_agent_dm_mo_access_type_e
57 SYNC_AGENT_DM_MO_ACCESSTYPE_NO_SET = 0,
59 SYNC_AGENT_DM_MO_ACCESSTYPE_ADD = 1, /**< accesstype add */
60 SYNC_AGENT_DM_MO_ACCESSTYPE_COPY = 2, /**< accesstype copy */
61 SYNC_AGENT_DM_MO_ACCESSTYPE_DELETE = 4,
62 /**< accesstype delete */
63 SYNC_AGENT_DM_MO_ACCESSTYPE_EXEC = 8, /**< accesstype exec */
64 SYNC_AGENT_DM_MO_ACCESSTYPE_GET = 16, /**< accesstype get */
65 SYNC_AGENT_DM_MO_ACCESSTYPE_REPLACE = 32/**< accesstype replace */
66 } sync_agent_dm_mo_access_type_e;
69 * @brief Enumerations of sync_agent_dm_mo_format_e
72 SYNC_AGENT_DM_MO_FORMAT_NO_SET = 0,
74 SYNC_AGENT_DM_MO_FORMAT_B64, /**< format b64 */
75 SYNC_AGENT_DM_MO_FORMAT_BIN, /**< format bin */
76 SYNC_AGENT_DM_MO_FORMAT_BOOL, /**< format bool */
77 SYNC_AGENT_DM_MO_FORMAT_CHR, /**< format chr */
78 SYNC_AGENT_DM_MO_FORMAT_INT, /**< format int */
79 SYNC_AGENT_DM_MO_FORMAT_NODE, /**< format node */
80 SYNC_AGENT_DM_MO_FORMAT_NULL, /**< format null */
81 SYNC_AGENT_DM_MO_FORMAT_XML, /**< format xml */
82 SYNC_AGENT_DM_MO_FORMAT_DATE, /**< format date */
83 SYNC_AGENT_DM_MO_FORMAT_TIME, /**< format time */
84 SYNC_AGENT_DM_MO_FORMAT_FLOAT /**< format float */
85 } sync_agent_dm_mo_format_e;
88 * @brief Enumerations of sync_agent_dm_mo_occurrence_e
91 SYNC_AGENT_DM_MO_OCCURRENCE_NO_SET = 0,
93 SYNC_AGENT_DM_MO_OCCURRENCE_ONE, /**< occurence one */
94 SYNC_AGENT_DM_MO_OCCURRENCE_ZEROORONE, /**< occurence zero or one */
95 SYNC_AGENT_DM_MO_OCCURRENCE_ZEROORMORE,
96 /**< occurence zero or more */
97 SYNC_AGENT_DM_MO_OCCURRENCE_ONEORMORE, /**< occurence one or more */
98 SYNC_AGENT_DM_MO_OCCURRENCE_ZEROORN, /**< occurence zero or n */
99 SYNC_AGENT_DM_MO_OCCURRENCE_ONEORN /**< occurence one or n */
100 } sync_agent_dm_mo_occurrence_e;
103 * @brief Enumerations of sync_agent_dm_mo_scope_e
106 SYNC_AGENT_DM_MO_SCOPE_NO_SET = 0,
108 SYNC_AGENT_DM_MO_SCOPE_PERMANENT,
109 /**< scope premanent */
110 SYNC_AGENT_DM_MO_SCOPE_DYNAMIC /**< scope dynamic */
111 } sync_agent_dm_mo_scope_e;
114 * @brief Enumerations of sync_agent_dm_mo_df_type_e
117 SYNC_AGENT_DM_MO_DF_TYPE_NO_SET = 0,
119 SYNC_AGENT_DM_MO_DF_TYPE_MIME, /**< df type mime */
120 SYNC_AGENT_DM_MO_DF_TYPE_DDFNAME /**< df type ddfname */
121 } sync_agent_dm_mo_df_type_e;
124 * @brief structure of sync_agent_dm_mo_framework_property_s
127 sync_agent_dm_mo_access_type_e accessType; /**< accesstype enum */
128 char *defaultValue; /**< default value */
129 char *description; /**< description */
130 sync_agent_dm_mo_format_e dffFormat; /**< ddf format enum */
131 sync_agent_dm_mo_occurrence_e occurrence; /**< occurrence enum */
132 int occurrence_num; /**< occurrence number */
133 sync_agent_dm_mo_scope_e scope; /**< scope enum */
134 char *dfTitle; /**< df title */
135 sync_agent_dm_mo_df_type_e dfType; /**< df type enum */
136 char *dfType_Value; /**< df type value */
137 } sync_agent_dm_mo_framework_property_s;
140 * @brief structure of sync_agent_dm_mo_runtime_property_s
143 char *acl; /**< acl value */
144 sync_agent_dm_mo_format_e format; /**< format enum */
145 char *name; /**< name */
146 char *size; /**< size */
147 char *title; /**< title */
148 char *tStamp; /**< time stamp */
149 sync_agent_dm_mo_df_type_e type; /**< df type */
150 char *type_value; /**< type value */
151 char *verNo; /**< version number */
152 } sync_agent_dm_mo_runtime_property_s;
155 * @brief Enumerations of sync_agent_dm_mo_node_type_e
158 SYNC_AGENT_DM_MO_NODE_ROOT = 1, /**< root node type */
159 SYNC_AGENT_DM_MO_NODE_FIRST, /**< first node type */
160 SYNC_AGENT_DM_MO_NODE_INTERIOR, /**< interior node type */
161 SYNC_AGENT_DM_MO_NODE_LEAF /**< leaf node type */
162 } sync_agent_dm_mo_node_type_e;
165 * @brief structure of sync_agent_dm_mo_node_s
167 typedef struct sync_agent_dm_mo_node_s {
168 int id; /**< id in db */
169 int parent_id; /**< parent id in db*/
170 char *name; /**< name */
171 char *value; /**< value */
172 char *full_path; /**< mo node path */
173 sync_agent_dm_mo_node_type_e type; /**< node type */
174 sync_agent_dm_mo_type_e mo_type; /**< mo type */
175 int server_type; /**< server type */
176 sync_agent_dm_mo_framework_property_s *framework_property;
177 /**< framework property */
178 sync_agent_dm_mo_runtime_property_s *runtime_property; /**< runtime property */
179 struct sync_agent_dm_mo_node_s *child_node_list; /**< child node list */
180 struct sync_agent_dm_mo_node_s *next_node; /**< next node */
181 struct sync_agent_dm_mo_node_s *parent_node; /**< parent node */
182 int child_node_cnt; /**< child node count */
183 } sync_agent_dm_mo_node_s;
186 * @brief Enumerations of sync_agent_dm_mo_get_option_e
189 SYNC_AGENT_DM_MO_GET_OPTION_ALL = 0, /**< get type all */
190 SYNC_AGENT_DM_MO_GET_OPTION_NODE /**< get type node value */
191 } sync_agent_dm_mo_get_option_e;
194 * @brief Enumerations of sync_agent_dm_mo_transaction_e
197 SYNC_AGENT_DM_MO_TRANSACTION_COMMIT = 0,/**< db transaction commit */
198 SYNC_AGENT_DM_MO_TRANSACTION_ROLLBACK /**< db transaction rollback */
199 } sync_agent_dm_mo_transaction_e;
202 * @brief Enumerations of sync_agent_dm_tnds_type_e
205 SYNC_AGENT_DM_MO_TNDS_TYPE_XML = 0, /**< tnds xml type */
206 SYNC_AGENT_DM_MO_TNDS_TYPE_WBXML /**< tnds wbxml type */
207 } sync_agent_dm_tnds_type_e;
210 * @brief Enumerations of sync_agent_dm_tnds_action_e
213 SYNC_AGENT_DM_MO_TNDS_ACTION_ADD = 0, /**< tnds add action */
214 SYNC_AGENT_DM_MO_TNDS_ACTION_REPLACE /**< tnds replace action */
215 } sync_agent_dm_tnds_action_e;
218 * @brief structure of sync_agent_dm_acc_info_s
221 char *auth_name; /**< auth name */
222 char *auth_secret; /**< auth secret */
223 char *auth_data; /**< auth data(nonce) */
224 char *auth_type; /**< auth type */
225 char *auth_level; /**< auth level */
226 char *addr; /**< server url */
227 } sync_agent_dm_acc_info_s;
230 * @brief structure of sync_agent_dm_acc_type_e
233 DEVICE_MANAGE_ACC_TYPE_SERVER, /**< dm acc server type */
234 DEVICE_MANAGE_ACC_TYPE_CLIENT /**< dm acc client type */
235 } sync_agent_dm_acc_type_e;
238 * @brief structure of sync_agent_dm_server_info_s
240 typedef struct sync_agent_dm_server_info_s {
241 char *server_id; /**< server id */
242 int server_type; /**< server type */
243 struct sync_agent_dm_server_info_s *next; /**< sync_agent_dm_server_info_s struct */
244 } sync_agent_dm_server_info_s;
252 #endif /* __cplusplus */
253 #endif /* MO_STRUCT_H_ */