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()

void CancelList ( ) [pure virtual]

Cancels an asynchronous List() operation.

The operation completes with KErrCancel.

CancelOpenToken()

void CancelOpenToken ( ) [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 &)

void List ( 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 > & aTokens On return, a list of all the tokens.
TRequestStatus & aStatus The 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,
RFs aFs
) [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 & aInfo Information about the token type.
RFs aFs An open file server session.

NewL(TUid, RFs)

MCTTokenType * NewL ( TUid aUID,
RFs aFs
) [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 aUID The UID of the token type.
RFs aFs An open file server session.

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

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

Opens the specified token.

Parameters

const TDesC & aTokenInfo Information about the required token.
MCTToken *& aToken On return, the token to be opened.
TRequestStatus & aStatus The 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 &)

void OpenToken ( TCTTokenHandle aHandle,
MCTToken *& aToken,
TRequestStatus & aStatus
) [pure virtual]

Opens the specified token.

Parameters

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

Release()

void Release ( ) [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.