os/mm/mmlibs/mmfw/tsrc/mmvalidationsuite/mmvalidationsuiteapp/inc/SettingsManager.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// Part of the MVS Application for TechView
sl@0
    15
//
sl@0
    16
sl@0
    17
#ifndef SETTINGS_MANAGER_H
sl@0
    18
#define SETTINGS_MANAGER_H
sl@0
    19
sl@0
    20
#include <e32cons.h>
sl@0
    21
#include <f32file.h>
sl@0
    22
#include <s32file.h>
sl@0
    23
sl@0
    24
class CMVSAppUi;
sl@0
    25
class CMVSConfigAudioFormatDialog; 
sl@0
    26
class CMVSConfigVideoFormatDialog;
sl@0
    27
sl@0
    28
class CSettingsManager :public CBase
sl@0
    29
	{
sl@0
    30
public:
sl@0
    31
	CSettingsManager();
sl@0
    32
	~CSettingsManager();
sl@0
    33
	static CSettingsManager* NewL();
sl@0
    34
	TBool FileExists();
sl@0
    35
	void MakeSeedIndexL();
sl@0
    36
	//gets general settings from the file store
sl@0
    37
	void ReadGeneralSettingsL(CMVSAppUi* aAppUI);
sl@0
    38
	void WriteGeneralSettingsL(CMVSAppUi* aAppUI);
sl@0
    39
	void WriteAudioDataL(CMVSConfigAudioFormatDialog* apAudioFormat,
sl@0
    40
					  const TUid& aUid);
sl@0
    41
	void  WriteVideoDataL(CMVSConfigVideoFormatDialog* aVideoFormatDlg,
sl@0
    42
						 const TUid& aUid);
sl@0
    43
	TInt ReadAudioDataL(CMVSConfigAudioFormatDialog* apAudioFormat,
sl@0
    44
							   const TUid& aUid);
sl@0
    45
	TBool ReadVideoDataL(CMVSConfigVideoFormatDialog* aVideoFormatDlg,
sl@0
    46
						const TUid& aUid);
sl@0
    47
sl@0
    48
private:
sl@0
    49
	TBool OpenStore2ReadLC();
sl@0
    50
	void OpenStore2WriteLC();
sl@0
    51
	TBool HasSettings();
sl@0
    52
	void ReadControllerTableL(RReadStream& aStream);
sl@0
    53
	TBool IsControllerAvailableL(const TUid& aUid,
sl@0
    54
										TStreamId&  aSteamId);										
sl@0
    55
	void WriteIndexL(RWriteStream& aStream,
sl@0
    56
					const TUid& aUid,
sl@0
    57
					TStreamId& aStreamId);
sl@0
    58
	void ConstructL();
sl@0
    59
sl@0
    60
private:
sl@0
    61
	RFs			iFsSession;
sl@0
    62
	CFileStore*	iStore;
sl@0
    63
	TBool iHasSettings;
sl@0
    64
	TStreamId iGenSettingsId;
sl@0
    65
	TStreamId iRootId; //for index writing
sl@0
    66
	//no. of controllers currently available in storage		 
sl@0
    67
	TInt8 iControllerCnt; 
sl@0
    68
	RArray<TUid> iArrUid;
sl@0
    69
	RArray<TStreamId> iArrStreamId;
sl@0
    70
	}; 
sl@0
    71
sl@0
    72
#endif  SETTINGS_MANAGER_H