CApaAppServer Class Reference

class CApaAppServer : public CPolicyServer

Base class for all server application's servers. Server applications must derive from this class to implement their servers. These must be instantiated in an override of CApaApplication::NewAppServerL() . The main task of this class is to create service implementations that clients of a server app may connect to.

CEikAppServer CPolicyServer

Public Member Functions
~CApaAppServer ()
IMPORT_C void ConstructL (const TDesC &)
IMPORT_C CApaAppServiceBase * CreateServiceL ( TUid )
IMPORT_C TCustomResult CreateServiceSecurityCheckL ( TUid , const RMessage2 &, TInt &, TSecurityInfo &)
IMPORT_C void NotifyServerExit ( TInt )
Protected Member Functions
CApaAppServer ()
IMPORT_C TCustomResult CustomSecurityCheckL (const RMessage2 &, TInt &, TSecurityInfo &)
IMPORT_C void DoConnect (const RMessage2 &)
Private Member Functions
IMPORT_C void CApaAppServer_Reserved1 ()
IMPORT_C void CApaAppServer_Reserved2 ()
TUid ConnectMessageServiceUid (const RMessage2 &)
IMPORT_C void ExtensionInterface ( TUid , TAny *&)
IMPORT_C CSession2 * NewSessionL (const TVersion &, const RMessage2 &)
Inherited Functions
CActive::CActive(TInt)
CActive::Cancel()
CActive::Deque()
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()
CPolicyServer::CPolicyServer(TInt,const TPolicy &,TServerType)
CPolicyServer::CheckFailedL(const RMessage2 &,TInt,const TSecurityInfo &)
CPolicyServer::CustomFailureActionL(const RMessage2 &,TInt,const TSecurityInfo &)
CPolicyServer::Extension_(TUint,TAny *&,TAny *)
CPolicyServer::ProcessError(const RMessage2 &,TInt)
CPolicyServer::ProcessL(const RMessage2 &)
CServer2::CServer2(TInt,TServerType)
CServer2::DoCancel()
CServer2::Message()const
CServer2::ReStart()
CServer2::Server()const
CServer2::SetMaster(const CServer2 *)
CServer2::SetPinClientDescriptors(TBool)
CServer2::Start(const TDesC &)
CServer2::StartL(const TDesC &)
CServer2::~CServer2()
Inherited Enumerations
CActive:TPriority
CPolicyServer:TCustomResult
CPolicyServer:TFailureAction
CPolicyServer:TSpecialCase
CServer2:TPanic
CServer2:TServerType
Private Attributes
TInt iApaReserved1
TInt iApaReserved2
Inherited Attributes
CActive::iStatus
CServer2::iSessionIter

Constructor & Destructor Documentation

CApaAppServer()

IMPORT_C CApaAppServer ( ) [protected]

Constructor.

~CApaAppServer()

IMPORT_C ~CApaAppServer ( )

Destructor

Member Functions Documentation

CApaAppServer_Reserved1()

IMPORT_C void CApaAppServer_Reserved1 ( ) [private, virtual]

CApaAppServer_Reserved2()

IMPORT_C void CApaAppServer_Reserved2 ( ) [private, virtual]

ConnectMessageServiceUid(const RMessage2 &)

TUid ConnectMessageServiceUid ( const RMessage2 & aMsg ) const [private]

Parameters

const RMessage2 & aMsg

ConstructL(const TDesC &)

IMPORT_C void ConstructL ( const TDesC & aFixedServerName ) [virtual]

Virtual ConstructL() function to allow second stage construction. This can be overridden for derived class construction, but must be base-called.

Parameters

const TDesC & aFixedServerName - the name that this server will use.

CreateServiceL(TUid)

IMPORT_C CApaAppServiceBase * CreateServiceL ( TUid aServiceType ) const [virtual]

Service creation function. When a client wants to connect to a server app, this function will be called to create the service requested by the client. This function must be overridden by server apps to create their implementations of the requested service. If the server app's implementation of this function does not recognise the service UID, it must base-call.

Parameters

TUid aServiceType The UID of the service that the client wants to connect to.

CreateServiceSecurityCheckL(TUid, const RMessage2 &, TInt &, TSecurityInfo &)

IMPORT_C TCustomResult CreateServiceSecurityCheckL ( TUid aServiceType,
const RMessage2 & aMsg,
TInt & aAction,
TSecurityInfo & aMissing
) [virtual]

Function to allow security checks on the client before they connect to a service. Server apps should override this method if they want to restict connections to some services to clients with particular capabilities. CPolicyServer

Parameters

TUid aServiceType The UID of the service that the client wants to connect to.
const RMessage2 & aMsg The message to check.
TInt & aAction A reference to the action to take if the security check fails. This is either a value from TFailureAction or a negative value which has meaning to the CustomFailureActionL() method of a derived class. The policy server framework gives this value a default of EFailClient. If a derived implementation wishes a different value, then it should change this.
TSecurityInfo & aMissing A reference to the list of security attributes missing from the checked process. The policy server initialises this object to zero (that is a sid of 0, a vid of 0, and no capabilities). If derived implementations wish to take advantage of a list of missing attributes in their implementation of CustomFailureActionL(), then they should set those missing attributes here in CustomSecurityCheckL().

CustomSecurityCheckL(const RMessage2 &, TInt &, TSecurityInfo &)

IMPORT_C TCustomResult CustomSecurityCheckL ( const RMessage2 & aMsg,
TInt & aAction,
TSecurityInfo & aMissing
) [protected, virtual]

The server's main security checking function. This delegates connect checks to CreateServiceSecurityCheckL and checks on other messages to the target service implementation's SecurityCheckL function. For framework use only.

Parameters

const RMessage2 & aMsg
TInt & aAction
TSecurityInfo & aMissing

DoConnect(const RMessage2 &)

IMPORT_C void DoConnect ( const RMessage2 & aMessage ) [protected, virtual]

Parameters

const RMessage2 & aMessage

ExtensionInterface(TUid, TAny *&)

IMPORT_C void ExtensionInterface ( TUid aInterfaceId,
TAny *& aImplementaion
) [private, virtual]

Extension mechanism - for internal BC proofing.

Parameters

TUid aInterfaceId
TAny *& aImplementaion

NewSessionL(const TVersion &, const RMessage2 &)

IMPORT_C CSession2 * NewSessionL ( const TVersion & aVersion,
const RMessage2 & aMessage
) const [private, virtual]

Creates a server-side session object.

The session represents a communication link between a client and a server, and its creation is initiated by the client through a call to one of the RSessionBase::CreateSession() variants.

A server must provide an implementation, which as a minimum should:

  • check that the version of the server is compatible with the client by comparing the client supplied version number against the server's version number; it should leave if there is incompatibility.

  • construct and return the server side client session object.

User::QueryVersionSupported()

Parameters

const TVersion & aVersion The version information supplied by the client.
const RMessage2 & aMessage Represents the details of the client request that is requesting the creation of the session.

NotifyServerExit(TInt)

IMPORT_C void NotifyServerExit ( TInt aReason )

Notifies clients that the server is going to exit. If a server application exits for any non-standard reason (ie anything except EEikCmdExit) this function should be called to forward the reason to the client. The UI framework will call this with EEikCmdExit if it has not already been done. CEikAppUi::Exit

Parameters

TInt aReason The exit reason from the server app. This will either be a command ID, eg EEikCmdExit, or an error code, eg KErrServerTerminated.

Member Data Documentation

TInt iApaReserved1

TInt iApaReserved1 [private]

TInt iApaReserved2

TInt iApaReserved2 [private]