1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #if !defined __MTUDREG_H__
19 #if !defined (__MTCLREG_H__)
25 /** UI Data MTM factory function.
27 A concrete UI Data MTM must implement an exported factory function of this
28 type. It should return an instance of the CBaseMtmUiData-derived class that
29 provides the implementation. The factory function is called by the UI Data
30 MTM registry when a client requests this UI Data MTM.
32 A CBaseMtmUiData-derived class typically provides a NewL() function, which
33 the factory function calls.
35 The factory function is called by ordinal. The ordinal of the function must
36 match that recorded in the MTM's registry information.
38 The CRegisteredMtmDll& argument passes the registration data for the MTM DLL.
40 The return value is a newly-created instance of the CBaseMtmUi-derived class
41 for the User Interface MTM.
43 The factory function should leave if it cannot create the object.
45 For example, a UI Data MTM whose concrete class was CEgMtmUiData could define
46 a suitable factory function as:
49 EXPORT_C CBaseMtmUiData* NewEgMtmL(CRegisteredMtmDll& aRegisteredMtmDll)
51 return CEgMtmUiData::NewL(aRegisteredMtmDll);
54 typedef CBaseMtmUiData* MtmUiDataFactoryFunctionL(CRegisteredMtmDll&);
56 // Client side MTM UI data registry
58 class CMtmUiDataRegistry : public CObserverRegistry
59 /** Accesses the UI Data MTM registry.
61 This registry holds details of the all the
62 UI Data MTMs currently available on the system. Message client applications
63 use this class to get a CBaseMtmUiData-derived object by which to access UI
64 Data MTM functionality.
66 Note that the base class CMtmDllRegistry provides functions for discovering
67 what MTMs are present in the registry.
73 IMPORT_C static CMtmUiDataRegistry* NewL(CMsvSession& aMsvSession,
74 TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32=TTimeIntervalMicroSeconds32(30000000));
75 virtual ~CMtmUiDataRegistry();
76 IMPORT_C CBaseMtmUiData* NewMtmUiDataLayerL(const TUid& aMtmTypeUid);
79 CMtmUiDataRegistry(CMsvSession& aMsvSession, TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32);
82 CBaseMtmUiData* NewMtmL(const RLibrary& aLib, CRegisteredMtmDll& aReg) const;
87 #endif // __MTUDREG_H__