btstack/docs/manual/api_sdp.tex

37 lines
1.2 KiB
TeX
Raw Normal View History

2014-11-06 14:09:12 +00:00
% !TEX root = btstack_gettingstarted.tex
2015-04-09 15:11:48 +00:00
\section{SDP API}
2014-11-06 14:09:12 +00:00
\label{appendix:api_sdp}
$ $
\begin{lstlisting}
2015-04-09 15:11:48 +00:00
/**
* @brief Set up SDP.
*/
2014-11-06 14:09:12 +00:00
void sdp_init(void);
2015-04-09 12:49:03 +00:00
void sdp_register_packet_handler(void (*handler)(void * connection, uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size));
#ifdef EMBEDDED
2015-04-09 15:11:48 +00:00
/**
* @brief Register service record internally - this version doesn't copy the record therefore it must be forever accessible. Preconditions:
- AttributeIDs are in ascending order;
- ServiceRecordHandle is first attribute and valid.
* @return ServiceRecordHandle or 0 if registration failed.
*/
2014-11-06 14:09:12 +00:00
uint32_t sdp_register_service_internal(void *connection, service_record_item_t * record_item);
2015-04-09 12:49:03 +00:00
#endif
#ifndef EMBEDDED
2015-04-09 15:11:48 +00:00
/**
* @brief Register service record internally - this version creates a copy of the record precondition: AttributeIDs are in ascending order => ServiceRecordHandle is first attribute if present.
* @return ServiceRecordHandle or 0 if registration failed
*/
2015-04-09 12:49:03 +00:00
uint32_t sdp_register_service_internal(void *connection, uint8_t * service_record);
#endif
2014-11-06 14:09:12 +00:00
2015-04-09 15:11:48 +00:00
/**
* @brief Unregister service record internally.
*/
2014-11-06 14:09:12 +00:00
void sdp_unregister_service_internal(void *connection, uint32_t service_record_handle);
\end{lstlisting}
2015-04-09 12:49:03 +00:00
\pagebreak