epoc32/include/mw/cmsvtechnologytypedefaultmtmsettings.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef __CMSVTECHNOLOGYTYPEDEFAULTMTMSETTINGS_H__
    17 #define __CMSVTECHNOLOGYTYPEDEFAULTMTMSETTINGS_H__
    18 
    19 #include <e32base.h>
    20 #include <e32cmn.h>
    21 
    22 class RFs;
    23 class CRepository;
    24 
    25 
    26 /**
    27 Stores default MTM settings for a technology type to the Central Repository.
    28 
    29 @publishedAll
    30 @released
    31 */
    32 class CMsvTechnologyTypeDefaultMtmSettings : public CBase
    33 	{
    34 private:
    35 	struct TMsvTechnologyTypeDefaultMtmInfo
    36 		{
    37 		TUid iTechnologyTypeUid;
    38 		TUid iMtmUid;
    39 		};
    40 
    41 public:
    42 	IMPORT_C static CMsvTechnologyTypeDefaultMtmSettings* NewL( RFs& aFs );
    43 	IMPORT_C ~CMsvTechnologyTypeDefaultMtmSettings( );
    44 	
    45 	IMPORT_C TInt DefaultMtm( TUid aTechnologyTypeUid, TUid& aMtmUid ) const;
    46 	IMPORT_C void SetDefaultMtmL( TUid aTechnologyTypeUid, TUid aMtmUid );
    47 	IMPORT_C TInt RemoveDefaultMtm( TUid aTechnologyTypeUid );
    48 	
    49 	// Stores and Restores data in the central repository
    50 	IMPORT_C void LoadSettingsL( );
    51 	IMPORT_C void SaveSettingsL( );
    52 
    53 private:
    54 	CMsvTechnologyTypeDefaultMtmSettings( RFs& aFs );
    55 	void ConstructL();
    56 	void CheckIfMtmIsPartOfTechnologyTypeGroupL( const TUid aTechnologyTypeUid,
    57 												 const TUid aMtmUid, const TUid aMtmTypeUid ) const;
    58 	TInt FindDefaultMtm( const TUid aTechnologyTypeUid, 
    59 						 TMsvTechnologyTypeDefaultMtmInfo& aTechnologyTypeDefaultMtmInfo ) const;
    60 
    61 private:
    62 	CRepository* iRepository;
    63 	RArray<TMsvTechnologyTypeDefaultMtmInfo> iTechnologyTypeDefaultMtmArray;
    64 	RArray<TUid> iRemovedTechnologyTypes;
    65 	RFs& iFs;
    66 	};
    67 #endif //__CMSVTECHNOLOGYTYPEDEFAULTMTMSETTINGS_H__