aboutsummaryrefslogtreecommitdiff
path: root/src/music-player-bridge.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/music-player-bridge.h')
-rw-r--r--src/music-player-bridge.h182
1 files changed, 156 insertions, 26 deletions
diff --git a/src/music-player-bridge.h b/src/music-player-bridge.h
index 6f08b8e..1670d28 100644
--- a/src/music-player-bridge.h
+++ b/src/music-player-bridge.h
@@ -1,4 +1,4 @@
-/* music-player-bridge.h generated by valac, the Vala compiler, do not modify */
+/* music-player-bridge.h generated by valac 0.9.5, the Vala compiler, do not modify */
#ifndef __MUSIC_PLAYER_BRIDGE_H__
@@ -106,6 +106,21 @@ typedef struct _TitleMenuitemClass TitleMenuitemClass;
typedef struct _TitleMenuitemPrivate TitleMenuitemPrivate;
typedef struct _PlayerControllerPrivate PlayerControllerPrivate;
+#define TYPE_MPRIS_BRIDGE (mpris_bridge_get_type ())
+#define MPRIS_BRIDGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MPRIS_BRIDGE, MprisBridge))
+#define MPRIS_BRIDGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MPRIS_BRIDGE, MprisBridgeClass))
+#define IS_MPRIS_BRIDGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MPRIS_BRIDGE))
+#define IS_MPRIS_BRIDGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MPRIS_BRIDGE))
+#define MPRIS_BRIDGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MPRIS_BRIDGE, MprisBridgeClass))
+
+typedef struct _MprisBridge MprisBridge;
+typedef struct _MprisBridgeClass MprisBridgeClass;
+
+#define PLAYER_CONTROLLER_TYPE_WIDGET_ORDER (player_controller_widget_order_get_type ())
+
+#define PLAYER_CONTROLLER_TYPE_STATE (player_controller_state_get_type ())
+typedef struct _MprisBridgePrivate MprisBridgePrivate;
+
#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))
@@ -115,22 +130,42 @@ typedef struct _PlayerControllerPrivate PlayerControllerPrivate;
typedef struct _MprisController MprisController;
typedef struct _MprisControllerClass MprisControllerClass;
+typedef struct _MprisControllerPrivate MprisControllerPrivate;
-#define PLAYER_CONTROLLER_TYPE_WIDGET_ORDER (player_controller_widget_order_get_type ())
+#define TYPE_MPRIS_ROOT (mpris_root_get_type ())
+#define MPRIS_ROOT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MPRIS_ROOT, MprisRoot))
+#define IS_MPRIS_ROOT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MPRIS_ROOT))
+#define MPRIS_ROOT_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MPRIS_ROOT, MprisRootIface))
-#define PLAYER_CONTROLLER_TYPE_STATE (player_controller_state_get_type ())
-typedef struct _MprisControllerPrivate MprisControllerPrivate;
+typedef struct _MprisRoot MprisRoot;
+typedef struct _MprisRootIface MprisRootIface;
+
+#define TYPE_MPRIS_PLAYER (mpris_player_get_type ())
+#define MPRIS_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MPRIS_PLAYER, MprisPlayer))
+#define IS_MPRIS_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MPRIS_PLAYER))
+#define MPRIS_PLAYER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MPRIS_PLAYER, MprisPlayerIface))
+
+typedef struct _MprisPlayer MprisPlayer;
+typedef struct _MprisPlayerIface MprisPlayerIface;
-#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))
+#define TYPE_FREE_DESKTOP_PROPERTIES (free_desktop_properties_get_type ())
+#define FREE_DESKTOP_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FREE_DESKTOP_PROPERTIES, FreeDesktopProperties))
+#define IS_FREE_DESKTOP_PROPERTIES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FREE_DESKTOP_PROPERTIES))
+#define FREE_DESKTOP_PROPERTIES_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_FREE_DESKTOP_PROPERTIES, FreeDesktopPropertiesIface))
-typedef struct _MprisControllerV2 MprisControllerV2;
-typedef struct _MprisControllerV2Class MprisControllerV2Class;
-typedef struct _MprisControllerV2Private MprisControllerV2Private;
+typedef struct _FreeDesktopProperties FreeDesktopProperties;
+typedef struct _FreeDesktopPropertiesIface FreeDesktopPropertiesIface;
+
+#define TYPE_MPRIS2_CONTROLLER (mpris2_controller_get_type ())
+#define MPRIS2_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MPRIS2_CONTROLLER, Mpris2Controller))
+#define MPRIS2_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MPRIS2_CONTROLLER, Mpris2ControllerClass))
+#define IS_MPRIS2_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MPRIS2_CONTROLLER))
+#define IS_MPRIS2_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MPRIS2_CONTROLLER))
+#define MPRIS2_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MPRIS2_CONTROLLER, Mpris2ControllerClass))
+
+typedef struct _Mpris2Controller Mpris2Controller;
+typedef struct _Mpris2ControllerClass Mpris2ControllerClass;
+typedef struct _Mpris2ControllerPrivate Mpris2ControllerPrivate;
#define TYPE_FAMILIAR_PLAYERS_DB (familiar_players_db_get_type ())
#define FAMILIAR_PLAYERS_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FAMILIAR_PLAYERS_DB, FamiliarPlayersDB))
@@ -208,7 +243,7 @@ struct _PlayerController {
PlayerControllerPrivate * priv;
gint current_state;
GeeArrayList* custom_items;
- MprisController* mpris_adaptor;
+ MprisBridge* mpris_bridge;
};
struct _PlayerControllerClass {
@@ -220,8 +255,7 @@ typedef enum {
PLAYER_CONTROLLER_WIDGET_ORDER_TITLE,
PLAYER_CONTROLLER_WIDGET_ORDER_METADATA,
PLAYER_CONTROLLER_WIDGET_ORDER_SCRUB,
- PLAYER_CONTROLLER_WIDGET_ORDER_TRANSPORT,
- PLAYER_CONTROLLER_WIDGET_ORDER_PLAYLIST
+ PLAYER_CONTROLLER_WIDGET_ORDER_TRANSPORT
} PlayerControllerwidget_order;
typedef enum {
@@ -232,6 +266,15 @@ typedef enum {
PLAYER_CONTROLLER_STATE_DISCONNECTED
} PlayerControllerstate;
+struct _MprisBridge {
+ GObject parent_instance;
+ MprisBridgePrivate * priv;
+};
+
+struct _MprisBridgeClass {
+ GObjectClass parent_class;
+};
+
struct _MprisController {
GObject parent_instance;
MprisControllerPrivate * priv;
@@ -241,13 +284,48 @@ struct _MprisControllerClass {
GObjectClass parent_class;
};
-struct _MprisControllerV2 {
- MprisController parent_instance;
- MprisControllerV2Private * priv;
+struct _MprisRootIface {
+ GTypeInterface parent_iface;
+ void (*Quit) (MprisRoot* self, GError** error);
+ void (*Raise) (MprisRoot* self, GError** error);
+ gboolean (*get_HasTracklist) (MprisRoot* self);
+ void (*set_HasTracklist) (MprisRoot* self, gboolean value);
+ gboolean (*get_CanQuit) (MprisRoot* self);
+ void (*set_CanQuit) (MprisRoot* self, gboolean value);
+ gboolean (*get_CanRaise) (MprisRoot* self);
+ void (*set_CanRaise) (MprisRoot* self, gboolean value);
+ char* (*get_Identity) (MprisRoot* self);
+ void (*set_Identity) (MprisRoot* self, const char* value);
+ char* (*get_DesktopEntry) (MprisRoot* self);
+ void (*set_DesktopEntry) (MprisRoot* self, const char* value);
+};
+
+struct _MprisPlayerIface {
+ GTypeInterface parent_iface;
+ void (*SetPosition) (MprisPlayer* self, const char* path, gint64 pos, GError** error);
+ void (*PlayPause) (MprisPlayer* self, GError** error);
+ void (*Pause) (MprisPlayer* self, GError** error);
+ void (*Next) (MprisPlayer* self, GError** error);
+ void (*Previous) (MprisPlayer* self, GError** error);
+ GHashTable* (*get_Metadata) (MprisPlayer* self);
+ void (*set_Metadata) (MprisPlayer* self, GHashTable* value);
+ gint32 (*get_Position) (MprisPlayer* self);
+ void (*set_Position) (MprisPlayer* self, gint32 value);
+ char* (*get_PlaybackStatus) (MprisPlayer* self);
+ void (*set_PlaybackStatus) (MprisPlayer* self, const char* value);
};
-struct _MprisControllerV2Class {
- MprisControllerClass parent_class;
+struct _FreeDesktopPropertiesIface {
+ GTypeInterface parent_iface;
+};
+
+struct _Mpris2Controller {
+ GObject parent_instance;
+ Mpris2ControllerPrivate * priv;
+};
+
+struct _Mpris2ControllerClass {
+ GObjectClass parent_class;
};
struct _FamiliarPlayersDB {
@@ -287,31 +365,38 @@ GType scrub_menuitem_get_type (void) G_GNUC_CONST;
ScrubMenuitem* scrub_menuitem_new (PlayerController* parent);
ScrubMenuitem* scrub_menuitem_construct (GType object_type, PlayerController* parent);
void scrub_menuitem_update_position (ScrubMenuitem* self, gint32 new_position);
+void scrub_menuitem_update_playstate (ScrubMenuitem* self, gint state);
GeeHashSet* scrub_menuitem_attributes_format (void);
GType title_menuitem_get_type (void) G_GNUC_CONST;
TitleMenuitem* title_menuitem_new (PlayerController* parent);
TitleMenuitem* title_menuitem_construct (GType object_type, PlayerController* parent);
GeeHashSet* title_menuitem_attributes_format (void);
-GType mpris_controller_get_type (void) G_GNUC_CONST;
+GType mpris_bridge_get_type (void) G_GNUC_CONST;
GType player_controller_widget_order_get_type (void) G_GNUC_CONST;
GType player_controller_state_get_type (void) G_GNUC_CONST;
-#define PLAYER_CONTROLLER_WIDGET_QUANTITY 6
+#define PLAYER_CONTROLLER_WIDGET_QUANTITY 5
PlayerController* player_controller_new (DbusmenuMenuitem* root, const char* client_name, gint offset, PlayerControllerstate initial_state);
PlayerController* player_controller_construct (GType object_type, DbusmenuMenuitem* root, const char* client_name, gint offset, PlayerControllerstate initial_state);
void player_controller_update_state (PlayerController* self, PlayerControllerstate new_state);
void player_controller_activate (PlayerController* self);
void player_controller_instantiate (PlayerController* self);
void player_controller_vanish (PlayerController* self);
+void player_controller_hibernate (PlayerController* self);
void player_controller_update_layout (PlayerController* self);
+void player_controller_determine_state (PlayerController* self);
const char* player_controller_get_name (PlayerController* self);
void player_controller_set_name (PlayerController* self, const char* value);
GAppInfo* player_controller_get_app_info (PlayerController* self);
void player_controller_set_app_info (PlayerController* self, GAppInfo* value);
gint player_controller_get_menu_offset (PlayerController* self);
void player_controller_set_menu_offset (PlayerController* self, gint value);
-GType mpris_controller_v2_get_type (void) G_GNUC_CONST;
-MprisControllerV2* mpris_controller_v2_new (PlayerController* ctrl, const char* inter);
-MprisControllerV2* mpris_controller_v2_construct (GType object_type, PlayerController* ctrl, const char* inter);
+MprisBridge* mpris_bridge_new (PlayerController* ctrl);
+MprisBridge* mpris_bridge_construct (GType object_type, PlayerController* ctrl);
+gboolean mpris_bridge_connected (MprisBridge* self);
+void mpris_bridge_transport_update (MprisBridge* self, TransportMenuitemaction update);
+void mpris_bridge_expose (MprisBridge* self);
+void mpris_bridge_set_track_position (MprisBridge* self, double pos);
+GType mpris_controller_get_type (void) G_GNUC_CONST;
MprisController* mpris_controller_new (PlayerController* ctrl, const char* inter);
MprisController* mpris_controller_construct (GType object_type, PlayerController* ctrl, const char* inter);
void mpris_controller_transport_event (MprisController* self, TransportMenuitemaction command);
@@ -320,6 +405,51 @@ gboolean mpris_controller_connected (MprisController* self);
DBusGProxy* mpris_controller_get_mpris_player (MprisController* self);
PlayerController* mpris_controller_get_owner (MprisController* self);
const char* mpris_controller_get_mpris_interface (MprisController* self);
+MprisRoot* mpris_root_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path);
+GType mpris_root_get_type (void) G_GNUC_CONST;
+void mpris_root_Quit (MprisRoot* self, GError** error);
+void mpris_root_Raise (MprisRoot* self, GError** error);
+gboolean mpris_root_get_HasTracklist (MprisRoot* self);
+void mpris_root_set_HasTracklist (MprisRoot* self, gboolean value);
+gboolean mpris_root_get_CanQuit (MprisRoot* self);
+void mpris_root_set_CanQuit (MprisRoot* self, gboolean value);
+gboolean mpris_root_get_CanRaise (MprisRoot* self);
+void mpris_root_set_CanRaise (MprisRoot* self, gboolean value);
+char* mpris_root_get_Identity (MprisRoot* self);
+void mpris_root_set_Identity (MprisRoot* self, const char* value);
+char* mpris_root_get_DesktopEntry (MprisRoot* self);
+void mpris_root_set_DesktopEntry (MprisRoot* self, const char* value);
+MprisPlayer* mpris_player_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path);
+GType mpris_player_get_type (void) G_GNUC_CONST;
+void mpris_player_SetPosition (MprisPlayer* self, const char* path, gint64 pos, GError** error);
+void mpris_player_PlayPause (MprisPlayer* self, GError** error);
+void mpris_player_Pause (MprisPlayer* self, GError** error);
+void mpris_player_Next (MprisPlayer* self, GError** error);
+void mpris_player_Previous (MprisPlayer* self, GError** error);
+GHashTable* mpris_player_get_Metadata (MprisPlayer* self);
+void mpris_player_set_Metadata (MprisPlayer* self, GHashTable* value);
+gint32 mpris_player_get_Position (MprisPlayer* self);
+void mpris_player_set_Position (MprisPlayer* self, gint32 value);
+char* mpris_player_get_PlaybackStatus (MprisPlayer* self);
+void mpris_player_set_PlaybackStatus (MprisPlayer* self, const char* value);
+GType free_desktop_properties_get_type (void) G_GNUC_CONST;
+FreeDesktopProperties* free_desktop_properties_dbus_proxy_new (DBusGConnection* connection, const char* name, const char* path);
+GType mpris2_controller_get_type (void) G_GNUC_CONST;
+#define MPRIS2_CONTROLLER_root_interface "org.mpris.MediaPlayer2"
+Mpris2Controller* mpris2_controller_new (PlayerController* ctrl);
+Mpris2Controller* mpris2_controller_construct (GType object_type, PlayerController* ctrl);
+void mpris2_controller_property_changed_cb (Mpris2Controller* self, const char* interface_source, GHashTable* changed_properties, char** invalid, int invalid_length1);
+void mpris2_controller_initial_update (Mpris2Controller* self);
+void mpris2_controller_transport_event (Mpris2Controller* self, TransportMenuitemaction command);
+void mpris2_controller_set_position (Mpris2Controller* self, double position);
+void mpris2_controller_onSeeked (Mpris2Controller* self, gint64 position);
+gboolean mpris2_controller_connected (Mpris2Controller* self);
+gboolean mpris2_controller_was_successfull (Mpris2Controller* self);
+void mpris2_controller_expose (Mpris2Controller* self);
+MprisRoot* mpris2_controller_get_mpris2_root (Mpris2Controller* self);
+MprisPlayer* mpris2_controller_get_player (Mpris2Controller* self);
+PlayerController* mpris2_controller_get_owner (Mpris2Controller* self);
+FreeDesktopProperties* mpris2_controller_get_properties_interface (Mpris2Controller* self);
PlayerItem* player_item_new (const char* type);
PlayerItem* player_item_construct (GType object_type, const char* type);
void player_item_reset (PlayerItem* self, GeeHashSet* attrs);