class RHandleBase |
A handle to an object.
The class encapsulates the basic behaviour of a handle, hiding the handle-number which identifies the object which the handle represents.
The class is abstract in the sense that a RHandleBase object is never explicitly instantiated. It is always a base class to a concrete handle class; for example, RSemaphore, RThread, RProcess, RCriticalSection etc.
Public Member Functions | |
---|---|
RHandleBase() | |
IMPORT_C TUint | Attributes() |
IMPORT_C TInt | BTraceId() |
IMPORT_C void | Close() |
void | DoExtendedClose() |
IMPORT_C TInt | Duplicate(const RThread &, TOwnerType) |
IMPORT_C TFullName | FullName() |
IMPORT_C void | FullName(TDes &) |
TInt | Handle() |
IMPORT_C void | HandleInfo(THandleInfo *) |
IMPORT_C TName | Name() |
IMPORT_C void | NotifyDestruction(TRequestStatus &) |
void | SetHandle(TInt) |
IMPORT_C void | SetHandleNC(TInt) |
TInt | SetReturnedHandle(TInt) |
Protected Member Functions | |
---|---|
RHandleBase(TInt) | |
IMPORT_C TInt | Open(const TFindHandleBase &, TOwnerType) |
TInt | OpenByName(const TDesC &, TOwnerType, TInt) |
TInt | SetReturnedHandle(TInt, RHandleBase &) |
Private Member Functions | |
---|---|
void | DoExtendedCloseL() |
Public Member Enumerations | |
---|---|
enum | TAttributes { EReadAccess = 0x1, EWriteAccess = 0x2, EDirectReadAccess = 0x4, EDirectWriteAccess = 0x8 } |
Protected Attributes | |
---|---|
TInt | iHandle |
RHandleBase | ( | TInt | aHandle | ) | [protected, inline] |
Copy constructor.
It constructs this handle from an existing one. Specifically, the handle-number encapsulated by the specified handle is copied to this handle.
TInt aHandle | The existing handle to be copied. |
IMPORT_C TInt | Duplicate | ( | const RThread & | aSrc, |
TOwnerType | aType = EOwnerProcess | |||
) |
const RThread & aSrc | |
TOwnerType aType = EOwnerProcess |
TInt | Handle | ( | ) | const [inline] |
Retrieves the handle-number of the object associated with this handle.
The handle number
IMPORT_C void | HandleInfo | ( | THandleInfo * | anInfo | ) |
THandleInfo * anInfo |
IMPORT_C void | NotifyDestruction | ( | TRequestStatus & | aStatus | ) |
TRequestStatus & aStatus |
IMPORT_C TInt | Open | ( | const TFindHandleBase & | aHandle, |
TOwnerType | aType | |||
) | [protected] |
const TFindHandleBase & aHandle | |
TOwnerType aType |
TInt | OpenByName | ( | const TDesC & | aName, |
TOwnerType | aOwnerType, | |||
TInt | aObjectType | |||
) | [protected] |
const TDesC & aName | |
TOwnerType aOwnerType | |
TInt aObjectType |
void | SetHandle | ( | TInt | aHandle | ) | [inline] |
Sets the handle-number of this handle to the specified value.
TInt aHandle | The handle-number to be set. |
TInt | SetReturnedHandle | ( | TInt | aHandleOrError | ) | [inline] |
Sets the handle-number of this handle to the specified value.
The function can take a (zero or positive) handle-number, or a (negative) error number.
If aHandleOrError represents a handle-number, then the handle-number of this handle is set to that value. If aHandleOrError represents an error number, then the handle-number of this handle is set to zero and the negative value is returned.
KErrNone, if aHandle is a handle-number; the value of aHandleOrError, otherwise.
TInt aHandleOrError | A handle-number, if zero or positive; an error value, if negative. |
TInt | SetReturnedHandle | ( | TInt | aHandleOrError, |
RHandleBase & | aHandle | |||
) | [protected, static] |
TInt aHandleOrError | |
RHandleBase & aHandle |
Read/Write attributes for the handle.
EReadAccess = 0x1 | |
EWriteAccess = 0x2 | |
EDirectReadAccess = 0x4 | |
EDirectWriteAccess = 0x8 |