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 DEVICE_INFO_INTERFACE_H_
19 #define DEVICE_INFO_INTERFACE_H_
24 #include "device/common.h"
28 #endif /* __cplusplus */
31 * @file device_info_interface.h
32 * @brief Defines plug-in interfaces about device information
35 /** @addtogroup plugin_deviceinfo DeviceInfo Domain
41 * Device information structure
42 * @remarks This structure is member of list (devInfo)
43 * Key(info_name) - value(value) pair
48 } sync_agent_plugin_device_info_s;
51 * API to get device information in the system and load this information on the memory
53 * @return 1 on success, 0 on error
58 * @see dev_init_dev(int)
60 int sync_agent_plugin_load_devinfo(void);
63 * API to get device information on the memory that user want to know
65 * @param[in] info_name name of device information
66 * @param[in] value as returned by sync_agent_plugin_get_devinfo() - value of device information
68 * @return 1 on success, 0 on error
73 * @see sync_agent_get_devinfo(int, char *, char **)
76 int sync_agent_plugin_get_devinfo(char *info_name, char **value);
79 * API to clear device information on the memory (free memory)
81 * @return 1 on success, 0 on error
86 * @see dev_destroy_dev(int)
89 int sync_agent_plugin_clear_devinfo(void);
92 * API to execute device function
94 * @param[in] function_name name of device function
95 * @param[in] args_cnt number of following parameters
96 * @param[in] ap varius type of parameters
98 * @return 1 on success, 0 on error
103 * @see sync_agent_execute_dev_function(int, char *, int, ...)
106 int sync_agent_plugin_execute_dev_function(char *function_name, int args_cnt, va_list ap);
109 * API to set function pointer of common type API which fetches device info
111 * @param[in] func function pointer to set
113 * @return 1 on success, 0 on error
118 * @see __process_plugin(xmlNode *)
121 void sync_agent_plugin_set_common_devinfo_function(sync_agent_get_devinfo_cb func);
124 * API to set function pointer of common type API which executes device function
126 * @param[in] func function pointer to set
128 * @return 1 on success, 0 on error
133 * @see __process_plugin(xmlNode *)
136 void sync_agent_plugin_set_common_execute_dev_function(sync_agent_execute_dev_cb func);
144 #endif /* __cplusplus */
145 #endif /* DEVICE_INFO_INTERFACE_H_ */