xref: /btstack/platform/daemon/src/daemon_cmds.h (revision 2531c97e167e1cae4616c774a6c07906b45ebb44)
1*2531c97eSMatthias Ringwald /*
2*2531c97eSMatthias Ringwald  * Copyright (C) 2014 BlueKitchen GmbH
3*2531c97eSMatthias Ringwald  *
4*2531c97eSMatthias Ringwald  * Redistribution and use in source and binary forms, with or without
5*2531c97eSMatthias Ringwald  * modification, are permitted provided that the following conditions
6*2531c97eSMatthias Ringwald  * are met:
7*2531c97eSMatthias Ringwald  *
8*2531c97eSMatthias Ringwald  * 1. Redistributions of source code must retain the above copyright
9*2531c97eSMatthias Ringwald  *    notice, this list of conditions and the following disclaimer.
10*2531c97eSMatthias Ringwald  * 2. Redistributions in binary form must reproduce the above copyright
11*2531c97eSMatthias Ringwald  *    notice, this list of conditions and the following disclaimer in the
12*2531c97eSMatthias Ringwald  *    documentation and/or other materials provided with the distribution.
13*2531c97eSMatthias Ringwald  * 3. Neither the name of the copyright holders nor the names of
14*2531c97eSMatthias Ringwald  *    contributors may be used to endorse or promote products derived
15*2531c97eSMatthias Ringwald  *    from this software without specific prior written permission.
16*2531c97eSMatthias Ringwald  * 4. Any redistribution, use, or modification is done solely for
17*2531c97eSMatthias Ringwald  *    personal benefit and not for any commercial purpose or for
18*2531c97eSMatthias Ringwald  *    monetary gain.
19*2531c97eSMatthias Ringwald  *
20*2531c97eSMatthias Ringwald  * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS
21*2531c97eSMatthias Ringwald  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22*2531c97eSMatthias Ringwald  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23*2531c97eSMatthias Ringwald  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS
24*2531c97eSMatthias Ringwald  * RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25*2531c97eSMatthias Ringwald  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26*2531c97eSMatthias Ringwald  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
27*2531c97eSMatthias Ringwald  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
28*2531c97eSMatthias Ringwald  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29*2531c97eSMatthias Ringwald  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
30*2531c97eSMatthias Ringwald  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31*2531c97eSMatthias Ringwald  * SUCH DAMAGE.
32*2531c97eSMatthias Ringwald  *
33*2531c97eSMatthias Ringwald  * Please inquire about commercial licensing options at
34*2531c97eSMatthias Ringwald  * [email protected]
35*2531c97eSMatthias Ringwald  *
36*2531c97eSMatthias Ringwald  */
37*2531c97eSMatthias Ringwald 
38*2531c97eSMatthias Ringwald /*
39*2531c97eSMatthias Ringwald  *  daemon_cmds.h
40*2531c97eSMatthias Ringwald  */
41*2531c97eSMatthias Ringwald 
42*2531c97eSMatthias Ringwald #ifndef __DAEMON_CMDS_H
43*2531c97eSMatthias Ringwald #define __DAEMON_CMDS_H
44*2531c97eSMatthias Ringwald 
45*2531c97eSMatthias Ringwald #include <stdint.h>
46*2531c97eSMatthias Ringwald 
47*2531c97eSMatthias Ringwald #include "bluetooth.h"
48*2531c97eSMatthias Ringwald #include "hci_cmd.h"
49*2531c97eSMatthias Ringwald 
50*2531c97eSMatthias Ringwald #if defined __cplusplus
51*2531c97eSMatthias Ringwald extern "C" {
52*2531c97eSMatthias Ringwald #endif
53*2531c97eSMatthias Ringwald 
54*2531c97eSMatthias Ringwald extern const hci_cmd_t btstack_get_state;
55*2531c97eSMatthias Ringwald extern const hci_cmd_t btstack_set_power_mode;
56*2531c97eSMatthias Ringwald extern const hci_cmd_t btstack_set_acl_capture_mode;
57*2531c97eSMatthias Ringwald extern const hci_cmd_t btstack_get_version;
58*2531c97eSMatthias Ringwald extern const hci_cmd_t btstack_get_system_bluetooth_enabled;
59*2531c97eSMatthias Ringwald extern const hci_cmd_t btstack_set_system_bluetooth_enabled;
60*2531c97eSMatthias Ringwald extern const hci_cmd_t btstack_set_discoverable;
61*2531c97eSMatthias Ringwald extern const hci_cmd_t btstack_set_bluetooth_enabled;    // only used by btstack config
62*2531c97eSMatthias Ringwald 
63*2531c97eSMatthias Ringwald extern const hci_cmd_t l2cap_accept_connection_cmd;
64*2531c97eSMatthias Ringwald extern const hci_cmd_t l2cap_create_channel_cmd;
65*2531c97eSMatthias Ringwald extern const hci_cmd_t l2cap_create_channel_mtu_cmd;
66*2531c97eSMatthias Ringwald extern const hci_cmd_t l2cap_decline_connection_cmd;
67*2531c97eSMatthias Ringwald extern const hci_cmd_t l2cap_disconnect_cmd;
68*2531c97eSMatthias Ringwald extern const hci_cmd_t l2cap_register_service_cmd;
69*2531c97eSMatthias Ringwald extern const hci_cmd_t l2cap_unregister_service_cmd;
70*2531c97eSMatthias Ringwald 
71*2531c97eSMatthias Ringwald extern const hci_cmd_t sdp_register_service_record_cmd;
72*2531c97eSMatthias Ringwald extern const hci_cmd_t sdp_unregister_service_record_cmd;
73*2531c97eSMatthias Ringwald extern const hci_cmd_t sdp_client_query_rfcomm_services_cmd;
74*2531c97eSMatthias Ringwald extern const hci_cmd_t sdp_client_query_services_cmd;
75*2531c97eSMatthias Ringwald 
76*2531c97eSMatthias Ringwald // accept connection @param bd_addr(48), rfcomm_cid (16)
77*2531c97eSMatthias Ringwald extern const hci_cmd_t rfcomm_accept_connection_cmd;
78*2531c97eSMatthias Ringwald // create rfcomm channel: @param bd_addr(48), channel (8)
79*2531c97eSMatthias Ringwald extern const hci_cmd_t rfcomm_create_channel_cmd;
80*2531c97eSMatthias Ringwald // create rfcomm channel: @param bd_addr(48), channel (8), mtu (16), credits (8)
81*2531c97eSMatthias Ringwald extern const hci_cmd_t rfcomm_create_channel_with_initial_credits_cmd;
82*2531c97eSMatthias Ringwald // decline rfcomm disconnect,@param bd_addr(48), rfcomm cid (16), reason(8)
83*2531c97eSMatthias Ringwald extern const hci_cmd_t rfcomm_decline_connection_cmd;
84*2531c97eSMatthias Ringwald // disconnect rfcomm disconnect, @param rfcomm_cid(8), reason(8)
85*2531c97eSMatthias Ringwald extern const hci_cmd_t rfcomm_disconnect_cmd;
86*2531c97eSMatthias Ringwald // register rfcomm service: @param channel(8), mtu (16)
87*2531c97eSMatthias Ringwald extern const hci_cmd_t rfcomm_register_service_cmd;
88*2531c97eSMatthias Ringwald // register rfcomm service: @param channel(8), mtu (16), initial credits (8)
89*2531c97eSMatthias Ringwald extern const hci_cmd_t rfcomm_register_service_with_initial_credits_cmd;
90*2531c97eSMatthias Ringwald // unregister rfcomm service, @param service_channel(16)
91*2531c97eSMatthias Ringwald extern const hci_cmd_t rfcomm_unregister_service_cmd;
92*2531c97eSMatthias Ringwald // request persisten rfcomm channel for service name: serive name (char*)
93*2531c97eSMatthias Ringwald extern const hci_cmd_t rfcomm_persistent_channel_for_service_cmd;
94*2531c97eSMatthias Ringwald extern const hci_cmd_t rfcomm_grants_credits_cmd;
95*2531c97eSMatthias Ringwald 
96*2531c97eSMatthias Ringwald extern const hci_cmd_t gap_disconnect_cmd;
97*2531c97eSMatthias Ringwald extern const hci_cmd_t gap_le_scan_start;
98*2531c97eSMatthias Ringwald extern const hci_cmd_t gap_le_scan_stop;
99*2531c97eSMatthias Ringwald extern const hci_cmd_t gap_le_set_scan_parameters;
100*2531c97eSMatthias Ringwald extern const hci_cmd_t gap_le_connect_cmd;
101*2531c97eSMatthias Ringwald extern const hci_cmd_t gap_le_connect_cancel_cmd;
102*2531c97eSMatthias Ringwald extern const hci_cmd_t gatt_discover_primary_services_cmd;
103*2531c97eSMatthias Ringwald 
104*2531c97eSMatthias Ringwald extern const hci_cmd_t gatt_discover_primary_services_by_uuid16_cmd;
105*2531c97eSMatthias Ringwald extern const hci_cmd_t gatt_discover_primary_services_by_uuid128_cmd;
106*2531c97eSMatthias Ringwald extern const hci_cmd_t gatt_find_included_services_for_service_cmd;
107*2531c97eSMatthias Ringwald extern const hci_cmd_t gatt_discover_characteristics_for_service_cmd;
108*2531c97eSMatthias Ringwald extern const hci_cmd_t gatt_discover_characteristics_for_service_by_uuid128_cmd;
109*2531c97eSMatthias Ringwald extern const hci_cmd_t gatt_discover_characteristic_descriptors_cmd;
110*2531c97eSMatthias Ringwald extern const hci_cmd_t gatt_read_value_of_characteristic_cmd;
111*2531c97eSMatthias Ringwald extern const hci_cmd_t gatt_read_long_value_of_characteristic_cmd;
112*2531c97eSMatthias Ringwald extern const hci_cmd_t gatt_write_value_of_characteristic_without_response_cmd;
113*2531c97eSMatthias Ringwald extern const hci_cmd_t gatt_write_value_of_characteristic_cmd;
114*2531c97eSMatthias Ringwald extern const hci_cmd_t gatt_write_long_value_of_characteristic_cmd;
115*2531c97eSMatthias Ringwald extern const hci_cmd_t gatt_reliable_write_long_value_of_characteristic_cmd;
116*2531c97eSMatthias Ringwald extern const hci_cmd_t gatt_read_characteristic_descriptor_cmd;
117*2531c97eSMatthias Ringwald extern const hci_cmd_t gatt_read_long_characteristic_descriptor_cmd;
118*2531c97eSMatthias Ringwald extern const hci_cmd_t gatt_write_characteristic_descriptor_cmd;
119*2531c97eSMatthias Ringwald extern const hci_cmd_t gatt_write_long_characteristic_descriptor_cmd;
120*2531c97eSMatthias Ringwald extern const hci_cmd_t gatt_write_client_characteristic_configuration_cmd;
121*2531c97eSMatthias Ringwald extern const hci_cmd_t gatt_get_mtu;
122*2531c97eSMatthias Ringwald 
123*2531c97eSMatthias Ringwald 
124*2531c97eSMatthias Ringwald #if defined __cplusplus
125*2531c97eSMatthias Ringwald }
126*2531c97eSMatthias Ringwald #endif
127*2531c97eSMatthias Ringwald 
128*2531c97eSMatthias Ringwald #endif // __DAEMON_CMDS_H
129