update epan/dissectors/pidl/drsuapi/drsuapi.idl from samba
[wireshark-sm.git] / ui / qt / utils / rtp_audio_routing.h
blob51117b169d16066853ddc6d51bc4ca93dc57e28d
1 /** @file
3 * Declarations of RTP audio routing class
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * SPDX-License-Identifier: GPL-2.0-or-later
12 #ifndef RTP_AUDIO_ROUTING_H
13 #define RTP_AUDIO_ROUTING_H
15 #include "config.h"
17 #include <QMetaType>
19 typedef enum {
20 channel_any, // Used just for changes of mute
21 channel_mono, // Play
22 channel_stereo_left, // L
23 channel_stereo_right, // R
24 channel_stereo_both // L+R
25 } audio_routing_channel_t;
27 class AudioRouting
29 public:
30 AudioRouting() = default;
31 ~AudioRouting() = default;
32 AudioRouting(const AudioRouting &) = default;
33 AudioRouting &operator=(const AudioRouting &) = default;
35 AudioRouting(bool muted, audio_routing_channel_t channel);
36 bool isMuted() { return muted_; }
37 void setMuted(bool muted) { muted_ = muted; }
38 audio_routing_channel_t getChannel() { return channel_; }
39 void setChannel(audio_routing_channel_t channel) { channel_ = channel; }
40 char const *formatAudioRoutingToString();
41 AudioRouting getNextChannel(bool stereo_available);
42 AudioRouting convert(bool stereo_available);
43 void mergeAudioRouting(AudioRouting new_audio_routing);
45 private:
46 bool muted_;
47 audio_routing_channel_t channel_;
49 Q_DECLARE_METATYPE(AudioRouting)
51 #define AUDIO_MUTED true
52 #define AUDIO_UNMUTED false
55 #endif // RTP_AUDIO_ROUTING_H