2 * Copyright (c) 2012 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (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://www.apache.org/licenses/LICENSE-2.0
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.
20 * @brief TODO This header must be removed because it does not fit to current
21 * solution, its just a temporary approach.
23 #ifndef _WRT_PLUGINS_COMMON_FEATURE_API_SO_FEATURES_H_
24 #define _WRT_PLUGINS_COMMON_FEATURE_API_SO_FEATURES_H_
26 #define PLUGIN_WIDGET_INIT_PROC_NAME "on_widget_init"
27 //#define PLUGIN_WIDGET_INIT_PROC_NAME \
28 // "_Z23on_widget_init_callbackP27feature_mapping_interface_s"
34 typedef struct devcaps_s
41 * mapping from a feature to corresponding list of device capabilities
43 typedef struct feature_devcaps_s
50 * list of feature_devcaps_t structs
52 typedef struct feature_mapping_s
54 feature_devcaps_t* features;
58 typedef feature_mapping_t* pfeature_mapping_t;
60 typedef pfeature_mapping_t (*features_getter)(void);
62 typedef const devcaps_t* (*devcaps_getter)(pfeature_mapping_t /*features*/,
63 const char* /*featureName*/);
64 typedef void (*deinitializer)(pfeature_mapping_t /*features*/);
66 typedef struct feature_mapping_interface_s
68 features_getter featGetter; /* returns a list of api features */
69 devcaps_getter dcGetter; /*
70 * for a given api feature returns a list of
71 * corresponding device capabilities
74 deinitializer release; /* as memory ownership of features is
75 * transfered to callee you have to call
76 * the release function ptr on features
78 } feature_mapping_interface_t;
80 typedef void (*on_widget_init_proc)(feature_mapping_interface_t *interface);