diff options
Diffstat (limited to 'backends/pulse/pulse-stream.h')
-rw-r--r-- | backends/pulse/pulse-stream.h | 109 |
1 files changed, 61 insertions, 48 deletions
diff --git a/backends/pulse/pulse-stream.h b/backends/pulse/pulse-stream.h index 3d3ee78..49eac42 100644 --- a/backends/pulse/pulse-stream.h +++ b/backends/pulse/pulse-stream.h @@ -15,14 +15,13 @@ * License along with this library; if not, see <http://www.gnu.org/licenses/>. */ -#ifndef MATEMIXER_PULSE_STREAM_H -#define MATEMIXER_PULSE_STREAM_H +#ifndef PULSE_STREAM_H +#define PULSE_STREAM_H #include <glib.h> #include <glib-object.h> #include <libmatemixer/matemixer-stream.h> -#include <libmatemixer/matemixer-port.h> #include <pulse/pulseaudio.h> @@ -30,57 +29,71 @@ G_BEGIN_DECLS -#define MATE_MIXER_TYPE_PULSE_STREAM \ - (mate_mixer_pulse_stream_get_type ()) -#define MATE_MIXER_PULSE_STREAM(o) \ - (G_TYPE_CHECK_INSTANCE_CAST ((o), MATE_MIXER_TYPE_PULSE_STREAM, MateMixerPulseStream)) -#define MATE_MIXER_IS_PULSE_STREAM(o) \ - (G_TYPE_CHECK_INSTANCE_TYPE ((o), MATE_MIXER_TYPE_PULSE_STREAM)) -#define MATE_MIXER_PULSE_STREAM_CLASS(k) \ - (G_TYPE_CHECK_CLASS_CAST ((k), MATE_MIXER_TYPE_PULSE_STREAM, MateMixerPulseStreamClass)) -#define MATE_MIXER_IS_PULSE_STREAM_CLASS(k) \ - (G_TYPE_CLASS_CHECK_CLASS_TYPE ((k), MATE_MIXER_TYPE_PULSE_STREAM)) -#define MATE_MIXER_PULSE_STREAM_GET_CLASS(o) \ - (G_TYPE_INSTANCE_GET_CLASS ((o), MATE_MIXER_TYPE_PULSE_STREAM, MateMixerPulseStreamClass)) - -typedef struct _MateMixerPulseStream MateMixerPulseStream; -typedef struct _MateMixerPulseStreamClass MateMixerPulseStreamClass; -typedef struct _MateMixerPulseStreamPrivate MateMixerPulseStreamPrivate; - -struct _MateMixerPulseStream +#define PULSE_TYPE_STREAM \ + (pulse_stream_get_type ()) +#define PULSE_STREAM(o) \ + (G_TYPE_CHECK_INSTANCE_CAST ((o), PULSE_TYPE_STREAM, PulseStream)) +#define PULSE_IS_STREAM(o) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((o), PULSE_TYPE_STREAM)) +#define PULSE_STREAM_CLASS(k) \ + (G_TYPE_CHECK_CLASS_CAST ((k), PULSE_TYPE_STREAM, PulseStreamClass)) +#define PULSE_IS_STREAM_CLASS(k) \ + (G_TYPE_CLASS_CHECK_CLASS_TYPE ((k), PULSE_TYPE_STREAM)) +#define PULSE_STREAM_GET_CLASS(o) \ + (G_TYPE_INSTANCE_GET_CLASS ((o), PULSE_TYPE_STREAM, PulseStreamClass)) + +typedef struct _PulseStream PulseStream; +typedef struct _PulseStreamClass PulseStreamClass; +typedef struct _PulseStreamPrivate PulseStreamPrivate; + +struct _PulseStream { - GObject parent; - - MateMixerPulseStreamPrivate *priv; + /*< private >*/ + GObject parent; + PulseStreamPrivate *priv; }; -struct _MateMixerPulseStreamClass +struct _PulseStreamClass { - GObjectClass parent; - - gboolean (*set_volume) (MateMixerStream *stream, guint32 volume); - gboolean (*set_mute) (MateMixerStream *stream, gboolean mute); + /*< private >*/ + GObjectClass parent; + + gboolean (*set_mute) (MateMixerStream *stream, + gboolean mute); + gboolean (*set_volume) (MateMixerStream *stream, + pa_cvolume *volume); + gboolean (*set_active_port) (MateMixerStream *stream, + const gchar *port_name); }; -GType mate_mixer_pulse_stream_get_type (void) G_GNUC_CONST; - -MateMixerPulseConnection * mate_mixer_pulse_stream_get_connection (MateMixerPulseStream *stream); -guint32 mate_mixer_pulse_stream_get_index (MateMixerPulseStream *stream); - -/* Interface implementation */ -const gchar * mate_mixer_pulse_stream_get_name (MateMixerStream *stream); -const gchar * mate_mixer_pulse_stream_get_description (MateMixerStream *stream); -const gchar * mate_mixer_pulse_stream_get_icon (MateMixerStream *stream); - -MateMixerPort * mate_mixer_pulse_stream_get_active_port (MateMixerStream *stream); -gboolean mate_mixer_pulse_stream_set_active_port (MateMixerStream *stream, - MateMixerPort *port); -const GList * mate_mixer_pulse_stream_list_ports (MateMixerStream *stream); -gboolean mate_mixer_pulse_stream_set_mute (MateMixerStream *stream, - gboolean mute); -gboolean mate_mixer_pulse_stream_set_volume (MateMixerStream *stream, - guint32 volume); +GType pulse_stream_get_type (void) G_GNUC_CONST; + +guint32 pulse_stream_get_index (PulseStream *stream); +PulseConnection *pulse_stream_get_connection (PulseStream *stream); + +gboolean pulse_stream_update_name (PulseStream *stream, + const gchar *name); +gboolean pulse_stream_update_description (PulseStream *stream, + const gchar *description); +gboolean pulse_stream_update_flags (PulseStream *stream, + MateMixerStreamFlags flags); +gboolean pulse_stream_update_status (PulseStream *stream, + MateMixerStreamStatus status); +gboolean pulse_stream_update_mute (PulseStream *stream, + gboolean mute); +gboolean pulse_stream_update_volume (PulseStream *stream, + const pa_cvolume *volume); +gboolean pulse_stream_update_volume_extended (PulseStream *stream, + const pa_cvolume *volume, + pa_volume_t volume_base, + guint32 volume_steps); +gboolean pulse_stream_update_channel_map (PulseStream *stream, + const pa_channel_map *map); +gboolean pulse_stream_update_ports (PulseStream *stream, + GList *ports); +gboolean pulse_stream_update_active_port (PulseStream *stream, + const gchar *port_name); G_END_DECLS -#endif /* MATEMIXER_PULSE_STREAM_H */ +#endif /* PULSE_STREAM_H */ |