MCTTokenType Class Reference

class MCTTokenType

A token type.

This abstract class is instantiated using the ECom Plug-in Architecture for a particular token type. It allows a list of available tokens of that type to be obtained, and particular tokens to be opened.

All implementation classes are in fact a subclass of CCTTokenType; refer to its documentation for implementation details. Client access is entirely through this M class.

The difference betweeen a token type and a token is best explained with an example. Suppose a device has two identical WIM slots, the code to handle WIMs is one token type, which will have two tokens for the two WIMs.

Since
v7.0

Member Functions Documentation

CancelList()

voidCancelList()[pure virtual]

Cancels an asynchronous List() operation.

The operation completes with KErrCancel.

CancelOpenToken()

voidCancelOpenToken()[pure virtual]

Cancels an asynchronous OpenToken() operation.

The operation completes with KErrCancel.

Label()

const TDesC &Label()const [pure virtual]

Gets the label of the token type.

This function is implemented by CCTTokenType, so token type implementers need not implement it.

List(RCPointerArray< HBufC > &, TRequestStatus &)

voidList(RCPointerArray< HBufC > &aTokens,
TRequestStatus &aStatus
)[pure virtual]

Lists all the tokens of this type.

This is an asynchronous request.

Tokens are defined by name, so instead of returning a CCTTokenTypeInfo object, this function just gives a list of pointers to HBufC objects.

Parameters

RCPointerArray< HBufC > & aTokensOn return, a list of all the tokens.
TRequestStatus & aStatusThe request status object; contains the result of the List() request when complete. Set to KErrCancel if an outstanding request is cancelled.

NewL(const CCTTokenTypeInfo &, RFs)

MCTTokenType *NewL(const CCTTokenTypeInfo &aInfo,
RFsaFs
)[static, inline]

Creates a MCTTokenType given it's CCTTokenTypeInfo

The definition of this inline function is in CCTTokenType.h. If you call this function, you need to link against ctfinder.dll as well as ctframework.dll

Creates a MCTTokenType object given it's CCTTokenTypeInfo.

Parameters

const CCTTokenTypeInfo & aInfoInformation about the token type.
RFs aFsAn open file server session.

NewL(TUid, RFs)

MCTTokenType *NewL(TUidaUID,
RFsaFs
)[static, inline]

Creates a MCTTokenType given the UID of the token type.

The definition of this inline function is in CCTTokenType.h. If you call this function, you need to link against ctfinder.dll as well as ctframework.dll

Creates a MCTTokenType object given the UID of the token type.

Parameters

TUid aUIDThe UID of the token type.
RFs aFsAn open file server session.

OpenToken(const TDesC &, MCTToken *&, TRequestStatus &)

voidOpenToken(const TDesC &aTokenInfo,
MCTToken *&aToken,
TRequestStatus &aStatus
)[pure virtual]

Opens the specified token.

Parameters

const TDesC & aTokenInfoInformation about the required token.
MCTToken *& aTokenOn return, the token to be opened.
TRequestStatus & aStatusThe request status object; contains the result of the OpenToken() request when complete. Set to KErrCancel if an outstanding request is cancelled.

OpenToken(TCTTokenHandle, MCTToken *&, TRequestStatus &)

voidOpenToken(TCTTokenHandleaHandle,
MCTToken *&aToken,
TRequestStatus &aStatus
)[pure virtual]

Opens the specified token.

Parameters

TCTTokenHandle aHandleThe handle of the token.
MCTToken *& aTokenOn return, the token to be opened.
TRequestStatus & aStatusThe request status object; contains the result of the OpenToken() request when complete. Set to KErrCancel if an outstanding request is cancelled.

Release()

voidRelease()[pure virtual]

Releases the token type object.

To be called when you have finished with the object.

The API does not allow the destructor to be directly called as this object could remain in existence for longer to hold onto the ECom handle on the DLL; for instance, it may not be deleted until all tokens and interfaces have also been released.

Type()

TUid Type()const [pure virtual]

Gets the UID of the token type.

This function is implemented by CCTTokenType, so token type implementers need not implement it.