1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/mw/mtclreg.h Wed Mar 31 12:27:01 2010 +0100
1.3 @@ -0,0 +1,77 @@
1.4 +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// 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.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +
1.20 +#if !defined __MTCLREG_H__
1.21 +#define __MTCLREG_H__
1.22 +
1.23 +#include <e32base.h> // CActive, TFileName etc.
1.24 +#include <msvreg.h>
1.25 +#include <msvapi.h> // MMsvSessionObserver
1.26 +
1.27 +// CObserverRegistry mixes in session notification API
1.28 +// this allows run-time update of the registries on the client-side.
1.29 +// the server registry should inherit from CMtmDllRegistry
1.30 +class CObserverRegistry : public CMtmDllRegistry, public MMsvSessionObserver
1.31 +/** Base class for client, UI and UI data MTM registries.
1.32 +
1.33 +It implements the session observer interface to update the registry information
1.34 +when MTM groups are installed or uninstalled.
1.35 +@publishedAll
1.36 +@released
1.37 +*/
1.38 + {
1.39 +public:
1.40 + IMPORT_C virtual void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3);
1.41 + IMPORT_C ~CObserverRegistry();
1.42 +
1.43 +protected:
1.44 + IMPORT_C CObserverRegistry(CMsvSession& aMsvSession,TUid aDllTypeUid,TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32);
1.45 + IMPORT_C void ConstructL();
1.46 +
1.47 +protected:
1.48 + CMsvSession& iMsvSession;
1.49 + TBool iIsAdded;
1.50 + };
1.51 +
1.52 +// Client side MTM registry
1.53 +class CClientMtmRegistry : public CObserverRegistry
1.54 +/** Accesses the Client-side MTM registry.
1.55 +
1.56 +This registry holds details of the all the Client-side MTMs currently available
1.57 +on the system. Message client applications use this class to get a CBaseMtm-derived
1.58 +object by which to access Client-side MTM functionality.
1.59 +
1.60 +Note that the base class CMtmDllRegistry provides functions for discovering
1.61 +what MTMs are present in the registry.
1.62 +
1.63 +@publishedAll
1.64 +@released
1.65 +*/
1.66 + {
1.67 +public:
1.68 + IMPORT_C static CClientMtmRegistry* NewL(CMsvSession& aMsvSession, TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32=TTimeIntervalMicroSeconds32(30000000));
1.69 + IMPORT_C ~CClientMtmRegistry();
1.70 + IMPORT_C CBaseMtm* NewMtmL(TUid aMtmTypeUid);
1.71 + //
1.72 +protected:
1.73 + CClientMtmRegistry(CMsvSession& aMsvSession,TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32);
1.74 + void ConstructL();
1.75 + //
1.76 +private:
1.77 + CBaseMtm* DoNewMtmL(const RLibrary& aLib, CRegisteredMtmDll& aReg) const;
1.78 + };
1.79 +
1.80 +#endif // __MTCLREG_H__