#include "sdp_api.h"
#include "sdpint.h"
-#if (SDP_SERVER_ENABLED == TRUE)
/******************************************************************************/
/* L O C A L F U N C T I O N P R O T O T Y P E S */
/******************************************************************************/
return (p - p_head);
}
-#endif /* SDP_SERVER_ENABLED == TRUE */
-
/*******************************************************************************
*
* Function SDP_CreateRecord
*
******************************************************************************/
uint32_t SDP_CreateRecord(void) {
-#if (SDP_SERVER_ENABLED == TRUE)
uint32_t handle;
uint8_t buf[4];
tSDP_DB* p_db = &sdp_cb.server_db;
} else
SDP_TRACE_ERROR("SDP_CreateRecord fail, exceed maximum records:%d",
SDP_MAX_RECORDS);
-#endif
return (0);
}
*
******************************************************************************/
bool SDP_DeleteRecord(uint32_t handle) {
-#if (SDP_SERVER_ENABLED == TRUE)
uint16_t xx, yy, zz;
tSDP_RECORD* p_rec = &sdp_cb.server_db.record[0];
}
}
}
-#endif
return (false);
}
******************************************************************************/
bool SDP_AddAttribute(uint32_t handle, uint16_t attr_id, uint8_t attr_type,
uint32_t attr_len, uint8_t* p_val) {
-#if (SDP_SERVER_ENABLED == TRUE)
uint16_t xx, yy, zz;
tSDP_RECORD* p_rec = &sdp_cb.server_db.record[0];
return (true);
}
}
-#endif
return (false);
}
******************************************************************************/
bool SDP_AddSequence(uint32_t handle, uint16_t attr_id, uint16_t num_elem,
uint8_t type[], uint8_t len[], uint8_t* p_val[]) {
-#if (SDP_SERVER_ENABLED == TRUE)
uint16_t xx;
uint8_t* p;
uint8_t* p_head;
(uint32_t)(p - p_buff), p_buff);
osi_free(p_buff);
return result;
-#else /* SDP_SERVER_ENABLED == FALSE */
- return (false);
-#endif
}
/*******************************************************************************
******************************************************************************/
bool SDP_AddUuidSequence(uint32_t handle, uint16_t attr_id, uint16_t num_uuids,
uint16_t* p_uuids) {
-#if (SDP_SERVER_ENABLED == TRUE)
uint16_t xx;
uint8_t* p;
int32_t max_len = SDP_MAX_ATTR_LEN - 3;
(uint32_t)(p - p_buff), p_buff);
osi_free(p_buff);
return result;
-#else /* SDP_SERVER_ENABLED == FALSE */
- return (false);
-#endif
}
/*******************************************************************************
******************************************************************************/
bool SDP_AddProtocolList(uint32_t handle, uint16_t num_elem,
tSDP_PROTOCOL_ELEM* p_elem_list) {
-#if (SDP_SERVER_ENABLED == TRUE)
int offset;
bool result;
uint8_t* p_buff =
DATA_ELE_SEQ_DESC_TYPE, (uint32_t)offset, p_buff);
osi_free(p_buff);
return result;
-#else /* SDP_SERVER_ENABLED == FALSE */
- return (false);
-#endif
}
/*******************************************************************************
******************************************************************************/
bool SDP_AddAdditionProtoLists(uint32_t handle, uint16_t num_elem,
tSDP_PROTO_LIST_ELEM* p_proto_list) {
-#if (SDP_SERVER_ENABLED == TRUE)
uint16_t xx;
uint8_t* p;
uint8_t* p_len;
DATA_ELE_SEQ_DESC_TYPE, (uint32_t)(p - p_buff), p_buff);
osi_free(p_buff);
return result;
-
-#else /* SDP_SERVER_ENABLED == FALSE */
- return (false);
-#endif
}
/*******************************************************************************
******************************************************************************/
bool SDP_AddProfileDescriptorList(uint32_t handle, uint16_t profile_uuid,
uint16_t version) {
-#if (SDP_SERVER_ENABLED == TRUE)
uint8_t* p;
bool result;
uint8_t* p_buff = (uint8_t*)osi_malloc(sizeof(uint8_t) * SDP_MAX_ATTR_LEN);
DATA_ELE_SEQ_DESC_TYPE, (uint32_t)(p - p_buff), p_buff);
osi_free(p_buff);
return result;
-
-#else /* SDP_SERVER_ENABLED == FALSE */
- return (false);
-#endif
}
/*******************************************************************************
******************************************************************************/
bool SDP_AddLanguageBaseAttrIDList(uint32_t handle, uint16_t lang,
uint16_t char_enc, uint16_t base_id) {
-#if (SDP_SERVER_ENABLED == TRUE)
uint8_t* p;
bool result;
uint8_t* p_buff = (uint8_t*)osi_malloc(sizeof(uint8_t) * SDP_MAX_ATTR_LEN);
DATA_ELE_SEQ_DESC_TYPE, (uint32_t)(p - p_buff), p_buff);
osi_free(p_buff);
return result;
-#else /* SDP_SERVER_ENABLED == FALSE */
- return (false);
-#endif
}
/*******************************************************************************
******************************************************************************/
bool SDP_AddServiceClassIdList(uint32_t handle, uint16_t num_services,
uint16_t* p_service_uuids) {
-#if (SDP_SERVER_ENABLED == TRUE)
uint16_t xx;
uint8_t* p;
bool result;
DATA_ELE_SEQ_DESC_TYPE, (uint32_t)(p - p_buff), p_buff);
osi_free(p_buff);
return result;
-#else /* SDP_SERVER_ENABLED == FALSE */
- return (false);
-#endif
}
/*******************************************************************************
*
******************************************************************************/
bool SDP_DeleteAttribute(uint32_t handle, uint16_t attr_id) {
-#if (SDP_SERVER_ENABLED == TRUE)
tSDP_RECORD* p_rec = &sdp_cb.server_db.record[0];
uint8_t* pad_ptr;
uint32_t len; /* Number of bytes in the entry */
}
}
}
-#endif
/* If here, not found */
return (false);
}
tSDP_RECORD record[SDP_MAX_RECORDS];
} tSDP_DB;
-#if (SDP_SERVER_ENABLED == TRUE)
/* Continuation information for the SDP server response */
typedef struct {
uint16_t next_attr_index; /* attr index for next continuation response */
uint16_t attr_offset; /* offset within the attr to keep trak of partial
attributes in the responses */
} tSDP_CONT_INFO;
-#endif /* SDP_SERVER_ENABLED == TRUE */
/* Define the SDP Connection Control Block */
typedef struct {
uint8_t disc_state;
uint8_t is_attr_search;
-#if (SDP_SERVER_ENABLED == TRUE)
uint16_t cont_offset; /* Continuation state data in the server response */
tSDP_CONT_INFO cont_info; /* structure to hold continuation information for
the server response */
-#endif /* SDP_SERVER_ENABLED == TRUE */
} tCONN_CB;
typedef struct {
tL2CAP_CFG_INFO l2cap_my_cfg; /* My L2CAP config */
tCONN_CB ccb[SDP_MAX_CONNECTIONS];
-#if (SDP_SERVER_ENABLED == TRUE)
tSDP_DB server_db;
-#endif
tL2CAP_APPL_INFO reg_info; /* L2CAP Registration info */
uint16_t max_attr_list_size; /* Max attribute list size to use */
uint16_t max_recs_per_search; /* Max records we want per seaarch */
/* Functions provided by sdp_server.cc
*/
-#if (SDP_SERVER_ENABLED == TRUE)
extern void sdp_server_handle_client_req(tCONN_CB* p_ccb, BT_HDR* p_msg);
-#else
-#define sdp_server_handle_client_req(p_ccb, p_msg)
-#endif
/* Functions provided by sdp_discovery.cc
*/