epoc32/include/cmsvtechnologytypedefaultmtmsettings.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
--- a/epoc32/include/cmsvtechnologytypedefaultmtmsettings.h	Tue Nov 24 13:55:44 2009 +0000
+++ b/epoc32/include/cmsvtechnologytypedefaultmtmsettings.h	Tue Mar 16 16:12:26 2010 +0000
@@ -1,1 +1,67 @@
-cmsvtechnologytypedefaultmtmsettings.h
+// Copyright (c) 2005-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:
+//
+
+#ifndef __CMSVTECHNOLOGYTYPEDEFAULTMTMSETTINGS_H__
+#define __CMSVTECHNOLOGYTYPEDEFAULTMTMSETTINGS_H__
+
+#include <e32base.h>
+#include <e32cmn.h>
+
+class RFs;
+class CRepository;
+
+
+/**
+Stores default MTM settings for a technology type to the Central Repository.
+
+@publishedAll
+@released
+*/
+class CMsvTechnologyTypeDefaultMtmSettings : public CBase
+	{
+private:
+	struct TMsvTechnologyTypeDefaultMtmInfo
+		{
+		TUid iTechnologyTypeUid;
+		TUid iMtmUid;
+		};
+
+public:
+	IMPORT_C static CMsvTechnologyTypeDefaultMtmSettings* NewL( RFs& aFs );
+	IMPORT_C ~CMsvTechnologyTypeDefaultMtmSettings( );
+	
+	IMPORT_C TInt DefaultMtm( TUid aTechnologyTypeUid, TUid& aMtmUid ) const;
+	IMPORT_C void SetDefaultMtmL( TUid aTechnologyTypeUid, TUid aMtmUid );
+	IMPORT_C TInt RemoveDefaultMtm( TUid aTechnologyTypeUid );
+	
+	// Stores and Restores data in the central repository
+	IMPORT_C void LoadSettingsL( );
+	IMPORT_C void SaveSettingsL( );
+
+private:
+	CMsvTechnologyTypeDefaultMtmSettings( RFs& aFs );
+	void ConstructL();
+	void CheckIfMtmIsPartOfTechnologyTypeGroupL( const TUid aTechnologyTypeUid,
+												 const TUid aMtmUid, const TUid aMtmTypeUid ) const;
+	TInt FindDefaultMtm( const TUid aTechnologyTypeUid, 
+						 TMsvTechnologyTypeDefaultMtmInfo& aTechnologyTypeDefaultMtmInfo ) const;
+
+private:
+	CRepository* iRepository;
+	RArray<TMsvTechnologyTypeDefaultMtmInfo> iTechnologyTypeDefaultMtmArray;
+	RArray<TUid> iRemovedTechnologyTypes;
+	RFs& iFs;
+	};
+#endif //__CMSVTECHNOLOGYTYPEDEFAULTMTMSETTINGS_H__