1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mmlibs/mmfw/tsrc/mmfunittest/GEF/Plugin/TestGlobalEffectPlugin.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,83 @@
1.4 +
1.5 +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// under the terms of "Eclipse Public License v1.0"
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +//
1.19 +
1.20 +#ifndef TESTGLOBALEFFECTPLUGIN_H
1.21 +#define TESTGLOBALEFFECTPLUGIN_H
1.22 +
1.23 +#include <mmf/plugin/mmfglblaudioeffectplugin.h>
1.24 +
1.25 +#include "../src/TestEffectCustom.h"
1.26 +#include "PresetList.h"
1.27 +
1.28 +// Test global audio effect - does nothing but supports setting, getting etc
1.29 +
1.30 +class CTestEffect : public CBase,
1.31 + public MMmfGlobalAudioImpl,
1.32 + public MTestEffectCustomIf
1.33 + {
1.34 +public:
1.35 + static MMmfGlobalAudioImpl* NewL();
1.36 + ~CTestEffect();
1.37 +
1.38 + enum TValueState
1.39 + {
1.40 + ESetByUnknown,
1.41 + ESetByUid,
1.42 + ESetByDes,
1.43 + ESetByValue
1.44 + };
1.45 +
1.46 +protected:
1.47 + // from MMmfGlobalAudioImpl
1.48 + void Release();
1.49 + TUint Capability(TBool aCurrentOnly);
1.50 + void RequestNotificationL(TUid aEventUid);
1.51 + TBool IsEnabled() const;
1.52 + TBool IsActive() const;
1.53 + void SetEnabledL(TBool aBool);
1.54 + TUid SettingsByUidL() const;
1.55 + void SetSettingsByUidL(TUid aPresetUid);
1.56 + HBufC8* SettingsByDesL() const;
1.57 + void SetSettingsByDesL(const TDesC8& aParam);
1.58 + MMmfGlobalAudioPresetList* KnownPresetsL();
1.59 + void ExtractValuesL(TDes8& aPackageBuf);
1.60 + void SetByValuesL(const TDesC8& aPackageBuf);
1.61 + TInt CreateCustomInterface(TUid aInterfaceUid);
1.62 + TAny* CustomInterface(TUid aInterfaceUid);
1.63 + void PassDestructorKey(TUid aDestructorKey);
1.64 + void CompleteConstructL(CMmfGlobalAudioEffect* aParent, MMmfGlobalAudioEffectObserver* aObserver);
1.65 +
1.66 + // from MTestEffectCustomIf
1.67 + void SetActive(TBool aValue);
1.68 + void GenCallbackL();
1.69 +
1.70 +private:
1.71 + CTestEffect();
1.72 +private:
1.73 + TUid iDestructorKey;
1.74 + CMmfGlobalAudioEffect* iParent;
1.75 + MMmfGlobalAudioEffectObserver* iObserver;
1.76 + TUid iSettingsUid;
1.77 + HBufC8* iSettingsDes;
1.78 + TInt iSettingsValue;
1.79 + TValueState iValueState;
1.80 + TBool iEnabled;
1.81 + TBool iIsActive;
1.82 + CPresetList* iPresetList;
1.83 + TUid iNotifyUid;
1.84 + };
1.85 +
1.86 +#endif