Merge the code from tizen_2.4
[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
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40
41 #undef LOG_TAG
42 #define LOG_TAG "BLUETOOTH_FRWK_CORE"
43
44 #define BT_DBG(fmt, args...) \
45         SLOGD(fmt, ##args)
46 #define BT_INFO(fmt, args...) \
47         SLOGI(fmt, ##args)
48 #define BT_ERR(fmt, args...) \
49         SLOGE(fmt, ##args)
50
51 #define BT_CORE_NAME "org.projectx.bt_core"
52 #define BT_CORE_PATH "/org/projectx/bt_core"
53
54 int _bt_core_service_request(int service_type, int service_function,
55                         GArray *in_param1, GArray *in_param2,
56                         GArray *in_param3, GArray *in_param4,
57                         GArray **out_param1);
58 void _bt_core_fill_garray_from_variant(GVariant *var, GArray *param);
59 GDBusProxy *_bt_core_gdbus_get_service_proxy(void);
60 #ifdef HPS_FEATURE
61 GDBusProxy *_bt_core_gdbus_get_hps_proxy(void);
62 #endif
63 void _bt_core_gdbus_deinit_proxys(void);
64
65 GDBusConnection * _bt_core_get_gdbus_connection(void);
66
67 gboolean _bt_core_register_dbus(void);
68 void  _bt_core_unregister_dbus(void);
69
70 #ifdef __cplusplus
71 }
72 #endif /* __cplusplus */
73 #endif /*_BT_CORE_DBUS_HANDLER_H_*/