hc
2024-08-12 233ab1bd4c5697f5cdec94e60206e8c6ac609b4c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/*
 *
 *  BlueZ - Bluetooth protocol stack for Linux
 *
 *  Copyright (C) 2014  Intel Corporation. All rights reserved.
 *
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 *
 */
 
#ifndef __A2DP_SOURCE_GATT__
#define __A2DP_SOURCE_GATT__
 
#include <RkBleClient.h>
 
#ifdef __cplusplus
extern "C" {
#endif
 
void gatt_add_service(GDBusProxy *proxy);
void gatt_remove_service(GDBusProxy *proxy);
 
void gatt_add_characteristic(GDBusProxy *proxy);
void gatt_remove_characteristic(GDBusProxy *proxy);
 
void gatt_add_descriptor(GDBusProxy *proxy);
void gatt_remove_descriptor(GDBusProxy *proxy);
 
void gatt_list_attributes(const char *device);
GDBusProxy *gatt_select_attribute(GDBusProxy *parent, const char *path);
char *gatt_attribute_generator(const char *text, int state);
 
int gatt_read_attribute(GDBusProxy *proxy, int offset);
int gatt_write_attribute(GDBusProxy *proxy, char *data, int data_len, int offset);
int gatt_notify_attribute(GDBusProxy *proxy, bool enable);
 
void gatt_acquire_write(GDBusProxy *proxy, const char *arg);
void gatt_release_write(GDBusProxy *proxy, const char *arg);
 
void gatt_acquire_notify(GDBusProxy *proxy, const char *arg);
void gatt_release_notify(GDBusProxy *proxy, const char *arg);
 
void gatt_add_manager(GDBusProxy *proxy);
void gatt_remove_manager(GDBusProxy *proxy);
 
void gatt_register_app(DBusConnection *conn, GDBusProxy *proxy,
                       int argc, char *argv[]);
void gatt_unregister_app(DBusConnection *conn, GDBusProxy *proxy);
 
void gatt_register_service(DBusConnection *conn, GDBusProxy *proxy,
                       int argc, char *argv[]);
void gatt_unregister_service(DBusConnection *conn, GDBusProxy *proxy,
                       int argc, char *argv[]);
 
void gatt_register_chrc(DBusConnection *conn, GDBusProxy *proxy,
                       int argc, char *argv[]);
void gatt_unregister_chrc(DBusConnection *conn, GDBusProxy *proxy,
                       int argc, char *argv[]);
 
void gatt_register_desc(DBusConnection *conn, GDBusProxy *proxy,
                       int argc, char *argv[]);
void gatt_unregister_desc(DBusConnection *conn, GDBusProxy *proxy,
                       int argc, char *argv[]);
 
void gatt_register_include(DBusConnection *conn, GDBusProxy *proxy,
                   int argc, char *argv[]);
void gatt_unregister_include(DBusConnection *conn, GDBusProxy *proxy,
                       int argc, char *argv[]);
 
void gatt_get_list_attributes(const char *path, RK_BLE_CLIENT_SERVICE_INFO *info);
bool gatt_get_notifying(GDBusProxy *proxy);
 
#ifdef __cplusplus
}
#endif
 
#endif /* __A2DP_SOURCE_GATT__ */