亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ag_connect.c

?? bluetooth audio gateway
?? C
?? 第 1 頁 / 共 2 頁
字號:
			msg->srch_continue = 1;
			msg->new_target = 0;
			msg->new_conn_server_chan = 0;
		}
	}
	else
	{
		/* User specified connect as hs or hf so we'd better not try the other */
		msg->srch_continue = 0;
		msg->new_target = 0;
		msg->new_conn_server_chan = 0;
	}
	agPutCmMsg(msg);
}


/*
    agConnectCfm

    Contains the status of the RFCOMM connection.
*/
void agConnectCfm(const CM_CONNECT_CFM_T *cfm)
{
    /* 
        if the connect is successful and the AG is connecting to a hands-free 
        device the connection is not considered to be up until some AT cmds have 
        been exchanged. Only send cfm once this has happened. For other cases can 
        send confirm straight away 
    */
    AGState.remote_addr = cfm->addr;

    /* store handles to the sink and source rfc buffers */
    AGState.rfcDataIncoming = cfm->source;
    AGState.rfcDataOutgoing = cfm->sink;

	/* Ser the role depending on the service connected to */
	if (cfm->conn_server_chan == AGState.agHsServerChan)
		agSetCurrentProfile(agHeadsetProfile);
	else if (cfm->conn_server_chan == AGState.agHfServerChan)
		agSetCurrentProfile(agHandsFreeProfile);
	else
		agSetCurrentProfile(agProfileNotSet);

    if (agIsCurrentlyHeadset() || cfm->status != CmConnectComplete)
        agSendStatusIndToClient(cfm->addr, cfm->status);

    if (agIsCurrentlyHandsFree())
        agGetExtraSdpInfo();

    if (cfm->status == CmConnectComplete)
    {
        /* check for data */
        handleSourceEvent();
    }
}


/*
    agRfcommStatusInd

    Indication of a change in the status of the RFCOMM connection.
*/
void agRfcommStatusInd(const CM_CONNECT_STATUS_IND_T *ind)
{
    agSendStatusIndToClient(ind->addr, ind->status);
}


/*
    agScoStatusInd

    Send the client the reported status of the SCO connection.
*/
void agScoStatusInd(const CM_SCO_STATUS_IND_T *ind)
{    
    if(ind->status == CmConnectComplete)
    {
        /* SCO created  so change the AG state accordingly */
        agSetCurrentState(AgScoConnected);
        
        /* stop the ring tones */
        AGState.rings_outstanding = 0;
    }
    else if (ind->status == CmConnectDisconnect)
    {
        /* SCO disconnected */
        if (agScoConnectedQuery())
            agSetCurrentState(AgConnected);
        else
            agSetCurrentState(AgIdle);
        
        /* stop the ring tones */
        AGState.rings_outstanding = 0; 

        /* Inform the hands-free of the change in call status */
        if (agIsCurrentlyHandsFree())
            agSendCallInd(0);
    }    
    else
    {
        /* SCO creation attempt timed out or was cancelled */
        agSetCurrentState(AgConnected);
    }

    /* Inform the interface that the SCO status has changed */
    handleScoStatusInd(agGetConnectionHandle(&ind->addr), connectStatus(ind->status), ind->sco_handle);    
}


/*
    agCreateSco

    Send the actual create SCO message to the CM, this way a SCO can
    be created internally by the AG i.e. without a cmd from the GUI.
*/

void agCreateSco(BD_ADDR_T addr, pkt_type_t pkt)
{    
    /* check if an RFCOMM connection exists and if not signal an error */
    if (AGState.currentState == AgConnected)
    {
        /* 
            Stop sending ring alerts - this is to handle the case
            where the AG sends rings and then sets up the SCO itself
            (without receiving a button press or anything similar from
            the hs) should only apply to testing though.
        */
        agStopRings();               
        
        {
            /* AG is not in park mode so continue with the SCO creation */
            MAKE_MSG(CM_SCO_CONNECT_REQ);
            msg->addr = addr;
            msg->pkt_type = pkt;
            agPutCmMsg(msg);            
        }
    }
    else
    {
        /*
            Cannot create a SCO unless an RFCOMM connection to that
            device has been set up.
        */
        agSendErrorToClient(AgErrorScoRequestWhenNotConnected, &addr);
    }
}


/*
    agScoConnectReqAction

    Request to create a SCO connection.
*/
void agScoConnectReqAction(ag_handle_t handle, pkt_type_t type)
{
	handle = handle;	
    agCreateSco(AGState.remote_addr, type);
}


/*
    agRfcommDisconnectReqAction

    Request to disconnect an RFCOMM connection.
*/
void agRfcommDisconnectReqAction(ag_handle_t handle)
{
	handle = handle;

    if (agRfcommConnectedQuery())
    {
        /* Inform the hands-free of the change in call status */
        if (agIsCurrentlyHandsFree())
            agSendServiceInd(0);
       
        /*
            Make sure that there is an RFCOMM and/or SCO connection
            brfore trying to disconnect it. If there is a SCO up it
            will be disconnected before the RFCOMM is dropped.
        */
        {
            MAKE_MSG(CM_DISCONNECT_REQ);
            msg->link_type = RfcommConnection;
            msg->addr = AGState.remote_addr;
            agPutCmMsg(msg);
        }
    }
    else
    {
        /* No RFCOMM connection to disconnect */
        agSendErrorToClient(AgErrorRfcommNotConnected, &(AGState.remote_addr));
    }
}


/*
    agScoDisconnectReqAction

    Request to disconnect a SCO connection 
*/
void agScoDisconnectReqAction(ag_handle_t handle)
{
	handle = handle;
    if (agScoConnectedQuery())
    {       
        /* Check a SCO exists before trying to disconnect it */
        MAKE_MSG(CM_DISCONNECT_REQ);
        msg->link_type = ScoConnection;
        msg->addr = AGState.remote_addr;
        agPutCmMsg(msg);        
    }
    else
    {
        /* Signal an error that there is no SCO to disconnect */
        agSendErrorToClient(AgErrorScoNotConnected, &(AGState.remote_addr));
    }
}


/* 
    agSendStatusIndToClient

    Send the client the reported status of the RFCOMM connection.
*/
void agSendStatusIndToClient(BD_ADDR_T dev_addr, connect_status_t status)
{   
    /* get the connection handle */
    ag_handle_t hdl = agGetConnectionHandle(&dev_addr);    
	ag_profile_role_t role = agProfileNotSet;

    if (status == CmConnectComplete)
    {
        agSetCurrentState(AgConnected);

		if (agIsCurrentlyHeadset())
			role = agHeadsetProfile;
		else if (agIsCurrentlyHandsFree())
			role = agHandsFreeProfile;
		else
			role = agProfileNotSet;
    }
    else
    {
        /* 
            If connection has been disconnected or connect attempt
            abandoned/ failed then remove the remote device address
            from the handle map. A new handle will be allocated if the
            ag tries to connect to that device at some later time
        */
        removeAddressFromHandleMap(hdl);

		/* AG is in idle mode */
        agSetCurrentState(AgIdle);

		/* Disable status flags */
        AGState.hfIndicatorUpdateEnabled = 0;
		AGState.hfVoiceRecogEnable = 0;

        /* cancel any ring tones being sent */
        agStopRings();
    }

    /* inform the interface of the change in rfcomm connection status */
    handleRfcommStatusInd(hdl, connectStatus(status), role);
}


/* --------------------------------------------------------------------------
 
    Internally called functions to handle device address to ag_handle mapping
 
   --------------------------------------------------------------------------
*/


/*
    createAddressHandleMap

    Allocate the array used to produce device address to ag_handles map.
*/

void createAddressHandleMap(void)
{
	AGState.remote_addr.lap = 0;
	AGState.remote_addr.uap = 0;
	AGState.remote_addr.nap = 0;
}


/*
    agGetConnectionHandle

    Given a device address return the handle corresponding to it in
    the map If an entry does not exist for the device address return
    UNDEFINED_HANDLE.
*/

ag_handle_t agGetConnectionHandle(const BD_ADDR_T *addr)
{
	if (AGState.remote_addr.lap == addr->lap &&
		AGState.remote_addr.uap == addr->uap &&
		AGState.remote_addr.nap == addr->nap)
		return ONLY_ONE_HANDLE;
	else
		return UNDEFINED_HANDLE;
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品一区二区综合| 欧美激情在线看| 一区二区三区四区不卡视频| 国产成人精品www牛牛影视| 日韩一卡二卡三卡国产欧美| 亚洲一区二区三区影院| 91视频观看视频| 欧美大白屁股肥臀xxxxxx| 视频一区二区欧美| 欧美唯美清纯偷拍| 亚洲国产aⅴ天堂久久| 色偷偷一区二区三区| 亚洲精品视频在线观看免费| 99国产精品99久久久久久| 亚洲乱码国产乱码精品精98午夜 | 国产欧美综合色| 日韩中文字幕av电影| 欧美蜜桃一区二区三区| 三级欧美韩日大片在线看| 欧美在线免费观看视频| 亚洲一区二区三区在线看 | 国产福利一区二区三区在线视频| 337p粉嫩大胆色噜噜噜噜亚洲| 日本va欧美va瓶| 欧美一卡2卡3卡4卡| 激情综合网av| 国产精品久久影院| 色诱亚洲精品久久久久久| 亚洲午夜激情网页| 欧美白人最猛性xxxxx69交| 国产毛片精品一区| 亚洲国产高清在线观看视频| 色女孩综合影院| 亚洲成人免费电影| 精品精品欲导航| 93久久精品日日躁夜夜躁欧美| 亚洲激情av在线| 欧美一区二区视频在线观看2020| 国产美女一区二区| 一区二区三区在线视频免费 | 欧美偷拍一区二区| 蜜臀久久99精品久久久画质超高清| 精品久久久久久最新网址| 成人中文字幕电影| 午夜精品久久久久久不卡8050| 日韩欧美不卡在线观看视频| 高清不卡在线观看av| 亚洲成av人片在线观看无码| 精品噜噜噜噜久久久久久久久试看| 成人免费视频caoporn| 午夜精品一区在线观看| 国产欧美一区二区三区网站| 99久久久国产精品免费蜜臀| 看电视剧不卡顿的网站| 欧美变态口味重另类| 色吊一区二区三区| 黄网站免费久久| 亚洲一级二级三级在线免费观看| 久久伊人蜜桃av一区二区| 在线免费观看一区| 午夜a成v人精品| 亚洲品质自拍视频网站| 2017欧美狠狠色| 欧美视频在线播放| 激情综合色播激情啊| 亚洲电影第三页| 国产精品伦一区二区三级视频| 色婷婷国产精品久久包臀| 久久精品99国产精品| 亚洲自拍偷拍麻豆| 国产精品伦一区| 制服视频三区第一页精品| 91麻豆swag| 不卡欧美aaaaa| 色综合久久中文字幕综合网 | 欧美不卡一区二区三区| 3atv一区二区三区| 欧美猛男超大videosgay| 在线亚洲免费视频| 91久久精品国产91性色tv| 96av麻豆蜜桃一区二区| 91美女在线看| 欧洲视频一区二区| 欧洲国内综合视频| 欧美日韩欧美一区二区| 欧美日韩国产区一| 337p亚洲精品色噜噜噜| 精品国产乱码久久久久久牛牛 | 国产欧美一区二区精品忘忧草| 久久综合久色欧美综合狠狠| 久久蜜桃香蕉精品一区二区三区| 久久久久久久免费视频了| 亚洲国产精品ⅴa在线观看| 亚洲欧洲av色图| 亚洲乱码日产精品bd| 石原莉奈一区二区三区在线观看| 美日韩一级片在线观看| 国产精品白丝jk黑袜喷水| 成人午夜在线免费| 一本大道久久a久久综合婷婷| 欧美性极品少妇| 精品少妇一区二区三区在线视频| 久久精品人人做人人爽人人| 亚洲欧美在线视频| 亚洲一区视频在线| 精品综合免费视频观看| 国产成人久久精品77777最新版本 国产成人鲁色资源国产91色综 | 欧美日韩大陆在线| 精品裸体舞一区二区三区| 亚洲欧洲另类国产综合| 亚洲一区二区三区视频在线 | 国产欧美一区二区精品婷婷 | 在线不卡免费av| 亚洲精品一线二线三线| 日韩一区在线播放| 视频一区中文字幕国产| 国产成人综合在线播放| 91国产丝袜在线播放| 日韩精品自拍偷拍| 一色桃子久久精品亚洲| 奇米888四色在线精品| 国产成人av电影| 欧美喷水一区二区| 中文字幕免费在线观看视频一区| 亚洲国产精品一区二区www在线| 久久99精品一区二区三区| 91欧美激情一区二区三区成人| 5566中文字幕一区二区电影| 国产精品婷婷午夜在线观看| 视频一区视频二区中文字幕| 99国产一区二区三精品乱码| 日韩欧美综合在线| 亚洲精品视频免费看| 国产成人免费视频网站高清观看视频| 欧美亚洲图片小说| 国产精品色呦呦| 久久精品国内一区二区三区| 欧美色视频在线观看| 久久久久久久精| 美腿丝袜亚洲综合| 欧美日韩久久久| 亚洲欧美激情插| 高清成人在线观看| 久久久国产精品不卡| 日本va欧美va欧美va精品| 91精彩视频在线| 国产精品超碰97尤物18| 黄色日韩网站视频| 日韩美女在线视频 | 欧美电视剧在线观看完整版| 亚洲一区二区成人在线观看| 91网站在线播放| 中文字幕第一区二区| 韩国av一区二区| 欧美一区在线视频| 三级一区在线视频先锋| 精品视频在线看| 一区二区三区国产精品| 91麻豆免费视频| 综合久久久久综合| av在线不卡网| 国产精品久久久久久久裸模| 国产成人一区在线| 国产欧美日韩一区二区三区在线观看| 久国产精品韩国三级视频| 欧美一区二区精品久久911| 天天操天天干天天综合网| 欧美亚洲一区二区三区四区| 一区二区三区在线观看欧美| 一本色道亚洲精品aⅴ| 一区二区三区不卡视频 | 亚洲最大的成人av| 色综合一区二区| 亚洲激情男女视频| 欧美中文字幕亚洲一区二区va在线| 亚洲视频你懂的| 色成年激情久久综合| 亚洲国产aⅴ成人精品无吗| 欧美日韩中文精品| 免费观看一级特黄欧美大片| 91精品国产综合久久精品app| 免费日本视频一区| 久久综合色播五月| 成人网男人的天堂| 伊人婷婷欧美激情| 8v天堂国产在线一区二区| 麻豆精品国产传媒mv男同| xfplay精品久久| jvid福利写真一区二区三区| 亚洲视频在线一区| 欧美日韩日本视频| 激情亚洲综合在线| 最新成人av在线| 欧美日韩在线不卡| 91国模大尺度私拍在线视频| 日本欧美一区二区三区乱码| 久久这里都是精品| 91美女精品福利| 蜜桃视频在线一区| 中文字幕+乱码+中文字幕一区|