epoc32/include/mtclreg.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
--- a/epoc32/include/mtclreg.h	Tue Nov 24 13:55:44 2009 +0000
+++ b/epoc32/include/mtclreg.h	Tue Mar 16 16:12:26 2010 +0000
@@ -1,1 +1,77 @@
-mtclreg.h
+// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// 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
+// which accompanies this distribution, and is available
+// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+
+#if !defined __MTCLREG_H__
+#define __MTCLREG_H__
+
+#include <e32base.h>		// CActive, TFileName etc.
+#include <msvreg.h>
+#include <msvapi.h>			// MMsvSessionObserver
+
+// CObserverRegistry mixes in session notification API
+// this allows run-time update of the registries on the client-side.
+// the server registry should inherit from CMtmDllRegistry
+class CObserverRegistry : public CMtmDllRegistry, public MMsvSessionObserver
+/** Base class for client, UI and UI data MTM registries.
+
+It implements the session observer interface to update the registry information 
+when MTM groups are installed or uninstalled.
+@publishedAll
+@released
+*/
+	{
+public:
+	IMPORT_C virtual void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3);
+	IMPORT_C ~CObserverRegistry();
+
+protected:
+	IMPORT_C CObserverRegistry(CMsvSession& aMsvSession,TUid aDllTypeUid,TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32);
+	IMPORT_C void ConstructL();
+
+protected:
+	CMsvSession& iMsvSession;
+	TBool iIsAdded;
+	};
+
+// Client side MTM registry
+class CClientMtmRegistry : public CObserverRegistry
+/** Accesses the Client-side MTM registry. 
+
+This registry holds details of the all the Client-side MTMs currently available 
+on the system. Message client applications use this class to get a CBaseMtm-derived 
+object by which to access Client-side MTM functionality.
+
+Note that the base class CMtmDllRegistry provides functions for discovering 
+what MTMs are present in the registry.
+ 
+@publishedAll
+@released
+*/
+	{
+public:
+	IMPORT_C static CClientMtmRegistry* NewL(CMsvSession& aMsvSession, TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32=TTimeIntervalMicroSeconds32(30000000));
+	IMPORT_C ~CClientMtmRegistry();
+	IMPORT_C CBaseMtm* NewMtmL(TUid aMtmTypeUid);
+	//
+protected:
+	CClientMtmRegistry(CMsvSession& aMsvSession,TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32);
+	void ConstructL();
+	//
+private:
+	CBaseMtm* DoNewMtmL(const RLibrary& aLib, CRegisteredMtmDll& aReg) const;
+	};
+
+#endif // __MTCLREG_H__