Update contrib.
2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Implementation of the base class for effects.
25 #include <AudioEffectBase.h>
26 #include <MAudioEffectObserver.h>
28 // ============================ MEMBER FUNCTIONS ===============================
30 // -----------------------------------------------------------------------------
31 // CAudioEffect::CAudioEffect
32 // C++ default constructor can NOT contain any code, that
34 // -----------------------------------------------------------------------------
36 EXPORT_C CAudioEffect::CAudioEffect()
39 iHaveUpdateRights(ETrue)
45 EXPORT_C CAudioEffect::~CAudioEffect()
50 // -----------------------------------------------------------------------------
51 // CAudioEffect::IsEnable
52 // -----------------------------------------------------------------------------
54 EXPORT_C TBool CAudioEffect::IsEnabled() const
59 // -----------------------------------------------------------------------------
60 // CAudioEffect::Enable
61 // -----------------------------------------------------------------------------
63 EXPORT_C void CAudioEffect::EnableL()
69 // -----------------------------------------------------------------------------
70 // CAudioEffect::Disable
71 // -----------------------------------------------------------------------------
73 EXPORT_C void CAudioEffect::DisableL()
79 // -----------------------------------------------------------------------------
80 // CAudioEffect::Enforce
81 // -----------------------------------------------------------------------------
83 EXPORT_C void CAudioEffect::EnforceL(
86 iEnforced = aEnforced;
90 // -----------------------------------------------------------------------------
91 // CAudioEffect::HaveUpdateRights
92 // -----------------------------------------------------------------------------
94 EXPORT_C TBool CAudioEffect::HaveUpdateRights() const
96 return iHaveUpdateRights;
99 // -----------------------------------------------------------------------------
100 // CAudioEffect::IsEnforced
101 // -----------------------------------------------------------------------------
103 EXPORT_C TBool CAudioEffect::IsEnforced() const
108 // -----------------------------------------------------------------------------
109 // CVolume::RegisterObserverL
110 // -----------------------------------------------------------------------------
112 EXPORT_C void CAudioEffect::RegisterObserverL(
113 MAudioEffectObserver& aObserver )
115 User::LeaveIfError(iObservers.Append(&aObserver));
118 // -----------------------------------------------------------------------------
119 // CVolume::UnRegisterObserver
120 // -----------------------------------------------------------------------------
122 EXPORT_C void CAudioEffect::UnRegisterObserver(
123 MAudioEffectObserver& aObserver )
125 TInt index = iObservers.Find(&aObserver);
126 if( index != KErrNotFound )
128 iObservers.Remove(index);
132 // ========================== OTHER EXPORTED FUNCTIONS =========================