[Bluetooth][OTP] Add base code for OTP server role
[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 <glib.h>
26 #include <gio/gio.h>
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31
32 #undef LOG_TAG
33 #define LOG_TAG "BLUETOOTH_FRWK_CORE"
34
35 #define BT_DBG(fmt, args...) \
36         SLOGD(fmt, ##args)
37 #define BT_INFO(fmt, args...) \
38         SLOGI(fmt, ##args)
39 #define BT_ERR(fmt, args...) \
40         SLOGE(fmt, ##args)
41
42 #define BT_CORE_NAME "org.projectx.bt_core"
43 #define BT_CORE_PATH "/org/projectx/bt_core"
44
45 int _bt_core_service_request(int service_type, int service_function,
46                         GArray *in_param1, GArray *in_param2,
47                         GArray *in_param3, GArray *in_param4,
48                         GArray **out_param1);
49 void _bt_core_fill_garray_from_variant(GVariant *var, GArray *param);
50 GDBusProxy *_bt_core_gdbus_get_service_proxy(void);
51 #ifdef TIZEN_FEATURE_BT_HPS
52 GDBusProxy *_bt_core_gdbus_get_hps_proxy(void);
53 int _bt_core_start_httpproxy(void);
54 int _bt_core_stop_httpproxy(void);
55 #endif
56 #ifdef TIZEN_FEATURE_BT_OTP
57 int _bt_core_stop_otp(void);
58 #endif
59 void _bt_core_gdbus_deinit_proxys(void);
60
61 GDBusConnection * _bt_core_get_gdbus_connection(void);
62
63 gboolean _bt_core_register_dbus(void);
64 void  _bt_core_unregister_dbus(void);
65
66 #ifdef __cplusplus
67 }
68 #endif /* __cplusplus */
69 #endif /*_BT_CORE_DBUS_HANDLER_H_*/