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