Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: mtuireg.h
Link against: mtur.lib

Class CMtmUiRegistry

CMtmUiRegistry

Support

Supported from 5.0

Description

Accesses the User Interface MTM registry. This registry holds details of the all the User Interface MTMs currently available on the system. Message client applications use this class to get a CBaseMtmUi-derived object by which to access User Interface MTM functionality.

Note that the base class CMtmDllRegistry provides functions for discovering what MTMs are present in the registry.

Derivation

CBaseBase class for all classes to be instantiated on the heap
CMtmDllRegistryAccesses the various MTM component registries
CMtmUiRegistryAccesses the User Interface MTM registry
CObserverRegistryAn intermediary class used in the derivation of CClientMtmRegistry, CMtmUiDataRegistry and CMtmUiRegistry
MMsvSessionObserverProvides the interface for notification of events from a Message Server session

Defined in CMtmUiRegistry:
NewL(), NewMtmUiL()

Inherited from CBase:
operator new()

Inherited from CMtmDllRegistry:
IsInUse(), IsPresent(), MtmTypeUid(), NumRegisteredMtmDlls(), RegisteredMtmDllInfo(), TechnologyTypeUid()

Inherited from MMsvSessionObserver:
EMsvCloseSession, EMsvCorruptedIndexRebuilding, EMsvCorruptedIndexRebuilt, EMsvGeneralError, EMsvMediaAvailable, EMsvMediaChanged, EMsvMediaIncorrect, EMsvMediaUnavailable, EMsvMtmGroupDeInstalled, EMsvMtmGroupInstalled, EMsvServerFailedToStart, EMsvServerReady, EMsvServerTerminated, EMsvStoreCommitted, EMsvStoreCreated, EMsvStoreDeleted, EmsvEntriesChanged, EmsvEntriesDeleted, EmsvEntriesMoved, EmsvEntryCreated, HandleSessionEvent(), HandleSessionEventL(), TMsvSessionEvent


Construct and allocate


NewL()

static CMtmUiRegistry* NewL(CMsvSession& aMsvSession, TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32=TTimeIntervalMicroSeconds32(30000000));

Description

Constructs and allocates a CMtmUiRegistry object. The client should delete this object when it is no longer required.

The registry keeps a reference count of the number of instances of each MTM in use. When that reference count falls to zero, the DLL that provides the MTM is unloaded. However, this is not done immediately, but only after the time specified in aTimeoutMicroSeconds32. This increases efficiency in cases where the DLL is required again shortly.

Parameters

CMsvSession& aMsvSession

The client’s Message Server session

TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32=TTimeIntervalMicroSeconds32(30000000)

Time to wait before unloading MTM DLLs

Return value

CMtmUiRegistry*

A pointer to a newly allocated and initialised object

Leave codes

KErrNoMemory

A memory allocation failed

[Top]


Create User Interface MTM object


NewMtmUiL()

CBaseMtmUi* NewMtmUiL(TUid aMtmTypeUid);

Description

Creates a User Interface MTM object for the specified MTM. The client should delete the returned object when it is no longer required.

Parameters

TUid aMtmTypeUid

UID of MTM to obtain

Return value

CBaseMtmUi*

User Interface MTM object for specified MTM

Leave codes

KErrNotFound

aMtmTypeUid does not specify a registered MTM

KErrNoMemory

A memory allocation failed

KErrBadLibraryEntryPoint

Malformed MTM: a library entry point was not of the required type

DLL loading error codes

The DLL that provides the MTM cannot be loaded