CUpnpHttpServer Class Reference

class CUpnpHttpServer : public CUpnpTcpServer
Base class for HTTP servers. Includes HTTP specific functionality and represents the highest layer of the HTTP stack. Http Server derives from CUpnpTcpServer and adds HTTP related features as sending HTTP messages, queueing messages, forwarding received messages and error codes to observer layer etc. DLNAWebServer.lib
Since
Series60 2.6

Inherits from

Public Member Functions
~CUpnpHttpServer ()
RConnection & ConnectionL ()
RFs & FileSession ()
void MessageExpiredL (CUpnpHttpMessage *)
CUpnpHttpServer * NewL ( MUpnpHttpServerObserver *, RSocketServ *, TInt )
TInt SendMessageL (CUpnpHttpMessage *)
TDesC8 & ServerDescription ()
void SetTransactionCreator ( MUpnpHttpServerTransactionCreator *)
IMPORT_C void StartIPFilteringL ()
void StartL (const TInt )
void Stop ()
IMPORT_C void StopIPFiltering ()
void ToReceiveStackD (CUpnpHttpMessage *)
MUpnpHttpServerTransactionCreator * TransactionCreator ()
Private Member Functions
CUpnpHttpServer ( MUpnpHttpServerObserver *, MUpnpHttpServerTransactionCreator *, RSocketServ *, TInt )
CUpnpTcpSession * ConnectionAcceptedL ( RSocket )
void ConstructL ()
CUpnpHttpSession * GetSession ( TInt )
TBool NewRedirection ( TInt )
TInt TrapSendMessageL (CUpnpHttpMessage *)
Inherited Functions
CActive::CActive(TInt)
CActive::Cancel()
CActive::Deque()
CActive::Extension_(TUint,TAny *&,TAny *)
CActive::IsActive()const
CActive::IsAdded()const
CActive::Priority()const
CActive::SetActive()
CActive::SetPriority(TInt)
CActive::~CActive()
CBase::CBase()
CBase::Delete(CBase *)
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()
CUpnpTcpServer::AcceptConnectionL()
CUpnpTcpServer::BaseConstructL()
CUpnpTcpServer::BindL(const TInt)
CUpnpTcpServer::BindRandomPortL()
CUpnpTcpServer::CUpnpTcpServer(RSocketServ *,TInt,TInt)
CUpnpTcpServer::CancelRetryTimer()
CUpnpTcpServer::CloseSockets()
CUpnpTcpServer::CreateConnectionManagerSessionL()
CUpnpTcpServer::DeleteSession(CUpnpTcpSession *)
CUpnpTcpServer::DoCancel()
CUpnpTcpServer::FileReadBufferSize()
CUpnpTcpServer::FileWriteBufferSize()
CUpnpTcpServer::GetServerAddress(TInetAddr &)
CUpnpTcpServer::HWAddressL()
CUpnpTcpServer::NewPortNumberL()
CUpnpTcpServer::OpenSocketL()
CUpnpTcpServer::PrepareToCloseSockets()
CUpnpTcpServer::RunError(TInt)
CUpnpTcpServer::RunL()
CUpnpTcpServer::ServerAddress(TInetAddr &)
CUpnpTcpServer::ServerPort()
CUpnpTcpServer::SetFileReadBufferSize(TInt)
CUpnpTcpServer::SetFileWriteBufferSize(TInt)
CUpnpTcpServer::SetServerAddress(const TInetAddr &)
CUpnpTcpServer::StartRetryTimer()
CUpnpTcpServer::StartToListenL()
CUpnpTcpServer::StopTcpServerL()
CUpnpTcpServer::TimerEventL(CUpnpNotifyTimer *)
CUpnpTcpServer::~CUpnpTcpServer()
Inherited Enumerations
CActive:TPriority
CUpnpTcpServer:TState
Private Attributes
RFs iFs
MUpnpHttpServerObserver * iObserver
HBufC8 * iServerDescription
Inherited Attributes
CActive::iStatus
CUpnpTcpServer::iActiveIap
CUpnpTcpServer::iClientSocket
CUpnpTcpServer::iCommDbPref
CUpnpTcpServer::iConnectionManagerProxy
CUpnpTcpServer::iFileReadBufferSize
CUpnpTcpServer::iFileWriteBufferSize
CUpnpTcpServer::iRetrySocketTimer
CUpnpTcpServer::iServerAddress
CUpnpTcpServer::iServerPort
CUpnpTcpServer::iServerSocket
CUpnpTcpServer::iSessionList
CUpnpTcpServer::iSocketServ
CUpnpTcpServer::iState
CUpnpTcpServer::iTransactionCreator

Constructor & Destructor Documentation

CUpnpHttpServer(MUpnpHttpServerObserver *, MUpnpHttpServerTransactionCreator *, RSocketServ *, TInt)

CUpnpHttpServer ( MUpnpHttpServerObserver * aObserver,
MUpnpHttpServerTransactionCreator * aCreator,
RSocketServ * aSocketServ,
TInt aActiveIap
) [private]
First phase constructor
Since
Series60 2.6

Parameters

MUpnpHttpServerObserver * aObserver handle to observer.
MUpnpHttpServerTransactionCreator * aCreator
RSocketServ * aSocketServ server socket used for accepting connestions.
TInt aActiveIap number of IAP that should be used for connection.

~CUpnpHttpServer()

~CUpnpHttpServer ( ) [virtual]
Virtual Destructor function.
Since
Series60 2.6

Member Functions Documentation

ConnectionAcceptedL(RSocket)

CUpnpTcpSession * ConnectionAcceptedL ( RSocket aSocket ) [private, virtual]
Accept the incoming connection from listening socket, creates a session and start new listening socket.
Since
Series60 2.6

Parameters

RSocket aSocket Socket that has received a new connection.

ConnectionL()

RConnection & ConnectionL ( )
This method returns the connection handle.
Since
Series60 2.6

ConstructL()

void ConstructL ( ) [private]
By default Symbian 2nd phase constructor is private.
Since
Series60 2.6

FileSession()

RFs & FileSession ( )
This method returns the file session handle.
Since
Series60 2.6

GetSession(TInt)

CUpnpHttpSession * GetSession ( TInt aSessionId ) [private]
Returns session
Since
Series60 3.2

Parameters

TInt aSessionId

MessageExpiredL(CUpnpHttpMessage *)

void MessageExpiredL ( CUpnpHttpMessage * aMessage )
Callback for timer in aMessage. This gets called when timer expires and message is tried to be sent again.
Since
Series60 2.6

Parameters

CUpnpHttpMessage * aMessage Message to be sent.

NewL(MUpnpHttpServerObserver *, RSocketServ *, TInt)

CUpnpHttpServer * NewL ( MUpnpHttpServerObserver * aObserver,
RSocketServ * aSocketServ,
TInt aActiveIap
) [static]
Constructor function.
Since
Series60 2.6

Parameters

MUpnpHttpServerObserver * aObserver Pointer to this HttpServer observer for callback functions.
RSocketServ * aSocketServ Pointer to Socket server.
TInt aActiveIap IAP to use with connection.

NewRedirection(TInt)

TBool NewRedirection ( TInt aSessionId ) [private]
Increments the counter of redirecting and check if no. of redirections is not above the limit
Since
Series60 3.2

Parameters

TInt aSessionId

SendMessageL(CUpnpHttpMessage *)

TInt SendMessageL ( CUpnpHttpMessage * aMessage )
Sends the message.
Since
Series60 2.6

Parameters

CUpnpHttpMessage * aMessage Pointer to message.

ServerDescription()

TDesC8 & ServerDescription ( )
Returns Server's description string.
Since
Series60 2.6

SetTransactionCreator(MUpnpHttpServerTransactionCreator *)

void SetTransactionCreator ( MUpnpHttpServerTransactionCreator * aTransactionCreator )
This function sets handle to transaction creator interface.
Since
Series60 5.0

Parameters

MUpnpHttpServerTransactionCreator * aTransactionCreator pointer to object implementing MUpnpHttpServerTransactionCreator interface.

StartIPFilteringL()

IMPORT_C void StartIPFilteringL ( )

StartL(const TInt)

void StartL ( const TInt aPort )
Starts the HttpServer.
Since
Series60 5.0

Parameters

const TInt aPort HTTP make attempt to start on that port

Stop()

void Stop ( )
Stops the HttpServer.
Since
Series60 2.6

StopIPFiltering()

IMPORT_C void StopIPFiltering ( )

ToReceiveStackD(CUpnpHttpMessage *)

void ToReceiveStackD ( CUpnpHttpMessage * aMsg )
Forwards message to the upper layer.
Since
Series60 2.6

Parameters

CUpnpHttpMessage * aMsg Pointer to message.

TransactionCreator()

MUpnpHttpServerTransactionCreator * TransactionCreator ( )

Gets httpFilter

TrapSendMessageL(CUpnpHttpMessage *)

TInt TrapSendMessageL ( CUpnpHttpMessage * aMessage ) [private]
Function that is used for sending messages. Function first tries to find if message should be sent using existing session - it means that the message is response for request. If session is not found then the new one is created and the message is sent as a request.
Since
Series60 2.6

Parameters

CUpnpHttpMessage * aMessage Message to be sent.

Member Data Documentation

RFs iFs

RFs iFs [private]

MUpnpHttpServerObserver * iObserver

MUpnpHttpServerObserver * iObserver [private]

HBufC8 * iServerDescription

HBufC8 * iServerDescription [private]