xref: /btstack/src/classic/sdp_client_rfcomm.h (revision 55bb522c69487413cb49256d55e877e5437bcbfc)
1efda0b48SMatthias Ringwald /*
2efda0b48SMatthias Ringwald  * Copyright (C) 2014 BlueKitchen GmbH
3efda0b48SMatthias Ringwald  *
4efda0b48SMatthias Ringwald  * Redistribution and use in source and binary forms, with or without
5efda0b48SMatthias Ringwald  * modification, are permitted provided that the following conditions
6efda0b48SMatthias Ringwald  * are met:
7efda0b48SMatthias Ringwald  *
8efda0b48SMatthias Ringwald  * 1. Redistributions of source code must retain the above copyright
9efda0b48SMatthias Ringwald  *    notice, this list of conditions and the following disclaimer.
10efda0b48SMatthias Ringwald  * 2. Redistributions in binary form must reproduce the above copyright
11efda0b48SMatthias Ringwald  *    notice, this list of conditions and the following disclaimer in the
12efda0b48SMatthias Ringwald  *    documentation and/or other materials provided with the distribution.
13efda0b48SMatthias Ringwald  * 3. Neither the name of the copyright holders nor the names of
14efda0b48SMatthias Ringwald  *    contributors may be used to endorse or promote products derived
15efda0b48SMatthias Ringwald  *    from this software without specific prior written permission.
16efda0b48SMatthias Ringwald  * 4. Any redistribution, use, or modification is done solely for
17efda0b48SMatthias Ringwald  *    personal benefit and not for any commercial purpose or for
18efda0b48SMatthias Ringwald  *    monetary gain.
19efda0b48SMatthias Ringwald  *
20efda0b48SMatthias Ringwald  * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS
21efda0b48SMatthias Ringwald  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22efda0b48SMatthias Ringwald  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
23efda0b48SMatthias Ringwald  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS
24efda0b48SMatthias Ringwald  * RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
25efda0b48SMatthias Ringwald  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26efda0b48SMatthias Ringwald  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
27efda0b48SMatthias Ringwald  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
28efda0b48SMatthias Ringwald  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29efda0b48SMatthias Ringwald  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
30efda0b48SMatthias Ringwald  * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31efda0b48SMatthias Ringwald  * SUCH DAMAGE.
32efda0b48SMatthias Ringwald  *
33efda0b48SMatthias Ringwald  * Please inquire about commercial licensing options at
34efda0b48SMatthias Ringwald  * [email protected]
35efda0b48SMatthias Ringwald  *
36efda0b48SMatthias Ringwald  */
37efda0b48SMatthias Ringwald 
38efda0b48SMatthias Ringwald /*
39efda0b48SMatthias Ringwald  *  sdp_rfcomm_query.h
40efda0b48SMatthias Ringwald  */
41efda0b48SMatthias Ringwald 
42efda0b48SMatthias Ringwald #ifndef __SDP_QUERY_RFCOMM_H
43efda0b48SMatthias Ringwald #define __SDP_QUERY_RFCOMM_H
44efda0b48SMatthias Ringwald 
45efda0b48SMatthias Ringwald #include "btstack_util.h"
46efda0b48SMatthias Ringwald 
47efda0b48SMatthias Ringwald #define SDP_SERVICE_NAME_LEN 20
48efda0b48SMatthias Ringwald 
49efda0b48SMatthias Ringwald #if defined __cplusplus
50efda0b48SMatthias Ringwald extern "C" {
51efda0b48SMatthias Ringwald #endif
52efda0b48SMatthias Ringwald 
53efda0b48SMatthias Ringwald /* API_START */
54efda0b48SMatthias Ringwald 
55efda0b48SMatthias Ringwald /**
5609ac355cSMatthias Ringwald  * @brief Searches SDP records on a remote device for RFCOMM services with a given 16-bit UUID.
5709ac355cSMatthias Ringwald  * @note calls sdp_service_search_pattern_for_uuid16 that uses global buffer
58efda0b48SMatthias Ringwald  */
59282ceebcSMatthias Ringwald uint8_t sdp_client_query_rfcomm_channel_and_name_for_uuid(btstack_packet_handler_t callback, bd_addr_t remote, uint16_t uuid);
60efda0b48SMatthias Ringwald 
61efda0b48SMatthias Ringwald /**
6209ac355cSMatthias Ringwald  * @brief Searches SDP records on a remote device for RFCOMM services with a given 128-bit UUID.
6309ac355cSMatthias Ringwald  * @note calls sdp_service_search_pattern_for_uuid128 that uses global buffer
6409ac355cSMatthias Ringwald  */
65*55bb522cSMatthias Ringwald uint8_t sdp_client_query_rfcomm_channel_and_name_for_uuid128(btstack_packet_handler_t callback, bd_addr_t remote, const uint8_t * uuid128);
6609ac355cSMatthias Ringwald 
6709ac355cSMatthias Ringwald /**
68efda0b48SMatthias Ringwald  * @brief Searches SDP records on a remote device for RFCOMM services with a given service search pattern.
69efda0b48SMatthias Ringwald  */
70*55bb522cSMatthias Ringwald uint8_t sdp_client_query_rfcomm_channel_and_name_for_search_pattern(btstack_packet_handler_t callback, bd_addr_t remote, const uint8_t * des_serviceSearchPattern);
7109ac355cSMatthias Ringwald 
72efda0b48SMatthias Ringwald /* API_END */
73efda0b48SMatthias Ringwald 
74efda0b48SMatthias Ringwald #if defined __cplusplus
75efda0b48SMatthias Ringwald }
76efda0b48SMatthias Ringwald #endif
77efda0b48SMatthias Ringwald 
78efda0b48SMatthias Ringwald #endif // __SDP_QUERY_RFCOMM_H
79