CUpnpSymbianServerBase Class Reference
class CUpnpSymbianServerBase : public CServer2 |
Base class for all symbian server classes used in upnp stack project This implementation provides:
proper server starting,
2 seconds stoping timeout,
stopping server if ( no connected clients && CanBeStopped() ) CanBeStopped() SuggestShutdown()
session connection version checking,
basic panics utility functions,
basic errors handling Note that it should be used with client part implementation that use RUpnpSessionBase class.
upnpipserversutils
Constructor & Destructor Documentation
CUpnpSymbianServerBase()
IMPORT_C | CUpnpSymbianServerBase | ( | ) | [protected] |
~CUpnpSymbianServerBase()
IMPORT_C | ~CUpnpSymbianServerBase | ( | ) | |
Member Functions Documentation
BaseConstructL()
IMPORT_C void | BaseConstructL | ( | ) | [protected] |
Second phase base constructor. It must be called by derived class.
CanBeStopped()
IMPORT_C TBool | CanBeStopped | ( | ) | const [private, virtual] |
Derived classes can implement in the method additional condidions of stopping server process that will be checked in SuggestShutdown method and befor actual server stopping. Default implementation provides no additional condidions.
DecrementSessionCount()
void | DecrementSessionCount | ( | ) | [private] |
Decrement the count of the active sessions for this server.
IncrementSessionCount()
void | IncrementSessionCount | ( | ) | [private] |
Increment the count of the active sessions for this server.
NewSessionL(const RMessage2 &)
NewSessionL(const TVersion &, const RMessage2 &)
This method wraps pure virtual NewSessionL(const RMessage2&) and leaves with KErrNotSupported if aVersion is different from version provided by pure virtual SupportedVersion.
PanicClient(const RMessage2 &, TInt)
IMPORT_C void | PanicClient | ( | const RMessage2 & | aMessage, |
| TInt | aReason |
| ) | const |
Parameters
const RMessage2 & aMessage | the message channel to the client. |
TInt aReason | the reason code for the panic. |
PanicServer(TInt)
IMPORT_C void | PanicServer | ( | TInt | aPanic | ) | const [protected] |
Parameters
TInt aPanic | the panic code. |
RunError(TInt)
IMPORT_C TInt | RunError | ( | TInt | aError | ) | [protected, virtual] |
Parameters
TInt aError | the leave code reported. |
RunL()
IMPORT_C void | RunL | ( | ) | [protected, virtual] |
Invoked by active object framework to handle ending events
ServerName()
const TDesC & | ServerName | ( | ) | const [private, pure virtual] |
StartServer(const TDesC &, TServerFactoryMethodLC)
Fully initialise thread, and start the server. Method is intended to be called from E32Main method without any earlier initialisation.
Parameters
const TDesC & aThreadName | name to which thread will be renamed. |
TServerFactoryMethodLC aServerFactoryMethodLC | two phase constructor of server object that leaves it on cleanup stack. |
StartServerL(const TDesC &, TServerFactoryMethodLC)
Internal method that initialises thread, and starts the server. Precondition is that cleanup stack is correctly initialised and method is called from within a TRAP.
Parameters
const TDesC & aThreadName | name to which thread will be renamed. |
TServerFactoryMethodLC aServerFactoryMethodLC | two phase constructor of server object that leaves it on cleanup stack. |
SuggestShutdown()
IMPORT_C void | SuggestShutdown | ( | ) | [protected] |
Method should be called when derived class wants to suggest closing of the media server. This method checks every stop condidion and starts closing server timeout if all of them are fulfilled.
SupportedVersion()
TVersion
| SupportedVersion | ( | ) | const [private, pure virtual] |
Returns version that is supported by this server.
TimerEventL(CUpnpNotifyTimer *)
Invoked by shutdown timer when event TimerEventL occured.
Member Enumerations Documentation
Enum TUpnpSymbianServerPanics
Enumerators
ECreateTrapCleanup | |
EBadRequest | |
EBadDescriptor | |
EFirstUnusedPanicNumber | |
Member Data Documentation
TInt
iSessionCount
TInt
| iSessionCount | [private] |
CUpnpNotifyTimer * iShutdownTimer
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.