diff options
author | Srikanth Uppala <suppala@broadcom.com> | 2012-06-17 21:44:48 -0700 |
---|---|---|
committer | Matthew Xie <mattx@google.com> | 2012-07-14 11:19:23 -0700 |
commit | 1144d2b375fc67c9b48298e0ffd774d969cfd2cc (patch) | |
tree | 4d36d4f8be4942d769300c242caeb9b9096c6a35 /btif | |
parent | fed66f7b66d29da466e2e67befe3238e7ed8fc6a (diff) | |
download | external_bluetooth_bluedroid-1144d2b375fc67c9b48298e0ffd774d969cfd2cc.zip external_bluetooth_bluedroid-1144d2b375fc67c9b48298e0ffd774d969cfd2cc.tar.gz external_bluetooth_bluedroid-1144d2b375fc67c9b48298e0ffd774d969cfd2cc.tar.bz2 |
resubmit code-cleanup changes lost in gerrit merge
Change-Id: Iebc520d9b10ef220a83a16ff55efa46b4c5a0d27
Diffstat (limited to 'btif')
-rw-r--r-- | btif/co/bta_fs_co.c | 2 | ||||
-rw-r--r-- | btif/include/btif_av_api.h | 3 | ||||
-rwxr-xr-x | btif/src/btif_av.c | 6 | ||||
-rwxr-xr-x | btif/src/btif_rc.c | 4 | ||||
-rw-r--r-- | btif/src/btif_sock_sdp.c | 145 |
5 files changed, 4 insertions, 156 deletions
diff --git a/btif/co/bta_fs_co.c b/btif/co/bta_fs_co.c index 0ba35bd..8834555 100644 --- a/btif/co/bta_fs_co.c +++ b/btif/co/bta_fs_co.c @@ -58,8 +58,6 @@ #include "gki.h" #include "bta_fs_co.h" #include "bta_fs_ci.h" -//#include "btui.h" -//#include "btui_int.h" #include <inttypes.h> #ifndef AID_SYSTEM diff --git a/btif/include/btif_av_api.h b/btif/include/btif_av_api.h index 9f9beeb..4cee7b5 100644 --- a/btif/include/btif_av_api.h +++ b/btif/include/btif_av_api.h @@ -64,8 +64,7 @@ #include "btif_media.h" #include "a2d_api.h" #include "a2d_sbc.h" -#include "a2d_m12.h" -#include "a2d_m24.h" + /***************************************************************************** ** Constants and data types diff --git a/btif/src/btif_av.c b/btif/src/btif_av.c index 3096629..512ae61 100755 --- a/btif/src/btif_av.c +++ b/btif/src/btif_av.c @@ -938,11 +938,6 @@ bt_status_t btif_av_execute_service(BOOLEAN b_enable) { if (b_enable) { -#if (AVRC_METADATA_INCLUDED == TRUE) - BTA_AvEnable(BTA_SEC_AUTHENTICATE|BTA_SEC_AUTHORIZE, - BTA_AV_FEAT_RCTG|BTA_AV_FEAT_METADATA|BTA_AV_FEAT_VENDOR, - bte_av_callback); -#else /* TODO: Removed BTA_SEC_AUTHORIZE since the Java/App does not * handle this request in order to allow incoming connections to succeed. * We need to put this back once support for this is added */ @@ -952,7 +947,6 @@ bt_status_t btif_av_execute_service(BOOLEAN b_enable) * be initiated by the app/audioflinger layers */ BTA_AvEnable(BTA_SEC_AUTHENTICATE, (BTA_AV_FEAT_RCTG | BTA_AV_FEAT_NO_SCO_SSPD), bte_av_callback); -#endif BTA_AvRegister(BTA_AV_CHNL_AUDIO, BTIF_AV_SERVICE_NAME, 0); } else { diff --git a/btif/src/btif_rc.c b/btif/src/btif_rc.c index 9a0d0ee..a3f631a 100755 --- a/btif/src/btif_rc.c +++ b/btif/src/btif_rc.c @@ -67,12 +67,8 @@ /***************************************************************************** ** Constants & Macros ******************************************************************************/ -#if (!defined(AVRC_METADATA_INCLUDED) || (AVRC_METADATA_INCLUDED == FALSE)) #define BTIF_RC_USE_UINPUT TRUE #include "uinput.h" -#else -#error "AVRCP 1.3 is not supported on Bluedroid yet." -#endif /* cod value for Headsets */ #define COD_AV_HEADSETS 0x0404 diff --git a/btif/src/btif_sock_sdp.c b/btif/src/btif_sock_sdp.c index c441df0..b2553e0 100644 --- a/btif/src/btif_sock_sdp.c +++ b/btif/src/btif_sock_sdp.c @@ -78,9 +78,8 @@ #include "btm_int.h" #include "btif_sock_sdp.h" #include "utl.h" -#include "../bta/ft/bta_fts_int.h" #include "../bta/pb/bta_pbs_int.h" -#include "../bta/op/bta_ops_int.h" +#include "../include/bta_op_api.h" #include <cutils/log.h> #define info(fmt, ...) LOGI ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) #define debug(fmt, ...) LOGD ("%s: " fmt,__FUNCTION__, ## __VA_ARGS__) @@ -100,140 +99,11 @@ static const UINT8 UUID_OBEX_OBJECT_PUSH[] = {0x00, 0x00, 0x11, 0x05, 0x00, 0x0 static const UINT8 UUID_PBAP_PSE[] = {0x00, 0x00, 0x11, 0x2F, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB}; -static const UINT8 UUID_OBEX_FILE_TRANSFER[] = {0x00, 0x00, 0x11, 0x06, 0x00, 0x00, 0x10, 0x00, - 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB}; -#define IS_UUID(u1,u2) !memcmp(u1,u2,UUID_MAX_LENGTH) - -static int add_ftp_sdp(const char *p_service_name, int scn) -{ - tSDP_PROTOCOL_ELEM protoList [3]; - UINT16 ftp_service = UUID_SERVCLASS_OBEX_FILE_TRANSFER; - UINT16 browse = UUID_SERVCLASS_PUBLIC_BROWSE_GROUP; - BOOLEAN status = FALSE; - int sdp_handle; - - info("scn: %d, service name: %s", scn, p_service_name); - tBTA_UTL_COD cod; - - - /* also set cod service bit for now */ - cod.service = BTM_COD_SERVICE_OBJ_TRANSFER; - utl_set_device_class(&cod, BTA_UTL_SET_COD_SERVICE_CLASS); - - if ((sdp_handle = SDP_CreateRecord()) == 0) - { - error("FTS SDP: Unable to register FTP Service"); - return sdp_handle; - } - - /* add service class */ - if (SDP_AddServiceClassIdList(sdp_handle, 1, &ftp_service)) - { - /* add protocol list, including RFCOMM scn */ - protoList[0].protocol_uuid = UUID_PROTOCOL_L2CAP; - protoList[0].num_params = 0; - protoList[1].protocol_uuid = UUID_PROTOCOL_RFCOMM; - protoList[1].num_params = 1; - protoList[1].params[0] = scn; - protoList[2].protocol_uuid = UUID_PROTOCOL_OBEX; - protoList[2].num_params = 0; - - if (SDP_AddProtocolList(sdp_handle, 3, protoList)) - { - status = TRUE; /* All mandatory fields were successful */ - - /* optional: if name is not "", add a name entry */ - if (*p_service_name != '\0') - SDP_AddAttribute(sdp_handle, - (UINT16)ATTR_ID_SERVICE_NAME, - (UINT8)TEXT_STR_DESC_TYPE, - (UINT32)(strlen(p_service_name) + 1), - (UINT8 *)p_service_name); - - /* Add in the Bluetooth Profile Descriptor List */ - SDP_AddProfileDescriptorList(sdp_handle, - UUID_SERVCLASS_OBEX_FILE_TRANSFER, - BTA_FTS_DEFAULT_VERSION); - - } /* end of setting mandatory protocol list */ - } /* end of setting mandatory service class */ - - /* Make the service browseable */ - SDP_AddUuidSequence (sdp_handle, ATTR_ID_BROWSE_GROUP_LIST, 1, &browse); - - if (!status) - { - SDP_DeleteRecord(sdp_handle); - sdp_handle = 0; - error("bta_fts_sdp_register FAILED"); - } - else - { - bta_sys_add_uuid(ftp_service); /* UUID_SERVCLASS_OBEX_FILE_TRANSFER */ - error("FTS: SDP Registered (handle 0x%08x)", sdp_handle); - } - - return sdp_handle; -} - - -static int add_spp_sdp(const char *service_name, int scn) -{ -#if 0 - tSPP_STATUS status = SPP_SUCCESS; - UINT16 serviceclassid = UUID_SERVCLASS_SERIAL_PORT; - tSDP_PROTOCOL_ELEM proto_elem_list[SPP_NUM_PROTO_ELEMS]; - int sdp_handle; - - info("scn %d, service name %s", scn, service_name); - /* register the service */ - if ((sdp_handle = SDP_CreateRecord()) != FALSE) - { - /*** Fill out the protocol element sequence for SDP ***/ - proto_elem_list[0].protocol_uuid = UUID_PROTOCOL_L2CAP; - proto_elem_list[0].num_params = 0; - proto_elem_list[1].protocol_uuid = UUID_PROTOCOL_RFCOMM; - proto_elem_list[1].num_params = 1; - - proto_elem_list[1].params[0] = scn; - - if (SDP_AddProtocolList(sdp_handle, SPP_NUM_PROTO_ELEMS, - proto_elem_list)) - { - if (SDP_AddServiceClassIdList(sdp_handle, 1, &serviceclassid)) - { - if ((SDP_AddAttribute(sdp_handle, ATTR_ID_SERVICE_NAME, - TEXT_STR_DESC_TYPE, (UINT32)(strlen(service_name)+1), - (UINT8 *)service_name)) == FALSE) - - status = SPP_ERR_SDP_ATTR; - else - { - UINT16 list[1]; +#define IS_UUID(u1,u2) !memcmp(u1,u2,UUID_MAX_LENGTH) - /* Make the service browseable */ - list[0] = UUID_SERVCLASS_PUBLIC_BROWSE_GROUP; - if ((SDP_AddUuidSequence (sdp_handle, ATTR_ID_BROWSE_GROUP_LIST, - 1, list)) == FALSE) - status = SPP_ERR_SDP_CLASSID; - } - } - else - status = SPP_ERR_SDP_CLASSID; - } - else - status = SPP_ERR_SDP_PROTO; - } - else - status = SPP_ERR_SDP_REG; - - return spb_handle; -#endif - return 0; -} #define BTM_NUM_PROTO_ELEMS 2 static int add_sdp_by_uuid(const char *name, const uint8_t *service_uuid, UINT16 channel) { @@ -410,11 +280,9 @@ static int add_ops_sdp(const char *p_service_name,int scn) tSDP_PROTOCOL_ELEM protoList [BTA_OPS_PROTOCOL_COUNT]; - tOBX_StartParams start_params; UINT16 servclass = UUID_SERVCLASS_OBEX_OBJECT_PUSH; int i, j; tBTA_UTL_COD cod; - tOBX_STATUS status; UINT8 desc_type[BTA_OPS_NUM_FMTS]; UINT8 type_len[BTA_OPS_NUM_FMTS]; UINT8 *type_value[BTA_OPS_NUM_FMTS]; @@ -512,12 +380,6 @@ static int add_rfc_sdp_by_uuid(const char* name, const uint8_t* uuid, int scn) { handle = add_pbap_sdp(name, final_scn); //PBAP Server is always 19 } - else if (IS_UUID(UUID_OBEX_FILE_TRANSFER,uuid)) - { - APPL_TRACE_EVENT0("Stopping btld ftp serivce when 3-party registering ftp service"); - //BTA_FtsDisable(); - handle = add_sdp_by_uuid(name, uuid, final_scn); - } else { handle = add_sdp_by_uuid(name, uuid, final_scn); @@ -563,8 +425,7 @@ int add_rfc_sdp_rec(const char* name, const uint8_t* uuid, int scn) case RESERVED_SCN_OPS: add_ops_sdp(name,scn); break; - default://serial port profile - sdp_handle = add_spp_sdp(name, scn); + default: break; } } |