2 * Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Flora License, Version 1.1 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://floralicense.org/license/
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 * @file box_plugin_interface.h
18 * @author Yunchan Cho (yunchan.cho@samsung.com)
20 #ifndef BOX_PLUGIN_INTERFACE_H
21 #define BOX_PLUGIN_INTERFACE_H
24 #include <Core/BoxData.h>
26 #define EXPORT_API __attribute__((visibility("default")))
28 #define WEB_PROVIDER_PLUGIN_INTERFACE_SYM_INITIALIZE "web_provider_plugin_interface_initialize"
29 #define WEB_PROVIDER_PLUGIN_INTERFACE_SYM_COMMAND "web_provider_plugin_interface_command"
30 #define WEB_PROVIDER_PLUGIN_INTERFACE_SYM_SHUTDOWN "web_provider_plugin_interface_shutdown"
38 REQUEST_CMD_REMOVE_BOX,
41 REQUEST_CMD_RESIZE_BOX,
42 REQUEST_CMD_RESUME_BOX,
43 REQUEST_CMD_PAUSE_BOX,
44 REQUEST_CMD_RESUME_ALL,
45 REQUEST_CMD_PAUSE_ALL,
46 REQUEST_CMD_CHANGE_PERIOD,
49 // definition of interface function type
50 typedef int (*plugin_interface_func_initialize)(void);
51 typedef int (*plugin_interface_func_command)(
52 const request_cmd_type type, const BoxInfoPtr& boxInfo);
53 typedef int (*plugin_interface_func_shutdown)(void);
57 const char* service_boxid;
58 plugin_interface_func_initialize initialize;
59 plugin_interface_func_command command;
60 plugin_interface_func_shutdown shutdown;
63 // inteface functions that should be implemented by each plugin
64 EXPORT_API int web_provider_plugin_interface_initialize();
65 EXPORT_API int web_provider_plugin_interface_command(
66 const request_cmd_type type, const BoxInfoPtr& boxInfo);
67 EXPORT_API int web_provider_plugin_interface_shutdown();
73 #endif // BOX_PLUGIN_INTERFACE_H