OBEXTRANSACTION (Compact 2013)
3/26/2014
This structure contains the information for a specific transaction.
Syntax
typedef struct _obex_transaction {
unsigned int uiConnectionId;
unsigned int uiTransactionId;
unsigned int uiOp;
ObexCommand * pObex;
MemAlloc ObexAlloc;
MemFree ObexFree;
ServerCallback ObexExecute;
} ObexTransaction;
Members
- uiConnectionId
Connection ID of the transaction (allocated by the server).
- uiTransactionId
Transaction ID (unique for a standard Object Exchange (OBEX) Protocol request-response exchange).
uiOp
Operation selector. This member contains one of the following values.Value
Description
OBEX_REQ_REQUEST
Place a request for service.
OBEX_REQ_CLOSE
The connection is closed.
OBEX_REQ_INIT
Initialize service.
OBEX_REQ_UNLOAD
The connection information is unloaded from the cache.
- pObex
Pointer to an OBEX server.
- ObexAlloc
Allocates the specified block of memory.
- ObexFree
Frees the specified block of memory.
- ObexExecute
Used to communicate the response from the command to the OBEX server.
Remarks
It is important to note that memory allocation function pointers will always be the same so it is legal to use ObexAlloc in one transaction to allocate a block of memory and ObexFree from another transaction to free it (so memory allocated can be persistent across transactions).
To place an OBEX service request, uiOp must be equal to OBEX_REQ_REQUEST and pObex must not be equal to NULL.
Requirements
Header |
obexserver.h |