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.
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 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 |
TUid | ConnectMessageServiceUid | ( | const RMessage2 & | aMsg | ) | const [private] |
const RMessage2 & aMsg |
IMPORT_C void | ConstructL | ( | const TDesC & | aFixedServerName | ) | [virtual] |
const TDesC & aFixedServerName |
IMPORT_C CApaAppServiceBase * | CreateServiceL | ( | TUid | aServiceType | ) | const [virtual] |
TUid aServiceType |
IMPORT_C TCustomResult | CreateServiceSecurityCheckL | ( | TUid | aServiceType, |
const RMessage2 & | aMsg, | |||
TInt & | aAction, | |||
TSecurityInfo & | aMissing | |||
) | [virtual] |
TUid aServiceType | |
const RMessage2 & aMsg | |
TInt & aAction | |
TSecurityInfo & aMissing |
IMPORT_C TCustomResult | CustomSecurityCheckL | ( | const RMessage2 & | aMsg, |
TInt & | aAction, | |||
TSecurityInfo & | aMissing | |||
) | [protected, virtual] |
Performs a custom security check. Derived server classes must implement this function if any element in iElementsIndex has the value CPolicyServer::ECustomCheck. Similarly, if CPolicyServer::ECustomCheck is not used, then this function can be safely ignored.
The custom security check can synchronously decide if the message should pass. In this case, the derived implementation must simply return either EPass or EFail depending on the result of the security check.
If the security check eventually passes, ProcessL() must be called with the appropriate message.
If the security check eventually fails, CheckFailedL() must be called with that message.
Pending messages on a given session need to be completed and discarded if the session is closed.
IMPORTANT NOTE. When processing a message asynchronously, a copy must be made of the RMessage2 object. Saving a refernece or pointer to the original message will produce unpredictable defects. This is because the object will be reused for the next message that the server receives.
In both cases, synchronous and asynchronous, the derived implementation has the option of updating the aAction and/or aMissing parameters if that is appropriate.
A value from TCustomResult.
panic
CBase 95 If the default implementation is called.
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(). |
IMPORT_C void | DoConnect | ( | const RMessage2 & | aMessage | ) | [protected, virtual] |
const RMessage2 & aMessage |
IMPORT_C void | ExtensionInterface | ( | TUid | aInterfaceId, |
TAny *& | aImplementaion | |||
) | [private, virtual] |
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.
A pointer to the newly created server-side session object.