class RMessagePtr2 |
A handle to a message sent by the client to the server.
A server's interaction with its clients is channelled through an RMessagePtr2 object, which acts as a handle to a message sent by the client. The details of the original message are kept by the kernel allowing it enforce correct usage of the member functions of this class.
Private Member Functions | |
---|---|
IMPORT_C TBool | DoHasCapability(TCapability, const char *) |
IMPORT_C TBool | DoHasCapability(TCapability) |
IMPORT_C TBool | DoHasCapability(TCapability, TCapability, const char *) |
IMPORT_C TBool | DoHasCapability(TCapability, TCapability) |
Protected Attributes | |
---|---|
TInt | iHandle |
IMPORT_C TInt | Client | ( | RThread & | aClient, |
TOwnerType | aOwnerType = EOwnerProcess | |||
) | const |
RThread & aClient | |
TOwnerType aOwnerType = EOwnerProcess |
void | ClientL | ( | RThread & | aClient, |
TOwnerType | aOwnerType = EOwnerProcess | |||
) | const [inline] |
Opens a handle on the client thread.
RThread & aClient | On successful return, the handle to the client thread. |
TOwnerType aOwnerType = EOwnerProcess | An enumeration whose enumerators define the ownership of the handle. If not explicitly specified, EOwnerProcess is taken as default. |
IMPORT_C TBool | DoHasCapability | ( | TCapability | aCapability, |
const char * | aDiagnostic | |||
) | const [private] |
TCapability aCapability | |
const char * aDiagnostic |
IMPORT_C TBool | DoHasCapability | ( | TCapability | aCapability | ) | const [private] |
TCapability aCapability |
IMPORT_C TBool | DoHasCapability | ( | TCapability | aCapability, |
TCapability | aCapability2, | |||
const char * | aDiagnostic | |||
) | const [private] |
TCapability aCapability | |
TCapability aCapability2 | |
const char * aDiagnostic |
IMPORT_C TBool | DoHasCapability | ( | TCapability | aCapability, |
TCapability | aCapability2 | |||
) | const [private] |
TCapability aCapability | |
TCapability aCapability2 |
TBool | HasCapability | ( | TCapability | aCapability, |
const char * | aDiagnostic = 0 | |||
) | const [inline] |
Check if the process which sent this message has a given capability.
When a check fails the action taken is determined by the system wide Platform Security configuration. If PlatSecDiagnostics is ON, then a diagnostic message is emitted. If PlatSecEnforcement is OFF, then this function will return ETrue even though the check failed.
ETrue if process which sent this message has the capability, EFalse otherwise.
TCapability aCapability | The capability to test. |
const char * aDiagnostic = 0 | A string that will be emitted along with any diagnostic message that may be issued if the test finds the capability is not present. This string must be enclosed in the __PLATSEC_DIAGNOSTIC_STRING macro which enables it to be easily removed from the system. |
TBool | HasCapability | ( | TCapability | aCapability1, |
TCapability | aCapability2, | |||
const char * | aDiagnostic = 0 | |||
) | const [inline] |
Check if the process which sent this message has both of the given capabilities.
When a check fails the action taken is determined by the system wide Platform Security configuration. If PlatSecDiagnostics is ON, then a diagnostic message is emitted. If PlatSecEnforcement is OFF, then this function will return ETrue even though the check failed.
ETrue if the process which sent this message has both the capabilities, EFalse otherwise.
TCapability aCapability1 | The first capability to test. |
TCapability aCapability2 | The second capability to test. |
const char * aDiagnostic = 0 | A string that will be emitted along with any diagnostic message that may be issued if the test finds a capability is not present. This string should be enclosed in the __PLATSEC_DIAGNOSTIC_STRING macro which enables it to be easily removed from the system. |
void | HasCapabilityL | ( | TCapability | aCapability, |
const char * | aDiagnosticMessage = 0 | |||
) | const [inline] |
Check if the process which sent this message has a given capability.
When a check fails the action taken is determined by the system wide Platform Security configuration. If PlatSecDiagnostics is ON, then a diagnostic message is emitted. If PlatSecEnforcement is OFF, then this function will not leave even though the check failed.
leave
KErrPermissionDenied, if the process does not have the capability.
TCapability aCapability | The capability to test. |
const char * aDiagnosticMessage = 0 | A string that will be emitted along with any diagnostic message that may be issued if the test finds the capability is not present. This string must be enclosed in the __PLATSEC_DIAGNOSTIC_STRING macro which enables it to be easily removed from the system. |
void | HasCapabilityL | ( | TCapability | aCapability1, |
TCapability | aCapability2, | |||
const char * | aDiagnosticMessage = 0 | |||
) | const [inline] |
Check if the process which sent this message has both of the given capabilities.
When a check fails the action taken is determined by the system wide Platform Security configuration. If PlatSecDiagnostics is ON, then a diagnostic message is emitted. If PlatSecEnforcement is OFF, then this function will not leave even though the check failed.
leave
KErrPermissionDenied, if the process does not have the capabilities.
TCapability aCapability1 | The first capability to test. |
TCapability aCapability2 | The second capability to test. |
const char * aDiagnosticMessage = 0 | A string that will be emitted along with any diagnostic message that may be issued if the test finds a capability is not present. This string should be enclosed in the __PLATSEC_DIAGNOSTIC_STRING macro which enables it to be easily removed from the system. |
TBool | IsNull | ( | ) | const [inline] |
Tests whether this message handle is empty.
True, if this message handle is empty, false, otherwise.
IMPORT_C TSecureId | SecureId | ( | ) | const |
Return the Secure ID of the process which sent this message.
If an intended use of this method is to check that the Secure ID is a given value, then the use of a TSecurityPolicy object should be considered. E.g. Instead of something like:
RMessagePtr2& message; TInt error = message.SecureId()==KRequiredSecureId ? KErrNone : KErrPermissionDenied;
this could be used;
RMessagePtr2& message; static _LIT_SECURITY_POLICY_S0(mySidPolicy, KRequiredSecureId); TBool pass = mySidPolicy().CheckPolicy(message);
This has the benefit that the TSecurityPolicy::CheckPolicy methods are configured by the system wide Platform Security configuration. I.e. are capable of emitting diagnostic messages when a check fails and/or the check can be forced to always pass.
TSecurityPolicy::CheckPolicy(RMessagePtr2 aMsgPtr, const char* aDiagnostic) const
_LIT_SECURITY_POLICY_S0
The Secure ID.
IMPORT_C TInt | SetProcessPriority | ( | TProcessPriority | aPriority | ) | const |
TProcessPriority aPriority |
void | SetProcessPriorityL | ( | TProcessPriority | aPriority | ) | const [inline] |
Sets the priority of the client's process.
TProcessPriority aPriority | The priority value. |
IMPORT_C TVendorId | VendorId | ( | ) | const |
Return the Vendor ID of the process which sent this message.
If an intended use of this method is to check that the Vendor ID is a given value, then the use of a TSecurityPolicy object should be considered. E.g. Instead of something like:
RMessagePtr2& message; TInt error = message.VendorId()==KRequiredVendorId ? KErrNone : KErrPermissionDenied;
this could be used;
RMessagePtr2& message; static _LIT_SECURITY_POLICY_V0(myVidPolicy, KRequiredVendorId); TBool pass = myVidPolicy().CheckPolicy(message);
This has the benefit that the TSecurityPolicy::CheckPolicy methods are configured by the system wide Platform Security configuration. I.e. are capable of emitting diagnostic messages when a check fails and/or the check can be forced to always pass.
TSecurityPolicy::CheckPolicy(RMessagePtr2 aMsgPtr, const char* aDiagnostic) const
_LIT_SECURITY_POLICY_V0
The Vendor ID.
IMPORT_C TInt | Write | ( | TInt | aParam, |
const TDesC8 & | aDes, | |||
TInt | aOffset = 0 | |||
) | const |
IMPORT_C TInt | Write | ( | TInt | aParam, |
const TDesC16 & | aDes, | |||
TInt | aOffset = 0 | |||
) | const |
IMPORT_C void | WriteL | ( | TInt | aParam, |
const TDesC8 & | aDes, | |||
TInt | aOffset = 0 | |||
) | const |
IMPORT_C void | WriteL | ( | TInt | aParam, |
const TDesC16 & | aDes, | |||
TInt | aOffset = 0 | |||
) | const |