unplugged-vendor/system/bt/mediatek/include/interop_mtk.h

679 lines
29 KiB
C

/* Copyright Statement:
* *
* * This software/firmware and related documentation ("MediaTek Software") are
* * protected under relevant copyright laws. The information contained herein
* * is confidential and proprietary to MediaTek Inc. and/or its licensors.
* * Without the prior written permission of MediaTek inc. and/or its licensors,
* * any reproduction, modification, use or disclosure of MediaTek Software,
* * and information contained herein, in whole or in part, shall be strictly prohibited.
* *
* * MediaTek Inc. (C) 2016. All rights reserved.
* *
* * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
* * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
* * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER ON
* * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
* * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
* * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
* * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
* * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
* * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH
* * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES
* * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES
* * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK
* * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
* * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND
* * CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
* * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
* * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO
* * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
* *
* * The following software/firmware and/or related documentation ("MediaTek Software")
* * have been modified by MediaTek Inc. All revisions are subject to any receiver's
* * applicable license agreements with MediaTek Inc.
* */
#pragma once
/******************************************************************************
*
* This file contains functions for the MTK defined interop function
*
******************************************************************************/
#include "raw_address.h"
#if defined(MTK_INTEROP_EXTENSION) && (MTK_INTEROP_EXTENSION == TRUE)
#if MTK_INTEROP_CONF == 1
static const char MTK_IOT_LIST_MODULE[] = "mtk_iot_list_module";
#endif
/****************************************************************************
* **
* ** Section definition for GATT
* **
* ***************************************************************************/
// Some LE devices have proven problematic behaviour if LE connection update is initiated with
// them, resulting in no response after initiating LE connection update and ultimately resulting
// in connection timeout. LE connection update is not requested explictly for those devices.
#define INTEROP_MTK_LE_DISABLE_CONN_UPDATES "MtkLeDisableConnUpdates"
// Some LE devices can not support EATT, and did not respond to quering Server Supported Features.
// So we should not query Server Supported Features for these devices
#define INTEROP_MTK_LE_DISABLE_EATT "MtkLeDisableEatt"
/****************************************************************************
* **
* ** Section definition for SM
* **
* ***************************************************************************/
// Disable secure connections
// This is for pre BT 4.1/2 devices that do not handle secure mode
// very well.
#define INTEROP_MTK_SM_DISABLE_LE_SECURE_CONNECTIONS \
"MtkSmDisableLeSecureConnections"
/****************************************************************************
* **
* ** Section definition for HOGP
* **
* ***************************************************************************/
// Some device like Arc Touch BT Mouse will behave abnormally if their required
// interval which is less than BTM_BLE_CONN_INT_MIN_LIMIT is rejected
#define INTEROP_MTK_LE_CONN_INT_MIN_LIMIT_ACCEPT "MtkLeConnIntMinLimitAccept"
// Some device like Mad/Designer Mouse will request their
// interval to BTM_BLE_CONN_INT_MIN, this will have low
// power or unsmoothy issue(ALPS04221340/ALPS04226407)
// We should adjust their interval to BTM_BLE_CONN_INT_MIN_LIMIT
#define INTEROP_MTK_LE_CONN_INT_MIN_LIMIT_ADJUST "MtkLeConnIntMinLimitAdjust"
// Devices like BSMBB09DS request a large slave latency which will slow down
// the data transmission or break the link during profile establishment. So adjust
// the slave latency to default value
#define INTEROP_MTK_LE_CONN_LATENCY_ADJUST "MtkLeConnLatencyAdjust"
// Some device like ELECOM cannot handle fast connection procedure
#define INTEROP_MTK_LE_DISABLE_FAST_CONNECTION "MtkLeDisableFastConnection"
// Some device like STARKEY cannot handle set phy
#define INTEROP_MTK_LE_DISABLE_SET_PHY "MtkLeDisableSetPhy"
// Some device like ELECOM cann't handle the peripheral pereferred connection
// parameters update procedure
#define INTEROP_MTK_LE_DISABLE_PREF_CONN_PARAMS "MtkLeDisablePrefConnParams"
// Some device will be deemed as DUMO
#define INTEROP_MTK_LE_DEVICE_TYPE_ADJUST "MtkLeDeviceTypeAdjust"
// Some device will not request connection-parameter-update. Need initial a setting
#define INTEROP_MTK_HOGP_SET_CONN_MIN "MtkHogpSetConnMin"
#define INTEROP_MTK_HOGP_SET_CONN_1125 "MtkHogpSetConn1125"
// Some device like FeiZhi joypad cannot handle fast connection procedure twice
#define INTEROP_MTK_LE_AVOID_DO_FAST_CONNECTION_TWICE "MtkLeAvoidDoFastConnectionTwice"
/****************************************************************************
* **
* ** Section definition for HFP
* **
* ***************************************************************************/
// Some devices has the special request for
// opening the sco time, so work around for these devices
#define INTEROP_MTK_HFP_DELAY_OPEN_SCO "MtkHfpDelayOpenSco"
// Some device has IOT issue for HFP. Turn off bt during ring call, then
// answer call and turn on bt, the end call UI display on Carkit;
// So work around delay open sco to avoid this issue;
#define INTEROP_MTK_HFP_DELAY_SCO_IN_ACT "MtkHfpDelayScoInAct"
// Some device has IOT issue for HFP 1.7 version.
// Back to 1.6 for this devices.
#define INTEROP_MTK_HFP_17_TO_16 "MtkHfp17To16"
// When HFP local default version fallback to 1.6,
// dynamically upgrade to 1.7 for devices that support 1.7.
#define INTEROP_MTK_HFP_17_WHITELIST "MtkHfp17WhiteList"
// Some device has issue when setup eSCO, so force to
// use SCO instead.
#define INTEROP_MTK_HFP_FORCE_TO_USE_SCO "MtkHfpForceToUseSco"
// Some device will no voice when using mSBC codec, so
// force to use CVSD.
#define INTEROP_MTK_HFP_FORCE_TO_USE_CVSD "MtkHfpForceToUseCvsd"
// Some device will delay voice in calling after disconnect and reconnect, so
// don't do codec nego.
#define INTEROP_MTK_HFP_DO_NOT_DO_CODEC_NEGO "MtkHfpDoNotDoCodecNego"
// Some device will have no voice issue, need to delay some time
// to setup sco after call active.
#define INTEROP_MTK_HFP_DELAY_SCO_AFTER_ACTIVE "MtkHfpDelayScoAfterActive"
// Host sends SCO request right after CIEV2,2, but FW will send SCO request
// first ad then CIEV2,2, because LMP has higher priority than ACL-U.
// Some devices may cannot resolve this order and no voice come out.
#define INTEROP_MTK_HFP_DELAY_SCO_FOR_MO_CALL "MtkHfpDelayScoForMoCall"
// Some device need to enabel inband ring.
#define INTEROP_MTK_HFP_INBAND_RINGING_ENABLE "MtkHfpInbandRingingEnable"
// Some device need to disabel inband ring.
#define INTEROP_MTK_HFP_INBAND_RINGING_DISABLE "MtkHfpInbandRingingDisable"
// Some device has no voice issue during second call, so force to
// send ciev 1,1 after accept second call.
#define INTEROP_MTK_HFP_UPDATE_SECOND_CALLSTATE "MtkHfpUpdateSecondCallstate"
// Can't disconnect SCO when we exit sniff mode closed to disconnect
// SCO in CAR AUDIO
#define INTEROP_MTK_HFP_DELAY_DISC_SCO "MtkHfpDelayDiscSco"
//Some device needs to create SCO right after receiving ATA command
#define INTEROP_MTK_HFP_CREATE_SCO_AFTER_ATA "MtkHfpCreateScoAfterAta"
// In-band ringing enabled, host sends SCO request right after CIEV2,1,
// but FW will send SCO request first ad then CIEV2,1, because LMP has
// higher priority than ACL-U. Some devices may cannot resolve this order
// and no voice come out.
#define INTEROP_MTK_HFP_DELAY_SCO_FOR_MT_CALL "MtkHfpDelayScoForMtCall"
// Some device will change the audio path to speaker shortly when answer active call
// change to answer the held call, disable to send +CIEV:7,2 command for those devices
#define INTEROP_MTK_HFP_NO_REPORT_CIEV_7_2 "MtkHfpNoReportCiev72"
// Some device will need more time to response codec negotiation
// we will extend the timeout to 10s
#define INTEROP_MTK_HFP_EXTENDED_CODEC_TIMEOUT "MtkHfpExtendedCodecTimeout"
//Some headset will create SCO ev3, FW can't handle this SCO when being slave
#define INTEROP_MTK_GAP_ROLE_SWITCH "MtkGapRoleSwitch"
// Some device will need complete sdp discovery before disconnected
#define INTEROP_MTK_HFP_KEEP_SDP_DISC "MtkHfpKeepSdpDisc"
// Some device can not work correctly when DUT being slave
#define INTEROP_MTK_LINK_POLICY_DISABLE_ROLE_SWITCH "MtkLinkPolicyDisableRoleSwitch"
// Some device do A2DP connection before SLC finished will get fail.
#define INTEROP_MTK_HFP_POSTPONE_A2DP_CREATE_CONNECTION "MtkHfpPostponeA2dpCreateConnection"
// Some device do not respond BCS command.
#define INTEROP_MTK_HFP_RESEND_BCS "MtkHfpResendBcs"
// If there is SCO when disable In-band ringtone,
// the peer device will play the ringtone after the call is answered.
#define INTEROP_MTK_HFP_NO_IN_BAND_RINGTONE_CLOSE_SCO "MtkHfpNoInBandRingtoneCloseSco"
// Some devices needs to set security level before connect HFP.
#define INTEROP_MTK_HFP_SET_SECURITY_LEVEL "MtkHfpSetSecurityLevel"
// Some devices do not support HF indicators.
#define INTEROP_MTK_HFP_NOT_SUPPORT_HF_INDICATORS "MtkHfpNotSupportHfIndicators"
// Some devices do not support eSCO S4.
#define INTEROP_MTK_HFP_NOT_SUPPORT_ESCO_S4 "MtkHfpNotSupportEscoS4"
// Some devices can directly use MSBC.
#define INTEROP_MTK_HFP_USE_MSBC "MtkHfpUseMsbc"
// Some devices need to do codec nego.
#define INTEROP_MTK_HFP_FORCE_TO_DO_CODEC_NEGO "MtkHfpForceToDoCodecNego"
// Some devices need to delay SCO creation from AG after codec nego
#define INTEROP_MTK_HFP_DELAY_SCO_CREATION "MtkHfpDelayScoCreation"
/****************************************************************************
* **
* ** Section definition for HID
* **
* ***************************************************************************/
// Some HID devices have issue if SDP is initiated while HID connection is in
// progress
#define INTEROP_MTK_GAP_DISABLE_SDP "MtkGapDisableSdpBlacklist"
// Not do sniif mode for HID profile.
#define INTEROP_MTK_GAP_NOT_DO_SNIFF_SUBRATING "MtkGapNotDoSniffSubrating"
// Partial devices support HID service but they won't use it.
#define INTEROP_MTK_SDP_PEER_NOT_USE_HID "MtkSdpPeerNotUseHid"
// Handle Set Report response.
#define INTEROP_MTK_HID_SETREPORT_RESPONSE "MtkHidSetreportResponse"
/****************************************************************************
* **
* ** Section definition for PAN NAP
* **
* ***************************************************************************/
// Ignore car kit NAP capability, and then phone will not try to connect
// carkit's NAP neteork
#define INTEROP_MTK_PAN_NAP_IGNORE_PEER_NAP_CAPABILITY "MtkPanNapIgnorePeerNapCapability"
/****************************************************************************
* **
* ** Section definition for A2DP
* **
* ***************************************************************************/
// Some special device want perform START cmd itself first
// If it not send START cmd, will close current link.
// So for this special device, we need delay send A2DP START cmd
// which from DUT to receive the special device cmd.
#define INTEROP_MTK_A2DP_DELAY_START_CMD "MtkA2dpDelayStartCmd"
// Some device will delay send A2DP signaling. It will occur A2DP connection
// conflict. Change accept signaling time out value for above devices.
#define INTEROP_MTK_A2DP_CHANGE_ACCEPT_SIGNALLING_TMS \
"MtkA2dpChangeAcceptSignallingTms"
// Some BT devices are less compatible in the market, for example,
// some devices like connect A2DP ASAP, but others are opposite.
// Add this blacklist to adapter this case.
#define INTEROP_MTK_A2DP_ADVANCED_A2DP_CONNECT "MtkA2dpAdvancedA2dpConnect"
//Some BT device send delay report continuously when a2dp suspend,
//or send delay report continuously when a2dp start,this cause high current.
#define INTEROP_MTK_A2DP_DISABLE_DELAY_REPORT "MtkA2dpDisableDelayReport"
// Add a2dp AAC black list,disable aac codec
#define INTEROP_MTK_A2DP_DISABLE_AAC_CODEC "MtkA2dpDisableAacCodec"
//Some BT device shloud delay avdtp discovery
#define INTEROP_MTK_A2DP_DELAY_DISCOVER "MtkA2dpDelayDiscover"
//Some device do role switch when a2dp started,lead to a2dp chopping
//set link policy is disable role switch
#define INTEROP_MTK_A2DP_DISABLE_ROLE_SWITCH_WHEN_A2DP_START "MtkA2dpDisableRoleSwitchWhenA2dpStart"
// Max bitrate 660kbps for some IOT device
#define INTEROP_MTK_A2DP_LDAC_ABR_MAX_660 "MtkA2dpLdacAbrMax660"
// Max bitrate 330kbps for some IOT device
#define INTEROP_MTK_A2DP_LDAC_NO_ABR_MAX_330 "MtkA2dpLdacNoAbrMax330"
//Don't query mandatroty codec priority for specail IOT device
#define INTEROP_MTK_A2DP_DISABLE_QUERY_MANDATORY_CODEC "MtkA2dpDisableQueryMandatoryCodec"
// Disable AAC VBR for some IOT device
#define INTEROP_MTK_A2DP_DISABLE_AAC_VBR "MtkA2dpDisableAacVbr"
// Delay output media data for some IOT device
#define INTEROP_MTK_A2DP_DELAY_STREAM_OUTPUT "MtkA2dpDelayStreamOutput"
// Disable 3Mbps packets and use only 2Mbps packets for ACL links when
// streaming audio.
#define INTEROP_MTK_A2DP_2MBPS_LINK_ONLY "MtkA2dp2mbpsLinkOnly"
// Do role switch when A2dp start.
#define INTEROP_MTK_A2DP_DO_ROLE_SWITCH_WHEN_START "MtkA2dpDoRoleSwitchWhenStart"
// Enable auto flush function.
#define INTEROP_MTK_A2DP_AUTO_FLUSH "MtkA2dpAutoFlush"
// Some BT sink device signalling would be failed because it set
//wrong samplerate to DUT. so DUT start signnaling event avdtp ch connected by peer.
#define INTEROP_MTK_A2DP_DUT_QUICK_SIGNALLING "MtkA2dpDutQuickSignalling"
// Some sink device not support mono ch even its sep says supports, however when send mono ch
// it would make noise.
#define INTEROP_MTK_DUALAUDIO_NOTSUPPORT_LRMODE "MtkDualaudioNotsupportLrmode"
// Some car-kit will reject SET_CONFIGURATION when switch codec
// send SET_CONFIGURATION request after receive remote L2CAP disconnected RSP
#define INTEROP_A2DP_L2C_DIS_FLOW "MtkA2dpL2cDisFlow"
/****************************************************************************
* **
* ** Section definition for RFCOMM
* **
* ***************************************************************************/
// Some devices can not parse multi AT commands in one rfcomm packet.
// So, send data separately.
#define INTEROP_MTK_RFCOMM_FORBID_COMBINE_RFCOMM_DATA "MtkRfcommForbidCombineRfcommData"
// Some devices will send SABM on DLCIs other than 0 lately.
// So, extend the timer to wait for it.
#define INTEROP_MTK_RFCOMM_EXTEND_MCB_RELEASE_TIMER "MtkRfcommExtendMcbReleaseTimer"
// Some devices won't send ACL packet to add Tx credits
// So, add Tx credits automatically after one second
#define INTEROP_MTK_RFCOMM_ADD_CREDIT_AUTOMATICALLY "MtkRfcommAddCreditAutomatically"
// Some devices can't handle the collision
// So, we just accept the incoming connection from peer
#define INTEROP_MTK_RFCOMM_COLLISION_ACCEPT_PEER "MtkRfcommCollisionAcceptPeer"
/****************************************************************************
* **
* ** Section definition for L2CAP
* **
* ***************************************************************************/
// Some devices cannot work normal as a master if the connection is initiated by
// them self
#define INTEROP_MTK_L2CAP_ACCEPT_CONN_AS_MASTER "MtkL2capAcceptConnAsMaster"
// Some device cannot work normal as a slave if the connection is established by
// themself.
#define INTEROP_MTK_L2CAP_ACCEPT_CONN_AS_SLAVE "MtkL2capAcceptConnAsSlave"
// Not restart ACL link when link down
#define INTEROP_MTK_L2CAP_NOT_RESTART_ACL "MtkL2capNotRestartAcl"
// Some Carkit will use BR over LE and it will cause l2cap did not stop the timer, and trigger Host sent HCI_Disconnect command
#define INTEROP_MTK_L2CAP_BR_OVER_LE "MtkL2capBrOverLe"
// Some Carkit can't handle 1 byte SDU and disconnect avrcp broswing channel when do arcp broswing
#define INTEROP_MTK_L2CAP_NOT_SEND_1BYTE_SDU "MtkL2capNotSend1byteSdu"
/****************************************************************************
* **
* ** Section definition for GAP
* **
* ***************************************************************************/
// Disable automatic pairing with headsets/car-kits
// Some car kits do not react kindly to a failed pairing attempt and
// do not allow immediate re-pairing. Blacklist these so that the initial
// pairing attempt makes it to the user instead.
#define INTEROP_MTK_GAP_DISABLE_AUTO_PAIRING "MtkGapDisableAutoPairing"
// Forbidden to do role switch for some devices.
#define INTEROP_MTK_GAP_DISABLE_ROLE_SWITCH "MtkGapDisableRoleSwitch"
// Uncheck service sercurity requirements for special device
// because they did not initiate authentication procedure during
// their reconnect.
#define INTEROP_MTK_GAP_DISABLE_SERVICE_SECURITY_CHECK \
"MtkGapDisableServiceSecurityCheck"
// M557 mouse seldomly claims SSP is not supported in its extended features,
// but actually it really wants SSP.
#define INTEROP_MTK_GAP_FORCED_SSP "MtkGapForcedSsp"
// JBL GO will send Authentication_Requested to restart authentication
// procedure after Authentication_Complete
#define INTEROP_MTK_GAP_AUTO_ACCEPT_SSP "MtkGapAutoAcceptSsp"
// Some device like JBL LIVE 200BT can't handle too many LMP packet
// so we delay the authentication cmd
#define INTEROP_MTK_GAP_DELAY_AUTHENTICATION "MtkGapDelayAuthentication"
// Special bluetooth HID device cannot reconnect with Phone because of RNR conflict.
#define INTEROP_MTK_GAP_DISABLE_REFRESH_RNR_ON_ACL "MtkGapDisableRefreshRnrOnAcl"
// Some device will act abnormal when it's not slave role, therefore we disallow role with
// when create connection
#define INTEROP_MTK_GAP_CRT_CONN_NOT_ALLOW_SWITCH_ROLE "MtkGapCrtConnNotAllowSwitchRole"
// Some device will disconnect during services discovery, then reconnect
#define INTEROP_MTK_GAP_DISABLE_RETRY_SDP "MtkGapDisableRetrySdp"
// Set High Power Mode for specific devices
#define INTEROP_MTK_GAP_SET_HPM "MtkGapSetHpm"
// Prevent role switch when the link is using A2DP streaming
#define INTEROP_MTK_GAP_DISABLE_ROLE_SWITCH_WITH_A2DP "MtkGapDisableRoleSwitchWithA2dp"
/****************************************************************************
* **
* ** Section definition for AVRCP
* **
* ***************************************************************************/
// Devices requiring this workaround do not handle Bluetooth Absolute Volume
// control correctly, leading to undesirable (potentially harmful) volume
// levels or general lack of controlability.
#define INTEROP_MTK_AVRCP_DISABLE_ABSOLUTE_VOLUME "MtkAvrcpDisableAbsoluteVolume"
// Some device do not update position progress when get DUT paused status.
// In this case, we will also update the play status to unactive device.
#define INTEROP_MTK_AVRCP_UPDATE_PLAY_STATUS_TO_UNACTIVE_DEVICE \
"MtkAvrcpUpdatePlayStatusToUnactiveDevice"
// Some device not support avrcp1.5, we need use avrcp1.3 to response
#define INTEROP_MTK_AVRCP13_USE "MtkAvrcp13Use"
// Some device do not support avrcp1.5 very good.
// we need use avrcp1.4 to response
#define INTEROP_MTK_AVRCP14_USE "MtkAvrcp14Use"
// We connect avrcp 100ms after a2dp connected
#define INTEROP_MTK_AVRCP_START_3500_MS \
"MtkAvrcpStart3500Ms"
// send extra track changed to sync song information
#define INTEROP_MTK_AVRCP_SEND_EXTRA_TRACK_CHANGE \
"MtkAvrcpSendExtraTrackChange"
// Some carkit don't support app settings feature. It will still send cmds.
// and if we response correctly, it can't send key to DUT.
#define INTEROP_MTK_AVRCP_NO_APP_SETTINGS \
"MtkAvrcpNoAppSettings"
// carkit use audio state will cause UI delay show pause
#define INTEROP_MTK_AVRCP_USE_MUSIC_ONLY \
"MtkAvrcpUseMusicOnly"
// carkit need a2dp state to avoid send play key
#define INTEROP_MTK_AVRCP_USE_A2DP_ONLY \
"MtkAvrcpUseA2dpOnly"
#define INTEROP_MTK_AVRCP_USE_FAKE_ID "MtkAvrcpUseFakeId"
#define INTEROP_MTK_AVRCP_UPDATE_TRACK_WHEN_RVD_PLAY \
"MtkAvrcpUpdateTrackWhenRvdPlay"
#define INTEROP_MTK_AVRCP_SEND_TRACK_WHEN_A2DP_START "MtkAvrcpSendTrackWhenA2dpStart"
/****************************************************************************
* **
* ** Section definition for PBAP
* **
* ***************************************************************************/
//pbap 1.1
#define INTEROP_MTK_SDP_PBAP_1_1 "MtkSdpPbap11"
/****************************************************************************
* **
* ** Section definition for SDP
* **
* ***************************************************************************/
#define INTEROP_MTK_SDP_SERIALIZE_CLIENT_SERVER "MtkSdpSerializeClientServer"
/******************************************************************************
**
** Function interop_mtk_match_name
**
** Description Looks up the address blacklist with the specified config
** section.
**
** Returns TRUE if matched, else FALSE
**
*******************************************************************************/
extern bool interop_mtk_match_addr(const char* section, const RawAddress* addr);
/******************************************************************************
**
** Function interop_mtk_match_name
**
** Description Looks up the name blacklist with the specified config
** section.
**
** Returns TRUE if matched, else FALSE
**
*******************************************************************************/
extern bool interop_mtk_match_name(const char* section, const RawAddress* addr);
/******************************************************************************
**
** Function interop_mtk_match_name
**
** Description Looks up the name blacklist with the specified config
** section.
**
** Returns TRUE if matched, else FALSE
**
*******************************************************************************/
extern bool interop_mtk_match_name(const char* section, const char* name);
/*******************************************************************************
**
** Function interop_mtk_match_addr_name
**
** Description Looks up the address blacklist and name blacklist with the
** specified config section.
**
** Returns TRUE if matched, else FALSE
**
*******************************************************************************/
extern bool interop_mtk_match_addr_name(const char* section, const RawAddress* addr);
/** M: New feature: add device information to black list {@ */
/*******************************************************************************
**
** Function interop_mtk_set_addr
**
** Description Update or add the address blacklist with the
** specified config section.
**
** Returns TRUE if save ok or already exist, else FALSE
**
*******************************************************************************/
extern bool interop_mtk_set_addr(const char* section, const RawAddress* addr, int size);
/*******************************************************************************
**
** Function interop_mtk_set_name
**
** Description Update or add name blacklist with the
** specified config section.
**
** Returns TRUE if save ok or already exist, else FALSE
**
*******************************************************************************/
extern bool interop_mtk_set_name(const char* section, const char* name);
/*******************************************************************************
**
** Function interop_mtk_set_partial_name
**
** Description Update or add partial name blacklist with the
** specified config section.
**
** Returns TRUE if save ok or already exist, else FALSE
**
*******************************************************************************/
extern bool interop_mtk_set_partial_name(const char* section, const char* name);
/******************************************************************************
**
** Function interop_mtk_match_lmp_ver
**
** Description Looks up the version blacklist with the specified config
** section.
**
** Returns TRUE if matched, else FALSE
**
*******************************************************************************/
extern bool interop_mtk_match_lmp_ver(const char* section, const RawAddress* addr);
/******************************************************************************
**
** Function interop_mtk_match_mfct
**
** Description Looks up the version blacklist with the specified config
** section.
**
** Returns TRUE if matched, else FALSE
**
*******************************************************************************/
extern bool interop_mtk_match_mfct(const char* section, const RawAddress* addr);
/******************************************************************************
**
** Function interop_mtk_match_lmp_subver
**
** Description Looks up the version blacklist with the specified config
** section.
**
** Returns TRUE if matched, else FALSE
**
*******************************************************************************/
extern bool interop_mtk_match_lmp_subver(const char* section, const RawAddress* addr);
/******************************************************************************
**
** Function interop_mtk_match_ver
**
** Description Looks up the version blacklist with the specified config
** section.
**
** Returns TRUE if matched, else FALSE
**
*******************************************************************************/
extern bool interop_mtk_match_ver(const char* section, const RawAddress* addr);
/*******************************************************************************
**
** Function interop_mtk_set_ver
**
** Description Update or add the version blacklist with the
** specified config section.
**
** Returns TRUE if save ok or already exist, else FALSE
**
*******************************************************************************/
extern bool interop_mtk_set_ver(const char* section, const RawAddress* addr);
/******************************************************************************
**
** Function interop_mtk_match_any
**
** Description Looks up the address blacklist, name blacklist and version
** blacklist with the specified config section.
**
** Returns TRUE if matched, else FALSE
**
*******************************************************************************/
extern bool interop_mtk_match_any(const char* section, const RawAddress* addr);
/**{@ */
#endif
/** M: New feature: framework get black list information {@ */
bool interop_mtk_match_addr_fwk(const char* section, const RawAddress* addr);
bool interop_mtk_match_name_fwk(const char* section, const char* name);
bool interop_mtk_match_addr_name_fwk(const char* section, const RawAddress* addr);
/** M: New feature: version black list */
bool interop_mtk_match_lmp_ver_fwk(const char* section, const RawAddress* addr);
bool interop_mtk_match_mfct_fwk(const char* section, const RawAddress* addr);
bool interop_mtk_match_lmp_subver_fwk(const char* section, const RawAddress* addr);
bool interop_mtk_match_ver_fwk(const char* section, const RawAddress* addr);
typedef struct {
/** Set to size of this struct */
size_t size;
bool (*interop_mtk_match_addr_fwk)(const char* section, const RawAddress* addr);
bool (*interop_mtk_match_name_fwk)(const char* section, const char* name);
bool (*interop_mtk_match_addr_name_fwk)(const char* section, const RawAddress* addr);
bool (*interop_mtk_match_lmp_ver_fwk)(const char* section, const RawAddress* addr);
bool (*interop_mtk_match_mfct_fwk)(const char* section, const RawAddress* addr);
bool (*interop_mtk_match_lmp_subver_fwk)(const char* section, const RawAddress* addr);
bool (*interop_mtk_match_ver_fwk)(const char* section, const RawAddress* addr);
} btinterop_mtk_interface_t;
extern const btinterop_mtk_interface_t* btif_interop_mtk_get_interface();
/**@}*/