Rollback changes to submit TIZEN:COMMON project
[platform/core/connectivity/bluetooth-frwk.git] / bt-core / bt_core.h
1 /*
2  * bluetooth-frwk
3  *
4  * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *              http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  */
19
20 #ifndef _BT_CORE_H_
21 #define _BT_CORE_H_
22
23 #include <sys/types.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 <glib-object.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_ERR(fmt, args...) \
41         SLOGE(fmt, ##args)
42
43 #define retv_if(expr, val) \
44         do { \
45                 if (expr) { \
46                         BT_ERR("(%s) return", #expr); \
47                         return (val); \
48                 } \
49         } while (0)
50
51 #define CONNMAN_DBUS_NAME "net.connman"
52 #define CONNMAN_BLUETOOTH_TECHNOLOGY_PATH "/net/connman/technology/bluetooth"
53 #define CONNMAN_BLUETOTOH_TECHNOLOGY_INTERFACE "net.connman.Technology"
54
55 #define BT_CORE_NAME "org.projectx.bt_core"
56 #define BT_CORE_PATH "/org/projectx/bt_core"
57
58 #define BT_CORE_TYPE (bt_core_get_type())
59
60 typedef struct _BtCore
61 {
62     GObject object;
63 } BtCore;
64
65 typedef struct _BtCoreClass
66 {
67     GObjectClass object_class;
68 } BtCoreClass;
69
70 #ifdef __cplusplus
71 }
72 #endif /* __cplusplus */
73 #endif /*_BT_CORE_H_*/