BLE Gatt Client Socket write and notify implementation
[platform/core/connectivity/bluetooth-frwk.git] / bt-api / include / bt-gatt-client.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_GATT_CLIENT_H_
26 #define _BT_GATT_CLIENT_H_
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif /* __cplusplus */
31
32 #define GATT_SERV_INTERFACE             "org.bluez.GattService1"
33 #define GATT_CHAR_INTERFACE             "org.bluez.GattCharacteristic1"
34 #define GATT_DESC_INTERFACE             "org.bluez.GattDescriptor1"
35
36 #define GATT_USER_DESC_UUID              "00002901-0000-1000-8000-00805f9b34fb"
37 #define GATT_CHAR_CLIENT_CONF           "00002902-0000-1000-8000-00805f9b34fb"
38 #define GATT_CHAR_SERVER_CONF            "00002903-0000-1000-8000-00805f9b34fb"
39 #define GATT_CHAR_FORMAT                "00002904-0000-1000-8000-00805f9b34fb"
40
41 gboolean _bluetooth_gatt_check_service_change_watcher_address(
42                 const bluetooth_device_address_t *device_addr);
43
44 typedef struct {
45         int write_fd;
46         int relpy_fd;
47         int mtu;
48         int id;
49         unsigned char UUID[16];
50         } bt_gatt_characteristic_write_info_t;
51
52 typedef struct {
53         int notify_fd;
54         int id;
55         int mtu;
56         unsigned char UUID[16];
57         char adress[BLUETOOTH_ADDRESS_STRING_LENGTH];
58 } bt_gatt_characteristic_notify_info_t;
59
60
61
62 #ifdef __cplusplus
63 }
64 #endif /* __cplusplus */
65 #endif /*_BT_GATT_CLIENT_H_*/
66