4 * Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Ja-young Gu <jygu@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
21 #ifndef __TCORE_PLUGIN_H__
22 #define __TCORE_PLUGIN_H__
26 enum tcore_plugin_priority {
27 TCORE_PLUGIN_PRIORITY_HIGH = -100,
28 TCORE_PLUGIN_PRIORITY_MID = 0,
29 TCORE_PLUGIN_PRIORITY_LOW = +100
32 struct tcore_plugin_define_desc {
34 enum tcore_plugin_priority priority;
37 gboolean (*init)(TcorePlugin *);
38 void (*unload)(TcorePlugin *);
42 TcorePlugin* tcore_plugin_new(Server *server,
43 const struct tcore_plugin_define_desc *desc,
44 const char *filename, void *handle);
45 void tcore_plugin_free(TcorePlugin *plugin);
47 const struct tcore_plugin_define_desc*
48 tcore_plugin_get_description(TcorePlugin *plugin);
50 char* tcore_plugin_get_filename(TcorePlugin *plugin);
51 const char* tcore_plugin_ref_plugin_name(TcorePlugin *plugin);
52 Server* tcore_plugin_ref_server(TcorePlugin *plugin);
54 TReturn tcore_plugin_link_user_data(TcorePlugin *plugin, void *user_data);
55 void* tcore_plugin_ref_user_data(TcorePlugin *plugin);
57 TReturn tcore_plugin_add_core_object(TcorePlugin *plugin, CoreObject *co);
58 TReturn tcore_plugin_remove_core_object(TcorePlugin *plugin, CoreObject *co);
60 CoreObject *tcore_plugin_ref_core_object(TcorePlugin *plugin, unsigned int type);
61 GSList* tcore_plugin_get_core_objects(TcorePlugin *plugin);
62 GSList* tcore_plugin_get_core_objects_bytype(TcorePlugin *plugin,
65 TReturn tcore_plugin_core_object_event_emit(TcorePlugin *plugin,
66 const char *event, const void *event_info);
68 TReturn tcore_plugin_link_property(TcorePlugin *plugin, const char *key,
70 void* tcore_plugin_ref_property(TcorePlugin *plugin, const char *key);