1c227ee0fSMatthias Ringwald /* 2c227ee0fSMatthias Ringwald * Copyright (C) 2014 BlueKitchen GmbH 3c227ee0fSMatthias Ringwald * 4c227ee0fSMatthias Ringwald * Redistribution and use in source and binary forms, with or without 5c227ee0fSMatthias Ringwald * modification, are permitted provided that the following conditions 6c227ee0fSMatthias Ringwald * are met: 7c227ee0fSMatthias Ringwald * 8c227ee0fSMatthias Ringwald * 1. Redistributions of source code must retain the above copyright 9c227ee0fSMatthias Ringwald * notice, this list of conditions and the following disclaimer. 10c227ee0fSMatthias Ringwald * 2. Redistributions in binary form must reproduce the above copyright 11c227ee0fSMatthias Ringwald * notice, this list of conditions and the following disclaimer in the 12c227ee0fSMatthias Ringwald * documentation and/or other materials provided with the distribution. 13c227ee0fSMatthias Ringwald * 3. Neither the name of the copyright holders nor the names of 14c227ee0fSMatthias Ringwald * contributors may be used to endorse or promote products derived 15c227ee0fSMatthias Ringwald * from this software without specific prior written permission. 16c227ee0fSMatthias Ringwald * 4. Any redistribution, use, or modification is done solely for 17c227ee0fSMatthias Ringwald * personal benefit and not for any commercial purpose or for 18c227ee0fSMatthias Ringwald * monetary gain. 19c227ee0fSMatthias Ringwald * 20c227ee0fSMatthias Ringwald * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS 21c227ee0fSMatthias Ringwald * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22c227ee0fSMatthias Ringwald * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23c227ee0fSMatthias Ringwald * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS 24c227ee0fSMatthias Ringwald * RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25c227ee0fSMatthias Ringwald * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26c227ee0fSMatthias Ringwald * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 27c227ee0fSMatthias Ringwald * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 28c227ee0fSMatthias Ringwald * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29c227ee0fSMatthias Ringwald * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 30c227ee0fSMatthias Ringwald * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31c227ee0fSMatthias Ringwald * SUCH DAMAGE. 32c227ee0fSMatthias Ringwald * 33c227ee0fSMatthias Ringwald * Please inquire about commercial licensing options at 34c227ee0fSMatthias Ringwald * [email protected] 35c227ee0fSMatthias Ringwald * 36c227ee0fSMatthias Ringwald */ 37c227ee0fSMatthias Ringwald 38c227ee0fSMatthias Ringwald /* 39c227ee0fSMatthias Ringwald * spp_server.h 40c227ee0fSMatthias Ringwald * 41c227ee0fSMatthias Ringwald * Create SPP SDP Records 42c227ee0fSMatthias Ringwald */ 43c227ee0fSMatthias Ringwald 4480e33422SMatthias Ringwald #ifndef SPP_SERVER_H 4580e33422SMatthias Ringwald #define SPP_SERVER_H 46c227ee0fSMatthias Ringwald 47c227ee0fSMatthias Ringwald #include <stdint.h> 48c227ee0fSMatthias Ringwald 49c227ee0fSMatthias Ringwald #if defined __cplusplus 50c227ee0fSMatthias Ringwald extern "C" { 51c227ee0fSMatthias Ringwald #endif 52c227ee0fSMatthias Ringwald 53c227ee0fSMatthias Ringwald /* API_START */ 54c227ee0fSMatthias Ringwald 55c227ee0fSMatthias Ringwald /** 56*ec818a28SMatthias Ringwald * @brief Create SDP record for SPP service with official SPP Service Class 57c227ee0fSMatthias Ringwald * @param service buffer - needs to large enough 58c227ee0fSMatthias Ringwald * @param service_record_handle 59c227ee0fSMatthias Ringwald * @param rfcomm_channel 60c227ee0fSMatthias Ringwald * @param name 61c227ee0fSMatthias Ringwald */ 62c227ee0fSMatthias Ringwald void spp_create_sdp_record(uint8_t *service, uint32_t service_record_handle, int rfcomm_channel, const char *name); 63c227ee0fSMatthias Ringwald 64*ec818a28SMatthias Ringwald /** 65*ec818a28SMatthias Ringwald * @brief Create SDP record for SPP service with custom service UUID (e.g. for use with Android) 66*ec818a28SMatthias Ringwald * @param service buffer - needs to large enough 67*ec818a28SMatthias Ringwald * @param service_record_handle 68*ec818a28SMatthias Ringwald * @param service_uuid128 buffer 69*ec818a28SMatthias Ringwald * @param rfcomm_channel 70*ec818a28SMatthias Ringwald * @param name 71*ec818a28SMatthias Ringwald */ 72*ec818a28SMatthias Ringwald void spp_create_custom_sdp_record(uint8_t *service, uint32_t service_record_handle, const uint8_t * service_uuid128, int rfcomm_channel, const char *name); 73*ec818a28SMatthias Ringwald 74c227ee0fSMatthias Ringwald /* API_END */ 75c227ee0fSMatthias Ringwald 76c227ee0fSMatthias Ringwald #if defined __cplusplus 77c227ee0fSMatthias Ringwald } 78c227ee0fSMatthias Ringwald #endif 7980e33422SMatthias Ringwald #endif // SPP_SERVER_H 80