From 3631b8ecce614d1bdd1f66e87f9ab20c85709cc3 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Fri, 7 May 2010 19:11:41 +0200 Subject: --- src/rhythmbox-controller.vala | 8 +- src/sound-service.c | 1 - vapi/indicate.vapi | 213 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 217 insertions(+), 5 deletions(-) create mode 100644 vapi/indicate.vapi diff --git a/src/rhythmbox-controller.vala b/src/rhythmbox-controller.vala index da10daf..49cc9c0 100644 --- a/src/rhythmbox-controller.vala +++ b/src/rhythmbox-controller.vala @@ -18,7 +18,7 @@ public class RhythmboxController : GLib.Object{ this.rhythmbox_shell = connection.get_object ("org.gnome.Rhythmbox", "/org/gnome/Rhythmbox/Shell", "/org/gnome/Rhythmbox/Shell"); this.rhythmbox_playlistmgr = connection.get_object ("org.gnome.Rhythmbox", "/org/gnome/Rhythmbox/PlaylistManager", "/org/gnome/Rhythmbox/PlaylistManager"); - this.rhythmbox_player.PlayingUriChanged += onUriChange; + //this.rhythmbox_player.PlayingUriChanged += onUriChange; this.rhythmbox_player.elapsedChanged += onElapsedChange; this.rhythmbox_player.setMute(false); @@ -29,9 +29,9 @@ public class RhythmboxController : GLib.Object{ debug("New rhythmbox controller has been instantiated %i", (int)b); } - private void onUriChange(dynamic DBus.Object rhythmbox, string uri){ - debug("onUriChange, new uri : %s", uri); - } +// private void onUriChange(dynamic DBus.Object rhythmbox, string uri){ +// debug("onUriChange, new uri : %s", uri); +// } private void onElapsedChange(dynamic DBus.Object rhythmbox, uint32 time){ debug("onElapsedChange, new time = %u", time); diff --git a/src/sound-service.c b/src/sound-service.c index a061e86..dad1bcd 100644 --- a/src/sound-service.c +++ b/src/sound-service.c @@ -73,7 +73,6 @@ main (int argc, char ** argv) dbus_menu_manager_setup(); BridgeServer* server = bridge_server_new(); bridge_server_test_me(server); - //g_object_new(bridge_server_new, NULL); // Run the loop mainloop = g_main_loop_new(NULL, FALSE); diff --git a/vapi/indicate.vapi b/vapi/indicate.vapi new file mode 100644 index 0000000..765ebc9 --- /dev/null +++ b/vapi/indicate.vapi @@ -0,0 +1,213 @@ +/* indicate.vapi generated by vapigen, do not modify. */ + +[CCode (cprefix = "Indicate", lower_case_cprefix = "indicate_")] +namespace Indicate { + [CCode (cheader_filename = "libindicate/indicator.h")] + public class Indicator : GLib.Object { + public weak GLib.Object parent; + [CCode (has_construct_function = false)] + public Indicator (); + public bool get_displayed (); + public uint get_id (); + public virtual GLib.Value get_property (string key); + public GLib.Value get_property_value (string key); + public Indicate.Server get_server (); + public bool is_visible (); + public virtual GLib.PtrArray list_properties (); + public void set_displayed (bool displayed); + public virtual void set_property (string key, GLib.Value data); + public void set_property_bool (string key, bool value); + public void set_property_int (string key, int value); + public void set_property_time (string key, GLib.TimeVal time); + public void set_property_value (string key, GLib.Value value); + public void set_server (Indicate.Server server); + [CCode (has_construct_function = false)] + public Indicator.with_server (Indicate.Server server); + public signal void displayed (bool object); + [HasEmitter] + public signal void hide (); + public signal void modified (string object); + [HasEmitter] + public signal void show (); + [HasEmitter] + public signal void user_display (uint object); + } + [CCode (cheader_filename = "libindicate/listener.h")] + public class Listener : GLib.Object { + public weak GLib.Object parent; + [CCode (has_construct_function = false)] + public Listener (); + public void display (Indicate.ListenerServer server, Indicate.ListenerIndicator indicator, uint timestamp); + public void displayed (Indicate.ListenerServer server, Indicate.ListenerIndicator indicator, bool displayed); + public void get_property (Indicate.ListenerServer server, Indicate.ListenerIndicator indicator, owned string property, [CCode (delegate_target_pos = 0)] Indicate.listener_get_property_cb callback); + public void get_property_bool (Indicate.ListenerServer server, Indicate.ListenerIndicator indicator, owned string property, [CCode (delegate_target_pos = 0)] Indicate.listener_get_property_bool_cb callback); + public void get_property_int (Indicate.ListenerServer server, Indicate.ListenerIndicator indicator, owned string property, [CCode (delegate_target_pos = 0)] Indicate.listener_get_property_int_cb callback); + public void get_property_time (Indicate.ListenerServer server, Indicate.ListenerIndicator indicator, owned string property, [CCode (delegate_target_pos = 0)] Indicate.listener_get_property_time_cb callback); + public void get_property_value (Indicate.ListenerServer server, Indicate.ListenerIndicator indicator, owned string property, [CCode (delegate_target_pos = 0)] Indicate.listener_get_property_value_cb callback); + public static GLib.Type indicator_get_gtype (); + public static Indicate.Listener ref_default (); + public bool server_check_interest (Indicate.ListenerServer server, Indicate.Interests interest); + public void server_get_count (Indicate.ListenerServer server, [CCode (delegate_target_pos = 0)] Indicate.listener_get_server_uint_property_cb callback); + public void server_get_desktop (Indicate.ListenerServer server, [CCode (delegate_target_pos = 0)] Indicate.listener_get_server_property_cb callback); + public static GLib.Type server_get_gtype (); + public void server_get_menu (Indicate.ListenerServer server, [CCode (delegate_target_pos = 0)] Indicate.listener_get_server_property_cb callback); + public static void server_get_type (Indicate.Listener listener, Indicate.ListenerServer server, [CCode (delegate_target_pos = 0)] Indicate.listener_get_server_property_cb callback); + public void server_remove_interest (Indicate.ListenerServer server, Indicate.Interests interest); + public void server_show_interest (Indicate.ListenerServer server, Indicate.Interests interest); + public void set_default_max_indicators (int max); + public void set_server_max_indicators (Indicate.ListenerServer server, int max); + public signal void indicator_added (Indicate.ListenerServer object, Indicate.ListenerIndicator p0); + public signal void indicator_modified (Indicate.ListenerServer object, Indicate.ListenerIndicator p0, string p1); + public signal void indicator_removed (Indicate.ListenerServer object, Indicate.ListenerIndicator p0); + public signal void indicator_servers_report (); + public signal void server_added (Indicate.ListenerServer object, string p0); + public signal void server_count_changed (Indicate.ListenerServer object, uint p0); + public signal void server_removed (Indicate.ListenerServer object, string p0); + } + [CCode (cheader_filename = "libindicate/server.h")] + public class Server : GLib.Object { + public weak GLib.Object parent; + public void add_indicator (Indicate.Indicator indicator); + public virtual bool check_interest (Indicate.Interests interest); + public virtual bool get_indicator_count (out uint count) throws GLib.Error; + public virtual bool get_indicator_list (GLib.Array indicators) throws GLib.Error; + public virtual bool get_indicator_properties (uint id, string properties) throws GLib.Error; + public virtual bool get_indicator_property (uint id, owned string property, GLib.Value value) throws GLib.Error; + public virtual bool get_indicator_property_group (uint id, GLib.PtrArray properties, string value) throws GLib.Error; + public int get_max_indicators (); + public virtual uint get_next_id (); + public void hide (); + public virtual void indicator_added (uint id); + public virtual bool indicator_displayed (owned string sender, uint id, bool displayed) throws GLib.Error; + public virtual void indicator_removed (uint id); + public virtual int max_indicators_get (); + public virtual bool max_indicators_set (owned string sender, int max); + public static Indicate.Server ref_default (); + public void remove_indicator (Indicate.Indicator indicator); + public virtual bool remove_interest (owned string sender, Indicate.Interests interest); + public void set_count (uint count); + public static void set_dbus_object (string obj); + public void set_default (); + public void set_desktop_file (string path); + public void set_menu (DbusmenuGlib.DbusmenuServer menu); + public void set_type (string type); + public void show (); + public virtual bool show_indicator_to_user (uint id, uint timestamp) throws GLib.Error; + public virtual bool show_interest (owned string sender, Indicate.Interests interest); + public uint count { get; set; } + public string desktop { get; set; } + public string type { get; set; } + public signal void indicator_delete (uint object); + public signal void indicator_modified (uint object, string p0); + public signal void indicator_new (uint object); + public signal void interest_added (uint object); + public signal void interest_removed (uint object); + public signal void max_indicators_changed (int object); + public signal void server_count_changed (uint object); + public signal void server_display (uint object); + public signal void server_hide (string object); + public signal void server_show (string object); + } + [CCode (type_id = "INDICATE_TYPE_LISTENER_INDICATOR", cheader_filename = "libindicate/listener.h")] + public struct ListenerIndicator { + public uint get_id (); + } + [CCode (type_id = "INDICATE_TYPE_LISTENER_SERVER", cheader_filename = "libindicate/listener.h")] + public struct ListenerServer { + public unowned string get_dbusname (); + } + [CCode (cprefix = "INDICATE_INTEREST_", cheader_filename = "libindicate/interests.h")] + public enum Interests { + NONE, + SERVER_DISPLAY, + SERVER_SIGNAL, + INDICATOR_DISPLAY, + INDICATOR_SIGNAL, + INDICATOR_COUNT, + LAST + } + [CCode (cheader_filename = "Indicate-0.2.h", has_target = false)] + public delegate void listener_get_property_bool_cb (Indicate.Listener listener, Indicate.ListenerServer server, Indicate.ListenerIndicator indicator, owned string property, bool propertydata, void* data); + [CCode (cheader_filename = "Indicate-0.2.h", has_target = false)] + public delegate void listener_get_property_cb (Indicate.Listener listener, Indicate.ListenerServer server, Indicate.ListenerIndicator indicator, owned string property, string propertydata, void* data); + [CCode (cheader_filename = "Indicate-0.2.h", has_target = false)] + public delegate void listener_get_property_int_cb (Indicate.Listener listener, Indicate.ListenerServer server, Indicate.ListenerIndicator indicator, owned string property, int propertydata, void* data); + [CCode (cheader_filename = "Indicate-0.2.h", has_target = false)] + public delegate void listener_get_property_time_cb (Indicate.Listener listener, Indicate.ListenerServer server, Indicate.ListenerIndicator indicator, owned string property, GLib.TimeVal propertydata, void* data); + [CCode (cheader_filename = "Indicate-0.2.h", has_target = false)] + public delegate void listener_get_property_value_cb (Indicate.Listener listener, Indicate.ListenerServer server, Indicate.ListenerIndicator indicator, owned string property, GLib.Value propertydata, void* data); + [CCode (cheader_filename = "Indicate-0.2.h", has_target = false)] + public delegate void listener_get_server_property_cb (Indicate.Listener listener, Indicate.ListenerServer server, owned string value, void* data); + [CCode (cheader_filename = "Indicate-0.2.h", has_target = false)] + public delegate void listener_get_server_uint_property_cb (Indicate.Listener listener, Indicate.ListenerServer server, uint value, void* data); + [CCode (cheader_filename = "Indicate-0.2.h")] + public const int INDICATOR_H_INCLUDED__; + [CCode (cheader_filename = "Indicate-0.2.h")] + public const int INDICATOR_MESSAGES_H_INCLUDED__; + [CCode (cheader_filename = "Indicate-0.2.h")] + public const string INDICATOR_MESSAGES_PROP_ATTENTION; + [CCode (cheader_filename = "Indicate-0.2.h")] + public const string INDICATOR_MESSAGES_PROP_COUNT; + [CCode (cheader_filename = "Indicate-0.2.h")] + public const string INDICATOR_MESSAGES_PROP_ICON; + [CCode (cheader_filename = "Indicate-0.2.h")] + public const string INDICATOR_MESSAGES_PROP_NAME; + [CCode (cheader_filename = "Indicate-0.2.h")] + public const string INDICATOR_MESSAGES_PROP_TIME; + [CCode (cheader_filename = "Indicate-0.2.h")] + public const string INDICATOR_MESSAGES_SERVER_TYPE; + [CCode (cheader_filename = "Indicate-0.2.h")] + public const string INDICATOR_SIGNAL_DISPLAY; + [CCode (cheader_filename = "Indicate-0.2.h")] + public const string INDICATOR_SIGNAL_DISPLAYED; + [CCode (cheader_filename = "Indicate-0.2.h")] + public const string INDICATOR_SIGNAL_HIDE; + [CCode (cheader_filename = "Indicate-0.2.h")] + public const string INDICATOR_SIGNAL_MODIFIED; + [CCode (cheader_filename = "Indicate-0.2.h")] + public const string INDICATOR_SIGNAL_SHOW; + [CCode (cheader_filename = "Indicate-0.2.h")] + public const string INDICATOR_VALUE_FALSE; + [CCode (cheader_filename = "Indicate-0.2.h")] + public const string INDICATOR_VALUE_TRUE; + [CCode (cheader_filename = "Indicate-0.2.h")] + public const int INTERESTS_H_INCLUDED__; + [CCode (cheader_filename = "Indicate-0.2.h")] + public const int LISTENER_H_INCLUDED__; + [CCode (cheader_filename = "Indicate-0.2.h")] + public const string LISTENER_SIGNAL_INDICATOR_ADDED; + [CCode (cheader_filename = "Indicate-0.2.h")] + public const string LISTENER_SIGNAL_INDICATOR_MODIFIED; + [CCode (cheader_filename = "Indicate-0.2.h")] + public const string LISTENER_SIGNAL_INDICATOR_REMOVED; + [CCode (cheader_filename = "Indicate-0.2.h")] + public const string LISTENER_SIGNAL_SERVER_ADDED; + [CCode (cheader_filename = "Indicate-0.2.h")] + public const string LISTENER_SIGNAL_SERVER_COUNT_CHANGED; + [CCode (cheader_filename = "Indicate-0.2.h")] + public const string LISTENER_SIGNAL_SERVER_REMOVED; + [CCode (cheader_filename = "Indicate-0.2.h")] + public const int SERVER_H_INCLUDED__; + [CCode (cheader_filename = "Indicate-0.2.h")] + public const int SERVER_INDICATOR_NULL; + [CCode (cheader_filename = "Indicate-0.2.h")] + public const string SERVER_SIGNAL_INDICATOR_ADDED; + [CCode (cheader_filename = "Indicate-0.2.h")] + public const string SERVER_SIGNAL_INDICATOR_MODIFIED; + [CCode (cheader_filename = "Indicate-0.2.h")] + public const string SERVER_SIGNAL_INDICATOR_REMOVED; + [CCode (cheader_filename = "Indicate-0.2.h")] + public const string SERVER_SIGNAL_INTEREST_ADDED; + [CCode (cheader_filename = "Indicate-0.2.h")] + public const string SERVER_SIGNAL_INTEREST_REMOVED; + [CCode (cheader_filename = "Indicate-0.2.h")] + public const string SERVER_SIGNAL_MAX_INDICATORS_CHANGED; + [CCode (cheader_filename = "Indicate-0.2.h")] + public const string SERVER_SIGNAL_SERVER_COUNT_CHANGED; + [CCode (cheader_filename = "Indicate-0.2.h")] + public const string SERVER_SIGNAL_SERVER_DISPLAY; + [CCode (cheader_filename = "Indicate-0.2.h")] + public const string SERVER_SIGNAL_SERVER_HIDE; + [CCode (cheader_filename = "Indicate-0.2.h")] + public const string SERVER_SIGNAL_SERVER_SHOW; +} -- cgit v1.2.3