CUpnpHttpSession Class Reference
class CUpnpHttpSession : public CUpnpTcpSession
|
Private Member Functions
|
|
CUpnpHttpSession
(
RSocket
,
CUpnpHttpServer
*,
TInt
,
TThreadPriority
)
|
void
|
BufferReceivedCheckingHeadersL
(
TDesC8
&)
|
void
|
BufferReceivedProcessL
(
TDesC8
&)
|
void
|
CheckConnectionCloseL
()
|
void
|
CheckSessionPersistence
(CUpnpHttpMessage *)
|
void
|
ConstructL
()
|
void
|
FileTransferReaderDoneL
()
|
void
|
FileTransferReaderErrorL
(
TInt
)
|
void
|
FileTransferWriterDoneL
()
|
void
|
FileTransferWriterHandleMoreL
()
|
void
|
HandleQueryL
(CUpnpHttpMessage *)
|
THttpInvalidMessage
|
IsValidMessage
(CUpnpHttpMessage *)
|
TInt
|
MatchHttpError
(
TInt
)
|
void
|
NotifyDisconnectL
(
TInetAddr
)
|
void
|
NotifyTimeoutL
()
|
void
|
NotifyUpperLayerLD
(CUpnpHttpMessage *)
|
void
|
NotifyUpperLayersOnPostL
()
|
void
|
PostingFileCompleteL
()
|
TInt
|
PrepareRangeHeaderL
(CUpnpHttpMessage *,
TBool
,
TInt
,
CUpnpHttpServerTransaction
&,
TInt
&,
TInt
&,
TInt
&)
|
TPtrC8
|
PrepareRelativeUriL
(const
TDesC8
&)
|
TInt
|
PrepareToServeFileL
(CUpnpHttpMessage *)
|
void
|
ResetSettingsL
()
|
void
|
ResponseErrorL
(
TInt
)
|
void
|
SinglePostBufferReceivedL
(
TDesC8
&)
|
void
|
SocketServerBusyL
(const
TInetAddr
&)
|
void
|
WriteMsgAndHeaderL
(CUpnpHttpMessage *, const
TDesC8
&, const
TDesC
&,
TInt
,
TInt
, const
TInt
, const
TInt
)
|
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()
|
|
CUpnpTcpSession::CUpnpTcpSession(RSocket &,TThreadPriority)
|
|
CUpnpTcpSession::CancelTcpReader()
|
|
CUpnpTcpSession::CloseSocketL()
|
|
CUpnpTcpSession::DisconnectRequestL()
|
|
CUpnpTcpSession::DownloadOngoing()
|
|
CUpnpTcpSession::FileTransferReader()
|
|
CUpnpTcpSession::FileTransferReaderConstructL()
|
|
CUpnpTcpSession::FileTransferWriter()
|
|
CUpnpTcpSession::FileTransferWriterConstructL(TInt)
|
|
CUpnpTcpSession::HandleErrorL(TInt)
|
|
CUpnpTcpSession::Id()
|
|
CUpnpTcpSession::InitialReceiveL()
|
|
CUpnpTcpSession::IsConnected()
|
|
CUpnpTcpSession::IsPersistentConnection()
|
|
CUpnpTcpSession::ReceiveL()
|
|
CUpnpTcpSession::ReceivingCompletedL(TDesC8 &)
|
|
CUpnpTcpSession::RemoteHost()
|
|
CUpnpTcpSession::ServerBusyL()
|
|
CUpnpTcpSession::ShutdownStop()
|
|
CUpnpTcpSession::ShuttingDown()
|
|
CUpnpTcpSession::StartClosingSession()
|
|
CUpnpTcpSession::StartDisconnect(TBool)
|
|
CUpnpTcpSession::StartDisconnectingTimer(TInt)
|
|
CUpnpTcpSession::StartTimeoutTimer(TBool)
|
|
CUpnpTcpSession::TcpConstructL(RSocket,TInt,TInt)
|
|
CUpnpTcpSession::TimeoutCurrentValue()
|
|
CUpnpTcpSession::TimerCancel()
|
|
CUpnpTcpSession::TimerEventL(CUpnpNotifyTimer *)
|
|
CUpnpTcpSession::WaitRetryError(TInt,TBool)
|
|
CUpnpTcpSession::WriteL(const TDesC8 &)
|
|
CUpnpTcpSession::WritingCompletedL()
|
|
CUpnpTcpSession::~CUpnpTcpSession()
|
Constructor & Destructor Documentation
CUpnpHttpSession(RSocket, CUpnpHttpServer *, TInt, TThreadPriority)
First phase constructor. This constructor is used when connection is iniatiated from network.
-
Since
-
Series60 2.6
~CUpnpHttpSession()
~CUpnpHttpSession
|
(
|
)
|
[virtual]
|
Virtual Destructor function.
Member Functions Documentation
BufferReceivedCheckingHeadersL(TDesC8 &)
void
|
BufferReceivedCheckingHeadersL
|
(
|
TDesC8
&
|
aBuffer
|
)
|
[private]
|
Received buffer checking headers for a message coming from network.
-
Since
-
Series60 2.6
Parameters
TDesC8
& aBuffer
|
Buffer that has been received.
|
BufferReceivedL(TDesC8 &)
void
|
BufferReceivedL
|
(
|
TDesC8
&
|
aBuffer
|
)
|
[virtual]
|
Callback function from TcpSession. Session has received aBuffer from network.
-
Since
-
Series60 2.6
Parameters
TDesC8
& aBuffer
|
Buffer that has been received.
|
BufferReceivedProcessL(TDesC8 &)
void
|
BufferReceivedProcessL
|
(
|
TDesC8
&
|
aBuffer
|
)
|
[private]
|
Received buffer processing from network.
-
Since
-
Series60 2.6
Parameters
TDesC8
& aBuffer
|
Buffer that has been received.
|
CheckConnectionCloseL()
void
|
CheckConnectionCloseL
|
(
|
)
|
[private, virtual]
|
Checks if session uses Connection close communication.
-
Since
-
Series60 2.6
CheckSessionPersistence(CUpnpHttpMessage *)
void
|
CheckSessionPersistence
|
(
|
CUpnpHttpMessage *
|
aMsg
|
)
|
[private]
|
Checks session and message against persistence
-
Since
-
Series60 3.2
ConstructL()
void
|
ConstructL
|
(
|
)
|
[private]
|
DeleteFileIfExists(TDesC16 &)
void
|
DeleteFileIfExists
|
(
|
TDesC16
&
|
aFilename
|
)
|
|
Deletes a file named aFilename if it exists. Used in receiving files to delete file if it already exists.
-
Since
-
Series60 2.6
Parameters
TDesC16
& aFilename
|
File to be deleted.
|
DeleteServeFileL()
void
|
DeleteServeFileL
|
(
|
)
|
[virtual]
|
Deletes the FileAccess of this session.
-
Since
-
Series60 2.6
DeleteThisSessionL(CUpnpTcpSession *)
Deletes current session.
-
Since
-
Series60 2.6
DestroyIt(CUpnpTcpSession *)
FileAccess()
Returns a pointer to file transfer object of this session.
-
Since
-
Series60 2.6
FileServeExists()
TBool
|
FileServeExists
|
(
|
)
|
[protected, virtual]
|
Returns ETrue, if fileserve exists.
-
Since
-
Series60 2.6
FileTransferReaderDoneL()
void
|
FileTransferReaderDoneL
|
(
|
)
|
[private, virtual]
|
File Transfer Reader callback when upload done
-
Since
-
Series60 3.2
FileTransferReaderErrorL(TInt)
void
|
FileTransferReaderErrorL
|
(
|
TInt
|
aError
|
)
|
[private, virtual]
|
File Transfer Reader callback when upload with error
-
Since
-
Series60 3.2
FileTransferWriterDoneL()
void
|
FileTransferWriterDoneL
|
(
|
)
|
[private, virtual]
|
File Transfer Writer callback when download done
-
Since
-
Series60 3.2
FileTransferWriterHandleMoreL()
void
|
FileTransferWriterHandleMoreL
|
(
|
)
|
[private, virtual]
|
File Transfer Writer callback for handling more downloads
-
Since
-
Series60 3.2
HandleQueryL(CUpnpHttpMessage *)
void
|
HandleQueryL
|
(
|
CUpnpHttpMessage *
|
aMsg
|
)
|
[private]
|
Decides what to do with the message, should it be sent to upper layer, Takes ownership of a parameter (it should be popped from cleanup stack before call
-
Since
-
Series60 2.6
Parameters
CUpnpHttpMessage * aMsg
|
Message to check.
|
HttpServer()
Returns HttpServer pointer
-
Since
-
Series60 3.2
IsMsgReady()
Returns ETrue when message is totally downloaded [completed]
-
Since
-
Series60 3.2
IsValidMessage(CUpnpHttpMessage *)
Checks message validity. Returns type of error.
-
Since
-
Series60 2.6
Parameters
CUpnpHttpMessage * aMsg
|
Message to check.
|
Length()
Returns the length of file content to be requested.
MatchHttpError(TInt)
TInt
|
MatchHttpError
|
(
|
TInt
|
error
|
)
|
[private]
|
Matches an error to a proper HTTP error code to be matched
NewL(RSocket, CUpnpHttpServer *, TInt, TThreadPriority)
Constructor function. This constructor is used when connection is iniatiated from network.
NotifyDisconnectL(TInetAddr)
void
|
NotifyDisconnectL
|
(
|
TInetAddr
|
aAddr
|
)
|
[private, virtual]
|
Notifies upper layers that session has disconnected.
-
Since
-
Series60 2.6
Parameters
TInetAddr
aAddr
|
Address of remote host to which the connection has been disconnected.
|
NotifyErrorL(TInt, TInt)
Notifies upper layers that there is a HTTP error.
-
Since
-
Series60 3.2
NotifyTimeoutL()
void
|
NotifyTimeoutL
|
(
|
)
|
[private, virtual]
|
Notifies upper layers that session has expired
-
Since
-
Series60 3.2
NotifyUpperLayerLD(CUpnpHttpMessage *)
void
|
NotifyUpperLayerLD
|
(
|
CUpnpHttpMessage *
|
aMessage
|
)
|
[private]
|
Notifies upper layers with error message. Method guarantee destrustion of parameter (even when leave ocure), and parameter should be poped from cleanupstack
-
Since
-
Series60 2.6
Parameters
CUpnpHttpMessage * aMessage
|
message that will be sent to upper layer.
|
NotifyUpperLayersOnPostL()
void
|
NotifyUpperLayersOnPostL
|
(
|
)
|
[private, virtual]
|
Callback function. Informs upper layers that HTTP POST has been started by sending HTTP error code 801 message to upper layers.
-
Since
-
Series60 2.6
Offset()
Returns offset of the file that should be requested from server.
OverwriteExisting()
TBool
|
OverwriteExisting
|
(
|
)
|
|
Should the existing local file be overwritten with the requested content. If not then the new file with name: iInFilename_serialNumber will be created to save incoming content. It's connected only with download.
PostingFileCompleteL()
void
|
PostingFileCompleteL
|
(
|
)
|
[private, virtual]
|
Callback function. Informs upper layers that HTTP POST has been finished.
-
Since
-
Series60 2.6
PrepareRangeHeaderL(CUpnpHttpMessage *, TBool, TInt, CUpnpHttpServerTransaction &, TInt &, TInt &, TInt &)
PrepareRelativeUriL(const TDesC8 &)
TPtrC8
|
PrepareRelativeUriL
|
(
|
const
TDesC8
&
|
aUri
|
)
|
[private]
|
Function to cut Ip and port from absoulute Uri in get request, it only cuts them when they are same as http server ones
-
Since
-
S60 5.1
PrepareToServeFileL(CUpnpHttpMessage *)
TInt
|
PrepareToServeFileL
|
(
|
CUpnpHttpMessage *
|
aMsg
|
)
|
[private]
|
Prepares serve a file. Checks that file exists and paths are correct. Checks filesize and so on.
-
Since
-
Series60 2.6
Parameters
CUpnpHttpMessage * aMsg
|
Message to check.
|
ResetSettingsL()
void
|
ResetSettingsL
|
(
|
)
|
[private]
|
Resets settings after upload
-
Since
-
Series60 3.2
ResponseErrorL(TInt)
void
|
ResponseErrorL
|
(
|
TInt
|
aStatus
|
)
|
[private]
|
Repsonse with HTTP error mesage to remoteServer
-
Since
-
Series60 2.6
Parameters
TInt
aStatus
|
Number of status code
|
SaveAtOffset()
Returns if should the requested offset of the remote file be saved at physical offset of existing local file. Only for Range requests
SendL(CUpnpHttpMessage *)
void
|
SendL
|
(
|
CUpnpHttpMessage *
|
aMessage
|
)
|
|
Sends aMessage to session's remote host.
-
Since
-
Series60 2.6
Parameters
CUpnpHttpMessage * aMessage
|
Message to be sent.
|
ServerPort()
TInt
|
ServerPort
|
(
|
)
|
[protected, virtual]
|
Returns the port of this HttpSession.
-
Since
-
Series60 2.6
SetRedirectCount()
TBool
|
SetRedirectCount
|
(
|
)
|
|
Increments the redirect counter
-
Since
-
Series60 3.2
SinglePostBufferReceivedL(TDesC8 &)
void
|
SinglePostBufferReceivedL
|
(
|
TDesC8
&
|
aBuffer
|
)
|
[private]
|
Single POST buffer processing
Parameters
TDesC8
& aBuffer
|
Buffer that has been received.
|
SocketServerBusyL(const TInetAddr &)
void
|
SocketServerBusyL
|
(
|
const
TInetAddr
&
|
aAddr
|
)
|
[private, virtual]
|
Notifies upper layers that Socket Server is unable to handle any more data by \ sending Expectation failed HTTP error to upper layers.
-
Since
-
Series60 2.6
Parameters
const
TInetAddr
& aAddr
|
Address of remote host to which the connection has been tried to connect
|
WriteMsgAndHeaderL(CUpnpHttpMessage *, const TDesC8 &, const TDesC &, TInt, TInt, const TInt, const TInt)
void
|
WriteMsgAndHeaderL
|
(
|
CUpnpHttpMessage *
|
aMsg,
|
|
const
TDesC8
&
|
aHeaderToWrite,
|
|
const
TDesC
&
|
aPathWithNewMethod,
|
|
TInt
|
aFileSize,
|
|
TInt
|
aRangeStatus,
|
|
const
TInt
|
aStartPos,
|
|
const
TInt
|
aEndPos
|
|
)
|
[private]
|
Parameters
CUpnpHttpMessage * aMsg
|
|
const
TDesC8
& aHeaderToWrite
|
|
const
TDesC
& aPathWithNewMethod
|
|
TInt
aFileSize
|
|
TInt
aRangeStatus
|
|
const
TInt
aStartPos
|
|
const
TInt
aEndPos
|
|
Member Enumerations Documentation
Enum THttpInvalidMessage
Enumerators
EMessageOk = 0
|
|
EUnknownMethod
|
|
Member Data Documentation
HBufC8 * iDestinationPath
HBufC8
*
|
iDestinationPath
|
[private]
|
TBool
iErrorNotified
TBool
|
iErrorNotified
|
[private]
|
CUpnpHttpFileAccess * iFileServe
TBool
iHeadersCompleted
TBool
|
iHeadersCompleted
|
[private]
|
HBufC8 * iInFilename
HBufC8
*
|
iInFilename
|
[private]
|
TBool
iIsChunked
TBool
|
iIsChunked
|
[private]
|
TBool
iMaximumSizeChecked
TBool
|
iMaximumSizeChecked
|
[private]
|
HBufC8 * iOutFilename
HBufC8
*
|
iOutFilename
|
[private]
|
TBool
iOverwriteExisting
TBool
|
iOverwriteExisting
|
[private]
|
TAny * iPendingRequest
TAny
*
|
iPendingRequest
|
[private]
|
RPointerArray< CUpnpHttpMessage > * iPendingRequests
THTTPMsgType iRequestType
THTTPMsgType
|
iRequestType
|
[private]
|
TBool
iRequestedTransferNotifySent
TBool
|
iRequestedTransferNotifySent
|
[private]
|
TInt
iRetryCounter
TInt
|
iRetryCounter
|
[private]
|
TBool
iSaveAtOffset
TBool
|
iSaveAtOffset
|
[private]
|
HBufC8 * iSenderPath
HBufC8
*
|
iSenderPath
|
[private]
|
CUpnpHttpServer * iServer
TBool
iSessionIsDeletedAfterResponse
TBool
|
iSessionIsDeletedAfterResponse
|
[private]
|
TBool
iUsesConnectionClose
TBool
|
iUsesConnectionClose
|
[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.