os/mm/mmlibs/mmfw/tsrc/mmfunittest/GEF/Plugin/TestGlobalEffectPlugin.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
sl@0
     2
// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     3
// All rights reserved.
sl@0
     4
// This component and the accompanying materials are made available
sl@0
     5
// under the terms of "Eclipse Public License v1.0"
sl@0
     6
// which accompanies this distribution, and is available
sl@0
     7
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     8
//
sl@0
     9
// Initial Contributors:
sl@0
    10
// Nokia Corporation - initial contribution.
sl@0
    11
//
sl@0
    12
// Contributors:
sl@0
    13
//
sl@0
    14
// Description:
sl@0
    15
//
sl@0
    16
sl@0
    17
#ifndef TESTGLOBALEFFECTPLUGIN_H
sl@0
    18
#define TESTGLOBALEFFECTPLUGIN_H
sl@0
    19
sl@0
    20
#include <mmf/plugin/mmfglblaudioeffectplugin.h>
sl@0
    21
sl@0
    22
#include "../src/TestEffectCustom.h"
sl@0
    23
#include "PresetList.h"
sl@0
    24
sl@0
    25
// Test global audio effect - does nothing but supports setting, getting etc
sl@0
    26
sl@0
    27
class CTestEffect : public CBase, 
sl@0
    28
                    public MMmfGlobalAudioImpl,
sl@0
    29
                    public MTestEffectCustomIf
sl@0
    30
	{
sl@0
    31
public:
sl@0
    32
	static MMmfGlobalAudioImpl* NewL();
sl@0
    33
	~CTestEffect();
sl@0
    34
	
sl@0
    35
	enum TValueState
sl@0
    36
		{
sl@0
    37
		ESetByUnknown,
sl@0
    38
		ESetByUid,
sl@0
    39
		ESetByDes,
sl@0
    40
		ESetByValue
sl@0
    41
		};
sl@0
    42
	
sl@0
    43
protected:
sl@0
    44
	// from MMmfGlobalAudioImpl
sl@0
    45
	void Release();
sl@0
    46
	TUint Capability(TBool aCurrentOnly);
sl@0
    47
	void RequestNotificationL(TUid aEventUid);
sl@0
    48
	TBool IsEnabled() const;
sl@0
    49
	TBool IsActive() const;
sl@0
    50
	void SetEnabledL(TBool aBool);
sl@0
    51
	TUid SettingsByUidL() const;
sl@0
    52
	void SetSettingsByUidL(TUid aPresetUid);
sl@0
    53
	HBufC8* SettingsByDesL() const;
sl@0
    54
	void SetSettingsByDesL(const TDesC8& aParam);
sl@0
    55
	MMmfGlobalAudioPresetList* KnownPresetsL();
sl@0
    56
	void ExtractValuesL(TDes8& aPackageBuf);
sl@0
    57
	void SetByValuesL(const TDesC8& aPackageBuf);
sl@0
    58
	TInt CreateCustomInterface(TUid aInterfaceUid);
sl@0
    59
	TAny* CustomInterface(TUid aInterfaceUid);
sl@0
    60
	void PassDestructorKey(TUid aDestructorKey);
sl@0
    61
	void CompleteConstructL(CMmfGlobalAudioEffect* aParent, MMmfGlobalAudioEffectObserver* aObserver);
sl@0
    62
	
sl@0
    63
	// from MTestEffectCustomIf
sl@0
    64
	void SetActive(TBool aValue);
sl@0
    65
	void GenCallbackL();
sl@0
    66
	
sl@0
    67
private:
sl@0
    68
	CTestEffect();
sl@0
    69
private:
sl@0
    70
	TUid iDestructorKey;
sl@0
    71
	CMmfGlobalAudioEffect* iParent;
sl@0
    72
	MMmfGlobalAudioEffectObserver* iObserver;
sl@0
    73
	TUid iSettingsUid;
sl@0
    74
	HBufC8* iSettingsDes;
sl@0
    75
	TInt iSettingsValue;
sl@0
    76
	TValueState iValueState;
sl@0
    77
	TBool iEnabled;
sl@0
    78
	TBool iIsActive;
sl@0
    79
	CPresetList* iPresetList;
sl@0
    80
	TUid iNotifyUid;
sl@0
    81
	};
sl@0
    82
	
sl@0
    83
#endif