CObexReaderBase Class Reference
class CObexReaderBase : public CObexActiveRW |
CObexReaderBase provides obex specific reader behaviour for concrete readers to use. Derive from this class when providing a reader for a specific transport.
In a concrete reader the following things must be done: (a) In DoTransfer a read data transfer is issued over the reader's transport (b) GetMaxPacketSize must return the maximum packet size that can be received (c) GetInitialPacketSize must return a packet size that can be used in the event that the packet size of the packet to be read is not yet known (for example irda and bt use the obexpacketheadersize and usb uses the buffer size of the packet created to receive the data) (d)The NewL function must call BaseConstructL(). This is future proofing in the event that the iFuture1 variable is used and requires initialisation
Constructor & Destructor Documentation
CObexReaderBase(TPriority, MObexTransportNotify &, TObexConnectionInfo &)
~CObexReaderBase()
IMPORT_C | ~CObexReaderBase | ( | ) | [virtual] |
Member Functions Documentation
BaseConstructL()
IMPORT_C void | BaseConstructL | ( | ) | [protected] |
This function is a place holder for future use. If the iFuture1 variable is used it will need this function for any allocation required.
To prevent binary compatiblity breaks if the iFuture1 variable is used, this function must be called from the NewL of derived classes.
CompleteTransfer()
IMPORT_C TBool | CompleteTransfer | ( | ) | [protected, virtual] |
Check if the packet read is complete
DoTransfer()
void | DoTransfer | ( | ) | [protected, pure virtual] |
This method issues either a read of data over the relevant transport object. NewRequest
GetInitialPacketSize()
TInt
| GetInitialPacketSize | ( | ) | [protected, pure virtual] |
Returns a initial packet size when the packet size of iPacket is not know. This is used when determining the remaining bytes to be read.
GetInterface(TUid)
IMPORT_C TAny * | GetInterface | ( | TUid | aUid | ) | [protected, virtual] |
This function is part of the extension pattern and is implemented by all derived instantiable classes that need to extend it's interface.
By default this returns null. Any derived class that is required to extend its interface and that of this base class returns its new interface in the form of an M class, that it extends, if and only if the corresponding TUid, aUid, is received. Otherwise the function calls the base class implementation, returning NULL.
Parameters
TUid aUid | The uid associated with the M Class that is being implemented |
GetMaxPacketSize()
TInt
| GetMaxPacketSize | ( | ) | [protected, pure virtual] |
Returns the maximum packet size that can be received
GetObexPacketBufferSize()
IMPORT_C TInt | GetObexPacketBufferSize | ( | ) | [protected] |
This function returns the buffer size of the read packet.
GetObexPacketDataLimit()
IMPORT_C TInt | GetObexPacketDataLimit | ( | ) | [protected] |
This function return the maximum limit the received data can be
GetObexPacketHeaderSize()
IMPORT_C TInt | GetObexPacketHeaderSize | ( | ) | [protected] |
This function returns the size of the obex packet's header
OnCompleteTransfer()
IMPORT_C void | OnCompleteTransfer | ( | ) | [protected, virtual] |
Performs any actions necessary on completion of a read.
OnReadActivity()
IMPORT_C void | OnReadActivity | ( | ) | [protected] |
Called when read activity is detected. This method will certainly be called when read activity is first detected on an Obex operation, and it may be called from time to time thereafter until that Obex operation is completed.
Remaining()
IMPORT_C TInt | Remaining | ( | ) | [protected, virtual] |
Return the number bytes left to transfer
StartTransfer(CObexPacket &)
IMPORT_C void | StartTransfer | ( | CObexPacket & | aPacket | ) | [protected, virtual] |
Start transfer. Calls into CObexActiveRW, which eventually queues a read
Member Data Documentation
TBool
iGotHeader
TBool
| iGotHeader | [private] |
TInt
iTransferError
TInt
| iTransferError | [private] |
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.