class RProcess : public RHandleBase |
A handle to a process.
The process itself is a kernel object.
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) |
Public Member Enumerations | |
---|---|
enum | TDataCaging { EDataCagingOff, EDataCagingOn, EDataCagingQuery } |
enum | TSecureApi { ESecureApiOff, ESecureApiOn, ESecureApiQuery } |
Inherited Enumerations | |
---|---|
RHandleBase:TAttributes |
Inherited Attributes | |
---|---|
RHandleBase::iHandle |
RProcess | ( | ) | [inline] |
Default constructor.
The constructor exists to initialise private data within this handle; it does not create the process object.
Specifically, it sets the handle-number to the value KCurrentProcessHandle. In effect, the constructor creates a default process handle.
RProcess | ( | TInt | aHandle | ) | [inline] |
Constructor taking a handle number.
TInt aHandle | The handle number to be used to construct this RProcess handle. |
IMPORT_C TInt | Create | ( | const TDesC & | aFileName, |
const TDesC & | aCommand, | |||
TOwnerType | aType = EOwnerProcess | |||
) |
const TDesC & aFileName | |
const TDesC & aCommand | |
TOwnerType aType = EOwnerProcess |
IMPORT_C TInt | Create | ( | const TDesC & | aFileName, |
const TDesC & | aCommand, | |||
const TUidType & | aUidType, | |||
TOwnerType | aType = EOwnerProcess | |||
) |
const TDesC & aFileName | |
const TDesC & aCommand | |
const TUidType & aUidType | |
TOwnerType aType = EOwnerProcess |
IMPORT_C TInt | CreateWithStackOverride | ( | const TDesC & | aFileName, |
const TDesC & | aCommand, | |||
const TUidType & | aUidType, | |||
TInt | aMinStackSize, | |||
TOwnerType | aType | |||
) |
const TDesC & aFileName | |
const TDesC & aCommand | |
const TUidType & aUidType | |
TInt aMinStackSize | |
TOwnerType aType |
IMPORT_C TInt | DataCaging | ( | TInt | aState | ) |
Legacy Platform Security development and migration support No replacement
TInt aState |
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 | aCapability1, |
TCapability | aCapability2, | |||
const char * | aDiagnostic | |||
) | const [private] |
TCapability aCapability1 | |
TCapability aCapability2 | |
const char * aDiagnostic |
IMPORT_C TBool | DoHasCapability | ( | TCapability | aCapability1, |
TCapability | aCapability2 | |||
) | const [private] |
TCapability aCapability1 | |
TCapability aCapability2 |
IMPORT_C TInt | GetMemoryInfo | ( | TModuleMemoryInfo & | aInfo | ) | const |
TModuleMemoryInfo & aInfo |
TBool | HasCapability | ( | TCapability | aCapability, |
const char * | aDiagnostic = 0 | |||
) | const [inline] |
Check if the process 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 the process 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 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 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 must be enclosed in the __PLATSEC_DIAGNOSTIC_STRING macro which enables it to be easily removed from the system. |
IMPORT_C void | Logon | ( | TRequestStatus & | aStatus | ) | const |
TRequestStatus & aStatus |
IMPORT_C TInt | LogonCancel | ( | TRequestStatus & | aStatus | ) | const |
TRequestStatus & aStatus |
IMPORT_C TInt | Open | ( | const TDesC & | aName, |
TOwnerType | aType = EOwnerProcess | |||
) |
const TDesC & aName | |
TOwnerType aType = EOwnerProcess |
IMPORT_C TInt | Open | ( | TProcessId | aId, |
TOwnerType | aType = EOwnerProcess | |||
) |
TProcessId aId | |
TOwnerType aType = EOwnerProcess |
TInt | Open | ( | const TFindProcess & | aFind, |
TOwnerType | aType = EOwnerProcess | |||
) | [inline] |
Opens a handle to the process found by pattern matching a name.
A TFindProcess object is used to find all processes whose full names match a specified pattern.
By default, ownership of this process handle is vested in the current process, but can be vested in the current thread by passing EOwnerThread as the second parameter to this function.
KErrNone if successful, otherwise one of the other system-wide error codes.
const TFindProcess & aFind | A reference to the TFindProcess object used to find the process. |
TOwnerType aType = EOwnerProcess | An enumeration whose enumerators define the ownership of this process handle. If not explicitly specified, EOwnerProcess is taken as default. |
TInt | RenameMe | ( | const TDesC & | aName | ) | [static, inline] |
Use User::RenameProcess() instead
const TDesC & aName |
IMPORT_C void | Rendezvous | ( | TRequestStatus & | aStatus | ) | const |
TRequestStatus & aStatus |
IMPORT_C TInt | RendezvousCancel | ( | TRequestStatus & | aStatus | ) | const |
TRequestStatus & aStatus |
IMPORT_C TInt | SecureApi | ( | TInt | aState | ) |
Legacy Platform Security development and migration support No replacement
TInt aState |
IMPORT_C TSecureId | SecureId | ( | ) | const |
Return the Secure ID of the process.
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:
RProcess& process; TInt error = process.SecureId()==KRequiredSecureId ? KErrNone : KErrPermissionDenied;
this could be used;
RProcess& process; static _LIT_SECURITY_POLICY_S0(mySidPolicy, KRequiredSecureId); TBool pass = mySidPolicy().CheckPolicy(process);
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(RProcess aProcess, const char* aDiagnostic) const
_LIT_SECURITY_POLICY_S0
The Secure ID.
IMPORT_C TInt | SetParameter | ( | TInt | aIndex, |
RHandleBase | aHandle | |||
) |
TInt aIndex | |
RHandleBase aHandle |
IMPORT_C TInt | SetParameter | ( | TInt | aSlot, |
const RSubSessionBase & | aSession | |||
) |
TInt aSlot | |
const RSubSessionBase & aSession |
IMPORT_C TInt | SetPriority | ( | TProcessPriority | aPriority | ) | const |
TProcessPriority aPriority |
IMPORT_C TVendorId | VendorId | ( | ) | const |
Return the Vendor ID of the process.
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:
RProcess& process; TInt error = process.VendorId()==KRequiredVendorId ? KErrNone : KErrPermissionDenied;
this could be used;
RProcess& process; static _LIT_SECURITY_POLICY_V0(myVidPolicy, KRequiredVendorId); TBool pass = myVidPolicy().CheckPolicy(process);
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(RProcess aProcess, const char* aDiagnostic) const
_LIT_SECURITY_POLICY_V0
The Vendor ID.