epoc32/include/mtclreg.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
     1.1 --- a/epoc32/include/mtclreg.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/mtclreg.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,77 @@
     1.4 -mtclreg.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 +
    1.21 +#if !defined __MTCLREG_H__
    1.22 +#define __MTCLREG_H__
    1.23 +
    1.24 +#include <e32base.h>		// CActive, TFileName etc.
    1.25 +#include <msvreg.h>
    1.26 +#include <msvapi.h>			// MMsvSessionObserver
    1.27 +
    1.28 +// CObserverRegistry mixes in session notification API
    1.29 +// this allows run-time update of the registries on the client-side.
    1.30 +// the server registry should inherit from CMtmDllRegistry
    1.31 +class CObserverRegistry : public CMtmDllRegistry, public MMsvSessionObserver
    1.32 +/** Base class for client, UI and UI data MTM registries.
    1.33 +
    1.34 +It implements the session observer interface to update the registry information 
    1.35 +when MTM groups are installed or uninstalled.
    1.36 +@publishedAll
    1.37 +@released
    1.38 +*/
    1.39 +	{
    1.40 +public:
    1.41 +	IMPORT_C virtual void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3);
    1.42 +	IMPORT_C ~CObserverRegistry();
    1.43 +
    1.44 +protected:
    1.45 +	IMPORT_C CObserverRegistry(CMsvSession& aMsvSession,TUid aDllTypeUid,TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32);
    1.46 +	IMPORT_C void ConstructL();
    1.47 +
    1.48 +protected:
    1.49 +	CMsvSession& iMsvSession;
    1.50 +	TBool iIsAdded;
    1.51 +	};
    1.52 +
    1.53 +// Client side MTM registry
    1.54 +class CClientMtmRegistry : public CObserverRegistry
    1.55 +/** Accesses the Client-side MTM registry. 
    1.56 +
    1.57 +This registry holds details of the all the Client-side MTMs currently available 
    1.58 +on the system. Message client applications use this class to get a CBaseMtm-derived 
    1.59 +object by which to access Client-side MTM functionality.
    1.60 +
    1.61 +Note that the base class CMtmDllRegistry provides functions for discovering 
    1.62 +what MTMs are present in the registry.
    1.63 + 
    1.64 +@publishedAll
    1.65 +@released
    1.66 +*/
    1.67 +	{
    1.68 +public:
    1.69 +	IMPORT_C static CClientMtmRegistry* NewL(CMsvSession& aMsvSession, TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32=TTimeIntervalMicroSeconds32(30000000));
    1.70 +	IMPORT_C ~CClientMtmRegistry();
    1.71 +	IMPORT_C CBaseMtm* NewMtmL(TUid aMtmTypeUid);
    1.72 +	//
    1.73 +protected:
    1.74 +	CClientMtmRegistry(CMsvSession& aMsvSession,TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32);
    1.75 +	void ConstructL();
    1.76 +	//
    1.77 +private:
    1.78 +	CBaseMtm* DoNewMtmL(const RLibrary& aLib, CRegisteredMtmDll& aReg) const;
    1.79 +	};
    1.80 +
    1.81 +#endif // __MTCLREG_H__