* Function gatt_uuid_compare * Description Compare two UUID to see if they are the same. * Returns TRUE if two uuid match; FALSE otherwise.
* Function bta_gattc_uuid_compare * Description Compare two UUID to see if they are the same. * Returns TRUE if two uuid match; FALSE otherwise.
* C L I E N T F U N C T I O N P R O T O T Y P E S * * Function SDP_InitDiscoveryDb * Description This function is called to initialize a discovery database. * Parameters: p_db - (input) address of an area of memory where the * discovery database is managed. * len - (input) size (in bytes) of the memory * NOTE: This must be larger than sizeof(tSDP_DISCOVERY_DB) * num_uuid - (input) number of UUID filters applied * p_uuid_list - (input) list of UUID filters * num_attr - (input) number of attribute filters applied * p_attr_list - (input) list of attribute filters * Returns BOOLEAN * TRUE if successful * FALSE if one or more parameters are bad
* Function bta_gattc_fill_gatt_db_el * Description fill a btgatt_db_element_t value * Returns None.
* Function gatt_build_uuid_to_stream * Description Add UUID into stream. * Returns UUID length.
* Function BTA_GATTS_CreateService * Description Create a service. When service creation is done, a callback * event BTA_GATTS_CREATE_EVT is called to report status * and service ID to the profile. The service ID obtained in * the callback function needs to be used when adding included * service and characteristics/descriptors into the service. * Parameters app_id: Profile ID this service is belonged to. * p_service_uuid: service UUID. * inst: instance ID number of this service. * num_handle: numble of handle requessted for this service. * is_primary: is this service a primary one or not. * Returns void
* Function GATTS_AddCharacteristic * Description This function is called to add a characteristic into a service. * It will add a characteristic declaration and characteristic * value declaration into the service database identified by the * service handle. * Parameter service_handle : To which service this included service is added to. * char_uuid : Characteristic UUID. * perm : Characteristic value declaration attribute permission. * property : Characteristic Properties * Returns Characteristic value declaration attribute handle. 0 if failed.
* Function BTA_GATTS_AddCharacteristic * Description This function is called to add a characteristic into a service. * Parameters service_id: service ID to which this included service is to * be added. * p_char_uuid : Characteristic UUID. * perm : Characteristic value declaration attribute permission. * property : Characteristic Properties * Returns None
* Function gatt_parse_uuid_from_cmd * Description Convert a 128 bits UUID into a 16 bits UUID. * Returns TRUE if command sent, otherwise FALSE.
* Function allocate_attr_in_db * Description Allocate a memory space for a new attribute, and link this * attribute into the database attribute list. * Parameter p_db : database pointer. * p_uuid: pointer to attribute UUID * service : type of attribute to be added. * Returns pointer to the newly allocated attribute.
* Function GATT_Register * Description This function is called to register an application * with GATT * Parameter p_app_uuid128: Application UUID * p_cb_info: callback functions. * Returns 0 for error, otherwise the index of the client registered with GATT
* Function BTA_GATTC_ServiceSearchRequest * Description This function is called to request a GATT service discovery * on a GATT server. This function report service search result * by a callback event, and followed by a service search complete * event. * Parameters conn_id: connection ID. * p_srvc_uuid: a UUID of the service application is interested in. * If Null, discover for all services. * Returns None
* Function BTA_GATTS_AddCharDescriptor * Description This function is called to add characteristic descriptor. When * it's done, a callback event BTA_GATTS_ADD_DESCR_EVT is called * to report the status and an ID number for this descriptor. * Parameters service_id: service ID to which this charatceristic descriptor is to * be added. * perm: descriptor access permission. * p_descr_uuid: descriptor UUID. * Returns returns status.
* Function SDP_FindServiceUUIDInDb * Description This function queries an SDP database for a specific service. * If the p_start_rec pointer is NULL, it looks from the beginning * of the database, else it continues from the next record after * p_start_rec. * NOTE the only difference between this function and the previous function * "SDP_FindServiceInDb()" is that this function takes a tBT_UUID input * Returns Pointer to record containing service class, or NULL
* Function GATTS_CreateService * Description This function is called to reserve a block of handles for a service. * *** It should be called only once per service instance *** * Parameter gatt_if : application if * p_svc_uuid : service UUID * svc_inst : instance of the service inside the application * num_handles : number of handles needed by the service. * is_pri : is a primary service or not. * Returns service handle if sucessful, otherwise 0.
* Function BTA_GATTC_AppRegister * Description This function is called to register application callbacks * with BTA GATTC module. * Parameters p_app_uuid - application UUID * p_client_cb - pointer to the application callback function. * Returns None
* Function BTA_GATTS_AppRegister * Description This function is called to register application callbacks * with BTA GATTS module. * Parameters p_app_uuid - application UUID * p_cback - pointer to the application callback function. * Returns None
* Function bta_gattc_add_attr_to_cache * Description Add an attribute into database cache buffer. * Returns status
* Function bta_gattc_fill_nv_attr * Description fill a NV attribute entry value * Returns None.
* Function bta_gattc_add_srvc_to_list * Description Add a service into explore pending list * Returns status
* Function GATTS_AddCharDescriptor * Description This function is called to add a characteristic descriptor * into a service database. Add descriptor should follow add char * to which it belongs, and next add char should be done only * after all add descriptors for the previous char. * Parameter service_handle : To which service this characteristic descriptor * is added to. * perm : Characteristic value declaration attribute * permission. * p_descr_uuid : Characteristic descriptor UUID * Returns Characteristic descriptor attribute handle. 0 if add * characteristic descriptor failed.
* Function gatt_dbg_display_uuid * Description Disaplay the UUID * Returns None
* Function gatt_sr_is_new_srv_chg * Description Find the app id in on the new service changed list * Returns Pointer to the found new service changed item othwerwise NULL
* Function gatt_find_hdl_buffer_by_app_id * Description Find handle range buffer by app ID, service and service instance ID. * Returns Pointer to the buffer, NULL no buffer available
* Function gatt_sr_find_i_rcb_by_handle * Description The function searches for a service that owns a specific handle. * Returns GATT_MAX_SR_PROFILES if not found. Otherwise index of th eservice.
* Function gatts_internal_read_by_type_req * Description check to see if the ReadByType request can be handled internally. * Returns void
* Function SDP_FindServiceUUIDInRec * Description This function is called to read the service UUID within a record * if there is any. * Parameters: p_rec - pointer to a SDP record. * p_uuid - output parameter to save the UUID found. * Returns TRUE if found, otherwise FALSE.
* Function sdpu_compare_uuid_with_attr * Description This function compares a BT UUID structure with the UUID in an * SDP attribute record. If needed, they are expanded to 128-bit * UUIDs, then compared. * NOTE - it is assumed that BT UUID structures are compressed to the * smallest possible UUIDs (by removing the base SDP UUID). * - it is also assumed that the discovery atribute is compressed * to the smallest possible * Returns TRUE if matched, else FALSE
* Function BTM_HasCustomEirService * Description This function is called to know if UUID is already in custom * UUID list. * Parameters custom_uuid - pointer to custom_uuid array in tBTA_DM_CB * uuid - UUID struct * Returns TRUE - if found * FALSE - if not found
* Function BTM_AddCustomEirService * Description This function is called to add a custom UUID. * Parameters custom_uuid - pointer to custom_uuid array in tBTA_DM_CB * uuid - UUID struct * Returns None
* Function BTM_RemoveCustomEirService * Description This function is called to remove a a custom UUID. * Parameters custom_uuid - pointer to custom_uuid array in tBTA_DM_CB * uuid - UUID struct * Returns None
* Function GATTS_DeleteService * Description This function is called to delete a service. * Parameter gatt_if : application interface * p_svc_uuid : service UUID * svc_inst : instance of the service inside the application * Returns TRUE if operation succeed, FALSE if handle block was not found.
* Function BTA_GATTC_Read_by_type * Description This function is called to read a attribute value by uuid * Parameters conn_id - connection ID. * s_handle - start handle. * e_handle - end handle * uuid - The attribute UUID. * Returns None
* Function gatt_free_srvc_db_buffer_app_id * Description free the service attribute database buffers by the owner of the * service app ID. * Returns None
* Function gatts_init_service_db * Description This function initialize a memory space to be a service database. * Parameter p_db: database pointer. * len: size of the memory space. * Returns Status of the operation.
* Function gatts_add_included_service * Description This function adds an included service into a database. * Parameter p_db: database pointer. * inc_srvc_type: included service type. * Returns Status of the operation.
* Function gatts_add_characteristic * Description This function add a characteristics and its descriptor into * a service identified by the service database pointer. * Parameter p_db: database pointer. * perm: permission (authentication and key size requirements) * property: property of the characteristic. * p_char: characteristic value information. * Returns Status of the operation.
* Function gatts_add_char_descr * Description This function add a characteristics descriptor. * Parameter p_db: database pointer. * perm: characteristic descriptor permission type. * char_dscp_tpye: the characteristic descriptor masks. * p_dscp_params: characteristic descriptors values. * Returns Status of the operation.
* Function gatts_db_read_attr_value_by_type * Description Query attribute value by attribute type. * Parameter p_db: pointer to the attribute database. * p_rsp: Read By type response data. * s_handle: starting handle of the range we are looking for. * e_handle: ending handle of the range we are looking for. * type: Attribute type. * mtu: MTU. * sec_flag: current link security status. * key_size: encryption key size. * Returns Status of the operation.
SDP_INCLUDED == TRUE * Function bta_dm_eir_update_uuid * Description This function adds or removes service UUID in EIR database. * Returns None
* Function bta_gattc_search_service * Description search local cache for matching service record. * Returns FALSE if map can not be found.
* Function bta_gatts_uuid_compare * Description Compare two UUID to see if they are the same. * Returns TRUE if two uuid match; FALSE otherwise.
* Function btm_find_match_custom_uuid_slot * Description Helper function for custom service managing routines. * Parameters custom_uuid - pointer to custom_uuid array in tBTA_DM_CB * uuid - UUID struct * Returns Slot number if given UUID is already in slots array, * otherwise - BTA_EIR_SERVER_NUM_CUSTOM_UUID
* Function gatts_db_add_service_declaration * Description Update a service database service declaration record. * Parameter p_db: database pointer. * service: UUID of the service. * Returns void
* Function bta_gattc_add_srvc_to_cache * Description Add a service into database cache. * Returns status
* Function SDP_FindServiceUUIDInRec_128bit * Description This function is called to read the 128-bit service UUID within a record * if there is any. * Parameters: p_rec - pointer to a SDP record. * p_uuid - output parameter to save the UUID found. * Returns TRUE if found, otherwise FALSE.
* Function BTA_DmDiscoverUUID * Description This function does service discovery for services of a * peer device * Returns void
* Function BTA_SdpSearch * Description This function performs service discovery for a specific service * on given peer device. When the operation is completed * the tBTA_SDP_DM_CBACK callback function will be called with * a BTA_SDP_SEARCH_COMPLETE_EVT. * Returns BTA_SDP_SUCCESS, if the request is being processed. * BTA_SDP_FAILURE, otherwise.
* Function sdpu_build_uuid_seq * Description This function builds a UUID sequence from the list of * passed UUIDs. It is also passed the address of the output * buffer. * Returns Pointer to next byte in the output buffer.
* Function BTA_JvStartDiscovery * Description This function performs service discovery for the services * provided by the given peer device. When the operation is * complete the tBTA_JV_DM_CBACK callback function will be * called with a BTA_JV_DISCOVERY_COMP_EVT. * Returns BTA_JV_SUCCESS, if the request is being processed. * BTA_JV_FAILURE, otherwise.
* Function gatt_is_last_attribute * Description Check this is the last attribute of the specified value or not * Returns TRUE - yes this is the last attribute
* Function gatt_act_send_browse * Description This function ends a browse command request, including read * information request and read by type request. * Returns status code
* Function btm_compare_uuid * Description Helper function for custom service managing routines. * Parameters uuid1 - pointer to the first tBT_UUID struct * uuid2 - pointer to the second tBT_UUID struct * Returns true if UUID structs are identical
* Function btm_find_empty_custom_uuid_slot * Description Helper function for custom service managing routines. * Parameters custom_uuid - pointer to custom_uuid array in tBTA_DM_CB * uuid - UUID struct * Returns Slot number if there is empty slot, * otherwise - BTA_EIR_SERVER_NUM_CUSTOM_UUID
* Function attp_build_browse_cmd * Description Build a read information request or read by type request * Returns None.
* Function gatt_build_primary_service_rsp * Description Primamry service request processed internally. Theretically * only deal with ReadByTypeVAlue and ReadByGroupType. * Returns void
* Function bta_gattc_add_char_to_list * Description Add a characteristic into explore pending list * Returns status
* Function sdpu_compare_bt_uuids * Description This function compares 2 BT UUID structures. * NOTE it is assumed that BT UUID structures are compressed to the * smallest possible UUIDs (by removing the base SDP UUID) * Returns TRUE if matched, else FALSE
* Function gatt_convertchar_descr_type * Description This function convert a char descript UUID into descriptor type. * Returns descriptor type.
* Function BTM_SetDiscoveryParams * Description This function is called to set the BTM default discovery parameters. * These UUID and attribute filters are used during the call to * BTM_StartDiscovery. * Returns void