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