CUpnpTcpSession Class Reference
class CUpnpTcpSession : public CBase
|
Constructor & Destructor Documentation
CUpnpTcpSession(RSocket &, TThreadPriority)
Constructor for building
CUpnpTcpSession
. This constructor is used when connection is iniatiated from network. Second-phase construction is made by
TcpConstructL()
.
~CUpnpTcpSession()
~CUpnpTcpSession
|
(
|
)
|
[virtual]
|
Member Functions Documentation
BufferReceivedL(TDesC8 &)
void
|
BufferReceivedL
|
(
|
TDesC8
&
|
aBuffer
|
)
|
[pure virtual]
|
Callback function. Called when data has been received.
-
Since
-
Series60 2.6
Parameters
TDesC8
& aBuffer
|
Data that has been received thru session.
|
CheckConnectionCloseL()
void
|
CheckConnectionCloseL
|
(
|
)
|
[pure virtual]
|
Callback function. Checks if connection uses Connection: Close header, and if so, tries to parse message and send it to upper layers.
-
Since
-
Series60 2.6
CloseSocketL()
Returns current value of the timeout
-
Since
-
Series60 3.2
-
Since
-
Series60 3.2
DeleteServeFileL()
void
|
DeleteServeFileL
|
(
|
)
|
[pure virtual]
|
Callback function. Deletes fileserve of this session.
-
Since
-
Series60 2.6
DeleteThisSessionL(CUpnpTcpSession *)
Callback function. Deletes given session.
-
Since
-
Series60 2.6
DestroyIt(CUpnpTcpSession *)
DisconnectRequestL()
void
|
DisconnectRequestL
|
(
|
)
|
|
Handles disconnect request
-
Since
-
Series60 3.2
DownloadOngoing()
TBool
|
DownloadOngoing
|
(
|
)
|
|
Checks if there are outstanding sending operations.
-
Since
-
Series60 3.2
FileAccess()
Returns a pointer to FileAccess object of this session.
-
Since
-
Series60 3.2
FileServeExists()
TBool
|
FileServeExists
|
(
|
)
|
[pure virtual]
|
Checks if FileServe Exists.
-
Since
-
Series60 2.6
FileTransferReaderConstructL()
void
|
FileTransferReaderConstructL
|
(
|
)
|
[protected]
|
Contructs file transfer reader
-
Since
-
Series60 3.2
FileTransferReaderDoneL()
void
|
FileTransferReaderDoneL
|
(
|
)
|
[pure virtual]
|
Callback function. Notifies http session when upload finished
-
Since
-
Series60 3.2
FileTransferReaderErrorL(TInt)
void
|
FileTransferReaderErrorL
|
(
|
TInt
|
aError
|
)
|
[pure virtual]
|
Callback function. Notifies http session when error in upload
-
Since
-
Series60 3.2
FileTransferWriter()
CUpnpHttpFileTransferWriter *
|
FileTransferWriter
|
(
|
)
|
|
Returns pointer to CUpnpHttpFileTransferWriter
-
Since
-
Series60 3.2
FileTransferWriterConstructL(TInt)
void
|
FileTransferWriterConstructL
|
(
|
TInt
|
aWriteSize
|
)
|
[protected]
|
Contructs file transfer writer
-
Since
-
Series60 3.2
FileTransferWriterDoneL()
void
|
FileTransferWriterDoneL
|
(
|
)
|
[pure virtual]
|
Callback function. Notifies http session when download finished
-
Since
-
Series60 3.2
FileTransferWriterHandleMoreL()
void
|
FileTransferWriterHandleMoreL
|
(
|
)
|
[pure virtual]
|
Callback function. Checks for outstanding downloads
-
Since
-
Series60 3.2
HandleErrorL(TInt)
void
|
HandleErrorL
|
(
|
TInt
|
aError
|
)
|
|
Handles possible error that can occure in the session as well as in reader and writer active objects.
-
Since
-
Series60 3.0
Id()
Returns the SessionId of this session.
-
Since
-
Series60 3.1
InitialReceiveL()
Starts to receive messages to this session
-
Since
-
Series60 3.2
IsConnected()
Checks is session is connected.
-
Since
-
Series60 2.6
IsPersistentConnection()
TBool
|
IsPersistentConnection
|
(
|
)
|
|
Marked if a persistent connection
-
Since
-
Series60 3.2
NotifyDisconnectL(TInetAddr)
void
|
NotifyDisconnectL
|
(
|
TInetAddr
|
aAddr
|
)
|
[pure virtual]
|
Callback function. Notifies upper layers that session has been disconnected.
-
Since
-
Series60 2.6
Parameters
TInetAddr
aAddr
|
Address of remote host.
|
NotifyTimeoutL()
void
|
NotifyTimeoutL
|
(
|
)
|
[pure virtual]
|
NotifyUpperLayersOnPostL()
void
|
NotifyUpperLayersOnPostL
|
(
|
)
|
[pure 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
OutstandingWritings()
TBool
|
OutstandingWritings
|
(
|
)
|
[private]
|
Checks if there are outstanding writing operations.
-
Since
-
Series60 3.2
PostingFileCompleteL()
void
|
PostingFileCompleteL
|
(
|
)
|
[pure virtual]
|
Callback function. Informs upper layers that HTTP POST has been finished
-
Since
-
Series60 2.6
ReceiveL()
Receive messages to this session
-
Since
-
Series60 3.2
ReceivingCompletedL(TDesC8 &)
void
|
ReceivingCompletedL
|
(
|
TDesC8
&
|
aBuffer
|
)
|
|
Callback function for reader object. When the reader gets some data, it forwards it to the session with this callback.
-
Since
-
Series60 3.0
Parameters
TDesC8
& aBuffer
|
buffer with received data.
|
RemoteHost()
TInetAddr
&
|
RemoteHost
|
(
|
)
|
|
Returns the address that session is connected to.
-
Since
-
Series60 2.6
ServerBusyL()
Function that is used to send notification to client and disconnect the session.
-
Since
-
Series60 2.6
ServerPort()
TInt
|
ServerPort
|
(
|
)
|
[pure virtual]
|
Callback function. Returns the port number of parent HttpServer.
-
Since
-
Series60 2.6
SetState(TUpnpTcpSessionState)
Sets session statel.
-
Since
-
Series60 2.6
ShuttingDown()
Checks if the session is being shutdown
-
Since
-
Series60 3.2
SocketServerBusyL(const TInetAddr &)
void
|
SocketServerBusyL
|
(
|
const
TInetAddr
&
|
aAddr
|
)
|
[pure virtual]
|
Callback function. Notifies upper layers that SocketServer is busy.
-
Since
-
Series60 2.6
Parameters
const
TInetAddr
& aAddr
|
Address of remote host.
|
StartClosingSession()
void
|
StartClosingSession
|
(
|
)
|
|
Starts closing the session, no more message to be sent to the client
-
Since
-
Series60 3.2
StartDisconnect(TBool)
void
|
StartDisconnect
|
(
|
TBool
|
aDisconnectNotification = EFalse
|
)
|
|
Starts disconnect session.
-
Since
-
Series60 3.2
Parameters
TBool
aDisconnectNotification = EFalse
|
|
StartDisconnectingTimer(TInt)
void
|
StartDisconnectingTimer
|
(
|
TInt
|
aTime = 500
|
)
|
|
Starts the timeoutTimer for session. Session is deleted after 0.5ms by default.
-
Since
-
Series60 2.6
StartTimeoutTimer(TBool)
void
|
StartTimeoutTimer
|
(
|
TBool
|
aSessionErrorReplyNeeded
|
)
|
|
Starts the timeoutTimer for session. If timer expires, no reply has been sent to remote host.
-
Since
-
Series60 2.6
Parameters
TBool
aSessionErrorReplyNeeded
|
ETrue, if in timeout there should be sent HTTP error 408 Server timeout.
|
TcpConstructL(RSocket, TInt, TInt)
void
|
TcpConstructL
|
(
|
RSocket
|
aSocket,
|
|
TInt
|
aReadBufferSize,
|
|
TInt
|
aFileReadBufferSize
|
|
)
|
|
Second phase constructor for building
CUpnpTcpSession
. This constructor is used when connection is iniatiated from network.
Parameters
RSocket
aSocket
|
Pointer to new Socket which is already connected to remote host.
|
TInt
aReadBufferSize
|
|
TInt
aFileReadBufferSize
|
|
TimeoutCurrentValue()
TInt
|
TimeoutCurrentValue
|
(
|
)
|
|
TimerCancel()
Cancel timer
-
Since
-
Series60 3.2
TimerEventL(CUpnpNotifyTimer *)
Callback function for timer expirations.
-
Since
-
Series60 2.6
WaitRetryError(TInt, TBool)
void
|
WaitRetryError
|
(
|
TInt
|
aError,
|
|
TBool
|
aStartTimer = EFalse
|
|
)
|
|
Callback function for writer object. When the request writing is not completed due to an error, a new attempt to write is being made...
-
Since
-
Series60 3.2
WriteL(const TDesC8 &)
void
|
WriteL
|
(
|
const
TDesC8
&
|
aBuffer
|
)
|
|
Writes data thru this session's socket
-
Since
-
Series60 2.6
Parameters
const
TDesC8
& aBuffer
|
Data to write.
|
WritingCompletedL()
void
|
WritingCompletedL
|
(
|
)
|
|
Callback function for writer object. When the request writing is completed then writer calls this function to notify session about it.
-
Since
-
Series60 3.0
Member Enumerations Documentation
Enum TUpnpTcpSessionState
State of session.
-
EnotConnected - Connection is not established yet.
-
EConnecting - TcpSession requested connection in asynchronous mode.
-
EConnected - Connection is established, TcpReader is started and TcpWriter can write to the socket.
-
EDisconnecting - Session is about to be disconnected but socket is not closed so TcpWriter can still write a response.
-
EServerBusy - Server is already occupied with processing requests so no other session can be established.
Enumerators
ENotConnected
|
|
EConnecting
|
|
EConnected
|
|
EDisconnecting
|
|
EShuttingDownWriteWait
|
|
EShuttingDownStop
|
|
EShuttingDown
|
|
EServerBusy
|
|
Member Data Documentation
TInetAddr
iAddr
TInetAddr
|
iAddr
|
[protected]
|
TBool
iContinuedMessageDownload
TBool
|
iContinuedMessageDownload
|
[protected]
|
TBool
iDisconnectNotification
TBool
|
iDisconnectNotification
|
[protected]
|
TInt
iExportRetryCounter
TInt
|
iExportRetryCounter
|
[protected]
|
CUpnpHttpFileTransferReader * iFTReader
CUpnpHttpFileTransferWriter * iFTWriter
CUpnpHttpFileTransferWriter *
|
iFTWriter
|
[protected]
|
TInt
iFileReadBufferSize
TInt
|
iFileReadBufferSize
|
[protected]
|
TThreadPriority
iInitialPriority
TBool
iIsPersistent
TBool
|
iIsPersistent
|
[protected]
|
TBool
iPendingPostRequests
TBool
|
iPendingPostRequests
|
[protected]
|
CUpnpHttpBuffer * iReceivedMessage
CUpnpHttpBuffer *
|
iReceivedMessage
|
[protected]
|
TBool
iSaveToFile
TBool
|
iSaveToFile
|
[protected]
|
TInt
iSessionError
TInt
|
iSessionError
|
[protected]
|
TBool
iSessionKeepAlive
TBool
|
iSessionKeepAlive
|
[protected]
|
TBool
iSessionNeedsErrorReply
TBool
|
iSessionNeedsErrorReply
|
[protected]
|
CUpnpSocketShutdown * iSocketShutdown
TUpnpTcpSessionState
iState
CUpnpTcpSessionReader * iTcpReader
CUpnpTcpSessionReader *
|
iTcpReader
|
[protected]
|
CUpnpTcpSessionWriter * iTcpWriter
CUpnpTcpSessionWriter *
|
iTcpWriter
|
[protected]
|
TInt
iTimeoutCurrentValue
TInt
|
iTimeoutCurrentValue
|
[protected]
|
TInt
iTimeoutSessionValue
TInt
|
iTimeoutSessionValue
|
[protected]
|
CUpnpNotifyTimer * iTimeoutTimer
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.