1*f1b34e8dSMatthias Ringwald /* 2*f1b34e8dSMatthias Ringwald * Copyright (C) 2014 BlueKitchen GmbH 3*f1b34e8dSMatthias Ringwald * 4*f1b34e8dSMatthias Ringwald * Redistribution and use in source and binary forms, with or without 5*f1b34e8dSMatthias Ringwald * modification, are permitted provided that the following conditions 6*f1b34e8dSMatthias Ringwald * are met: 7*f1b34e8dSMatthias Ringwald * 8*f1b34e8dSMatthias Ringwald * 1. Redistributions of source code must retain the above copyright 9*f1b34e8dSMatthias Ringwald * notice, this list of conditions and the following disclaimer. 10*f1b34e8dSMatthias Ringwald * 2. Redistributions in binary form must reproduce the above copyright 11*f1b34e8dSMatthias Ringwald * notice, this list of conditions and the following disclaimer in the 12*f1b34e8dSMatthias Ringwald * documentation and/or other materials provided with the distribution. 13*f1b34e8dSMatthias Ringwald * 3. Neither the name of the copyright holders nor the names of 14*f1b34e8dSMatthias Ringwald * contributors may be used to endorse or promote products derived 15*f1b34e8dSMatthias Ringwald * from this software without specific prior written permission. 16*f1b34e8dSMatthias Ringwald * 4. Any redistribution, use, or modification is done solely for 17*f1b34e8dSMatthias Ringwald * personal benefit and not for any commercial purpose or for 18*f1b34e8dSMatthias Ringwald * monetary gain. 19*f1b34e8dSMatthias Ringwald * 20*f1b34e8dSMatthias Ringwald * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS 21*f1b34e8dSMatthias Ringwald * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22*f1b34e8dSMatthias Ringwald * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23*f1b34e8dSMatthias Ringwald * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS 24*f1b34e8dSMatthias Ringwald * RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25*f1b34e8dSMatthias Ringwald * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26*f1b34e8dSMatthias Ringwald * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 27*f1b34e8dSMatthias Ringwald * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 28*f1b34e8dSMatthias Ringwald * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29*f1b34e8dSMatthias Ringwald * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 30*f1b34e8dSMatthias Ringwald * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31*f1b34e8dSMatthias Ringwald * SUCH DAMAGE. 32*f1b34e8dSMatthias Ringwald * 33*f1b34e8dSMatthias Ringwald * Please inquire about commercial licensing options at 34*f1b34e8dSMatthias Ringwald * [email protected] 35*f1b34e8dSMatthias Ringwald * 36*f1b34e8dSMatthias Ringwald */ 37*f1b34e8dSMatthias Ringwald 38*f1b34e8dSMatthias Ringwald #ifndef __GOEP_CLIENT_H 39*f1b34e8dSMatthias Ringwald 40*f1b34e8dSMatthias Ringwald #if defined __cplusplus 41*f1b34e8dSMatthias Ringwald extern "C" { 42*f1b34e8dSMatthias Ringwald #endif 43*f1b34e8dSMatthias Ringwald 44*f1b34e8dSMatthias Ringwald #include "btstack_config.h" 45*f1b34e8dSMatthias Ringwald #include <stdint.h> 46*f1b34e8dSMatthias Ringwald 47*f1b34e8dSMatthias Ringwald /* API_START */ 48*f1b34e8dSMatthias Ringwald 49*f1b34e8dSMatthias Ringwald /** 50*f1b34e8dSMatthias Ringwald * Setup PhoneBook Access Client 51*f1b34e8dSMatthias Ringwald */ 52*f1b34e8dSMatthias Ringwald void pbap_client_init(void); 53*f1b34e8dSMatthias Ringwald 54*f1b34e8dSMatthias Ringwald /** 55*f1b34e8dSMatthias Ringwald * @brief Create PBAP connection to a Phone Book Server (PSE) server on a remote deivce. 56*f1b34e8dSMatthias Ringwald * @param handler 57*f1b34e8dSMatthias Ringwald * @param addr 58*f1b34e8dSMatthias Ringwald * @param out_cid to use for further commands 59*f1b34e8dSMatthias Ringwald * @result status 60*f1b34e8dSMatthias Ringwald */ 61*f1b34e8dSMatthias Ringwald uint8_t pbap_connect(btstack_packet_handler_t handler, bd_addr_t addr, uint16_t * out_cid); 62*f1b34e8dSMatthias Ringwald 63*f1b34e8dSMatthias Ringwald /** 64*f1b34e8dSMatthias Ringwald * @brief Disconnects PBAP connection with given identifier. 65*f1b34e8dSMatthias Ringwald * @param pbap_cid 66*f1b34e8dSMatthias Ringwald * @return status 67*f1b34e8dSMatthias Ringwald */ 68*f1b34e8dSMatthias Ringwald uint8_t pbap_disconnect(uint16_t pbap_cid); 69*f1b34e8dSMatthias Ringwald 70*f1b34e8dSMatthias Ringwald /** 71*f1b34e8dSMatthias Ringwald * @brief Set current folder on PSE 72*f1b34e8dSMatthias Ringwald * @param pbap_cid 73*f1b34e8dSMatthias Ringwald * @param path - note: path is not copied 74*f1b34e8dSMatthias Ringwald * @return status 75*f1b34e8dSMatthias Ringwald */ 76*f1b34e8dSMatthias Ringwald uint8_t pbap_set_phonebook(uint16_t pbap_cid, const char * path); 77*f1b34e8dSMatthias Ringwald 78*f1b34e8dSMatthias Ringwald /** 79*f1b34e8dSMatthias Ringwald * @brief Pull phone book from PSE 80*f1b34e8dSMatthias Ringwald * @param pbap_cid 81*f1b34e8dSMatthias Ringwald * @return status 82*f1b34e8dSMatthias Ringwald */ 83*f1b34e8dSMatthias Ringwald uint8_t pbap_pull_phonebook(uint16_t pbap_cid); 84*f1b34e8dSMatthias Ringwald 85*f1b34e8dSMatthias Ringwald /* API_END */ 86*f1b34e8dSMatthias Ringwald 87*f1b34e8dSMatthias Ringwald #if defined __cplusplus 88*f1b34e8dSMatthias Ringwald } 89*f1b34e8dSMatthias Ringwald #endif 90*f1b34e8dSMatthias Ringwald #endif 91