|
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_H |
|
19 #define QTMS_H |
|
20 |
|
21 // Include files |
|
22 #include <glib.h> |
|
23 #include <vector> |
|
24 |
|
25 namespace QTMS { |
|
26 |
|
27 // FORWARD DECLARATION |
|
28 class QTMSFormat; |
|
29 |
|
30 // Result codes |
|
31 #define QTMS_RESULT_SUCCESS ((gint)0x00000000) |
|
32 #define QTMS_RESULT_ALREADY_EXIST ((gint)0x00000001) |
|
33 #define QTMS_RESULT_DOES_NOT_EXIST ((gint)0x00000002) |
|
34 #define QTMS_RESULT_NULL_ARGUMENT ((gint)0x00000003) |
|
35 #define QTMS_RESULT_INVALID_ARGUMENT ((gint)0x00000004) |
|
36 #define QTMS_RESULT_INVALID_STATE ((gint)0x00000005) |
|
37 #define QTMS_RESULT_UNINITIALIZED_OBJECT ((gint)0x00000006) |
|
38 #define QTMS_RESULT_INSUFFICIENT_MEMORY ((gint)0x00000007) |
|
39 #define QTMS_RESULT_GENERAL_ERROR ((gint)0x00000008) |
|
40 #define QTMS_RESULT_FATAL_ERROR ((gint)0x00000009) |
|
41 #define QTMS_RESULT_OPERATION_CANCELLED ((gint)0x0000000A) |
|
42 #define QTMS_RESULT_ILLEGAL_OPERATION ((gint)0x0000000B) |
|
43 #define QTMS_RESULT_BUFFER_LATENCY_ERROR ((gint)0x0000000C) |
|
44 #define QTMS_RESULT_CALL_TYPE_NOT_SUPPORTED ((gint)0x0000000D) |
|
45 #define QTMS_RESULT_BUFFER_TYPE_NOT_SUPPORTED ((gint)0x0000000E) |
|
46 #define QTMS_RESULT_SOURCE_TYPE_NOT_SUPPORTED ((gint)0x0000000F) |
|
47 #define QTMS_RESULT_SINK_TYPE_NOT_SUPPORTED ((gint)0x00000010) |
|
48 #define QTMS_RESULT_STREAM_TYPE_NOT_SUPPORTED ((gint)0x00000011) |
|
49 #define QTMS_RESULT_FORMAT_TYPE_NOT_SUPPORTED ((gint)0x00000012) |
|
50 #define QTMS_RESULT_EFFECT_TYPE_NOT_SUPPORTED ((gint)0x00000013) |
|
51 #define QTMS_RESULT_VERSION_NOT_SUPPORTED ((gint)0x00000014) |
|
52 #define QTMS_RESULT_FORMAT_TYPE_UNSPECIFIED ((gint)0x00000015) |
|
53 #define QTMS_RESULT_FEATURE_NOT_SUPPORTED ((gint)0x00000016) |
|
54 |
|
55 // Reasons codes |
|
56 #define QTMS_REASON_CLIENT_INITIATED ((gint)0x00000000) |
|
57 #define QTMS_REASON_DEVICE_IN_USE ((gint)0x00000001) // Device not available |
|
58 #define QTMS_REASON_DEVICE_TAKEN ((gint)0x00000002) // Preemption |
|
59 #define QTMS_REASON_INSUFFICIENT_MEMORY ((gint)0x00000003) // Memory |
|
60 #define QTMS_REASON_PERMISSION_DENIED ((gint)0x00000004) // Client app does not have perission |
|
61 #define QTMS_REASON_EMERGENCY_CALL_ONGOING ((gint)0x00000005) // Already ongoing emergency call |
|
62 #define QTMS_REASON_EMERGENCY_CALL_STARTED ((gint)0x00000006) // Preemption because of emergency call |
|
63 #define QTMS_REASON_SOURCE_NULL ((gint)0x00000007) // Could be checked on client side |
|
64 #define QTMS_REASON_SOURCE_NOT_SUPPORTED ((gint)0x00000008) |
|
65 #define QTMS_REASON_FORMAT_NULL ((gint)0x00000009) // Could be checked on client side |
|
66 #define QTMS_REASON_EFFECT_NOT_SUPPORTED ((gint)0x0000000A) |
|
67 #define QTMS_REASON_SINK_NULL ((gint)0x0000000B) // Could be checked on client side |
|
68 #define QTMS_REASON_SINK_NOT_SUPPORTED ((gint)0x0000000C) |
|
69 #define QTMS_REASON_CALL_NOT_ACTIVE ((gint)0x0000000D) |
|
70 |
|
71 // Event codes |
|
72 #define QTMS_EVENT_STREAM_STATE_CHANGED ((gint)0x00000000) |
|
73 #define QTMS_EVENT_STREAM_STATE_CHANGE_ERROR ((gint)0x00000001) |
|
74 #define QTMS_EVENT_SOURCE_FILL_BUFFER ((gint)0x00000002) |
|
75 #define QTMS_EVENT_SOURCE_PROCESSED_BUFFER ((gint)0x00000003) |
|
76 #define QTMS_EVENT_SINK_PROCESS_BUFFER ((gint)0x00000004) |
|
77 #define QTMS_EVENT_EFFECT_VOL_CHANGED ((gint)0x00000005) |
|
78 #define QTMS_EVENT_EFFECT_GAIN_CHANGED ((gint)0x00000006) |
|
79 #define QTMS_EVENT_ROUTING_AVAIL_OUTPUTS_CHANGED ((gint)0x00000007) |
|
80 #define QTMS_EVENT_ROUTING_OUTPUT_CHANGED ((gint)0x00000008) |
|
81 #define QTMS_EVENT_ROUTING_SET_OUTPUT_COMPLETE ((gint)0x00000009) |
|
82 #define QTMS_EVENT_RINGTONE_OPEN_COMPLETE ((gint)0x0000000A) |
|
83 #define QTMS_EVENT_RINGTONE_PLAY_COMPLETE ((gint)0x0000000B) |
|
84 #define QTMS_EVENT_RINGTONE_DEINIT_COMPLETE ((gint)0x0000000C) |
|
85 #define QTMS_EVENT_DTMF_TONE_STARTED ((gint)0x0000000D) |
|
86 #define QTMS_EVENT_DTMF_TONE_STOPPED ((gint)0x0000000E) |
|
87 #define QTMS_EVENT_INBAND_TONE_STARTED ((gint)0x0000000F) |
|
88 #define QTMS_EVENT_INBAND_TONE_STOPPED ((gint)0x00000010) |
|
89 |
|
90 // Stream states |
|
91 typedef gint QTMSStreamState; |
|
92 #define QTMS_STREAM_UNINITIALIZED ((gint)0x00000000) |
|
93 #define QTMS_STREAM_INITIALIZED ((gint)0x00000001) |
|
94 #define QTMS_STREAM_PAUSED ((gint)0x00000002) |
|
95 #define QTMS_STREAM_STARTED ((gint)0x00000003) |
|
96 |
|
97 #define DEFAULT_CALL_CONTEXT ((gint)1) |
|
98 |
|
99 // QTMS object types |
|
100 typedef gint QTMSStreamType; |
|
101 #define QTMS_STREAM_UPLINK ((gint)0) |
|
102 #define QTMS_STREAM_DOWNLINK ((gint)1) |
|
103 |
|
104 typedef gint QTMSBufferType; |
|
105 #define QTMS_BUFFER_MEMORY ((gint)2) |
|
106 |
|
107 typedef gint QTMSSourceType; |
|
108 #define QTMS_SOURCE_CLIENT ((gint)3) |
|
109 #define QTMS_SOURCE_MODEM ((gint)4) |
|
110 #define QTMS_SOURCE_MIC ((gint)5) |
|
111 |
|
112 typedef gint QTMSSinkType; |
|
113 #define QTMS_SINK_CLIENT ((gint)6) |
|
114 #define QTMS_SINK_MODEM ((gint)7) |
|
115 #define QTMS_SINK_SPEAKER ((gint)8) |
|
116 |
|
117 typedef gint QTMSEffectType; |
|
118 #define QTMS_EFFECT_GLOBAL_VOL ((gint)9) |
|
119 #define QTMS_EFFECT_GLOBAL_GAIN ((gint)10) |
|
120 #define QTMS_EFFECT_VOLUME ((gint)11) |
|
121 #define QTMS_EFFECT_GAIN ((gint)12) |
|
122 |
|
123 typedef gint QTMSFormatType; |
|
124 #define QTMS_FORMAT_PCM ((gint)13) |
|
125 #define QTMS_FORMAT_AMR ((gint)14) |
|
126 #define QTMS_FORMAT_G711 ((gint)15) |
|
127 #define QTMS_FORMAT_G729 ((gint)16) |
|
128 #define QTMS_FORMAT_ILBC ((gint)17) |
|
129 |
|
130 typedef gint QTMSRingToneType; |
|
131 #define QTMS_RINGTONE_DEFAULT ((gint)0) |
|
132 #define QTMS_RINGTONE_FILE ((gint)1) |
|
133 #define QTMS_RINGTONE_SEQUENCE ((gint)2) |
|
134 #define QTMS_RINGTONE_BEEP_ONCE ((gint)3) |
|
135 #define QTMS_RINGTONE_SILENT ((gint)4) |
|
136 #define QTMS_RINGTONE_UNSECURE_VOIP ((gint)5) |
|
137 |
|
138 typedef gint QTMSRTPSessionType; |
|
139 #define QTMS_SESSION_RTP_PULL ((gint)0) |
|
140 #define QTMS_SESSION_RTP_PUSH ((gint)1) |
|
141 |
|
142 // QTMS vectors |
|
143 typedef std::vector<QTMSFormat*> FormatVector; |
|
144 typedef std::vector<guint> BitRateVector; |
|
145 typedef std::vector<guint> OutputVector; |
|
146 |
|
147 // Call types |
|
148 typedef gint QTMSCallType; |
|
149 #define QTMS_CALL_CS ((gint)0) |
|
150 #define QTMS_CALL_ECS ((gint)1) |
|
151 #define QTMS_CALL_IP ((gint)2) |
|
152 #define QTMS_CALL_RTP ((gint)3) |
|
153 |
|
154 // Codec modes |
|
155 typedef gint QTMSG711CodecMode; |
|
156 #define QTMS_G711_CODEC_MODE_ALAW ((gint)0) |
|
157 #define QTMS_G711_CODEC_MODE_MULAW ((gint)1) |
|
158 |
|
159 typedef gint QTMSILBCCodecMode; |
|
160 #define QTMS_ILBC_CODEC_MODE_20MS_FRAME ((gint)0) |
|
161 #define QTMS_ILBC_CODEC_MODE_30MS_FRAME ((gint)1) |
|
162 |
|
163 // Audio output types |
|
164 typedef gint QTMSAudioOutput; |
|
165 #define QTMS_AUDIO_OUTPUT_NONE ((gint)0) |
|
166 #define QTMS_AUDIO_OUTPUT_PUBLIC ((gint)1) |
|
167 #define QTMS_AUDIO_OUTPUT_PRIVATE ((gint)2) |
|
168 #define QTMS_AUDIO_OUTPUT_HANDSET ((gint)3) |
|
169 #define QTMS_AUDIO_OUTPUT_LOUDSPEAKER ((gint)4) |
|
170 #define QTMS_AUDIO_OUTPUT_WIRED_ACCESSORY ((gint)5) |
|
171 #define QTMS_AUDIO_OUTPUT_ACCESSORY ((gint)6) |
|
172 #define QTMS_AUDIO_OUTPUT_ETTY ((gint)7) |
|
173 #define QTMS_AUDIO_OUTPUT_NOT_ACTIVE ((gint)8) |
|
174 |
|
175 typedef gint QTMSInbandToneType; |
|
176 #define QTMS_INBAND_USER_BUSY ((gint)0) |
|
177 #define QTMS_INBAND_RADIO_PATH_NOT_AVAIL ((gint)1) |
|
178 #define QTMS_INBAND_CONGESTION ((gint)2) |
|
179 #define QTMS_INBAND_SPECIAL_INFO ((gint)3) |
|
180 #define QTMS_INBAND_REORDER ((gint)4) |
|
181 #define QTMS_INBAND_REMOTE_ALEARTING ((gint)5) |
|
182 #define QTMS_INBAND_CALL_WAITING ((gint)6) |
|
183 #define QTMS_INBAND_DATA_CALL ((gint)7) |
|
184 #define QTMS_INBAND_NO_SEQUENCE ((gint)8) |
|
185 #define QTMS_INBAND_BEEP_SEQUENCE ((gint)9) |
|
186 |
|
187 // Structure signalling callback notifications |
|
188 struct QTMSSignalEvent |
|
189 { |
|
190 guint type; |
|
191 guint reason; |
|
192 gpointer event_data; |
|
193 gpointer user_data; |
|
194 gint curr_state; |
|
195 gint prev_state; |
|
196 }; |
|
197 |
|
198 // Structure for global volume effect change event |
|
199 struct QTMSVolumeEventChangeData |
|
200 { |
|
201 guint level; |
|
202 QTMSAudioOutput output; |
|
203 gboolean output_changed; |
|
204 }; |
|
205 |
|
206 } //namespace QTMS |
|
207 |
|
208 #endif // QTMS_H |
|
209 |
|
210 // End of file |