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()
voidMessageExpiredL(CUpnpHttpMessage *)
CUpnpHttpServer *NewL(MUpnpHttpServerObserver *, RSocketServ *, TInt)
TInt SendMessageL(CUpnpHttpMessage *)
TDesC8 &ServerDescription()
voidSetTransactionCreator(MUpnpHttpServerTransactionCreator *)
IMPORT_C voidStartIPFilteringL()
voidStartL(const TInt)
voidStop()
IMPORT_C voidStopIPFiltering()
voidToReceiveStackD(CUpnpHttpMessage *)
MUpnpHttpServerTransactionCreator *TransactionCreator()
Private Member Functions
CUpnpHttpServer(MUpnpHttpServerObserver *, MUpnpHttpServerTransactionCreator *, RSocketServ *, TInt)
CUpnpTcpSession *ConnectionAcceptedL(RSocket)
voidConstructL()
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,
TIntaActiveIap
)[private]
First phase constructor
Since
Series60 2.6

Parameters

MUpnpHttpServerObserver * aObserverhandle to observer.
MUpnpHttpServerTransactionCreator * aCreator
RSocketServ * aSocketServserver socket used for accepting connestions.
TInt aActiveIapnumber 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(RSocketaSocket)[private, virtual]
Accept the incoming connection from listening socket, creates a session and start new listening socket.
Since
Series60 2.6

Parameters

RSocket aSocketSocket that has received a new connection.

ConnectionL()

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

ConstructL()

voidConstructL()[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(TIntaSessionId)[private]
Returns session
Since
Series60 3.2

Parameters

TInt aSessionId

MessageExpiredL(CUpnpHttpMessage *)

voidMessageExpiredL(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 * aMessageMessage to be sent.

NewL(MUpnpHttpServerObserver *, RSocketServ *, TInt)

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

Parameters

MUpnpHttpServerObserver * aObserverPointer to this HttpServer observer for callback functions.
RSocketServ * aSocketServPointer to Socket server.
TInt aActiveIapIAP to use with connection.

NewRedirection(TInt)

TBool NewRedirection(TIntaSessionId)[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 * aMessagePointer to message.

ServerDescription()

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

SetTransactionCreator(MUpnpHttpServerTransactionCreator *)

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

Parameters

MUpnpHttpServerTransactionCreator * aTransactionCreatorpointer to object implementing MUpnpHttpServerTransactionCreator interface.

StartIPFilteringL()

IMPORT_C voidStartIPFilteringL()

StartL(const TInt)

voidStartL(const TIntaPort)
Starts the HttpServer.
Since
Series60 5.0

Parameters

const TInt aPortHTTP make attempt to start on that port

Stop()

voidStop()
Stops the HttpServer.
Since
Series60 2.6

StopIPFiltering()

IMPORT_C voidStopIPFiltering()

ToReceiveStackD(CUpnpHttpMessage *)

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

Parameters

CUpnpHttpMessage * aMsgPointer 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 * aMessageMessage to be sent.

Member Data Documentation

RFs iFs

RFs iFs[private]

MUpnpHttpServerObserver * iObserver

MUpnpHttpServerObserver *iObserver[private]

HBufC8 * iServerDescription

HBufC8 *iServerDescription[private]