tizen 2.3.1 release
[framework/connectivity/bluez.git] / src / gatt-database.h
1 /*
2  *
3  *  BlueZ - Bluetooth protocol stack for Linux
4  *
5  *  Copyright (C) 2015  Google Inc.
6  *
7  *
8  *  This program is free software; you can redistribute it and/or modify
9  *  it under the terms of the GNU General Public License as published by
10  *  the Free Software Foundation; either version 2 of the License, or
11  *  (at your option) any later version.
12  *
13  *  This program is distributed in the hope that it will be useful,
14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  *  GNU General Public License for more details.
17  *
18  */
19
20 struct btd_gatt_database;
21
22 struct btd_gatt_database *btd_gatt_database_new(struct btd_adapter *adapter);
23 void btd_gatt_database_destroy(struct btd_gatt_database *database);
24
25 struct gatt_db *btd_gatt_database_get_db(struct btd_gatt_database *database);
26
27 typedef uint8_t (*btd_gatt_database_ccc_write_t) (uint16_t value,
28                                                         void *user_data);
29 typedef void (*btd_gatt_database_destroy_t) (void *data);
30
31 struct gatt_db_attribute *
32 btd_gatt_database_add_ccc(struct btd_gatt_database *database,
33                                 uint16_t service_handle,
34                                 btd_gatt_database_ccc_write_t write_callback,
35                                 void *user_data,
36                                 btd_gatt_database_destroy_t destroy);