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.
18 #ifndef DM_COMMON_ENGINE_H_
19 #define DM_COMMON_ENGINE_H_
22 #include "common/dm_error.h"
23 #include "common/dm_common_def.h"
24 #include "common/dm_common.h"
25 #include "framework/san-parser/pm_sanparser.h"
26 #include "framework/platform-event-handler/dm_platform_event_handler_internal.h"
27 #include "framework/platform-event-handler/dm_platform_event_handler.h"
29 #define CHECK_OPERATION 1
30 #define NON_CHECK_OPERATION 0
33 * @par Description: API to get service engine id
37 * @par Typical use case:
38 * @par Method of function operation:
39 * @par Important notes:
40 * @param[out] engine_id engine id
41 * @param[in] ui mode ui mode
56 void get_service_engine_id(ENGINE_ID * service_engine_id, char *ui_mode);
59 * @par Description: API to init dm engine
63 * @par Typical use case:
64 * @par Method of function operation:
65 * @par Important notes:
66 * @param[out] engine_id engine id
67 * @param[in] ui mode ui mode
82 void init_Dm_Engine();
85 * @par Description: API to engine Start
89 * @par Typical use case:
90 * @par Method of function operation:
91 * @par Important notes:
92 * @param[in] server id server id
93 * @param[in] full_path full path
94 * @param[in] correlator correlator
95 * @param[in] resultCode resultCode
97 * @return DM_OK success
111 DM_ERROR engine_start(char *server_id, char *full_path, char *correlator, ENGINE_ID * service_engine_id, int *resultCode);
114 * @par Description: API to service_engine_Start
118 * @par Typical use case:
119 * @par Method of function operation:
120 * @par Important notes:
121 * @param[in] service engine id service engine id
122 * @param[out] service_ret service_ret
124 * @return DM_OK success
138 DM_ERROR service_engine_start(ENGINE_ID service_engine_id, DM_ERROR * service_ret);
141 * @par Description: API to set_engine_status_idle
145 * @par Typical use case:
146 * @par Method of function operation:
147 * @par Important notes:
148 * @param[in] service engine id service engine id
150 * @return DM_OK success
164 DM_ERROR set_engine_status_idle(ENGINE_ID service_engine_id);
167 * @par Description: API to set_end_engine_status_idle
171 * @par Typical use case:
172 * @par Method of function operation:
173 * @par Important notes:
174 * @param[in] service engine id service engine id
176 * @return DM_OK success
190 DM_ERROR set_end_engine_status_idle();
193 * @par Description: API to dm_common_start
197 * @par Typical use case:
198 * @par Method of function operation:
199 * @par Important notes:
200 * @param[in] Event_Contents Event_Contents
202 * @return DM_OK success
216 DM_ERROR dm_common_start(Event_Contents * pEvent_data);
219 * @par Description: API to dm common operation (called by task)
223 * @par Typical use case:
224 * @par Method of function operation:
225 * @par Important notes:
226 * @param[in] Event_Contents Event_Contents
228 * @return DM_OK success
242 DM_ERROR dm_common_operation(Event_Contents * pEvent_data);
245 * @par Description: API to genericAelrt_operation
249 * @par Typical use case:
250 * @par Method of function operation:
251 * @par Important notes:
252 * @param[in] session session
253 * @param[in] isFinish isFinish
254 * @param[in] service engine id service engine id
256 * @return DM_OK success
270 DM_ERROR genericalert_operation(void **session, int *isFinish, ENGINE_ID service_engine_id);
272 #endif /* DM_COMMON_ENGINE_H_ */