MCTTokenType Class Reference

#include <ct/mcttokentype.h>

Link against: ssl.lib

class MCTTokenType
Public Member Functions
pure virtual voidCancelList()
pure virtual voidCancelOpenToken()
pure virtual const TDesC &Label()
pure virtual voidList(RCPointerArray< HBufC > &, TRequestStatus &)
MCTTokenType *NewL(const CCTTokenTypeInfo &, RFs)
MCTTokenType *NewL(TUid, RFs)
pure virtual voidOpenToken(const TDesC &, MCTToken *&, TRequestStatus &)
pure virtual voidOpenToken(TCTTokenHandle, MCTToken *&, TRequestStatus &)
pure virtual voidRelease()
pure virtual TUid Type()

Detailed Description

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 Function 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.

Returns: The label to the token type.

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.

ParameterDescription
aTokensOn return, a list of all the tokens.
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.

ParameterDescription
aInfoInformation about the token type.
aFsAn open file server session.

Returns: The new token type object.A new token type object.

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.

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

Returns: A new token type object.A new token type object.

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

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

Opens the specified token.

ParameterDescription
aTokenInfoInformation about the required token.
aTokenOn return, the token to be opened.
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.

ParameterDescription
aHandleThe handle of the token.
aTokenOn return, the token to be opened.
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.

Returns: The UID of the token type.