mmappfw_plat/qt_telephony_multimedia_service_api/inc/qtmsglobalrouting.h
branchRCL_3
changeset 56 63223d4fd956
parent 55 6c1dfe4da5dd
child 59 666f9a5a90a9
equal deleted inserted replaced
55:6c1dfe4da5dd 56:63223d4fd956
     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_ROUTING_H
       
    19 #define QTMS_GLOBAL_ROUTING_H
       
    20 
       
    21 #include <qtms.h>
       
    22 #include <QObject>
       
    23 #include "qtmswrapperexport.h"
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 namespace TMS
       
    27 {
       
    28 class TMSGlobalRouting;
       
    29 }
       
    30 
       
    31 namespace QTMS
       
    32 {
       
    33 
       
    34 /**
       
    35  * QTMSGlobalRouting class
       
    36  *
       
    37  * This class provides audio routing control in the global QTMS scope.
       
    38  * Audio routing changes done by any client are adjusted accross all calls
       
    39  * serviced by the QTMS server.
       
    40  *
       
    41  * @lib QTMSapi.lib
       
    42  *
       
    43  */
       
    44 class QTMS_WRAPPER_DLL_EXPORT QTMSGlobalRouting : public QObject
       
    45 {
       
    46     Q_OBJECT
       
    47 public:
       
    48     /**
       
    49      * Destructor
       
    50      */
       
    51     virtual ~QTMSGlobalRouting();
       
    52 
       
    53     /**
       
    54      * Set global output device audio should be routed to.
       
    55      *
       
    56      * Settings are call-type dependent.
       
    57      *
       
    58      * Common:
       
    59      *  QTMS_AUDIO_OUTPUT_NONE
       
    60      * VoIP call type:
       
    61      *  QTMS_AUDIO_OUTPUT_PUBLIC
       
    62      *  QTMS_AUDIO_OUTPUT_PRIVATE
       
    63      * CS call type:
       
    64      *  QTMS_AUDIO_OUTPUT_HANDSET
       
    65      *  QTMS_AUDIO_OUTPUT_LOUDSPEAKER
       
    66      *  QTMS_AUDIO_OUTPUT_WIRED_ACCESSORY
       
    67      *  QTMS_AUDIO_OUTPUT_ACCESSORY
       
    68      *  QTMS_AUDIO_OUTPUT_ETTY
       
    69      *
       
    70      * @param  output
       
    71      *      Sets call-specific audio output device.
       
    72      *
       
    73      * @return
       
    74      *      QTMS_RESULT_INVALID_ARGUMENT if set to QTMS_AUDIO_OUTPUT_NONE.
       
    75      *      QTMS_RESULT_SUCCESS if the operation was successful.
       
    76      *
       
    77      */
       
    78     gint SetOutput(const QTMSAudioOutput output);
       
    79 
       
    80     /**
       
    81      * Return current global audio output device settings.
       
    82      *
       
    83      * Settings are call-type dependent.
       
    84      * See SetOutput() (above)
       
    85      *
       
    86      * @param  output
       
    87      *      Current audio output device.
       
    88      *
       
    89      * @return
       
    90      *      QTMS_RESULT_SUCCESS if the operation was successful.
       
    91      *
       
    92      */
       
    93     gint GetOutput(QTMSAudioOutput& output);
       
    94 
       
    95     /**
       
    96      * Return previous audio output device.
       
    97      *
       
    98      * Settings are call-type dependent.
       
    99      * See SetOutput() (above)
       
   100      *
       
   101      * @param  output
       
   102      *      Previous audio output device.
       
   103      *
       
   104      * @return
       
   105      *      QTMS_RESULT_SUCCESS if the operation was successful.
       
   106      *
       
   107      */
       
   108     gint GetPreviousOutput(QTMSAudioOutput& output);
       
   109 
       
   110     /**
       
   111      * Return list of supported audio output devices.
       
   112      *
       
   113      * Settings are call-type dependent.
       
   114      * See SetOutput() (above)
       
   115      *
       
   116      * @param  outputs
       
   117      *      The typedef std::vector<guint> OutputVector; list of supported
       
   118      *      audio output devices (QTMSAudioOutput-type).
       
   119      *
       
   120      * @return
       
   121      *      QTMS_RESULT_SUCCESS if the operation was successful.
       
   122      *
       
   123      */
       
   124     gint GetAvailableOutputs(OutputVector& outputs);
       
   125 
       
   126     Q_SIGNALS:
       
   127     void GlobalRoutingEvent(const QTMSGlobalRouting& routing,
       
   128         QTMSSignalEvent event, QTMSAudioOutput output);
       
   129 
       
   130 protected:
       
   131     /**
       
   132      * Constructor
       
   133      */
       
   134     QTMSGlobalRouting();
       
   135 
       
   136 protected:
       
   137     TMS::TMSGlobalRouting* iRouting;
       
   138 };
       
   139 
       
   140 } //namespace QTMS
       
   141 
       
   142 #endif //QTMS_GLOBAL_ROUTING_H