summaryrefslogtreecommitdiff
path: root/libmatemixer
diff options
context:
space:
mode:
authorMichal Ratajsky <[email protected]>2014-07-04 14:31:56 +0200
committerMichal Ratajsky <[email protected]>2014-07-04 14:31:56 +0200
commit4793cbd87fed50678215b5dc1ba8e708fd4c9b58 (patch)
treeb1a34657c1606fdea3ce14036c5f6fff9a3168ed /libmatemixer
parentb81d9ed11fae7bee59b67b1aee9927e417666875 (diff)
downloadlibmatemixer-4793cbd87fed50678215b5dc1ba8e708fd4c9b58.tar.bz2
libmatemixer-4793cbd87fed50678215b5dc1ba8e708fd4c9b58.tar.xz
Rename MateMixerProfile to MateMixerDeviceProfile and add number of streams in a profile
Diffstat (limited to 'libmatemixer')
-rw-r--r--libmatemixer/Makefile.am4
-rw-r--r--libmatemixer/matemixer-device-profile.c272
-rw-r--r--libmatemixer/matemixer-device-profile.h72
-rw-r--r--libmatemixer/matemixer-device.c6
-rw-r--r--libmatemixer/matemixer-device.h38
-rw-r--r--libmatemixer/matemixer-profile.c212
-rw-r--r--libmatemixer/matemixer-profile.h68
-rw-r--r--libmatemixer/matemixer-stream.c16
-rw-r--r--libmatemixer/matemixer.h2
9 files changed, 377 insertions, 313 deletions
diff --git a/libmatemixer/Makefile.am b/libmatemixer/Makefile.am
index 9d79e9d..538592f 100644
--- a/libmatemixer/Makefile.am
+++ b/libmatemixer/Makefile.am
@@ -13,9 +13,9 @@ libmatemixer_include_HEADERS = \
matemixer-client-stream.h \
matemixer-control.h \
matemixer-device.h \
+ matemixer-device-profile.h \
matemixer-enums.h \
matemixer-port.h \
- matemixer-profile.h \
matemixer-stream.h \
matemixer-version.h
@@ -31,10 +31,10 @@ libmatemixer_la_SOURCES = \
matemixer-client-stream.c \
matemixer-control.c \
matemixer-device.c \
+ matemixer-device-profile.c \
matemixer-enum-types.c \
matemixer-enum-types.h \
matemixer-port.c \
- matemixer-profile.c \
matemixer-stream.c
libmatemixer_la_LIBADD = $(GLIB_LIBS)
diff --git a/libmatemixer/matemixer-device-profile.c b/libmatemixer/matemixer-device-profile.c
new file mode 100644
index 0000000..e229b6a
--- /dev/null
+++ b/libmatemixer/matemixer-device-profile.c
@@ -0,0 +1,272 @@
+/*
+ * Copyright (C) 2014 Michal Ratajsky <[email protected]>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the licence, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include "matemixer-device-profile.h"
+
+/**
+ * SECTION:matemixer-device-profile
+ * @include: libmatemixer/matemixer.h
+ */
+
+struct _MateMixerDeviceProfilePrivate
+{
+ gchar *name;
+ gchar *description;
+ guint priority;
+ guint num_input_streams;
+ guint num_output_streams;
+};
+
+enum {
+ PROP_0,
+ PROP_NAME,
+ PROP_DESCRIPTION,
+ PROP_PRIORITY,
+ PROP_NUM_INPUT_STREAMS,
+ PROP_NUM_OUTPUT_STREAMS,
+ N_PROPERTIES
+};
+
+static GParamSpec *properties[N_PROPERTIES] = { NULL, };
+
+static void mate_mixer_device_profile_class_init (MateMixerDeviceProfileClass *klass);
+
+static void mate_mixer_device_profile_get_property (GObject *object,
+ guint param_id,
+ GValue *value,
+ GParamSpec *pspec);
+static void mate_mixer_device_profile_set_property (GObject *object,
+ guint param_id,
+ const GValue *value,
+ GParamSpec *pspec);
+
+static void mate_mixer_device_profile_init (MateMixerDeviceProfile *profile);
+static void mate_mixer_device_profile_finalize (GObject *object);
+
+G_DEFINE_TYPE (MateMixerDeviceProfile, mate_mixer_device_profile, G_TYPE_OBJECT);
+
+static void
+mate_mixer_device_profile_class_init (MateMixerDeviceProfileClass *klass)
+{
+ GObjectClass *object_class;
+
+ object_class = G_OBJECT_CLASS (klass);
+ object_class->finalize = mate_mixer_device_profile_finalize;
+ object_class->get_property = mate_mixer_device_profile_get_property;
+ object_class->set_property = mate_mixer_device_profile_set_property;
+
+ properties[PROP_NAME] =
+ g_param_spec_string ("name",
+ "Name",
+ "Name of the profile",
+ NULL,
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS);
+
+ properties[PROP_DESCRIPTION] =
+ g_param_spec_string ("description",
+ "Description",
+ "Description of the profile",
+ NULL,
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS);
+
+ properties[PROP_PRIORITY] =
+ g_param_spec_uint ("priority",
+ "Priority",
+ "Priority of the profile",
+ 0,
+ G_MAXUINT,
+ 0,
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS);
+
+ properties[PROP_NUM_INPUT_STREAMS] =
+ g_param_spec_uint ("num-input-streams",
+ "Number of input streams",
+ "Number of input streams in the profile",
+ 0,
+ G_MAXUINT,
+ 0,
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS);
+
+ properties[PROP_NUM_OUTPUT_STREAMS] =
+ g_param_spec_uint ("num-output-streams",
+ "Number of output streams",
+ "Number of output streams in the profile",
+ 0,
+ G_MAXUINT,
+ 0,
+ G_PARAM_CONSTRUCT_ONLY |
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS);
+
+ g_object_class_install_properties (object_class, N_PROPERTIES, properties);
+
+ g_type_class_add_private (object_class, sizeof (MateMixerDeviceProfilePrivate));
+}
+
+static void
+mate_mixer_device_profile_get_property (GObject *object,
+ guint param_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ MateMixerDeviceProfile *profile;
+
+ profile = MATE_MIXER_DEVICE_PROFILE (object);
+
+ switch (param_id) {
+ case PROP_NAME:
+ g_value_set_string (value, profile->priv->name);
+ break;
+ case PROP_DESCRIPTION:
+ g_value_set_string (value, profile->priv->description);
+ break;
+ case PROP_PRIORITY:
+ g_value_set_uint (value, profile->priv->priority);
+ break;
+ case PROP_NUM_INPUT_STREAMS:
+ g_value_set_uint (value, profile->priv->num_input_streams);
+ break;
+ case PROP_NUM_OUTPUT_STREAMS:
+ g_value_set_uint (value, profile->priv->num_output_streams);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
+ break;
+ }
+}
+
+static void
+mate_mixer_device_profile_set_property (GObject *object,
+ guint param_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ MateMixerDeviceProfile *profile;
+
+ profile = MATE_MIXER_DEVICE_PROFILE (object);
+
+ switch (param_id) {
+ case PROP_NAME:
+ /* Construct-only string */
+ profile->priv->name = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_DESCRIPTION:
+ /* Construct-only string */
+ profile->priv->description = g_strdup (g_value_get_string (value));
+ break;
+ case PROP_PRIORITY:
+ profile->priv->priority = g_value_get_uint (value);
+ break;
+ case PROP_NUM_INPUT_STREAMS:
+ profile->priv->num_input_streams = g_value_get_uint (value);
+ break;
+ case PROP_NUM_OUTPUT_STREAMS:
+ profile->priv->num_output_streams = g_value_get_uint (value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
+ break;
+ }
+}
+
+static void
+mate_mixer_device_profile_init (MateMixerDeviceProfile *profile)
+{
+ profile->priv = G_TYPE_INSTANCE_GET_PRIVATE (profile,
+ MATE_MIXER_TYPE_DEVICE_PROFILE,
+ MateMixerDeviceProfilePrivate);
+}
+
+static void
+mate_mixer_device_profile_finalize (GObject *object)
+{
+ MateMixerDeviceProfile *profile;
+
+ profile = MATE_MIXER_DEVICE_PROFILE (object);
+
+ g_free (profile->priv->name);
+ g_free (profile->priv->description);
+
+ G_OBJECT_CLASS (mate_mixer_device_profile_parent_class)->finalize (object);
+}
+
+MateMixerDeviceProfile *
+mate_mixer_device_profile_new (const gchar *name,
+ const gchar *description,
+ guint priority,
+ guint input_streams,
+ guint output_streams)
+{
+ return g_object_new (MATE_MIXER_TYPE_DEVICE_PROFILE,
+ "name", name,
+ "description", description,
+ "priority", priority,
+ "num-input-streams", input_streams,
+ "num-output-streams", output_streams,
+ NULL);
+}
+
+const gchar *
+mate_mixer_device_profile_get_name (MateMixerDeviceProfile *profile)
+{
+ g_return_val_if_fail (MATE_MIXER_IS_DEVICE_PROFILE (profile), NULL);
+
+ return profile->priv->name;
+}
+
+const gchar *
+mate_mixer_device_profile_get_description (MateMixerDeviceProfile *profile)
+{
+ g_return_val_if_fail (MATE_MIXER_IS_DEVICE_PROFILE (profile), NULL);
+
+ return profile->priv->description;
+}
+
+guint
+mate_mixer_device_profile_get_priority (MateMixerDeviceProfile *profile)
+{
+ g_return_val_if_fail (MATE_MIXER_IS_DEVICE_PROFILE (profile), 0);
+
+ return profile->priv->priority;
+}
+
+guint
+mate_mixer_device_profile_get_num_input_streams (MateMixerDeviceProfile *profile)
+{
+ g_return_val_if_fail (MATE_MIXER_IS_DEVICE_PROFILE (profile), 0);
+
+ return profile->priv->num_input_streams;
+}
+
+guint
+mate_mixer_device_profile_get_num_output_streams (MateMixerDeviceProfile *profile)
+{
+ g_return_val_if_fail (MATE_MIXER_IS_DEVICE_PROFILE (profile), 0);
+
+ return profile->priv->num_output_streams;
+}
diff --git a/libmatemixer/matemixer-device-profile.h b/libmatemixer/matemixer-device-profile.h
new file mode 100644
index 0000000..6a4368b
--- /dev/null
+++ b/libmatemixer/matemixer-device-profile.h
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2014 Michal Ratajsky <[email protected]>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the licence, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef MATEMIXER_DEVICE_PROFILE_H
+#define MATEMIXER_DEVICE_PROFILE_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+#define MATE_MIXER_TYPE_DEVICE_PROFILE \
+ (mate_mixer_device_profile_get_type ())
+#define MATE_MIXER_DEVICE_PROFILE(o) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((o), MATE_MIXER_TYPE_DEVICE_PROFILE, MateMixerDeviceProfile))
+#define MATE_MIXER_IS_DEVICE_PROFILE(o) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((o), MATE_MIXER_TYPE_DEVICE_PROFILE))
+#define MATE_MIXER_DEVICE_PROFILE_CLASS(k) \
+ (G_TYPE_CHECK_CLASS_CAST ((k), MATE_MIXER_TYPE_DEVICE_PROFILE, MateMixerDeviceProfileClass))
+#define MATE_MIXER_IS_DEVICE_PROFILE_CLASS(k) \
+ (G_TYPE_CHECK_CLASS_TYPE ((k), MATE_MIXER_TYPE_DEVICE_PROFILE))
+#define MATE_MIXER_DEVICE_PROFILE_GET_CLASS(o) \
+ (G_TYPE_INSTANCE_GET_CLASS ((o), MATE_MIXER_TYPE_DEVICE_PROFILE, MateMixerDeviceProfileClass))
+
+typedef struct _MateMixerDeviceProfile MateMixerDeviceProfile;
+typedef struct _MateMixerDeviceProfileClass MateMixerDeviceProfileClass;
+typedef struct _MateMixerDeviceProfilePrivate MateMixerDeviceProfilePrivate;
+
+struct _MateMixerDeviceProfile
+{
+ GObject parent;
+
+ /*< private >*/
+ MateMixerDeviceProfilePrivate *priv;
+};
+
+struct _MateMixerDeviceProfileClass
+{
+ GObjectClass parent_class;
+};
+
+GType mate_mixer_device_profile_get_type (void) G_GNUC_CONST;
+
+MateMixerDeviceProfile *mate_mixer_device_profile_new (const gchar *name,
+ const gchar *description,
+ guint priority,
+ guint input_streams,
+ guint output_streams);
+
+const gchar * mate_mixer_device_profile_get_name (MateMixerDeviceProfile *profile);
+const gchar * mate_mixer_device_profile_get_description (MateMixerDeviceProfile *profile);
+guint mate_mixer_device_profile_get_priority (MateMixerDeviceProfile *profile);
+guint mate_mixer_device_profile_get_num_input_streams (MateMixerDeviceProfile *profile);
+guint mate_mixer_device_profile_get_num_output_streams (MateMixerDeviceProfile *profile);
+
+G_END_DECLS
+
+#endif /* MATEMIXER_DEVICE_PROFILE_H */
diff --git a/libmatemixer/matemixer-device.c b/libmatemixer/matemixer-device.c
index e74dc23..00a848a 100644
--- a/libmatemixer/matemixer-device.c
+++ b/libmatemixer/matemixer-device.c
@@ -19,7 +19,7 @@
#include <glib-object.h>
#include "matemixer-device.h"
-#include "matemixer-profile.h"
+#include "matemixer-device-profile.h"
/**
* SECTION:matemixer-device
@@ -73,7 +73,7 @@ mate_mixer_device_default_init (MateMixerDeviceInterface *iface)
g_param_spec_object ("active-profile",
"Active profile",
"The currently active profile of the sound device",
- MATE_MIXER_TYPE_PROFILE,
+ MATE_MIXER_TYPE_DEVICE_PROFILE,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS));
}
@@ -146,7 +146,7 @@ mate_mixer_device_list_profiles (MateMixerDevice *device)
return NULL;
}
-MateMixerProfile *
+MateMixerDeviceProfile *
mate_mixer_device_get_active_profile (MateMixerDevice *device)
{
MateMixerDeviceInterface *iface;
diff --git a/libmatemixer/matemixer-device.h b/libmatemixer/matemixer-device.h
index a1422e3..ef283f1 100644
--- a/libmatemixer/matemixer-device.h
+++ b/libmatemixer/matemixer-device.h
@@ -21,7 +21,7 @@
#include <glib.h>
#include <glib-object.h>
-#include <libmatemixer/matemixer-profile.h>
+#include <libmatemixer/matemixer-device-profile.h>
G_BEGIN_DECLS
@@ -42,29 +42,29 @@ struct _MateMixerDeviceInterface
GTypeInterface parent_iface;
/*< private >*/
- const gchar *(*get_name) (MateMixerDevice *device);
- const gchar *(*get_description) (MateMixerDevice *device);
- const gchar *(*get_icon) (MateMixerDevice *device);
- const GList *(*list_streams) (MateMixerDevice *device);
- const GList *(*list_ports) (MateMixerDevice *device);
- const GList *(*list_profiles) (MateMixerDevice *device);
- MateMixerProfile *(*get_active_profile) (MateMixerDevice *device);
- gboolean (*set_active_profile) (MateMixerDevice *device,
- const gchar *profile);
+ const gchar *(*get_name) (MateMixerDevice *device);
+ const gchar *(*get_description) (MateMixerDevice *device);
+ const gchar *(*get_icon) (MateMixerDevice *device);
+ const GList *(*list_streams) (MateMixerDevice *device);
+ const GList *(*list_ports) (MateMixerDevice *device);
+ const GList *(*list_profiles) (MateMixerDevice *device);
+ MateMixerDeviceProfile *(*get_active_profile) (MateMixerDevice *device);
+ gboolean (*set_active_profile) (MateMixerDevice *device,
+ const gchar *profile);
};
-GType mate_mixer_device_get_type (void) G_GNUC_CONST;
+GType mate_mixer_device_get_type (void) G_GNUC_CONST;
-const gchar * mate_mixer_device_get_name (MateMixerDevice *device);
-const gchar * mate_mixer_device_get_description (MateMixerDevice *device);
-const gchar * mate_mixer_device_get_icon (MateMixerDevice *device);
+const gchar * mate_mixer_device_get_name (MateMixerDevice *device);
+const gchar * mate_mixer_device_get_description (MateMixerDevice *device);
+const gchar * mate_mixer_device_get_icon (MateMixerDevice *device);
-const GList * mate_mixer_device_list_ports (MateMixerDevice *device);
-const GList * mate_mixer_device_list_profiles (MateMixerDevice *device);
+const GList * mate_mixer_device_list_ports (MateMixerDevice *device);
+const GList * mate_mixer_device_list_profiles (MateMixerDevice *device);
-MateMixerProfile *mate_mixer_device_get_active_profile (MateMixerDevice *device);
-gboolean mate_mixer_device_set_active_profile (MateMixerDevice *device,
- const gchar *profile);
+MateMixerDeviceProfile *mate_mixer_device_get_active_profile (MateMixerDevice *device);
+gboolean mate_mixer_device_set_active_profile (MateMixerDevice *device,
+ const gchar *profile);
G_END_DECLS
diff --git a/libmatemixer/matemixer-profile.c b/libmatemixer/matemixer-profile.c
deleted file mode 100644
index c98af30..0000000
--- a/libmatemixer/matemixer-profile.c
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * Copyright (C) 2014 Michal Ratajsky <[email protected]>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the licence, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <glib.h>
-#include <glib-object.h>
-
-#include "matemixer-profile.h"
-
-/**
- * SECTION:matemixer-profile
- * @include: libmatemixer/matemixer.h
- */
-
-struct _MateMixerProfilePrivate
-{
- gchar *name;
- gchar *description;
- gulong priority;
-};
-
-enum {
- PROP_0,
- PROP_NAME,
- PROP_DESCRIPTION,
- PROP_PRIORITY,
- N_PROPERTIES
-};
-
-static GParamSpec *properties[N_PROPERTIES] = { NULL, };
-
-static void mate_mixer_profile_class_init (MateMixerProfileClass *klass);
-
-static void mate_mixer_profile_get_property (GObject *object,
- guint param_id,
- GValue *value,
- GParamSpec *pspec);
-static void mate_mixer_profile_set_property (GObject *object,
- guint param_id,
- const GValue *value,
- GParamSpec *pspec);
-
-static void mate_mixer_profile_init (MateMixerProfile *profile);
-static void mate_mixer_profile_finalize (GObject *object);
-
-G_DEFINE_TYPE (MateMixerProfile, mate_mixer_profile, G_TYPE_OBJECT);
-
-static void
-mate_mixer_profile_class_init (MateMixerProfileClass *klass)
-{
- GObjectClass *object_class;
-
- object_class = G_OBJECT_CLASS (klass);
- object_class->finalize = mate_mixer_profile_finalize;
- object_class->get_property = mate_mixer_profile_get_property;
- object_class->set_property = mate_mixer_profile_set_property;
-
- properties[PROP_NAME] =
- g_param_spec_string ("name",
- "Name",
- "Name of the profile",
- NULL,
- G_PARAM_CONSTRUCT_ONLY |
- G_PARAM_READWRITE |
- G_PARAM_STATIC_STRINGS);
-
- properties[PROP_DESCRIPTION] =
- g_param_spec_string ("description",
- "Description",
- "Description of the profile",
- NULL,
- G_PARAM_CONSTRUCT_ONLY |
- G_PARAM_READWRITE |
- G_PARAM_STATIC_STRINGS);
-
- properties[PROP_PRIORITY] =
- g_param_spec_ulong ("priority",
- "Priority",
- "Priority of the profile",
- 0,
- G_MAXULONG,
- 0,
- G_PARAM_CONSTRUCT_ONLY |
- G_PARAM_READWRITE |
- G_PARAM_STATIC_STRINGS);
-
- g_object_class_install_properties (object_class, N_PROPERTIES, properties);
-
- g_type_class_add_private (object_class, sizeof (MateMixerProfilePrivate));
-}
-
-static void
-mate_mixer_profile_get_property (GObject *object,
- guint param_id,
- GValue *value,
- GParamSpec *pspec)
-{
- MateMixerProfile *profile;
-
- profile = MATE_MIXER_PROFILE (object);
-
- switch (param_id) {
- case PROP_NAME:
- g_value_set_string (value, profile->priv->name);
- break;
- case PROP_DESCRIPTION:
- g_value_set_string (value, profile->priv->description);
- break;
- case PROP_PRIORITY:
- g_value_set_ulong (value, profile->priv->priority);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
- break;
- }
-}
-
-static void
-mate_mixer_profile_set_property (GObject *object,
- guint param_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- MateMixerProfile *profile;
-
- profile = MATE_MIXER_PROFILE (object);
-
- switch (param_id) {
- case PROP_NAME:
- /* Construct-only string */
- profile->priv->name = g_strdup (g_value_get_string (value));
- break;
- case PROP_DESCRIPTION:
- /* Construct-only string */
- profile->priv->description = g_strdup (g_value_get_string (value));
- break;
- case PROP_PRIORITY:
- profile->priv->priority = g_value_get_ulong (value);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
- break;
- }
-}
-
-static void
-mate_mixer_profile_init (MateMixerProfile *profile)
-{
- profile->priv = G_TYPE_INSTANCE_GET_PRIVATE (profile,
- MATE_MIXER_TYPE_PROFILE,
- MateMixerProfilePrivate);
-}
-
-static void
-mate_mixer_profile_finalize (GObject *object)
-{
- MateMixerProfile *profile;
-
- profile = MATE_MIXER_PROFILE (object);
-
- g_free (profile->priv->name);
- g_free (profile->priv->description);
-
- G_OBJECT_CLASS (mate_mixer_profile_parent_class)->finalize (object);
-}
-
-MateMixerProfile *
-mate_mixer_profile_new (const gchar *name, const gchar *description, gulong priority)
-{
- return g_object_new (MATE_MIXER_TYPE_PROFILE,
- "name", name,
- "description", description,
- "priority", priority,
- NULL);
-}
-
-const gchar *
-mate_mixer_profile_get_name (MateMixerProfile *profile)
-{
- g_return_val_if_fail (MATE_MIXER_IS_PROFILE (profile), NULL);
-
- return profile->priv->name;
-}
-
-const gchar *
-mate_mixer_profile_get_description (MateMixerProfile *profile)
-{
- g_return_val_if_fail (MATE_MIXER_IS_PROFILE (profile), NULL);
-
- return profile->priv->description;
-}
-
-gulong
-mate_mixer_profile_get_priority (MateMixerProfile *profile)
-{
- g_return_val_if_fail (MATE_MIXER_IS_PROFILE (profile), 0);
-
- return profile->priv->priority;
-}
diff --git a/libmatemixer/matemixer-profile.h b/libmatemixer/matemixer-profile.h
deleted file mode 100644
index b652085..0000000
--- a/libmatemixer/matemixer-profile.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (C) 2014 Michal Ratajsky <[email protected]>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the licence, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef MATEMIXER_PROFILE_H
-#define MATEMIXER_PROFILE_H
-
-#include <glib.h>
-#include <glib-object.h>
-
-G_BEGIN_DECLS
-
-#define MATE_MIXER_TYPE_PROFILE \
- (mate_mixer_profile_get_type ())
-#define MATE_MIXER_PROFILE(o) \
- (G_TYPE_CHECK_INSTANCE_CAST ((o), MATE_MIXER_TYPE_PROFILE, MateMixerProfile))
-#define MATE_MIXER_IS_PROFILE(o) \
- (G_TYPE_CHECK_INSTANCE_TYPE ((o), MATE_MIXER_TYPE_PROFILE))
-#define MATE_MIXER_PROFILE_CLASS(k) \
- (G_TYPE_CHECK_CLASS_CAST ((k), MATE_MIXER_TYPE_PROFILE, MateMixerProfileClass))
-#define MATE_MIXER_IS_PROFILE_CLASS(k) \
- (G_TYPE_CHECK_CLASS_TYPE ((k), MATE_MIXER_TYPE_PROFILE))
-#define MATE_MIXER_PROFILE_GET_CLASS(o) \
- (G_TYPE_INSTANCE_GET_CLASS ((o), MATE_MIXER_TYPE_PROFILE, MateMixerProfileClass))
-
-typedef struct _MateMixerProfile MateMixerProfile;
-typedef struct _MateMixerProfileClass MateMixerProfileClass;
-typedef struct _MateMixerProfilePrivate MateMixerProfilePrivate;
-
-struct _MateMixerProfile
-{
- GObject parent;
-
- /*< private >*/
- MateMixerProfilePrivate *priv;
-};
-
-struct _MateMixerProfileClass
-{
- GObjectClass parent_class;
-};
-
-GType mate_mixer_profile_get_type (void) G_GNUC_CONST;
-
-MateMixerProfile *mate_mixer_profile_new (const gchar *name,
- const gchar *description,
- gulong priority);
-
-const gchar * mate_mixer_profile_get_name (MateMixerProfile *profile);
-const gchar * mate_mixer_profile_get_description (MateMixerProfile *profile);
-gulong mate_mixer_profile_get_priority (MateMixerProfile *profile);
-
-G_END_DECLS
-
-#endif /* MATEMIXER_PROFILE_H */
diff --git a/libmatemixer/matemixer-stream.c b/libmatemixer/matemixer-stream.c
index 5400357..b4da26f 100644
--- a/libmatemixer/matemixer-stream.c
+++ b/libmatemixer/matemixer-stream.c
@@ -102,14 +102,14 @@ mate_mixer_stream_default_init (MateMixerStreamInterface *iface)
G_PARAM_STATIC_STRINGS));
g_object_interface_install_property (iface,
- g_param_spec_int64 ("volume",
- "Volume",
- "Volume of the stream",
- G_MININT64,
- G_MAXINT64,
- 0,
- G_PARAM_READABLE |
- G_PARAM_STATIC_STRINGS));
+ g_param_spec_uint ("volume",
+ "Volume",
+ "Volume of the stream",
+ 0,
+ G_MAXUINT,
+ 0,
+ G_PARAM_READABLE |
+ G_PARAM_STATIC_STRINGS));
g_object_interface_install_property (iface,
g_param_spec_float ("balance",
diff --git a/libmatemixer/matemixer.h b/libmatemixer/matemixer.h
index f5c1a78..36a3d39 100644
--- a/libmatemixer/matemixer.h
+++ b/libmatemixer/matemixer.h
@@ -24,9 +24,9 @@
#include <libmatemixer/matemixer-client-stream.h>
#include <libmatemixer/matemixer-control.h>
#include <libmatemixer/matemixer-device.h>
+#include <libmatemixer/matemixer-device-profile.h>
#include <libmatemixer/matemixer-enums.h>
#include <libmatemixer/matemixer-port.h>
-#include <libmatemixer/matemixer-profile.h>
#include <libmatemixer/matemixer-stream.h>
#include <libmatemixer/matemixer-version.h>