aboutsummaryrefslogtreecommitdiff
path: root/src/mpris-controller-v2.c
diff options
context:
space:
mode:
authorKen VanDine <ken.vandine@canonical.com>2010-06-17 16:50:30 -0400
committerKen VanDine <ken.vandine@canonical.com>2010-06-17 16:50:30 -0400
commit619a7c5da5817b5da3bfd8af5c3af9de450b6d48 (patch)
tree8047ef8b2414a7f097042712dffe1e9bdfdcf90e /src/mpris-controller-v2.c
parent012ac7d97cc878ac1a66c9330e82b96e363f2e61 (diff)
downloadayatana-indicator-sound-619a7c5da5817b5da3bfd8af5c3af9de450b6d48.tar.gz
ayatana-indicator-sound-619a7c5da5817b5da3bfd8af5c3af9de450b6d48.tar.bz2
ayatana-indicator-sound-619a7c5da5817b5da3bfd8af5c3af9de450b6d48.zip
Import upstream version 0.3.1
Diffstat (limited to 'src/mpris-controller-v2.c')
-rw-r--r--src/mpris-controller-v2.c135
1 files changed, 135 insertions, 0 deletions
diff --git a/src/mpris-controller-v2.c b/src/mpris-controller-v2.c
new file mode 100644
index 0000000..4a48165
--- /dev/null
+++ b/src/mpris-controller-v2.c
@@ -0,0 +1,135 @@
+/* mpris-controller-v2.c generated by valac, the Vala compiler
+ * generated from mpris-controller-v2.vala, do not modify */
+
+/*
+This service primarily controls PulseAudio and is driven by the sound indicator menu on the panel.
+Copyright 2010 Canonical Ltd.
+
+Authors:
+ Conor Curran <conor.curran@canonical.com>
+
+This program is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License version 3, as published
+by the Free Software Foundation.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranties of
+MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
+PURPOSE. See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along
+with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <glib.h>
+#include <glib-object.h>
+#include <dbus/dbus-glib-lowlevel.h>
+#include <dbus/dbus-glib.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+#define TYPE_MPRIS_CONTROLLER (mpris_controller_get_type ())
+#define MPRIS_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MPRIS_CONTROLLER, MprisController))
+#define MPRIS_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MPRIS_CONTROLLER, MprisControllerClass))
+#define IS_MPRIS_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MPRIS_CONTROLLER))
+#define IS_MPRIS_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MPRIS_CONTROLLER))
+#define MPRIS_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MPRIS_CONTROLLER, MprisControllerClass))
+
+typedef struct _MprisController MprisController;
+typedef struct _MprisControllerClass MprisControllerClass;
+typedef struct _MprisControllerPrivate MprisControllerPrivate;
+
+#define TYPE_MPRIS_CONTROLLER_V2 (mpris_controller_v2_get_type ())
+#define MPRIS_CONTROLLER_V2(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MPRIS_CONTROLLER_V2, MprisControllerV2))
+#define MPRIS_CONTROLLER_V2_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MPRIS_CONTROLLER_V2, MprisControllerV2Class))
+#define IS_MPRIS_CONTROLLER_V2(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MPRIS_CONTROLLER_V2))
+#define IS_MPRIS_CONTROLLER_V2_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MPRIS_CONTROLLER_V2))
+#define MPRIS_CONTROLLER_V2_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MPRIS_CONTROLLER_V2, MprisControllerV2Class))
+
+typedef struct _MprisControllerV2 MprisControllerV2;
+typedef struct _MprisControllerV2Class MprisControllerV2Class;
+typedef struct _MprisControllerV2Private MprisControllerV2Private;
+
+#define TYPE_PLAYER_CONTROLLER (player_controller_get_type ())
+#define PLAYER_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PLAYER_CONTROLLER, PlayerController))
+#define PLAYER_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PLAYER_CONTROLLER, PlayerControllerClass))
+#define IS_PLAYER_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PLAYER_CONTROLLER))
+#define IS_PLAYER_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PLAYER_CONTROLLER))
+#define PLAYER_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PLAYER_CONTROLLER, PlayerControllerClass))
+
+typedef struct _PlayerController PlayerController;
+typedef struct _PlayerControllerClass PlayerControllerClass;
+
+struct _MprisController {
+ GObject parent_instance;
+ MprisControllerPrivate * priv;
+ DBusGProxy* mpris_player;
+};
+
+struct _MprisControllerClass {
+ GObjectClass parent_class;
+};
+
+struct _MprisControllerV2 {
+ MprisController parent_instance;
+ MprisControllerV2Private * priv;
+};
+
+struct _MprisControllerV2Class {
+ MprisControllerClass parent_class;
+};
+
+
+static gpointer mpris_controller_v2_parent_class = NULL;
+
+GType mpris_controller_get_type (void);
+GType mpris_controller_v2_get_type (void);
+enum {
+ MPRIS_CONTROLLER_V2_DUMMY_PROPERTY
+};
+GType player_controller_get_type (void);
+MprisController* mpris_controller_new (const char* name, PlayerController* controller, const char* mpris_interface);
+MprisController* mpris_controller_construct (GType object_type, const char* name, PlayerController* controller, const char* mpris_interface);
+MprisControllerV2* mpris_controller_v2_new (const char* name, PlayerController* controller);
+MprisControllerV2* mpris_controller_v2_construct (GType object_type, const char* name, PlayerController* controller);
+
+
+
+MprisControllerV2* mpris_controller_v2_construct (GType object_type, const char* name, PlayerController* controller) {
+ MprisControllerV2 * self;
+ g_return_val_if_fail (name != NULL, NULL);
+ g_return_val_if_fail (controller != NULL, NULL);
+ self = (MprisControllerV2*) mpris_controller_construct (object_type, name, controller, "org.mpris.MediaPlayer.Player");
+ return self;
+}
+
+
+MprisControllerV2* mpris_controller_v2_new (const char* name, PlayerController* controller) {
+ return mpris_controller_v2_construct (TYPE_MPRIS_CONTROLLER_V2, name, controller);
+}
+
+
+static void mpris_controller_v2_class_init (MprisControllerV2Class * klass) {
+ mpris_controller_v2_parent_class = g_type_class_peek_parent (klass);
+}
+
+
+static void mpris_controller_v2_instance_init (MprisControllerV2 * self) {
+}
+
+
+GType mpris_controller_v2_get_type (void) {
+ static volatile gsize mpris_controller_v2_type_id__volatile = 0;
+ if (g_once_init_enter (&mpris_controller_v2_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (MprisControllerV2Class), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) mpris_controller_v2_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MprisControllerV2), 0, (GInstanceInitFunc) mpris_controller_v2_instance_init, NULL };
+ GType mpris_controller_v2_type_id;
+ mpris_controller_v2_type_id = g_type_register_static (TYPE_MPRIS_CONTROLLER, "MprisControllerV2", &g_define_type_info, 0);
+ g_once_init_leave (&mpris_controller_v2_type_id__volatile, mpris_controller_v2_type_id);
+ }
+ return mpris_controller_v2_type_id__volatile;
+}
+
+
+
+