mmappfw_plat/qt_telephony_multimedia_service_api/inc/qtmsglobalvoleffect.h
changeset 27 cbb1bfb7ebfb
child 50 762d760dcfdf
equal deleted inserted replaced
25:d881023c13eb 27:cbb1bfb7ebfb
       
     1 /*
       
     2  * Copyright (c) 2010 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: QT Bindings for TMS
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef QTMS_GLOBAL_VOL_EFFECT_H
       
    19 #define QTMS_GLOBAL_VOL_EFFECT_H
       
    20 
       
    21 #include <qtms.h>
       
    22 #include <qtmseffect.h>
       
    23 #include <QObject>
       
    24 #include <qglobal.h>
       
    25 #include "qtmswrapperexport.h"
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 namespace TMS {
       
    29 class TMSEffect;
       
    30 }
       
    31 
       
    32 namespace QTMS {
       
    33 
       
    34 /**
       
    35  * QTMSGlobalVolEffect class
       
    36  *
       
    37  * This class provides volume level control in the global QTMS scope. Volume
       
    38  * level changes done by any client are adjusted accross all calls serviced
       
    39  * by the QTMS server.
       
    40  *
       
    41  * @lib QTMSapi.lib
       
    42  *
       
    43  */
       
    44 class QTMS_WRAPPER_DLL_EXPORT QTMSGlobalVolEffect : public QObject,
       
    45                                                     public QTMSEffect
       
    46     {
       
    47     Q_OBJECT
       
    48 public:
       
    49     /**
       
    50      * Destructor
       
    51      */
       
    52     virtual ~QTMSGlobalVolEffect();
       
    53 
       
    54     /**
       
    55      * Set global audio volume level. The volume level should be between 0
       
    56      * and the max value returned by GetMaxLevel().
       
    57      *
       
    58      * @param  level
       
    59      *      the volume level to be set.
       
    60      * @return
       
    61      *      QTMS_RESULT_SUCCESS if the operation was successful.
       
    62      */
       
    63     gint SetLevel(const guint level);
       
    64 
       
    65     /**
       
    66      * Return current global audio volume level.
       
    67      *
       
    68      * @param  level
       
    69      *      Volume level to be set.
       
    70      *
       
    71      * @return
       
    72      *      QTMS_RESULT_SUCCESS if the operation was successful.
       
    73      *
       
    74      */
       
    75     gint GetLevel(guint& level);
       
    76 
       
    77     /**
       
    78      * Return max volume level supported by the device.
       
    79      *
       
    80      * @param  level
       
    81      *      Max volume level.
       
    82      *
       
    83      * @return
       
    84      *      QTMS_RESULT_SUCCESS if the operation was successful.
       
    85      *
       
    86      */
       
    87     gint GetMaxLevel(guint& level);
       
    88 
       
    89     /**
       
    90      * Return effect type.
       
    91      *
       
    92      * @param  effecttype
       
    93      *      Type of the effect object (QTMS_EFFECT_GLOBAL_VOL).
       
    94      *
       
    95      * @return
       
    96      *      QTMS_RESULT_SUCCESS if the operation was successful.
       
    97      *
       
    98      */
       
    99     virtual gint GetType(QTMSEffectType& effecttype);
       
   100 
       
   101     Q_SIGNALS:
       
   102     void EffectsEvent(const QTMSEffect& tmseffect, QTMSSignalEvent event);
       
   103 
       
   104 protected:
       
   105     /**
       
   106      * Constructor
       
   107      */
       
   108     QTMSGlobalVolEffect();
       
   109 
       
   110 protected:
       
   111     TMS::TMSEffect* iEffect;
       
   112     };
       
   113 
       
   114 } //namespace QTMS
       
   115 
       
   116 #endif //QTMS_GLOBAL_VOL_EFFECT_H