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 INITIALIZATION_INTERFACE_H_
19 #define INITIALIZATION_INTERFACE_H_
23 #endif /* __cplusplus */
29 * @brief Support to initialize framework for agent
32 /** @addtogroup initialization
37 * @brief Initialization of Agent Framework
38 * @remarks Framework will be initialized using by config file written by the agent developer.
39 * Initialization config file format is XML.
43 * const char *init_config_path = "/tmp/config_file";
44 * sync_agent_init_error_e init_error = sync_agent_init(init_config_path);
45 * if (init_error != SYNC_AGENT_INIT_SUCCESS) {
50 * @param[in] init_config_path framework init config file - XML format
51 * @return SYNC_AGENT_INIT_SUCCESS on success, otherwise a error value.
52 * @retval SYNC_AGENT_INIT_SUCCESS Successful
53 * @retval SYNC_AGENT_INIT_PARSER_FAIL Parsing the initialization config file failed
54 * @retval SYNC_AGENT_INIT_ENGINE_CONTROLLER_FAIL Engine controller Initialization failed
55 * @retval SYNC_AGENT_INIT_SYNC_AGENT_EVENT_FAIL Event module Initialization failed
56 * @retval SYNC_AGENT_INIT_COMMON_DB_FAIL CommonDataBase Initialization failed
57 * @retval SYNC_AGENT_INIT_PLUGIN_FAIL PlugIn Initialization failed
58 * @retval SYNC_AGENT_INIT_PM_FAIL PlatformMonitor Initialization failed
59 * @retval SYNC_AGENT_INIT_DM_FAIL DeviceManagent Initialization failed
60 * @retval SYNC_AGENT_INIT_NETWORK_FAIL NetworkAccess Initialization failed
61 * @retval SYNC_AGENT_INIT_DEVICE_FAIL Device Initialization failed
62 * @pre Has not been called before. This function should be called one time.
63 * @post Framework is initialized as described in the file. Agent can use the Framework's function.
65 sync_agent_init_error_e sync_agent_init(const char *init_config_path);
68 * @brief Deinitialization of Agent Framework
69 * @remarks Framework must be initialized using by config file written by the agent developer.
73 * const char *init_config_path = "/tmp/config_file";
74 * sync_agent_init_error_e init_error = sync_agent_init(init_config_path);
75 * if (init_error != SYNC_AGENT_INIT_SUCCESS) {
79 * sync_agent_deinit_error_e deinit_error = sync_agent_deinit();
80 * if (deinit_error != SYNC_AGENT_DEINIT_SUCCESS) {
85 * @return SYNC_AGENT_DEINIT_SUCCESS on success, SYNC_AGENT_DEINIT_FAIL on error
87 sync_agent_deinit_error_e sync_agent_deinit();
95 #endif /* __cplusplus */
96 #endif /* INITIALIZATION_INTERFACE_H_ */