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