Upgrade bluez5_37 :Merge the code from private
[platform/upstream/bluez.git] / src / gatt-client.h
1 /*
2  *
3  *  BlueZ - Bluetooth protocol stack for Linux
4  *
5  *  Copyright (C) 2014  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_client;
21
22 struct btd_gatt_client *btd_gatt_client_new(struct btd_device *device);
23 void btd_gatt_client_destroy(struct btd_gatt_client *client);
24
25 void btd_gatt_client_ready(struct btd_gatt_client *client);
26 void btd_gatt_client_connected(struct btd_gatt_client *client);
27 void btd_gatt_client_service_added(struct btd_gatt_client *client,
28                                         struct gatt_db_attribute *attrib);
29 void btd_gatt_client_service_removed(struct btd_gatt_client *client,
30                                         struct gatt_db_attribute *attrib);
31 void btd_gatt_client_disconnected(struct btd_gatt_client *client);
32
33 typedef void (*btd_gatt_client_service_path_t)(const char *service_path,
34                                                         void *user_data);
35 void btd_gatt_client_foreach_service(struct btd_gatt_client *client,
36                                         btd_gatt_client_service_path_t func,
37                                         void *user_data);