Пример #1
0
void ConnectionRfcommConnectResponseTestExtraParams(
        Task theAppTask,
        bool response,
        Sink sink,
        uint8 local_server_channel,
        uint16 max_payload_size,
        uint8 modem_signal,
        uint8 break_signal,
        uint16 msc_timeout
        )
{
    rfcomm_config_params params;  

    params.max_payload_size = max_payload_size;
    params.modem_signal     = modem_signal;
    params.break_signal     = break_signal;
    params.msc_timeout      = msc_timeout ; 

    ConnectionRfcommConnectResponse(
            theAppTask,
            response,
            sink,
            local_server_channel,
            &params
            );
}
Пример #2
0
void ConnectionRfcommConnectResponseTestExtraDefault(
        Task theAppTask,
        bool response,
        Sink sink,
        uint8 local_server_channel
        )
{
    ConnectionRfcommConnectResponse(
            theAppTask,
            response,
            sink,
            local_server_channel,
            0
            );
}
void SppConnectResponse(Task theAppTask, const bdaddr *bd_addr, const bool response, const Sink sink, const uint8 local_server_channel, const uint16 max_payload_size)
{
    /* Create the Sppc task */
    SPP *spp = PanicUnlessNew(SPP);

    rfcomm_config_params rfcomm_config = 
        {
        RFCOMM_DEFAULT_PAYLOAD_SIZE,
        RFCOMM_DEFAULT_MODEM_SIGNAL,
        RFCOMM_DEFAULT_BREAK_SIGNAL,
        RFCOMM_DEFAULT_MSC_TIMEOUT
        };

    SPP_PRINT(("SPP Server Task Created.\n"));
    
    spp->c.task.handler= sppsConnectionHandler;
    spp->c.client_task = theAppTask;
    spp->c.sink = sink;
    spp->c.bd_addr = *bd_addr;
    spp->c.max_payload_size = max_payload_size;
    spp->c.state = sppConnecting;
    spp->server_channel = local_server_channel;

    /* If the response is negative, then the CL_RFCOM_SERVER_CONNECT_CFM will 
     * indicate that the connection was unsuccessful and put the SPP Server 
     * into the disconnecting state to tidy up
     */
    if (spp->c.max_payload_size)
        rfcomm_config.max_payload_size = spp->c.max_payload_size;

    ConnectionRfcommConnectResponse(
        &spp->c.task,
        response,
        sink,
        local_server_channel,
        &rfcomm_config
        );
}
Пример #4
0
/****************************************************************************
NAME	
	hfpHandleRfcommConnectResponse

DESCRIPTION
	Response to an incoming RFCOMM connect request.

RETURNS
	void
*/
void hfpHandleRfcommConnectResponse(HFP *hfp, bool response, const bdaddr *addr, uint8 server_channel, const rfcomm_config_params *config)
{
	/* Issue a reject without passing this up to the app */
	ConnectionRfcommConnectResponse(&hfp->task, response, addr, server_channel, config);
}
Пример #5
0
/****************************************************************************
	Response to an incoming RFCOMM connect request.
*/
void aghfpHandleRfcommConnectResponse(AGHFP *aghfp, bool response, Sink sink, uint8 server_channel, const rfcomm_config_params *config)
{
	/* Issue a reject without passing this up to the app */
	ConnectionRfcommConnectResponse(&aghfp->task, response, sink, server_channel, config);
}