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