CObexActiveRW Class Reference
class CObexActiveRW : public CActive
|
Base class for a specific transport's active reader and writer classes. The derived classes are responsible for sending and receiving data for their transport.
CObexReaderBase
CObexWriterBase
Constructor & Destructor Documentation
CObexActiveRW(TPriority, MObexTransportNotify &, TObexConnectionInfo &)
Member Functions Documentation
CompleteTransfer()
TBool
|
CompleteTransfer
|
(
|
)
|
[protected, pure virtual]
|
This method compares the number of bytes, iCount, read/ written, against the packet size. In the case of a write, ETrue is returned if all the bytes have been written, otherwise EFalse.
For reads, check if the header is received and if so assign iPacketSize with the packet size indicated in the header of the received packet. Note that the claimed packet size must be greater than the required obex header size and no more than the maximum packet size this transport handles.
CObexTransportControllerBase::Process()
DoTransfer()
void
|
DoTransfer
|
(
|
)
|
[protected, pure virtual]
|
This method issues either a read or write of data over the relevant transport object. This method is called from NewRequest.
NewRequest
NewRequest(CObexPacket &)
Start a new write or read Reset the pointer descriptor to the start of the buffer and make the call to start the transfer
OnCompleteTransfer()
void
|
OnCompleteTransfer
|
(
|
)
|
[protected, pure virtual]
|
This method is called when a transfer is complete. Any actions associated with completion of a transfer should be performed here, for instance sending the packet to the owner of the reader to be processed.
Remaining()
TInt
|
Remaining
|
(
|
)
|
[protected, pure virtual]
|
Return the number bytes left to transfer
RunL()
IMPORT_C void
|
RunL
|
(
|
)
|
[protected, virtual]
|
RunL called after a read/write has completed Check to see if we need to issue another request, otherwise process the complete packet
StartTransfer(CObexPacket &)
void
|
StartTransfer
|
(
|
CObexPacket
&
|
aPacket
|
)
|
[protected, pure virtual]
|
Parameters
CObexPacket
& aPacket
|
The packet to read into or written
|
Member Data Documentation
TInt
iCount
The number of bytes that have been read or written
TPtr8
iLocation
TPtr8
|
iLocation
|
[protected]
|
A pointer to the iPacket buffer at the point where data is to be written from or read into. The maximum length is the remaining bytes to be read or written. Data is read from this buffer into the transport, or written from the transport into this buffer.
MObexTransportNotify & iOwner
The owner of the derived reader or writer class. Required at construction.
CObexPacket * iPacket
The obex packet, received from the owner, that will be sent or written into iLocation.
TBool
iPacketBased
TBool
|
iPacketBased
|
[protected]
|
Is true if the transport is a packet based transport
TInt
iPacketSize
TInt
|
iPacketSize
|
[protected]
|
The size of the obex packet
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.