CApaAppServiceBase Class Reference

class CApaAppServiceBase : public CSession2

Base class for all service implementations. Provides the basic IPC and security framework that server applications can use to receive messages from their clients. In a typical service implementation, a service support class will be derived from this class, and the service implementation will then be derived from the service support class.

Instances of this class are created by the server application in its override of CApaAppServer::CreateServiceL().

CApaAppServer CPolicyServer

Inherits from

Constructor & Destructor Documentation

CApaAppServiceBase()

IMPORT_CCApaAppServiceBase()

Constructor.

~CApaAppServiceBase()

IMPORT_C~CApaAppServiceBase()

Destructor.

Member Functions Documentation

CApaAppServiceBase_Reserved1()

IMPORT_C voidCApaAppServiceBase_Reserved1()[private, virtual]

CApaAppServiceBase_Reserved2()

IMPORT_C voidCApaAppServiceBase_Reserved2()[private, virtual]

CancelNotifyServerExit(const RMessage2 &)

voidCancelNotifyServerExit(const RMessage2 &aMessage)const [private]

Parameters

const RMessage2 & aMessage

CountResources()

IMPORT_C TIntCountResources()[protected, virtual]

CreateL()

IMPORT_C voidCreateL()[protected, virtual]

An implementation of the CreateL() method from CSession2. This can be further overridden by derived classes, but such implementations should also base-call.

Disconnect(const RMessage2 &)

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

Parameters

const RMessage2 & aMessage

ExtensionInterface(TUid, TAny *&)

IMPORT_C voidExtensionInterface(TUidaInterfaceId,
TAny *&aImplementaion
)[private, virtual]

Extension mechanism - for internal BC proofing.

Parameters

TUid aInterfaceId
TAny *& aImplementaion

NotifyServerExit(const RMessage2 &)

voidNotifyServerExit(const RMessage2 &aMessage)[private]

Parameters

const RMessage2 & aMessage

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

IMPORT_C CPolicyServer::TCustomResultSecurityCheckL(const RMessage2 &aMsg,
TInt &aAction,
TSecurityInfo &aMissing
)[virtual]

Virtual framework function that is called on receipt of a message from the client. This allows the service implementation to define a security policy for messages from the client. The default behaviour of this function is to pass security checks. CPolicyServer

Parameters

const RMessage2 & aMsgThe message to check.
TInt & aActionA 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 & aMissingA 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().

SendAppServerExitNotification(TInt)

voidSendAppServerExitNotification(TIntaExitReason)

Parameters

TInt aExitReason

ServiceError(const RMessage2 &, TInt)

IMPORT_C voidServiceError(const RMessage2 &aMessage,
TIntaError
)[protected, virtual]

Handle leave errors from ServiceL().

Parameters

const RMessage2 & aMessageThe client message that was being processed when the leave occured.
TInt aErrorThe leave code.

ServiceL(const RMessage2 &)

IMPORT_C voidServiceL(const RMessage2 &aMessage)[protected, virtual]
Framework function to handle client messages. Derived classes should override this method to receive messages from the client. These messages should have function ids starting from REikAppServiceBase::KServiceCmdBase. The behaviour for any unrecognised messages must be to base-call.
panic
ApaAppServer 0 If this function does not recognise the function ID.

Parameters

const RMessage2 & aMessageThe clients request message.

Member Data Documentation

TInt iApaReserved2

TInt iApaReserved2[private]

TInt iExitReason

TInt iExitReason[private]

RMessagePtr2 iNotifyExitMsg

RMessagePtr2 iNotifyExitMsg[private]