xref: /btstack/src/classic/gatt_sdp.h (revision 2fca4dad957cd7b88f4657ed51e89c12615dda72)
1e5836bafSMatthias Ringwald /*
2e5836bafSMatthias Ringwald  * Copyright (C) 2019 BlueKitchen GmbH
3e5836bafSMatthias Ringwald  *
4e5836bafSMatthias Ringwald  * Redistribution and use in source and binary forms, with or without
5e5836bafSMatthias Ringwald  * modification, are permitted provided that the following conditions
6e5836bafSMatthias Ringwald  * are met:
7e5836bafSMatthias Ringwald  *
8e5836bafSMatthias Ringwald  * 1. Redistributions of source code must retain the above copyright
9e5836bafSMatthias Ringwald  *    notice, this list of conditions and the following disclaimer.
10e5836bafSMatthias Ringwald  * 2. Redistributions in binary form must reproduce the above copyright
11e5836bafSMatthias Ringwald  *    notice, this list of conditions and the following disclaimer in the
12e5836bafSMatthias Ringwald  *    documentation and/or other materials provided with the distribution.
13e5836bafSMatthias Ringwald  * 3. Neither the name of the copyright holders nor the names of
14e5836bafSMatthias Ringwald  *    contributors may be used to endorse or promote products derived
15e5836bafSMatthias Ringwald  *    from this software without specific prior written permission.
16e5836bafSMatthias Ringwald  * 4. Any redistribution, use, or modification is done solely for
17e5836bafSMatthias Ringwald  *    personal benefit and not for any commercial purpose or for
18e5836bafSMatthias Ringwald  *    monetary gain.
19e5836bafSMatthias Ringwald  *
20e5836bafSMatthias Ringwald  * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS
21e5836bafSMatthias Ringwald  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22e5836bafSMatthias Ringwald  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23*2fca4dadSMilanka Ringwald  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BLUEKITCHEN
24*2fca4dadSMilanka Ringwald  * GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25e5836bafSMatthias Ringwald  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26e5836bafSMatthias Ringwald  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
27e5836bafSMatthias Ringwald  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
28e5836bafSMatthias Ringwald  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29e5836bafSMatthias Ringwald  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
30e5836bafSMatthias Ringwald  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31e5836bafSMatthias Ringwald  * SUCH DAMAGE.
32e5836bafSMatthias Ringwald  *
33e5836bafSMatthias Ringwald  * Please inquire about commercial licensing options at
34e5836bafSMatthias Ringwald  * [email protected]
35e5836bafSMatthias Ringwald  *
36e5836bafSMatthias Ringwald  */
37e5836bafSMatthias Ringwald 
38fe5a6c4eSMilanka Ringwald /**
39fe5a6c4eSMilanka Ringwald  * @title GATT SDP
40fe5a6c4eSMilanka Ringwald  *
41e5836bafSMatthias Ringwald  */
42e5836bafSMatthias Ringwald 
43e5836bafSMatthias Ringwald #ifndef GATT_SDP_H
44e5836bafSMatthias Ringwald #define GATT_SDP_H
45e5836bafSMatthias Ringwald 
46e5836bafSMatthias Ringwald #include <stdint.h>
47e5836bafSMatthias Ringwald #include "bluetooth.h"
48e5836bafSMatthias Ringwald 
49e5836bafSMatthias Ringwald #if defined __cplusplus
50e5836bafSMatthias Ringwald extern "C" {
51e5836bafSMatthias Ringwald #endif
52e5836bafSMatthias Ringwald 
53e5836bafSMatthias Ringwald /* API_START */
54e5836bafSMatthias Ringwald 
55e5836bafSMatthias Ringwald /**
56e5836bafSMatthias Ringwald  * @brief Creates SDP record forG ATT service in provided empty buffer.
57e5836bafSMatthias Ringwald  * @note Make sure the buffer is big enough.
58e5836bafSMatthias Ringwald  *
59e5836bafSMatthias Ringwald  * @param service is an empty buffer to store service record
60e5836bafSMatthias Ringwald  * @param service_record_handle for new service
61e5836bafSMatthias Ringwald  * @param gatt_start_handle
62e5836bafSMatthias Ringwald  * @param gatt_end_handle
63e5836bafSMatthias Ringwald  */
64e5836bafSMatthias Ringwald void gatt_create_sdp_record(uint8_t *service, uint32_t service_record_handle, uint16_t gatt_start_handle, uint16_t gatt_end_handle);
65e5836bafSMatthias Ringwald 
66e5836bafSMatthias Ringwald /* API_END */
67e5836bafSMatthias Ringwald 
68e5836bafSMatthias Ringwald #if defined __cplusplus
69e5836bafSMatthias Ringwald }
70e5836bafSMatthias Ringwald #endif
71e5836bafSMatthias Ringwald #endif // GATT_SDP_H
72