Remove security-server dependency
[platform/core/connectivity/bluetooth-frwk.git] / bt-core / include / bt-core-dbus-handler.h
1 /*
2  * Bluetooth-frwk
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact:  Hocheol Seo <hocheol.seo@samsung.com>
7  *               Girishashok Joshi <girish.joshi@samsung.com>
8  *               Chanyeol Park <chanyeol.park@samsung.com>
9  *
10  * Licensed under the Apache License, Version 2.0 (the "License");
11  * you may not use this file except in compliance with the License.
12  * You may obtain a copy of the License at
13  *
14  *              http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  *
22  */
23
24
25 #ifndef _BT_CORE_DBUS_HANDLER_H_
26 #define _BT_CORE_DBUS_HANDLER_H_
27
28 #include <sys/types.h>
29 #include <sys/wait.h>
30 #include <dlog.h>
31 #include <dbus/dbus.h>
32 #include <dbus/dbus-glib.h>
33 #include <dbus/dbus-glib-lowlevel.h>
34 #include <glib.h>
35 #include <gio/gio.h>
36 #include <glib-object.h>
37
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41
42 #undef LOG_TAG
43 #define LOG_TAG "BLUETOOTH_FRWK_CORE"
44
45 #define BT_DBG(fmt, args...) \
46         SLOGD(fmt, ##args)
47 #define BT_INFO(fmt, args...) \
48         SLOGI(fmt, ##args)
49 #define BT_ERR(fmt, args...) \
50         SLOGE(fmt, ##args)
51
52 #define BT_CORE_NAME "org.projectx.bt_core"
53 #define BT_CORE_PATH "/org/projectx/bt_core"
54
55 typedef struct _BtCore
56 {
57     GObject object;
58 } BtCore;
59
60 typedef struct _BtCoreClass
61 {
62     GObjectClass object_class;
63 } BtCoreClass;
64
65
66 DBusGProxy *_bt_core_register_event_filter(DBusGConnection *g_conn, BtCore *bt_core);
67 void _bt_unregister_event_filter(DBusGConnection *g_conn, BtCore *bt_core, DBusGProxy *dbus_proxy);
68
69 int _bt_core_service_request(int service_type, int service_function,
70                         GArray *in_param1, GArray *in_param2,
71                         GArray *in_param3, GArray *in_param4,
72                         GArray **out_param1);
73 void _bt_core_fill_garray_from_variant(GVariant *var, GArray *param);
74 GDBusProxy *_bt_core_gdbus_get_service_proxy(void);
75 void _bt_core_gdbus_deinit_proxys(void);
76
77 #ifdef __cplusplus
78 }
79 #endif /* __cplusplus */
80 #endif /*_BT_CORE_DBUS_HANDLER_H_*/