本文整理汇总了C++中connectionGetCmTask函数的典型用法代码示例。如果您正苦于以下问题:C++ connectionGetCmTask函数的具体用法?C++ connectionGetCmTask怎么用?C++ connectionGetCmTask使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了connectionGetCmTask函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: connectionHandleSdpOpenSearchCfm
/****************************************************************************
NAME
connectionHandleSdpOpenSearchCfm
DESCRIPTION
Handle the response to the open SDP session request
RETURNS
void
*/
void connectionHandleSdpOpenSearchCfm(connectionSdpState *state, const SDC_OPEN_SEARCH_CFM_T *cfm)
{
if(state->sdpLock == connectionGetCmTask())
{
/* Request was internal, start SDP Ping */
uint8* sdp_ptr = (uint8 *) SdpPingServiceRequest;
if (cfm->result == SDC_OPEN_SEARCH_OK)
ConnectionSdpServiceSearchRequest(connectionGetCmTask(), &state->sdpServerAddr, 1, sizeof(SdpPingServiceRequest), sdp_ptr);
}
else if(state->sdpLock)
{
/* Send a response message up to the client */
MAKE_CL_MESSAGE(CL_SDP_OPEN_SEARCH_CFM);
message->status = connectionConvertSdpOpenStatus(cfm->result);
MessageSend(state->sdpLock, CL_SDP_OPEN_SEARCH_CFM, message);
}
/* Check if the open search succeeded */
if (cfm->result != SDC_OPEN_SEARCH_OK)
{
/* Reset the resource lock */
state->sdpLock = 0;
/* Reset the stored address */
BdaddrSetZero(&state->sdpServerAddr);
}
}
开发者ID:Duiesel,项目名称:thebirdfree-personal,代码行数:37,代码来源:sdp_handler.c
示例2: ConnectionInitEx
void ConnectionInitEx(Task theAppTask, const msg_filter *msgFilter)
{
theCm.msgFilter = msgFilter;
/* Turn on extended bluestack prims */
VmUseExtendedBluestackPrimitives();
/* Initialise the Connection Library Task, all upstream messages sent by
Bluestack will be handled by this task */
theCm.task.handler = connectionBluestackHandler;
/* If a task is already registered to receive BlueStack prims then we panic! */
if (MessageBlueStackTask(connectionGetCmTask()))
{
CL_DEBUG(("ERROR - task already registered\n"));
}
/* Init the resource locks */
initLocks();
/* Store the application task */
theCm.theAppTask = theAppTask;
/* Start the initialisation process */
MessageSend(connectionGetCmTask(), CL_INTERNAL_INIT_REQ, NO_PAYLOAD);
}
开发者ID:Duiesel,项目名称:thebirdfree-personal,代码行数:26,代码来源:init.c
示例3: connectionHandleSdpOpenSearchRequest
/****************************************************************************
NAME
connectionHandleSdpOpenSearchRequest
DESCRIPTION
Send a request to BlueSTack to open an SDP search session
RETURNS
void
*/
void connectionHandleSdpOpenSearchRequest(connectionSdpState *state, const CL_INTERNAL_SDP_OPEN_SEARCH_REQ_T *req)
{
/* Check the state of the resource lock */
if (!state->sdpLock)
{
/* Resource free, set the lock */
state->sdpLock = req->theAppTask;
/* Store the address of the device we're opening the search to */
state->sdpServerAddr = req->bd_addr;
/* Send the request to BlueStack */
{
MAKE_PRIM_T(SDC_OPEN_SEARCH_REQ);
connectionConvertBdaddr_t(&prim->bd_addr, &req->bd_addr);
VmSendSdpPrim(prim);
}
}
else if(req->theAppTask != connectionGetCmTask())
{
/* Resource busy so queue up the request */
MAKE_CL_MESSAGE(CL_INTERNAL_SDP_OPEN_SEARCH_REQ);
COPY_CL_MESSAGE(req, message);
MessageSendConditionallyOnTask(connectionGetCmTask(), CL_INTERNAL_SDP_OPEN_SEARCH_REQ, message, &state->sdpLock);
}
}
开发者ID:Duiesel,项目名称:thebirdfree-personal,代码行数:36,代码来源:sdp_handler.c
示例4: connectionHandleRfcommEstablishCfm
void connectionHandleRfcommEstablishCfm(const RFC_ESTABLISH_CFM_T* cfm)
{
/* Get the connection instance data keyed by server channel and mux id */
conn_instance *conn = getRfcommConnection(NULL, cfm->mux_id, cfm->server_chan);
if(conn)
{
if(cfm->result_code == RFC_SUCCESS)
{
/* Move to the modem status phase */
conn->config.rfcomm.state = modem_status_phase;
/*
Send modem status signal, data cannot be exchanged until both
sides have exchanged modem status signals
*/
startControlPhase(conn);
}
else if (cfm->result_code == DLC_ALREADY_EXISTS)
{
/* Send a cfm to the app indicating an error has ocurred*/
sendRfcommConnectionCfm(conn->config.rfcomm.app_task, rfcomm_connect_channel_already_open, INVALID_SERVER_CHANNEL, 0, 0);
/* Cancel the connect timeout and clean up the connection state data. */
(void) MessageCancelFirst(connectionGetCmTask(), CL_INTERNAL_RFCOMM_CONNECT_TIMEOUT_IND);
(void) deleteRfcommConnection(NULL, cfm->mux_id, cfm->server_chan);
}
else if (cfm->result_code == REMOTE_REFUSAL)
{
/* Connection establishment failed, clean up */
endConnection(conn);
/* Inform the app of the failure */
sendRfcommConnectionCfm(conn->config.rfcomm.app_task, rfcomm_connect_rejected, INVALID_SERVER_CHANNEL, 0, 0);
/* Cancel the connect timeout and clean up the connection state data. */
(void) MessageCancelFirst(connectionGetCmTask(), CL_INTERNAL_RFCOMM_CONNECT_TIMEOUT_IND);
(void) deleteRfcommConnection(NULL, cfm->mux_id, cfm->server_chan);
}
else
{
/* Connection establishment failed, clean up */
endConnection(conn);
/* Inform the app of the failure */
sendRfcommConnectionCfm(conn->config.rfcomm.app_task, rfcomm_connect_failed, INVALID_SERVER_CHANNEL, 0, 0);
/* Cancel the connect timeout and clean up the connection state data. */
(void) MessageCancelFirst(connectionGetCmTask(), CL_INTERNAL_RFCOMM_CONNECT_TIMEOUT_IND);
(void) deleteRfcommConnection(NULL, cfm->mux_id, cfm->server_chan);
}
}
/*
This could happen if the connect timeout has triggered and cleaned up the connection
state entry and then we get an RFC_ESTABLISH_CFM indicating the remote end failed to
respond. We should just ignore this cfm.
*/
}
开发者ID:Duiesel,项目名称:thebirdfree-personal,代码行数:58,代码来源:rfc_handler.c
示例5: ConnectionSmAuthoriseResponse
void ConnectionSmAuthoriseResponse(const bdaddr* bd_addr, dm_protocol_id protocol_id, uint32 channel, bool incoming, bool authorised)
{
#ifdef CONNECTION_DEBUG_LIB
if ((protocol_id != protocol_l2cap) && (protocol_id != protocol_rfcomm))
{
CL_DEBUG(("ConnectionSmAuthoriseResponse - Out of range protocol id 0x%x\n", protocol_id));
}
if((protocol_id == protocol_rfcomm) && ((channel < RFCOMM_SERVER_CHANNEL_MIN) || (channel > RFCOMM_SERVER_CHANNEL_MAX)))
{
CL_DEBUG(("cd ..Out of range RFCOMM server channel 0x%lx\n", channel));
}
if(bd_addr == NULL)
{
CL_DEBUG(("Out of range Bluetooth Address 0x%p\n", (void*)bd_addr));
}
#endif
{
MAKE_CL_MESSAGE(CL_INTERNAL_SM_AUTHORISE_RES);
message->bd_addr = *bd_addr;
message->protocol_id = protocol_id;
message->channel = channel;
message->incoming = incoming;
message->authorised = authorised;
MessageSend(connectionGetCmTask(), CL_INTERNAL_SM_AUTHORISE_RES, message);
}
}
开发者ID:Duiesel,项目名称:thebirdfree-personal,代码行数:29,代码来源:dm_security_authorise.c
示例6: ConnectionSmUnRegisterOutgoingService
void ConnectionSmUnRegisterOutgoingService(const bdaddr* bd_addr, dm_protocol_id protocol_id, uint32 channel)
{
#ifdef CONNECTION_DEBUG_LIB
if ((protocol_id != protocol_l2cap) && (protocol_id != protocol_rfcomm))
{
CL_DEBUG(("Out of range protocol id 0x%x\n", protocol_id));
}
/* TODO: Check if we should check channel range for outgoing service channel */
if((protocol_id == protocol_rfcomm) &&
((channel < RFCOMM_SERVER_CHANNEL_MIN) ||
(channel > RFCOMM_SERVER_CHANNEL_MAX))
)
{
CL_DEBUG(("Out of range RFCOMM server channel 0x%lx\n", channel));
}
if(bd_addr == NULL)
{
CL_DEBUG(("Out of range Bluetooth Address 0x%p\n", (void*)bd_addr));
}
#endif
{
MAKE_CL_MESSAGE(CL_INTERNAL_SM_UNREGISTER_OUTGOING_REQ);
message->bd_addr = *bd_addr;
message->protocol_id = protocol_id;
message->channel = channel;
MessageSend(connectionGetCmTask(), CL_INTERNAL_SM_UNREGISTER_OUTGOING_REQ, message);
}
}
开发者ID:stephen-kun,项目名称:csr8670,代码行数:31,代码来源:ConnectionSmUnRegisterOutgoingService.c
示例7: ConnectionSmUserConfirmationResponse
void ConnectionSmUserConfirmationResponse(const bdaddr* bd_addr, bool confirm)
{
MAKE_CL_MESSAGE(CL_INTERNAL_SM_USER_CONFIRMATION_REQUEST_RES);
message->bd_addr = *bd_addr;
message->confirm = confirm;
MessageSend(connectionGetCmTask(), CL_INTERNAL_SM_USER_CONFIRMATION_REQUEST_RES, message);
}
开发者ID:Duiesel,项目名称:thebirdfree-personal,代码行数:7,代码来源:dm_security_authorise.c
示例8: ConnectionRfcommDeallocateChannel
void ConnectionRfcommDeallocateChannel(Task theAppTask, uint8 local_server_channel)
{
MAKE_CL_MESSAGE(CL_INTERNAL_RFCOMM_UNREGISTER_REQ);
message->theAppTask = theAppTask;
message->local_server_channel = local_server_channel;
MessageSend(connectionGetCmTask(), CL_INTERNAL_RFCOMM_UNREGISTER_REQ, message);
}
开发者ID:stephen-kun,项目名称:koovox_adk4.0,代码行数:7,代码来源:rfc.c
示例9: ConnectionSmRegisterIncomingService
void ConnectionSmRegisterIncomingService(dm_protocol_id protocol_id, uint32 channel, dm_security_level security_level)
{
/* Check params are within allowed values - debug build only */
#ifdef CONNECTION_DEBUG_LIB
if ((protocol_id != protocol_l2cap) && (protocol_id != protocol_rfcomm))
{
CL_DEBUG(("Out of range protocol id 0x%x\n", protocol_id));
}
if((protocol_id == protocol_rfcomm) && ((channel < RFCOMM_SERVER_CHANNEL_MIN) || (channel > RFCOMM_SERVER_CHANNEL_MAX)))
{
CL_DEBUG(("Out of range RFCOMM server channel 0x%lx\n", channel));
}
if (security_level >= secl_level_unknown)
{
CL_DEBUG(("Out of range security level 0x%x\n", security_level));
}
#endif
{
MAKE_CL_MESSAGE(CL_INTERNAL_SM_REGISTER_REQ);
message->protocol_id = protocol_id;
message->channel = channel;
message->outgoing_ok = FALSE;
message->security_level = security_level;
message->psm = 0;
MessageSend(connectionGetCmTask(), CL_INTERNAL_SM_REGISTER_REQ, message);
}
}
开发者ID:Duiesel,项目名称:thebirdfree-personal,代码行数:30,代码来源:dm_security_service.c
示例10: ConnectionSyncRegister
void ConnectionSyncRegister(Task theAppTask)
{
/* Send an internal register request message */
MAKE_CL_MESSAGE(CL_INTERNAL_SYNC_REGISTER_REQ);
message->theAppTask = theAppTask;
MessageSend(connectionGetCmTask(), CL_INTERNAL_SYNC_REGISTER_REQ, message);
}
开发者ID:Duiesel,项目名称:thebirdfree-personal,代码行数:7,代码来源:dm_sync.c
示例11: connectionHandleReadInquiryTx
/****************************************************************************
NAME
connectionHandleReadInquiryTx
DESCRIPTION
This function will initiate a read of the inquiry tx power of the device
RETURNS
void
*/
void connectionHandleReadInquiryTx(connectionReadInfoState* infoState, connectionInquiryState *state, const CL_INTERNAL_DM_READ_INQUIRY_TX_REQ_T *req)
{
/* Check command supported by firmware */
if(infoState->version != bluetooth_unknown)
{
/* Check the state of the task lock before doing anything */
if (!state->inquiryLock)
{
/* One request at a time */
state->inquiryLock = req->theAppTask;
/* Issue request to read the inquiry tx */
{
MAKE_PRIM_C(DM_HCI_READ_INQUIRY_RESPONSE_TX_POWER_LEVEL_REQ);
VmSendDmPrim(prim);
}
}
else
{
/* Remote name request currently being performed, queue up the request */
MAKE_CL_MESSAGE(CL_INTERNAL_DM_READ_INQUIRY_TX_REQ);
COPY_CL_MESSAGE(req, message);
MessageSendConditionallyOnTask(connectionGetCmTask(), CL_INTERNAL_DM_READ_INQUIRY_TX_REQ, message, &state->inquiryLock);
}
}
else
{
/* Tell the app this is unsupported */
MAKE_CL_MESSAGE(CL_DM_READ_INQUIRY_TX_CFM);
message->status = hci_error_unsupported_feature;
message->tx_power = 0;
MessageSend(req->theAppTask, CL_DM_READ_INQUIRY_TX_CFM, message);
}
}
开发者ID:stephen-kun,项目名称:koovox_adk4.0,代码行数:44,代码来源:dm_inquiry_handler.c
示例12: ConnectionSetLinkSupervisionTimeout
void ConnectionSetLinkSupervisionTimeout(Sink sink, uint16 timeout)
{
MAKE_CL_MESSAGE(CL_INTERNAL_DM_SET_LINK_SUPERVISION_TIMEOUT_REQ);
message->sink = sink;
message->timeout = timeout;
MessageSend(connectionGetCmTask(), CL_INTERNAL_DM_SET_LINK_SUPERVISION_TIMEOUT_REQ, message);
}
开发者ID:stephen-kun,项目名称:csr8670,代码行数:7,代码来源:dm_link_policy.c
示例13: ConnectionSmRegisterOutgoingService
void ConnectionSmRegisterOutgoingService(Task theAppTask, const bdaddr* bd_addr, dm_protocol_id protocol_id, uint32 channel, dm_security_out security)
{
MAKE_CL_MESSAGE(CL_INTERNAL_SM_REGISTER_OUTGOING_REQ);
#ifdef CONNECTION_DEBUG_LIB
if ((protocol_id != protocol_l2cap) && (protocol_id != protocol_rfcomm))
{
CL_DEBUG(("Out of range protocol id 0x%x\n", protocol_id));
}
else if ((protocol_id == protocol_rfcomm) && !theAppTask)
{
CL_DEBUG(("App task undefined for RFCOMM\n"));
}
if(bd_addr == NULL)
{
CL_DEBUG(("Out of range Bluetooth Address 0x%p\n", (void*)bd_addr));
}
/* Are any bits other then valid dm_security_in bits are set. */
if (security & ~sec_out_bitmask)
{
CL_DEBUG(("Invalid dm_security_out bits set 0x%x\n", (security & ~sec_out_bitmask)));
}
#endif
message->theAppTask = theAppTask;
message->bd_addr = *bd_addr;
message->protocol_id = protocol_id;
message->remote_channel = channel;
message->outgoing_security_level = security;
MessageSend(connectionGetCmTask(), CL_INTERNAL_SM_REGISTER_OUTGOING_REQ, message);
}
开发者ID:stephen-kun,项目名称:koovox_adk4.0,代码行数:34,代码来源:ConnectionSmRegisterOutgoingService.c
示例14: ConnectionWriteClassOfDevice
void ConnectionWriteClassOfDevice(uint32 cod)
{
/* All requests are sent through the internal state handler */
MAKE_CL_MESSAGE(CL_INTERNAL_DM_WRITE_CLASS_OF_DEVICE_REQ);
message->class_of_device = cod;
MessageSend(connectionGetCmTask(), CL_INTERNAL_DM_WRITE_CLASS_OF_DEVICE_REQ, message);
}
开发者ID:Duiesel,项目名称:thebirdfree-personal,代码行数:7,代码来源:dm_baseband_cod.c
示例15: ConnectionReadLocalVersion
void ConnectionReadLocalVersion(Task theAppTask)
{
/* All requests are sent through the internal state handler */
MAKE_CL_MESSAGE(CL_INTERNAL_DM_READ_LOCAL_VERSION_REQ);
message->theAppTask = theAppTask;
MessageSend(connectionGetCmTask(), CL_INTERNAL_DM_READ_LOCAL_VERSION_REQ, message);
}
开发者ID:stephen-kun,项目名称:csr8670,代码行数:7,代码来源:dm_info_local_version.c
示例16: ConnectionSmSendKeypressNotificationRequest
void ConnectionSmSendKeypressNotificationRequest(const bdaddr* bd_addr, cl_sm_keypress_type type)
{
MAKE_CL_MESSAGE(CL_INTERNAL_SM_SEND_KEYPRESS_NOTIFICATION_REQ);
message->bd_addr = *bd_addr;
message->type = type;
MessageSend(connectionGetCmTask(), CL_INTERNAL_SM_SEND_KEYPRESS_NOTIFICATION_REQ, message);
}
开发者ID:Duiesel,项目名称:thebirdfree-personal,代码行数:7,代码来源:ConnectionSmSendKeypressNotificationRequest.c
示例17: ConnectionSdpAttributeSearchRequest
void ConnectionSdpAttributeSearchRequest(Task appTask, const bdaddr *bd_addr, uint16 max_num_recs, uint32 service_hdl, uint16 size_attribute_list, const uint8 *attribute_list)
{
#ifdef CONNECTION_DEBUG_LIB
if (size_attribute_list == 0)
CL_DEBUG(("sdp - attribute search pattern not supplied\n"));
if (max_num_recs == 0)
CL_DEBUG(("sdp - max number of attribute bytes set to zero\n"));
if(bd_addr == NULL)
CL_DEBUG(("Out of range Bluetooth Address 0x%p\n", (void*)bd_addr));
#endif
{
MAKE_CL_MESSAGE(CL_INTERNAL_SDP_ATTRIBUTE_SEARCH_REQ);
message->theAppTask = appTask;
message->bd_addr = *bd_addr;
message->service_handle = service_hdl;
message->size_attribute_list = size_attribute_list;
if (size_attribute_list)
{
message->attribute_list = (uint8 *)PanicUnlessMalloc(size_attribute_list);
memcpy(message->attribute_list, attribute_list, size_attribute_list);
}
else
message->attribute_list = 0;
message->max_num_attr = max_num_recs;
MessageSend(connectionGetCmTask(), CL_INTERNAL_SDP_ATTRIBUTE_SEARCH_REQ, message);
}
}
开发者ID:Duiesel,项目名称:thebirdfree-personal,代码行数:30,代码来源:ConnectionSdpAttributeSearchRequest.c
示例18: connectionHandleReadEirDataRequest
/****************************************************************************
NAME
connectionHandleReadEirDataRequest
DESCRIPTION
Handles request for Reading the Extended Inquiry Data.
RETURNS
void
*/
void connectionHandleReadEirDataRequest(connectionReadInfoState *infoState, connectionInquiryState *state, const CL_INTERNAL_DM_READ_EIR_DATA_REQ_T *req)
{
if(infoState->version >= bluetooth2_1)
{
/* Check the state of the task lock before doing anything */
if (!state->inquiryLock)
{
state->inquiryLock = req->task;
{
MAKE_PRIM_C(DM_HCI_READ_EXTENDED_INQUIRY_RESPONSE_DATA_REQ);
VmSendDmPrim(prim);
}
}
else
{
/* Inquiry currently being performed, queue up the request */
MAKE_CL_MESSAGE(CL_INTERNAL_DM_READ_EIR_DATA_REQ);
COPY_CL_MESSAGE(req, message);
MessageSendConditionallyOnTask(connectionGetCmTask(), CL_INTERNAL_DM_READ_EIR_DATA_REQ, message, &state->inquiryLock);
}
}
else
{
/* Not supported, tell the app */
MAKE_CL_MESSAGE(CL_DM_READ_EIR_DATA_CFM);
message->status = hci_error_unsupported_feature;
message->fec_required = FALSE;
message->size_eir_data = 0;
message->eir_data[0] = 0;
MessageSend(state->inquiryLock, CL_DM_READ_EIR_DATA_CFM, message);
}
}
开发者ID:stephen-kun,项目名称:koovox_adk4.0,代码行数:42,代码来源:dm_inquiry_handler.c
示例19: ConnectionSmIoCapabilityResponse
void ConnectionSmIoCapabilityResponse(const bdaddr* bd_addr, cl_sm_io_capability io_capability, bool force_mitm, bool bonding, bool oob_data_present, uint8* oob_hash_c, uint8* oob_rand_r)
{
#ifdef CONNECTION_DEBUG_LIB
if(bd_addr == NULL)
{
CL_DEBUG(("Out of range Bluetooth Address 0x%p\n", (void*)bd_addr));
}
#endif
{
MAKE_CL_MESSAGE(CL_INTERNAL_SM_IO_CAPABILITY_REQUEST_RES);
message->bd_addr = *bd_addr;
message->io_capability = io_capability;
message->bonding = bonding;
message->mitm = force_mitm;
if(oob_data_present)
{
message->oob_data_present = 1;
message->oob_hash_c = PanicUnlessMalloc(CL_SIZE_OOB_DATA);
message->oob_rand_r = PanicUnlessMalloc(CL_SIZE_OOB_DATA);
memcpy(message->oob_hash_c, oob_hash_c, CL_SIZE_OOB_DATA);
memcpy(message->oob_rand_r, oob_rand_r, CL_SIZE_OOB_DATA);
}
else
{
message->oob_data_present = 0;
message->oob_hash_c = NULL;
message->oob_rand_r = NULL;
}
MessageSend(connectionGetCmTask(), CL_INTERNAL_SM_IO_CAPABILITY_REQUEST_RES, message);
}
}
开发者ID:Duiesel,项目名称:thebirdfree-personal,代码行数:34,代码来源:dm_security_authorise.c
示例20: ConnectionReadClassOfDevice
void ConnectionReadClassOfDevice(Task theAppTask)
{
/* Create internal message and sent to the CL */
MAKE_CL_MESSAGE(CL_INTERNAL_DM_READ_CLASS_OF_DEVICE_REQ);
message->theAppTask = theAppTask;
MessageSend(connectionGetCmTask(), CL_INTERNAL_DM_READ_CLASS_OF_DEVICE_REQ, message);
}
开发者ID:stephen-kun,项目名称:koovox_adk4.0,代码行数:7,代码来源:ConnectionReadClassOfDevice.c
注:本文中的connectionGetCmTask函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论