sl@0: // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // Part of the MVS Application for TechView sl@0: // sl@0: sl@0: #ifndef SETTINGS_MANAGER_H sl@0: #define SETTINGS_MANAGER_H sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: class CMVSAppUi; sl@0: class CMVSConfigAudioFormatDialog; sl@0: class CMVSConfigVideoFormatDialog; sl@0: sl@0: class CSettingsManager :public CBase sl@0: { sl@0: public: sl@0: CSettingsManager(); sl@0: ~CSettingsManager(); sl@0: static CSettingsManager* NewL(); sl@0: TBool FileExists(); sl@0: void MakeSeedIndexL(); sl@0: //gets general settings from the file store sl@0: void ReadGeneralSettingsL(CMVSAppUi* aAppUI); sl@0: void WriteGeneralSettingsL(CMVSAppUi* aAppUI); sl@0: void WriteAudioDataL(CMVSConfigAudioFormatDialog* apAudioFormat, sl@0: const TUid& aUid); sl@0: void WriteVideoDataL(CMVSConfigVideoFormatDialog* aVideoFormatDlg, sl@0: const TUid& aUid); sl@0: TInt ReadAudioDataL(CMVSConfigAudioFormatDialog* apAudioFormat, sl@0: const TUid& aUid); sl@0: TBool ReadVideoDataL(CMVSConfigVideoFormatDialog* aVideoFormatDlg, sl@0: const TUid& aUid); sl@0: sl@0: private: sl@0: TBool OpenStore2ReadLC(); sl@0: void OpenStore2WriteLC(); sl@0: TBool HasSettings(); sl@0: void ReadControllerTableL(RReadStream& aStream); sl@0: TBool IsControllerAvailableL(const TUid& aUid, sl@0: TStreamId& aSteamId); sl@0: void WriteIndexL(RWriteStream& aStream, sl@0: const TUid& aUid, sl@0: TStreamId& aStreamId); sl@0: void ConstructL(); sl@0: sl@0: private: sl@0: RFs iFsSession; sl@0: CFileStore* iStore; sl@0: TBool iHasSettings; sl@0: TStreamId iGenSettingsId; sl@0: TStreamId iRootId; //for index writing sl@0: //no. of controllers currently available in storage sl@0: TInt8 iControllerCnt; sl@0: RArray iArrUid; sl@0: RArray iArrStreamId; sl@0: }; sl@0: sl@0: #endif SETTINGS_MANAGER_H