os/mm/mmlibs/mmfw/tsrc/mmvalidationsuite/mmvalidationsuiteapp/inc/SettingsManager.h
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmlibs/mmfw/tsrc/mmvalidationsuite/mmvalidationsuiteapp/inc/SettingsManager.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,72 @@
1.4 +// Copyright (c) 2005-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 "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.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 +// Part of the MVS Application for TechView
1.18 +//
1.19 +
1.20 +#ifndef SETTINGS_MANAGER_H
1.21 +#define SETTINGS_MANAGER_H
1.22 +
1.23 +#include <e32cons.h>
1.24 +#include <f32file.h>
1.25 +#include <s32file.h>
1.26 +
1.27 +class CMVSAppUi;
1.28 +class CMVSConfigAudioFormatDialog;
1.29 +class CMVSConfigVideoFormatDialog;
1.30 +
1.31 +class CSettingsManager :public CBase
1.32 + {
1.33 +public:
1.34 + CSettingsManager();
1.35 + ~CSettingsManager();
1.36 + static CSettingsManager* NewL();
1.37 + TBool FileExists();
1.38 + void MakeSeedIndexL();
1.39 + //gets general settings from the file store
1.40 + void ReadGeneralSettingsL(CMVSAppUi* aAppUI);
1.41 + void WriteGeneralSettingsL(CMVSAppUi* aAppUI);
1.42 + void WriteAudioDataL(CMVSConfigAudioFormatDialog* apAudioFormat,
1.43 + const TUid& aUid);
1.44 + void WriteVideoDataL(CMVSConfigVideoFormatDialog* aVideoFormatDlg,
1.45 + const TUid& aUid);
1.46 + TInt ReadAudioDataL(CMVSConfigAudioFormatDialog* apAudioFormat,
1.47 + const TUid& aUid);
1.48 + TBool ReadVideoDataL(CMVSConfigVideoFormatDialog* aVideoFormatDlg,
1.49 + const TUid& aUid);
1.50 +
1.51 +private:
1.52 + TBool OpenStore2ReadLC();
1.53 + void OpenStore2WriteLC();
1.54 + TBool HasSettings();
1.55 + void ReadControllerTableL(RReadStream& aStream);
1.56 + TBool IsControllerAvailableL(const TUid& aUid,
1.57 + TStreamId& aSteamId);
1.58 + void WriteIndexL(RWriteStream& aStream,
1.59 + const TUid& aUid,
1.60 + TStreamId& aStreamId);
1.61 + void ConstructL();
1.62 +
1.63 +private:
1.64 + RFs iFsSession;
1.65 + CFileStore* iStore;
1.66 + TBool iHasSettings;
1.67 + TStreamId iGenSettingsId;
1.68 + TStreamId iRootId; //for index writing
1.69 + //no. of controllers currently available in storage
1.70 + TInt8 iControllerCnt;
1.71 + RArray<TUid> iArrUid;
1.72 + RArray<TStreamId> iArrStreamId;
1.73 + };
1.74 +
1.75 +#endif SETTINGS_MANAGER_H