CUpnpHttpFileTransferReader Class Reference
class CUpnpHttpFileTransferReader : public CActive |
CUpnpHttpFileTransferReader is responsible for asynchronous reading. Reader starta reading in asynchronous mode. Issues reading and then waits for the operation to be completed. When it is completed then received data is forwarded to upper layer -
CUpnpTcpSession and the new read operation is issues. This continues in loop until the
Cancel() is invoked or object is destroyed. DLNAWebServer.lib
- Since
- Series60 3.2
Inherits from
- CUpnpHttpFileTransferReader
Constructor & Destructor Documentation
CUpnpHttpFileTransferReader(CUpnpTcpSession &, RSocket &, TThreadPriority, TInt, TInt)
Parameters
CUpnpTcpSession & aSession | session that runs and supervises reader. |
RSocket & aSocket | socket from which data will be read. |
TThreadPriority aPriority | priority with which the reader will be working. |
TInt aReadPortion | - size of the buffer to read from the socket |
TInt aBufferSize | - the buffer size |
~CUpnpHttpFileTransferReader()
~CUpnpHttpFileTransferReader | ( | ) | [virtual] |
Virtual destructor.
- Since
- Series60 3.2
Member Functions Documentation
Activated()
Checks if the reader is started meaning in use
- Since
- Series60 3.2
AppendL(const TDesC8 &)
void | AppendL | ( | const TDesC8 & | aBeginning | ) | |
Appends first portion of data to the buffer.
- Since
- Series60 3.2
AvailableSpace()
TInt
| AvailableSpace | ( | ) | [protected] |
Returns how many bytes will still fit into the buffer
- Since
- Series60 3.2
BaseConstructL()
void | BaseConstructL | ( | ) | [protected] |
Base constructor to be used also in derived classes.
- Since
- Series60 3.2
CalculateBufferSize(TInt, TInt)
TInt
| CalculateBufferSize | ( | TInt | aReadPortion, |
| TInt | aBufferSize |
| ) | [static] |
Calculates the buffer size as exponent of 2 and proper for read portions
- Since
- Series60 3.2
CancelTimers()
Cancel the timers
- Since
- Series60 3.2
DoCancel()
void | DoCancel | ( | ) | [protected, virtual] |
Cancels issued reading request. Standard active object function
- Since
- Series60 3.2
Finish()
void | Finish | ( | ) | [protected, virtual] |
Finish the session
- Since
- Series60 3.2
HandleError()
void | HandleError | ( | ) | [protected] |
Handles leave from RunL
- Since
- Series60 3.2
HandleL()
TBool
| HandleL | ( | ) | [protected, virtual] |
Handles buffer of data
- Since
- Series60 3.2
HandleOneBufferShortTransferL()
void | HandleOneBufferShortTransferL | ( | ) | [protected] |
If content length is less than single buffer size transaction is completed and session is closed
- Since
- Series60 3.2
InitiateBufferL()
void | InitiateBufferL | ( | ) | [protected] |
Initiates the buffer
- Since
- Series60 3.2
IssueRead()
void | IssueRead | ( | ) | [protected] |
Issues reading in asynchronous mode.
- Since
- Series60 3.2
NewL(CUpnpTcpSession &, RSocket &, TThreadPriority, TInt, TInt)
Parameters
CUpnpTcpSession & aSession | session that runs and supervises reader. |
RSocket & aSocket | socket from which data will be read. |
TThreadPriority aPriority | priority with which the reader will be working. |
TInt aReadPortion | - size of the buffer to read from the socket |
TInt aBufferSize | - the buffer size |
ReadBufferSize()
TInt
| ReadBufferSize | ( | ) | [protected, virtual] |
Remaing number of bytes to read.
- Since
- Series60 3.2
ReadFromSocket()
void | ReadFromSocket | ( | ) | [protected, virtual] |
Reads from socket
- Since
- Series60 3.2
RemainingBytes()
TInt
| RemainingBytes | ( | ) | [protected, virtual] |
Remaing number of bytes to read.
- Since
- Series60 3.2
Reset()
Resets some member values to start reading data
- Since
- Series60 3.2
RunError(TInt)
TInt
| RunError | ( | TInt | aError | ) | [protected, virtual] |
Trap RunL leaves Standard active object function
- Since
- Series60 3.2
RunL()
void | RunL | ( | ) | [protected, virtual] |
Function called when the read request is finished. Standard active object function
- Since
- Series60 3.2
SetActivated(TBool)
void | SetActivated | ( | TBool | aValue | ) | |
Sets the state of the reader to activated
- Since
- Series60 3.2
StartCancelTimer()
void | StartCancelTimer | ( | ) | [protected] |
Starts the cancel timer.
- Since
- Series60 3.2
StartL()
Starts reading in asynchronous mode.
- Since
- Series60 3.2
TcpFinFoundRemainingBytes()
TInt
| TcpFinFoundRemainingBytes | ( | ) | [protected] |
Returns bytes to be read unless FIN received, then returns 0
- Since
- Series60 3.2
TimerEventL(CUpnpNotifyTimer *)
Callback function for timer expirations.
- Since
- Series60 2.6
Member Data Documentation
TInt
iBufferSize
TInt
| iBufferSize | [protected] |
RBuf8
iCacheBuffer
RBuf8
| iCacheBuffer | [protected] |
TBool
iCancelFromTimer
TBool
| iCancelFromTimer | [protected] |
Variable indicating when the cancel was called from cancel timer.
CUpnpNotifyTimer * iCancelTimer
Timer used for cancel reciving process.
TBool
iIsActivated
TBool
| iIsActivated | [protected] |
TInt
iIsFinished
TInt
| iIsFinished | [protected] |
TInt
iReadBufferSize
TInt
| iReadBufferSize | [protected] |
TPtr8
iReceivePtr
TPtr8
| iReceivePtr | [protected] |
TInt
iRetryErrorCount
TInt
| iRetryErrorCount | [protected] |
CUpnpNotifyTimer * iRetryTimer
Timer used for retry process.
CUpnpTcpSession & iSession
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.