Merge "DPM: Add basic code for device policy manager for BT." into tizen
[platform/core/connectivity/bluetooth-frwk.git] / bt-core / include / bt-core-dbus-handler.h
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  *              http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17
18
19 #ifndef _BT_CORE_DBUS_HANDLER_H_
20 #define _BT_CORE_DBUS_HANDLER_H_
21
22 #include <sys/types.h>
23 #include <sys/wait.h>
24 #include <dlog.h>
25 #include <dbus/dbus.h>
26 #include <dbus/dbus-glib.h>
27 #include <dbus/dbus-glib-lowlevel.h>
28 #include <glib.h>
29 #include <gio/gio.h>
30
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34
35 #undef LOG_TAG
36 #define LOG_TAG "BLUETOOTH_FRWK_CORE"
37
38 #define BT_DBG(fmt, args...) \
39         SLOGD(fmt, ##args)
40 #define BT_INFO(fmt, args...) \
41         SLOGI(fmt, ##args)
42 #define BT_ERR(fmt, args...) \
43         SLOGE(fmt, ##args)
44
45 #define BT_CORE_NAME "org.projectx.bt_core"
46 #define BT_CORE_PATH "/org/projectx/bt_core"
47
48 int _bt_core_service_request(int service_type, int service_function,
49                         GArray *in_param1, GArray *in_param2,
50                         GArray *in_param3, GArray *in_param4,
51                         GArray **out_param1);
52 void _bt_core_fill_garray_from_variant(GVariant *var, GArray *param);
53 GDBusProxy *_bt_core_gdbus_get_service_proxy(void);
54 #ifdef HPS_FEATURE
55 GDBusProxy *_bt_core_gdbus_get_hps_proxy(void);
56 #endif
57 void _bt_core_gdbus_deinit_proxys(void);
58
59 GDBusConnection * _bt_core_get_gdbus_connection(void);
60
61 gboolean _bt_core_register_dbus(void);
62 void  _bt_core_unregister_dbus(void);
63
64 #ifdef __cplusplus
65 }
66 #endif /* __cplusplus */
67 #endif /*_BT_CORE_DBUS_HANDLER_H_*/