mmmw_plat/telephony_multimedia_service_api/inc/tmseffectobsrvr.h
changeset 0 71ca22bcf22a
child 13 f5c5c82a163e
equal deleted inserted replaced
-1:000000000000 0:71ca22bcf22a
       
     1 /*
       
     2  * Copyright (c) 2009 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:This class provides callback mechanism for TMSEffect listeners.
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef TMS_EFFECT_OBSRVR_H
       
    19 #define TMS_EFFECT_OBSRVR_H
       
    20 
       
    21 // Include files
       
    22 #include <tms.h>
       
    23 
       
    24 namespace TMS {
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class TMSEffect;
       
    28 
       
    29 /**
       
    30  * TMSEffectObserver class
       
    31  *
       
    32  * This class provides callback mechanism for TMSEffect listeners.
       
    33  *
       
    34  * Client class that wants to receive events from TMSEffect concrete class
       
    35  * objects must inherit from TMSEffectObserver class and register itself with
       
    36  * the TMSEffect object.
       
    37  *
       
    38  * Functions declared in this class are called when effect events occur.
       
    39  *
       
    40  * The client must not do any blocking, or perform any CPU-intensive operations
       
    41  * in the callback methods. It is recommended that the client saves event data,
       
    42  * returns from this function immediately and if necessary, responds to
       
    43  * the event in asynchronous way.
       
    44  *
       
    45  * Usage:
       
    46  * <code>
       
    47  * // Register as observer to TMSVolumeEffect
       
    48  * iClient->AddObserver(*this);
       
    49  * ...
       
    50  * // Unregister (optional)
       
    51  * iClient->RemoveObserver(*this);
       
    52  * ...
       
    53  * </code>
       
    54  *
       
    55  * @lib tmsapi.lib
       
    56  *
       
    57  */
       
    58 class TMSEffectObserver
       
    59     {
       
    60 public:
       
    61     /**
       
    62      * Signal Effects event.
       
    63      *
       
    64      * This method is called when an Effects event occurs.
       
    65      *
       
    66      * Effect types:
       
    67      *  TMS_EFFECT_GLOBAL_VOL
       
    68      *  TMS_EFFECT_GLOBAL_GAIN
       
    69      *  TMS_EFFECT_VOLUME
       
    70      *  TMS_EFFECT_GAIN
       
    71      *
       
    72      * Notified events:
       
    73      *  TMS_EVENT_EFFECT_VOL_CHANGED
       
    74      *  TMS_EVENT_EFFECT_GAIN_CHANGED
       
    75      *
       
    76      * @param  tmseffect
       
    77      *      Pointer to the object that is being signaled.
       
    78      *
       
    79      * @param  event
       
    80      *      Event descriptor.
       
    81      *
       
    82      */
       
    83     virtual void EffectsEvent(TMSEffect* tmseffect, TMSSignalEvent event) = 0;
       
    84     };
       
    85 
       
    86 } //namespace TMS
       
    87 
       
    88 #endif // TMS_EFFECT_OBSRVR_H
       
    89 
       
    90 // End of file