xref: /btstack/src/classic/sdp_client_rfcomm.h (revision 282ceebcb6fd490ce67877b1b2d0f3b99021769e)
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 /**
56efda0b48SMatthias Ringwald  * @brief Searches SDP records on a remote device for RFCOMM services with a given UUID.
57efda0b48SMatthias Ringwald  */
58*282ceebcSMatthias Ringwald uint8_t sdp_client_query_rfcomm_channel_and_name_for_uuid(btstack_packet_handler_t callback, bd_addr_t remote, uint16_t uuid);
59efda0b48SMatthias Ringwald 
60efda0b48SMatthias Ringwald /**
61efda0b48SMatthias Ringwald  * @brief Searches SDP records on a remote device for RFCOMM services with a given service search pattern.
62efda0b48SMatthias Ringwald  */
63*282ceebcSMatthias Ringwald uint8_t sdp_client_query_rfcomm_channel_and_name_for_search_pattern(btstack_packet_handler_t callback, bd_addr_t remote, uint8_t * des_serviceSearchPattern);
64efda0b48SMatthias Ringwald /* API_END */
65efda0b48SMatthias Ringwald 
66efda0b48SMatthias Ringwald #if defined __cplusplus
67efda0b48SMatthias Ringwald }
68efda0b48SMatthias Ringwald #endif
69efda0b48SMatthias Ringwald 
70efda0b48SMatthias Ringwald #endif // __SDP_QUERY_RFCOMM_H
71