epoc32/include/mw/mtuireg.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:27:01 +0100
branchSymbian2
changeset 3 e1b950c65cb4
parent 2 epoc32/include/mtuireg.h@2fe1408b6811
child 4 837f303aceeb
permissions -rw-r--r--
Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
williamr@2
     1
// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     2
// All rights reserved.
williamr@2
     3
// This component and the accompanying materials are made available
williamr@2
     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
williamr@2
     5
// which accompanies this distribution, and is available
williamr@2
     6
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
williamr@2
     7
//
williamr@2
     8
// Initial Contributors:
williamr@2
     9
// Nokia Corporation - initial contribution.
williamr@2
    10
//
williamr@2
    11
// Contributors:
williamr@2
    12
//
williamr@2
    13
// Description:
williamr@2
    14
// MTM client-side MTMUI registry class 
williamr@2
    15
// 
williamr@2
    16
//
williamr@2
    17
williamr@2
    18
#if !defined __MTUIREG_H__
williamr@2
    19
#define __MTUIREG_H__
williamr@2
    20
williamr@2
    21
williamr@2
    22
#if !defined (__E32BASE_H__)
williamr@2
    23
#include <e32base.h>		// CActive, TFileName etc.
williamr@2
    24
#endif
williamr@2
    25
williamr@2
    26
#if !defined (__MTCLREG_H__)
williamr@2
    27
#include <mtclreg.h>
williamr@2
    28
#endif
williamr@2
    29
williamr@2
    30
class CBaseMtmUi;
williamr@2
    31
williamr@2
    32
/** UI MTM factory function.
williamr@2
    33
williamr@2
    34
A concrete User Interface MTM must implement an exported factory function of 
williamr@2
    35
this type. It should return an instance of the CBaseMtmUi-derived class that 
williamr@2
    36
provides the implementation. The factory function is called by the User Interface 
williamr@2
    37
MTM registry when a client requests this User Interface MTM.
williamr@2
    38
williamr@2
    39
A CBaseMtmUi-derived class typically provides a NewL() function, which the 
williamr@2
    40
factory function calls.
williamr@2
    41
williamr@2
    42
The factory function is called by ordinal. The ordinal of the function must 
williamr@2
    43
match that recorded in the MTM's registry information. 
williamr@2
    44
williamr@2
    45
For example, a User Interface MTM whose concrete class was CEgMtmUi could 
williamr@2
    46
define a suitable factory function as:
williamr@2
    47
williamr@2
    48
@code
williamr@2
    49
EXPORT_C CBaseMtmUi* NewEgMtmUiL(CBaseMtm& aMtm, CRegisteredMtmDll& aRegisteredDll)
williamr@2
    50
	{
williamr@2
    51
	return CEgMtmUi::NewL(aMtm, aRegisteredDll);
williamr@2
    52
	}@endcode
williamr@2
    53
williamr@2
    54
@param aBaseMtm The CBaseMtm requesting the object.
williamr@2
    55
@param aRegisteredMtmDll Registration data for the MTM DLL.
williamr@2
    56
@return A newly-created instance of the CBaseMtmUi-derived class 
williamr@2
    57
for the User Interface MTM.
williamr@2
    58
@leave Any The factory function should leave if it cannot create the object. */
williamr@2
    59
typedef CBaseMtmUi* MtmUiFactoryFunctionL(CBaseMtm&, CRegisteredMtmDll&);
williamr@2
    60
williamr@2
    61
// Client side MTM registry
williamr@2
    62
williamr@2
    63
class CMtmUiRegistry : public CObserverRegistry
williamr@2
    64
/** Accesses the User Interface MTM registry. 
williamr@2
    65
williamr@2
    66
This registry holds details of the 
williamr@2
    67
all the User Interface MTMs currently available on the system. Message client 
williamr@2
    68
applications use this class to get a CBaseMtmUi-derived object by which to 
williamr@2
    69
access User Interface MTM functionality.
williamr@2
    70
williamr@2
    71
Note that the base class CMtmDllRegistry provides functions for discovering 
williamr@2
    72
what MTMs are present in the registry. 
williamr@2
    73
@publishedAll
williamr@2
    74
@released
williamr@2
    75
*/
williamr@2
    76
	{
williamr@2
    77
public:
williamr@2
    78
	IMPORT_C static CMtmUiRegistry* NewL(CMsvSession& aMsvSession,
williamr@2
    79
		TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32=TTimeIntervalMicroSeconds32(30000000));
williamr@2
    80
	virtual ~CMtmUiRegistry();
williamr@2
    81
	IMPORT_C CBaseMtmUi* NewMtmUiL(CBaseMtm& aMtm);
williamr@2
    82
	//
williamr@2
    83
protected:
williamr@2
    84
	CMtmUiRegistry(CMsvSession& aMsvSession, TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32);
williamr@2
    85
	//
williamr@2
    86
private:
williamr@2
    87
	CBaseMtmUi* NewMtmL(const RLibrary& aLib, CBaseMtm& aMtm, CRegisteredMtmDll& aReg) const;
williamr@2
    88
	};
williamr@2
    89
williamr@2
    90
williamr@2
    91
williamr@2
    92
#endif // __MTUIREG_H__