epoc32/include/mtuireg.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
     1.1 --- a/epoc32/include/mtuireg.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/mtuireg.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,92 @@
     1.4 -mtuireg.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 +// MTM client-side MTMUI registry class 
    1.19 +// 
    1.20 +//
    1.21 +
    1.22 +#if !defined __MTUIREG_H__
    1.23 +#define __MTUIREG_H__
    1.24 +
    1.25 +
    1.26 +#if !defined (__E32BASE_H__)
    1.27 +#include <e32base.h>		// CActive, TFileName etc.
    1.28 +#endif
    1.29 +
    1.30 +#if !defined (__MTCLREG_H__)
    1.31 +#include <mtclreg.h>
    1.32 +#endif
    1.33 +
    1.34 +class CBaseMtmUi;
    1.35 +
    1.36 +/** UI MTM factory function.
    1.37 +
    1.38 +A concrete User Interface MTM must implement an exported factory function of 
    1.39 +this type. It should return an instance of the CBaseMtmUi-derived class that 
    1.40 +provides the implementation. The factory function is called by the User Interface 
    1.41 +MTM registry when a client requests this User Interface MTM.
    1.42 +
    1.43 +A CBaseMtmUi-derived class typically provides a NewL() function, which the 
    1.44 +factory function calls.
    1.45 +
    1.46 +The factory function is called by ordinal. The ordinal of the function must 
    1.47 +match that recorded in the MTM's registry information. 
    1.48 +
    1.49 +For example, a User Interface MTM whose concrete class was CEgMtmUi could 
    1.50 +define a suitable factory function as:
    1.51 +
    1.52 +@code
    1.53 +EXPORT_C CBaseMtmUi* NewEgMtmUiL(CBaseMtm& aMtm, CRegisteredMtmDll& aRegisteredDll)
    1.54 +	{
    1.55 +	return CEgMtmUi::NewL(aMtm, aRegisteredDll);
    1.56 +	}@endcode
    1.57 +
    1.58 +@param aBaseMtm The CBaseMtm requesting the object.
    1.59 +@param aRegisteredMtmDll Registration data for the MTM DLL.
    1.60 +@return A newly-created instance of the CBaseMtmUi-derived class 
    1.61 +for the User Interface MTM.
    1.62 +@leave Any The factory function should leave if it cannot create the object. */
    1.63 +typedef CBaseMtmUi* MtmUiFactoryFunctionL(CBaseMtm&, CRegisteredMtmDll&);
    1.64 +
    1.65 +// Client side MTM registry
    1.66 +
    1.67 +class CMtmUiRegistry : public CObserverRegistry
    1.68 +/** Accesses the User Interface MTM registry. 
    1.69 +
    1.70 +This registry holds details of the 
    1.71 +all the User Interface MTMs currently available on the system. Message client 
    1.72 +applications use this class to get a CBaseMtmUi-derived object by which to 
    1.73 +access User Interface MTM functionality.
    1.74 +
    1.75 +Note that the base class CMtmDllRegistry provides functions for discovering 
    1.76 +what MTMs are present in the registry. 
    1.77 +@publishedAll
    1.78 +@released
    1.79 +*/
    1.80 +	{
    1.81 +public:
    1.82 +	IMPORT_C static CMtmUiRegistry* NewL(CMsvSession& aMsvSession,
    1.83 +		TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32=TTimeIntervalMicroSeconds32(30000000));
    1.84 +	virtual ~CMtmUiRegistry();
    1.85 +	IMPORT_C CBaseMtmUi* NewMtmUiL(CBaseMtm& aMtm);
    1.86 +	//
    1.87 +protected:
    1.88 +	CMtmUiRegistry(CMsvSession& aMsvSession, TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32);
    1.89 +	//
    1.90 +private:
    1.91 +	CBaseMtmUi* NewMtmL(const RLibrary& aLib, CBaseMtm& aMtm, CRegisteredMtmDll& aReg) const;
    1.92 +	};
    1.93 +
    1.94 +
    1.95 +
    1.96 +#endif // __MTUIREG_H__