mpxplugins/viewplugins/views/equalizerview/src/mpxequalizerhelperstub.cpp
changeset 0 ff3acec5bc43
equal deleted inserted replaced
-1:000000000000 0:ff3acec5bc43
       
     1 /*
       
     2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     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".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Helper class for managing equalizer utility instances
       
    15 *                (stub version).
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 // INCLUDE FILES
       
    22 #include <mpxplaybackmessage.h>
       
    23 #include <mpxmessagegeneraldefs.h>
       
    24 #include "mpxequalizerhelper.h"
       
    25 #include "mpxlog.h"
       
    26 
       
    27 // ======== MEMBER FUNCTIONS ========
       
    28 
       
    29 // ---------------------------------------------------------------------------
       
    30 // C++ default constructor can NOT contain any code, that
       
    31 // might leave.
       
    32 // ---------------------------------------------------------------------------
       
    33 //
       
    34 CMPXEqualizerHelper::CMPXEqualizerHelper()
       
    35     {
       
    36     // Do nothing
       
    37     }
       
    38 
       
    39 // ---------------------------------------------------------------------------
       
    40 // Symbian 2nd phase constructor can leave.
       
    41 // ---------------------------------------------------------------------------
       
    42 //
       
    43 void CMPXEqualizerHelper::ConstructL()
       
    44     {
       
    45     MPX_FUNC("CMPXEqualizerHelper::ConstructL");
       
    46     // Do nothing
       
    47     }
       
    48 
       
    49 // ---------------------------------------------------------------------------
       
    50 // Two-phased constructor.
       
    51 // ---------------------------------------------------------------------------
       
    52 //
       
    53 CMPXEqualizerHelper* CMPXEqualizerHelper::NewL()
       
    54     {
       
    55     MPX_FUNC("CMPXEqualizerHelper::NewL");
       
    56     CMPXEqualizerHelper* self =
       
    57         new ( ELeave ) CMPXEqualizerHelper();
       
    58     CleanupStack::PushL( self );
       
    59     self->ConstructL();
       
    60     CleanupStack::Pop( self );
       
    61     return self;
       
    62     }
       
    63 
       
    64 // ---------------------------------------------------------------------------
       
    65 // Destructor
       
    66 // ---------------------------------------------------------------------------
       
    67 //
       
    68 CMPXEqualizerHelper::~CMPXEqualizerHelper()
       
    69     {
       
    70     // Do nothing
       
    71     }
       
    72 
       
    73 // ---------------------------------------------------------------------------
       
    74 // Initialize audio equalizer utility for current active playing track.
       
    75 // ---------------------------------------------------------------------------
       
    76 //
       
    77 void CMPXEqualizerHelper::InitializeEqualizerUtilityL()
       
    78     {
       
    79     MPX_FUNC("CMPXEqualizerHelper::InitializeEqualizerUtilityL");
       
    80     // Do nothing
       
    81     }
       
    82 
       
    83 // ---------------------------------------------------------------------------
       
    84 // Release audio equalizer utility.
       
    85 // ---------------------------------------------------------------------------
       
    86 //
       
    87 void CMPXEqualizerHelper::ReleaseEqualizerUtility()
       
    88     {
       
    89     MPX_FUNC("CMPXEqualizerHelper::ReleaseEqualizerUtility");
       
    90     // Do nothing
       
    91     }
       
    92 
       
    93 // ---------------------------------------------------------------------------
       
    94 // Get current preset ID.
       
    95 // ---------------------------------------------------------------------------
       
    96 //
       
    97 TInt CMPXEqualizerHelper::GetPresetId( TInt& /* aPresetId */ )
       
    98     {
       
    99     MPX_FUNC("CMPXEqualizerHelper::GetPresetId");
       
   100     return KErrNotFound;
       
   101     }
       
   102 
       
   103 // ---------------------------------------------------------------------------
       
   104 // Initialize secondary audio equalizer utility for situations when the
       
   105 // engine cannot provide one.
       
   106 // ---------------------------------------------------------------------------
       
   107 //
       
   108 void CMPXEqualizerHelper::InitializeBackupEqualizerUtilityL()
       
   109     {
       
   110     MPX_FUNC("CMPXEqualizerHelper::InitializeBackupEqualizerUtilityL");
       
   111     // Do nothing
       
   112     }
       
   113 
       
   114 // ---------------------------------------------------------------------------
       
   115 // Create secondary audio equalizer utility based on latest preset settings.
       
   116 // ---------------------------------------------------------------------------
       
   117 //
       
   118 void CMPXEqualizerHelper::CreateBackupEqualizerUtility()
       
   119     {
       
   120     MPX_FUNC("CMPXEqualizerHelper::CreateBackupEqualizerUtility");
       
   121     // Do nothing
       
   122     }
       
   123 
       
   124 // ---------------------------------------------------------------------------
       
   125 // Setup active equalizer utility for equalizer dialog.
       
   126 // ---------------------------------------------------------------------------
       
   127 //
       
   128 void CMPXEqualizerHelper::SetupActiveEqualizerUtility()
       
   129     {
       
   130     MPX_FUNC("CMPXEqualizerHelper::SetupActiveEqualizerUtility");
       
   131     // Do nothing
       
   132     }
       
   133 
       
   134 // ---------------------------------------------------------------------------
       
   135 // Launch equalizer dialog.
       
   136 // ---------------------------------------------------------------------------
       
   137 //
       
   138 void CMPXEqualizerHelper::DoLaunchEqualizerDialogL()
       
   139     {
       
   140     MPX_FUNC("CMPXEqualizerHelper::DoLaunchEqualizerDialogL");
       
   141     // Do nothing
       
   142     }
       
   143 
       
   144 // ---------------------------------------------------------------------------
       
   145 // Handle playback message.
       
   146 // ---------------------------------------------------------------------------
       
   147 //
       
   148 void CMPXEqualizerHelper::DoHandlePlaybackMessageL(
       
   149     const CMPXMessage& aMessage )
       
   150     {
       
   151     MPX_FUNC("CMPXEqualizerHelper::DoHandlePlaybackMessageL");
       
   152     TMPXMessageId id( aMessage.ValueTObjectL<TMPXMessageId>( KMPXMessageGeneralId ) );
       
   153     if ( KMPXMessageGeneral == id )
       
   154         {
       
   155         switch ( aMessage.ValueTObjectL<TInt>( KMPXMessageGeneralEvent ) )
       
   156             {
       
   157             case TMPXPlaybackMessage::EStateChanged:
       
   158                 {
       
   159                 TMPXPlaybackState state(
       
   160                     static_cast<TMPXPlaybackState>(
       
   161                         aMessage.ValueTObjectL<TInt>( KMPXMessageGeneralType ) ) );
       
   162                 DoHandleStateChangedL( state );
       
   163                 break;
       
   164                 }
       
   165             default:
       
   166                 {
       
   167                 // pass
       
   168                 break;
       
   169                 }
       
   170             }
       
   171         }
       
   172     }
       
   173 
       
   174 // ---------------------------------------------------------------------------
       
   175 // Handle playback state changed.
       
   176 // ---------------------------------------------------------------------------
       
   177 //
       
   178 void CMPXEqualizerHelper::DoHandleStateChangedL(
       
   179     TMPXPlaybackState /* aState */ )
       
   180     {
       
   181     MPX_FUNC("CMPXEqualizerHelper::DoHandleStateChangedL");
       
   182     // Do nothing
       
   183     }
       
   184 
       
   185 // ---------------------------------------------------------------------------
       
   186 // From CMPXEqualizerView
       
   187 // Launch equalizer dialog.
       
   188 // ---------------------------------------------------------------------------
       
   189 //
       
   190 void CMPXEqualizerHelper::LaunchEqualizerL()
       
   191     {
       
   192     MPX_FUNC("CMPXEqualizerHelper::LaunchEqualizerL");
       
   193     // Do nothing
       
   194     }
       
   195 
       
   196 // ---------------------------------------------------------------------------
       
   197 // From MMPXPlaybackObserver
       
   198 // Handle playback message.
       
   199 // ---------------------------------------------------------------------------
       
   200 //
       
   201 void CMPXEqualizerHelper::HandlePlaybackMessage(
       
   202     CMPXMessage* aMessage, TInt aError )
       
   203     {
       
   204     MPX_FUNC("CMPXEqualizerHelper::HandlePlaybackMessage");
       
   205     if ( aError == KErrNone && aMessage )
       
   206         {
       
   207         TRAP_IGNORE( DoHandlePlaybackMessageL( *aMessage ) );
       
   208         }
       
   209     }
       
   210 
       
   211 // ---------------------------------------------------------------------------
       
   212 // From MEqualizerPresetActivationObserver
       
   213 // Handle preset id activation from Equalizer dialog.
       
   214 // ---------------------------------------------------------------------------
       
   215 //
       
   216 void CMPXEqualizerHelper::HandlePresetActivation(
       
   217     TInt /* aActivatedPreset */ )
       
   218     {
       
   219     MPX_FUNC("CMPXEqualizerHelper::HandlePresetActivation");
       
   220     // Do nothing
       
   221     }
       
   222 
       
   223 // ---------------------------------------------------------------------------
       
   224 // From MMdaAudioPlayerCallback
       
   225 // Callback when an attempt to open and initialise an audio sample
       
   226 // has completed.
       
   227 // ---------------------------------------------------------------------------
       
   228 //
       
   229 void CMPXEqualizerHelper::MapcInitComplete(
       
   230     TInt /* aError */,
       
   231     const TTimeIntervalMicroSeconds& /* aDuration */ )
       
   232     {
       
   233     MPX_FUNC("CMPXEqualizerHelper::MapcInitComplete");
       
   234     // Do nothing
       
   235     }
       
   236 
       
   237 // ---------------------------------------------------------------------------
       
   238 // From MMdaAudioPlayerCallback
       
   239 // Callback when an attempt to playback an audio sample has completed.
       
   240 // ---------------------------------------------------------------------------
       
   241 //
       
   242 void CMPXEqualizerHelper::MapcPlayComplete(
       
   243     TInt /* aError */ )
       
   244     {
       
   245     MPX_FUNC("CMPXEqualizerHelper::MapcPlayComplete");
       
   246     // Do nothing
       
   247     }
       
   248 
       
   249 //  End of File