Lines Matching defs:pLlcpSocket
133 phFriNfc_LlcpTransport_Socket_t * pLlcpSocket = (phFriNfc_LlcpTransport_Socket_t*)pContext;
138 pfSavedCallback = pLlcpSocket->pfSocketSend_Cb;
141 pLlcpSocket->pfSocketSend_Cb = NULL;
142 pfSavedCallback(pLlcpSocket->pSendContext, status);
146 static void phFriNfc_LlcpTransport_Connectionless_Abort(phFriNfc_LlcpTransport_Socket_t* pLlcpSocket)
148 if (pLlcpSocket->pfSocketSend_Cb != NULL)
150 pLlcpSocket->pfSocketSend_Cb(pLlcpSocket->pSendContext, NFCSTATUS_ABORTED);
151 pLlcpSocket->pSendContext = NULL;
152 pLlcpSocket->pfSocketSend_Cb = NULL;
154 if (pLlcpSocket->pfSocketRecvFrom_Cb != NULL)
156 pLlcpSocket->pfSocketRecvFrom_Cb(pLlcpSocket->pRecvContext, 0, NFCSTATUS_ABORTED);
157 pLlcpSocket->pRecvContext = NULL;
158 pLlcpSocket->pfSocketRecvFrom_Cb = NULL;
159 pLlcpSocket->pfSocketRecv_Cb = NULL;
161 pLlcpSocket->pAcceptContext = NULL;
162 pLlcpSocket->pfSocketAccept_Cb = NULL;
163 pLlcpSocket->pListenContext = NULL;
164 pLlcpSocket->pfSocketListen_Cb = NULL;
165 pLlcpSocket->pConnectContext = NULL;
166 pLlcpSocket->pfSocketConnect_Cb = NULL;
167 pLlcpSocket->pDisconnectContext = NULL;
168 pLlcpSocket->pfSocketDisconnect_Cb = NULL;
177 * \param[in] pLlcpSocket A pointer to a phFriNfc_LlcpTransport_Socket_t.
184 NFCSTATUS phFriNfc_LlcpTransport_Connectionless_Close(phFriNfc_LlcpTransport_Socket_t* pLlcpSocket)
187 pLlcpSocket->eSocket_State = phFriNfc_LlcpTransportSocket_eSocketDefault;
188 pLlcpSocket->eSocket_Type = phFriNfc_LlcpTransport_eDefaultType;
189 pLlcpSocket->pContext = NULL;
190 pLlcpSocket->pSocketErrCb = NULL;
191 pLlcpSocket->socket_sSap = PHFRINFC_LLCP_SAP_DEFAULT;
192 pLlcpSocket->socket_dSap = PHFRINFC_LLCP_SAP_DEFAULT;
193 pLlcpSocket->bSocketRecvPending = FALSE;
194 pLlcpSocket->bSocketSendPending = FALSE;
195 pLlcpSocket->bSocketListenPending = FALSE;
196 pLlcpSocket->bSocketDiscPending = FALSE;
197 pLlcpSocket->RemoteBusyConditionInfo = FALSE;
198 pLlcpSocket->ReceiverBusyCondition = FALSE;
199 pLlcpSocket->socket_VS = 0;
200 pLlcpSocket->socket_VSA = 0;
201 pLlcpSocket->socket_VR = 0;
202 pLlcpSocket->socket_VRA = 0;
204 phFriNfc_LlcpTransport_Connectionless_Abort(pLlcpSocket);
206 memset(&pLlcpSocket->sSocketOption, 0x00, sizeof(phFriNfc_LlcpTransport_sSocketOptions_t));
208 if (pLlcpSocket->sServiceName.buffer != NULL) {
209 phOsalNfc_FreeMemory(pLlcpSocket->sServiceName.buffer);
211 pLlcpSocket->sServiceName.buffer = NULL;
212 pLlcpSocket->sServiceName.length = 0;
225 * \param[in] pLlcpSocket A pointer to a LlcpSocket created.
244 NFCSTATUS phFriNfc_LlcpTransport_Connectionless_SendTo(phFriNfc_LlcpTransport_Socket_t *pLlcpSocket,
253 pLlcpSocket->pfSocketSend_Cb = pSend_RspCb;
254 pLlcpSocket->pSendContext = pContext;
257 if(pLlcpSocket->psTransport->bSendPending == TRUE)
260 pLlcpSocket->sSocketSendBuffer = *psBuffer;
261 pLlcpSocket->socket_dSap = nSap;
267 pLlcpSocket->sLlcpHeader.dsap = nSap;
268 pLlcpSocket->sLlcpHeader.ptype = PHFRINFC_LLCP_PTYPE_UI;
269 pLlcpSocket->sLlcpHeader.ssap = pLlcpSocket->socket_sSap;
272 status = phFriNfc_LlcpTransport_LinkSend(pLlcpSocket->psTransport,
273 &pLlcpSocket->sLlcpHeader,
277 pLlcpSocket->index,
278 pLlcpSocket);
293 * \param[in] pLlcpSocket A pointer to a LlcpSocket created.
311 NFCSTATUS phLibNfc_LlcpTransport_Connectionless_RecvFrom(phFriNfc_LlcpTransport_Socket_t *pLlcpSocket,
320 if(pLlcpSocket->bSocketRecvPending)
327 if(pLlcpSocket->indexRwRead != pLlcpSocket->indexRwWrite)
329 readIndex = pLlcpSocket->indexRwRead % pLlcpSocket->localRW;
332 ssap = pLlcpSocket->sSocketRwBufferTable[readIndex].buffer[0];
334 pLlcpSocket->sSocketRwBufferTable[readIndex].buffer + 1,
335 pLlcpSocket->sSocketRwBufferTable[readIndex].length);
336 psBuffer->length = pLlcpSocket->sSocketRwBufferTable[readIndex].length;
339 pLlcpSocket->sSocketRwBufferTable[readIndex].length = 0;
342 pLlcpSocket->indexRwRead++;
353 pLlcpSocket->pfSocketRecvFrom_Cb = pRecv_Cb;
354 pLlcpSocket->pRecvContext = pContext;
357 pLlcpSocket->sSocketRecvBuffer = psBuffer;
358 pLlcpSocket->receivedLength = &psBuffer->length;
361 pLlcpSocket->bSocketRecvPending = TRUE;