CUpnpHttpFileAccess Class Reference

class CUpnpHttpFileAccess : public CBase
Since
Series60 2.6

Inherits from

Public Member Functions
~CUpnpHttpFileAccess()
TInt BytesWritten()
voidDeleteFile()
TBool Download()
TBool EncodingMode()
TInt EndPosOfFile()
TBool FileExist()
TDesC16 &FileToServe()
const TDesC8 &GetHeaders()
TBool GetL(TPtr8 &, TInt)
TBool HeadersSent()
CUpnpHttpFileAccess *NewL(CUpnpHttpSession *, const TDesC8 &, const TDesC16 &, TInt)
CUpnpHttpFileAccess *NewL(CUpnpHttpSession *, const TDesC16 &)
TUint PosOfFile()
TInt SaveL(TDesC8 &)
voidSetChunkCompleted(TBool)
voidSetEncodingMode(TBool)
voidSetEndPosOfFile(TInt)
voidSetHeadersSent()
voidSetOffset(TUint)
voidSetPosOfFile(TUint)
voidSetPosOfHeader(TUint)
voidSetTotalSize(TInt)
voidSetTransferTotal(TInt)
TInt TransferTotal()
TInt TransferredBytes()
Private Member Functions
CUpnpHttpFileAccess(TInt)
CUpnpHttpFileAccess()
voidConstructL(CUpnpHttpSession *, const TDesC8 &, const TDesC16 &)
voidConstructL(CUpnpHttpSession *, const TDesC16 &)
TBool IsEndOfFile()
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Attributes
TInt iBytesWritten
TInt iEndPosOfFile
RFile iFile
HBufC16 *iFileToServe
RFs iFsSession
HBufC8 *iHeaderBuffer
TInt iHeaderLength
TBool iHeadersSent
TBool iIsChunkCompleted
TBool iIsChunked
TBool iIsDeleted
TBool iIsDownload
TInt iOpen
HBufC *iOpenedFile
TInt iPosInFile
TInt iPosToReadHeader
CUpnpHttpSession *iSession
TInt iSizeOfFile
RFile iTargetFile
TInt iTotalSizeOfDownload

Constructor & Destructor Documentation

CUpnpHttpFileAccess(TInt)

CUpnpHttpFileAccess(TIntaFileSize)[private]
First phase constructor. This constructor is used when file is to be sent from HttpServer.
Since
Series60 2.6

Parameters

TInt aFileSizeSize of file to be served.

CUpnpHttpFileAccess()

CUpnpHttpFileAccess()[private]
First phase constructor. This constructor is used when file is to be received.
Since
Series60 2.6

~CUpnpHttpFileAccess()

~CUpnpHttpFileAccess()

Virtual Destructor function.

Member Functions Documentation

BytesWritten()

TInt BytesWritten()
Returnes the number of bytes written
Since
Series60 3.2

ConstructL(CUpnpHttpSession *, const TDesC8 &, const TDesC16 &)

voidConstructL(CUpnpHttpSession *aSession,
const TDesC8 &aHeaderBuffer,
const TDesC16 &aFilename
)[private]

By default Symbian 2nd phase constructor is private.

Parameters

CUpnpHttpSession * aSessionhandle to parent session that owns this object.
const TDesC8 & aHeaderBufferdescriptor with message headers.
const TDesC16 & aFilename

ConstructL(CUpnpHttpSession *, const TDesC16 &)

voidConstructL(CUpnpHttpSession *aSession,
const TDesC16 &aFilename
)[private]

By default Symbian 2nd phase constructor is private.

Parameters

CUpnpHttpSession * aSessionhandle to parent session that owns this object.
const TDesC16 & aFilename

DeleteFile()

voidDeleteFile()
Deletes file in error cases.
Since
Series60 2.6

Download()

TBool Download()
Returnes if currently handled file is downloaded or uploaded.
Since
Series60 2.6

EncodingMode()

TBool EncodingMode()
Returns the encoding mode
Since
Series60 3.2

EndPosOfFile()

TInt EndPosOfFile()
Returns the position where to stop reading the file.
Since
Series60 2.6

FileExist()

TBool FileExist()
Returnes true if currently handled file is not removed.
Since
Series60 3.2

FileToServe()

TDesC16 &FileToServe()
Returns the filename of the served file.
Since
Series60 2.6

GetHeaders()

const TDesC8 &GetHeaders()
Gets the headers of content to be sent
Since
Series60 3.2

GetL(TPtr8 &, TInt)

TBool GetL(TPtr8 &aPointer,
TIntaBytesToSend
)
Gets bytes to be sent
Since
Series60 3.2

Parameters

TPtr8 & aPointerto write the read content
TInt aBytesToSendNumber of bytes to send.

HeadersSent()

TBool HeadersSent()
True if HTTP headers sent
Since
Series60 3.2

IsEndOfFile()

TBool IsEndOfFile()[private]

Checks if whole file has been read - returns ETrue if yes Close iTargetFile when returns ETrue

NewL(CUpnpHttpSession *, const TDesC8 &, const TDesC16 &, TInt)

CUpnpHttpFileAccess *NewL(CUpnpHttpSession *aSession,
const TDesC8 &aHeaderBuffer,
const TDesC16 &aFilename,
TIntaFileSize
)[static]
Constructor function. This constructor is used when file is served by HttpServer.
Since
Series60 2.6

Parameters

CUpnpHttpSession * aSessionPointer to owning session of this CUpnpHttpFileAccess.
const TDesC8 & aHeaderBufferBuffer that contains the headers of message to be served.
const TDesC16 & aFilenameName of file to be served.
TInt aFileSizeSize of file to be served.

NewL(CUpnpHttpSession *, const TDesC16 &)

CUpnpHttpFileAccess *NewL(CUpnpHttpSession *aSession,
const TDesC16 &aFilename
)[static]
Constructor function. This constructor is used when file is to be received.
Since
Series60 2.6

Parameters

CUpnpHttpSession * aSessionPointer to owning session of this CUpnpHttpFileAccess.
const TDesC16 & aFilenameName of file to be saved locally.

PosOfFile()

TUint PosOfFile()
Returns the reading position of the file.
Since
Series60 2.6

SaveL(TDesC8 &)

TInt SaveL(TDesC8 &aBuffer)
Saves aBuffer at the end of file used in this CUpnpHttpFileAccess.
Since
Series60 3.2

Parameters

TDesC8 & aBufferContent to save (append) to file.

SetChunkCompleted(TBool)

voidSetChunkCompleted(TBoolaCompleted)
True when chunk tranfer completes
Since
Series60 3.2

Parameters

TBool aCompleted

SetEncodingMode(TBool)

voidSetEncodingMode(TBoolaIsChunked)
Sets the encoding mode
Since
Series60 3.2

Parameters

TBool aIsChunked

SetEndPosOfFile(TInt)

voidSetEndPosOfFile(TIntaNewEndPos)
Sets the position where to stop reading the file.
Since
Series60 2.6

Parameters

TInt aNewEndPos

SetHeadersSent()

voidSetHeadersSent()
Called after headers were queued to be sent
Since
Series60 3.2

SetOffset(TUint)

voidSetOffset(TUintaOffset)
Sets the offset of the local file at which should be downloaded content saved.
Since
Series60 2.6

Parameters

TUint aOffset

SetPosOfFile(TUint)

voidSetPosOfFile(TUintaNewPos)
Sets the reading position of the file.
Since
Series60 2.6

Parameters

TUint aNewPosPosition of reading, counting from start of file.

SetPosOfHeader(TUint)

voidSetPosOfHeader(TUintaNewPos)
Sets the reading position of the headerbuffer.
Since
Series60 2.6

Parameters

TUint aNewPosPosition of reading, counting from start of headerbuffer.

SetTotalSize(TInt)

voidSetTotalSize(TIntaSizeToSet)
Sets the total size of file transfer (FileSize).
Since
Series60 2.6

Parameters

TInt aSizeToSet

SetTransferTotal(TInt)

voidSetTransferTotal(TIntaLength)
Sets the size of the transfer
Since
Series60 3.2

Parameters

TInt aLength

TransferTotal()

TInt TransferTotal()
Returns the number of bytes that is to be transferred, ie size of file.
Since
Series60 2.6

TransferredBytes()

TInt TransferredBytes()
Returns the number of bytes that has been transferred
Since
Series60 2.6

Member Data Documentation

TInt iBytesWritten

TInt iBytesWritten[private]

TInt iEndPosOfFile

TInt iEndPosOfFile[private]

RFile iFile

RFile iFile[private]

HBufC16 * iFileToServe

HBufC16 *iFileToServe[private]

RFs iFsSession

RFs iFsSession[private]

HBufC8 * iHeaderBuffer

HBufC8 *iHeaderBuffer[private]

TInt iHeaderLength

TInt iHeaderLength[private]

TBool iHeadersSent

TBool iHeadersSent[private]

TBool iIsChunkCompleted

TBool iIsChunkCompleted[private]

TBool iIsChunked

TBool iIsChunked[private]

TBool iIsDeleted

TBool iIsDeleted[private]

TBool iIsDownload

TBool iIsDownload[private]

TInt iOpen

TInt iOpen[private]

HBufC * iOpenedFile

HBufC *iOpenedFile[private]

TInt iPosInFile

TInt iPosInFile[private]

TInt iPosToReadHeader

TInt iPosToReadHeader[private]

CUpnpHttpSession * iSession

CUpnpHttpSession *iSession[private]

TInt iSizeOfFile

TInt iSizeOfFile[private]

RFile iTargetFile

RFile iTargetFile[private]

TInt iTotalSizeOfDownload

TInt iTotalSizeOfDownload[private]