1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/mw/mtudreg.h Wed Mar 31 12:27:01 2010 +0100
1.3 @@ -0,0 +1,87 @@
1.4 +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// 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
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +#if !defined __MTUDREG_H__
1.20 +#define __MTUDREG_H__
1.21 +
1.22 +#if !defined (__MTCLREG_H__)
1.23 +#include <mtclreg.h>
1.24 +#endif
1.25 +
1.26 +class CBaseMtmUiData;
1.27 +
1.28 +/** UI Data MTM factory function.
1.29 +
1.30 +A concrete UI Data MTM must implement an exported factory function of this
1.31 +type. It should return an instance of the CBaseMtmUiData-derived class that
1.32 +provides the implementation. The factory function is called by the UI Data
1.33 +MTM registry when a client requests this UI Data MTM.
1.34 +
1.35 +A CBaseMtmUiData-derived class typically provides a NewL() function, which
1.36 +the factory function calls.
1.37 +
1.38 +The factory function is called by ordinal. The ordinal of the function must
1.39 +match that recorded in the MTM's registry information.
1.40 +
1.41 +The CRegisteredMtmDll& argument passes the registration data for the MTM DLL.
1.42 +
1.43 +The return value is a newly-created instance of the CBaseMtmUi-derived class
1.44 +for the User Interface MTM.
1.45 +
1.46 +The factory function should leave if it cannot create the object.
1.47 +
1.48 +For example, a UI Data MTM whose concrete class was CEgMtmUiData could define
1.49 +a suitable factory function as:
1.50 +
1.51 +@code
1.52 +EXPORT_C CBaseMtmUiData* NewEgMtmL(CRegisteredMtmDll& aRegisteredMtmDll)
1.53 + {
1.54 + return CEgMtmUiData::NewL(aRegisteredMtmDll);
1.55 + }
1.56 +@endcode */
1.57 +typedef CBaseMtmUiData* MtmUiDataFactoryFunctionL(CRegisteredMtmDll&);
1.58 +
1.59 +// Client side MTM UI data registry
1.60 +
1.61 +class CMtmUiDataRegistry : public CObserverRegistry
1.62 +/** Accesses the UI Data MTM registry.
1.63 +
1.64 +This registry holds details of the all the
1.65 +UI Data MTMs currently available on the system. Message client applications
1.66 +use this class to get a CBaseMtmUiData-derived object by which to access UI
1.67 +Data MTM functionality.
1.68 +
1.69 +Note that the base class CMtmDllRegistry provides functions for discovering
1.70 +what MTMs are present in the registry.
1.71 +@publishedAll
1.72 +@released
1.73 +*/
1.74 + {
1.75 +public:
1.76 + IMPORT_C static CMtmUiDataRegistry* NewL(CMsvSession& aMsvSession,
1.77 + TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32=TTimeIntervalMicroSeconds32(30000000));
1.78 + virtual ~CMtmUiDataRegistry();
1.79 + IMPORT_C CBaseMtmUiData* NewMtmUiDataLayerL(const TUid& aMtmTypeUid);
1.80 + //
1.81 +protected:
1.82 + CMtmUiDataRegistry(CMsvSession& aMsvSession, TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32);
1.83 + //
1.84 +private:
1.85 + CBaseMtmUiData* NewMtmL(const RLibrary& aLib, CRegisteredMtmDll& aReg) const;
1.86 + };
1.87 +
1.88 +
1.89 +
1.90 +#endif // __MTUDREG_H__