diff options
Diffstat (limited to 'src/mpris-controller-v2.c')
-rw-r--r-- | src/mpris-controller-v2.c | 130 |
1 files changed, 130 insertions, 0 deletions
diff --git a/src/mpris-controller-v2.c b/src/mpris-controller-v2.c new file mode 100644 index 0000000..40fe3da --- /dev/null +++ b/src/mpris-controller-v2.c @@ -0,0 +1,130 @@ +/* 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 <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; +}; + +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); +MprisControllerV2* mpris_controller_v2_new (PlayerController* ctrl, const char* inter); +MprisControllerV2* mpris_controller_v2_construct (GType object_type, PlayerController* ctrl, const char* inter); + + + +MprisControllerV2* mpris_controller_v2_construct (GType object_type, PlayerController* ctrl, const char* inter) { + MprisControllerV2 * self; + g_return_val_if_fail (ctrl != NULL, NULL); + g_return_val_if_fail (inter != NULL, NULL); + self = (MprisControllerV2*) g_object_new (object_type, "owner", ctrl, "mpris-interface", inter, NULL); + return self; +} + + +MprisControllerV2* mpris_controller_v2_new (PlayerController* ctrl, const char* inter) { + return mpris_controller_v2_construct (TYPE_MPRIS_CONTROLLER_V2, ctrl, inter); +} + + +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; +} + + + + |