aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac4
-rw-r--r--src/Makefile.am8
-rw-r--r--src/familiar-players-db.vala154
-rw-r--r--src/metadata-menu-item.vala11
-rw-r--r--src/music-player-bridge.vala90
-rw-r--r--src/player-controller.vala14
-rw-r--r--src/player-item.vala26
-rw-r--r--src/transport-menu-item.vala5
-rw-r--r--vapi/Indicate-0.2.vapi218
10 files changed, 490 insertions, 42 deletions
diff --git a/Makefile.am b/Makefile.am
index 466806a..70e69c1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,7 +5,7 @@ SUBDIRS = \
tests \
po
-EXTRA_DIST = autogen.sh vapi/common-defs.vapi
+EXTRA_DIST = autogen.sh vapi/common-defs.vapi vapi/Indicate-0.2.vapi
DISTCHECK_CONFIGURE_FLAGS = --enable-localinstall
diff --git a/configure.ac b/configure.ac
index e55123e..781e815 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,10 +1,10 @@
-AC_INIT(indicator-sound, 0.3.1, conor.curran@canonical.com)
+AC_INIT(indicator-sound, 0.3.2, conor.curran@canonical.com)
AC_PREREQ(2.53)
AM_CONFIG_HEADER(config.h)
-AM_INIT_AUTOMAKE(indicator-sound, 0.3.1)
+AM_INIT_AUTOMAKE(indicator-sound, 0.3.2)
AM_MAINTAINER_MODE
diff --git a/src/Makefile.am b/src/Makefile.am
index 8e7bc94..b33107d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -57,20 +57,22 @@ music_bridge_VALASOURCES = \
player-controller.vala \
mpris-controller-v2.vala \
mpris-controller.vala \
- player-item.vala
+ player-item.vala \
+ familiar-players-db.vala
music_bridge_VALAFLAGS = \
--ccode \
-H music-player-bridge.h -d . \
- --vapidir=./ \
--vapidir=$(top_srcdir)/vapi/ \
+ --vapidir=./ \
--thread \
--pkg gee-1.0 \
--pkg Indicate-0.2 \
--pkg Dbusmenu-Glib-0.2 \
--pkg common-defs \
--pkg dbus-glib-1 \
- $(MAINTAINER_VALAFLAGS)
+ --pkg gio-unix-2.0
+ $(MAINTAINER_VALAFLAGS)
music_bridge_APIFILES = \
music-player-bridge.h
diff --git a/src/familiar-players-db.vala b/src/familiar-players-db.vala
new file mode 100644
index 0000000..88bc01f
--- /dev/null
+++ b/src/familiar-players-db.vala
@@ -0,0 +1,154 @@
+/*
+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/>.
+*/
+
+using Gee;
+using GLib.Path;
+using GLib.DirUtils;
+using GLib.FileUtils;
+using GLib.Timeout;
+using GLib.Environment;
+
+// TODO: more refactoring needed here
+public class FamiliarPlayersDB : GLib.Object
+{
+ private const string GROUP_NAME = "Seen Database";
+ private const string KEY_NAME = "DesktopFiles";
+ private HashMap<string, bool> players_DB;
+ private string file_name;
+ private string dir_name;
+ private KeyFile key_file;
+ private uint write_id;
+
+ public FamiliarPlayersDB()
+ {
+ this.write_id = 0;
+ this.players_DB = new HashMap<string, bool>();
+ this.dir_name = build_filename(get_user_cache_dir(), "indicators", "sound");
+ this.file_name = build_filename(this.dir_name, "familiar-players-db.keyfile");
+ if(create_key_file() && check_for_keys() && load_data_from_key_file()){
+ debug("keyfiles in place and ready for action");
+ }
+ else{
+ this.key_file = null;
+ warning("FamiliarPlayersDB:: problems loading key file - can't go any further");
+ }
+ }
+
+ private bool create_key_file(){
+ if (test(this.file_name, GLib.FileTest.EXISTS)) {
+ this.key_file = new KeyFile();
+ try{
+ if (this.key_file.load_from_file(this.file_name, KeyFileFlags.NONE) == true) {
+ return true;
+ }
+ }
+ catch(FileError e){
+ warning("FamiliarPlayersDB - error trying to load KeyFile");
+ }
+ }
+ return false;
+ }
+
+ private bool check_for_keys(){
+ try{
+ if(this.key_file.has_key(GROUP_NAME, KEY_NAME) == true){
+ return true;
+ }
+ }
+ catch(KeyFileError e){
+ return false;
+ }
+ warning("Seen DB '%s' does not have key '%s' in group '%s'", this.file_name, KEY_NAME, GROUP_NAME);
+ return false;
+ }
+
+ private bool load_data_from_key_file(){
+ try{
+ string[] desktops = this.key_file.get_string_list(GROUP_NAME,
+ KEY_NAME);
+ foreach(string s in desktops){
+ this.players_DB.set(s, true);
+ }
+ return true;
+ }
+ catch(FileError error){
+ warning("Error loading the Desktop string list");
+ return false;
+ }
+ }
+
+ private bool write_db()
+ {
+ KeyFile keyfile = new KeyFile();
+ string[] desktops = {};
+ foreach(string key in this.players_DB.keys){
+ desktops += key;
+ }
+ keyfile.set_string_list(GROUP_NAME,
+ KEY_NAME,
+ desktops);
+ size_t data_length;
+ string data = null;
+ try{
+ data = keyfile.to_data(out data_length);
+ }
+ catch(Error e){
+ warning("Problems dumping keyfile to a string");
+ return false;
+ }
+
+ if(create_with_parents(this.dir_name, 0700) != 0){
+ warning("Unable to make directory: %s", this.dir_name);
+ return false;
+ }
+
+ try{
+ if(set_contents(this.file_name, data, (ssize_t)data_length) == false){
+ warning("Unable to write out file '%s'", this.file_name);
+ }
+ }
+ catch(FileError err){
+ warning("Unable to write out file '%s'", this.file_name);
+ }
+ return true;
+ }
+
+ public void insert(string desktop)
+ {
+ if(already_familiar(desktop) == false){
+ if(this.write_id != 0){
+ Source.remove(this.write_id);
+ this.write_id = 0;
+ }
+ this.write_id = Timeout.add_seconds(60, write_db);
+ this.players_DB.set(desktop.dup(), true);
+ }
+ }
+
+ public bool already_familiar(string desktop)
+ {
+ return this.players_DB.get(desktop);
+ }
+
+ public Gee.Set<string> records()
+ {
+ return this.players_DB.keys;
+ }
+
+} \ No newline at end of file
diff --git a/src/metadata-menu-item.vala b/src/metadata-menu-item.vala
index f62cd46..541fbf4 100644
--- a/src/metadata-menu-item.vala
+++ b/src/metadata-menu-item.vala
@@ -37,5 +37,16 @@ public class MetadataMenuitem : PlayerItem
attrs.add(MENUITEM_ARTURL);
return attrs;
}
+
+ public override void check_layout(){
+ this.property_set_bool(MENUITEM_PROP_VISIBLE, this.populated());
+ debug("check layout for the metadata = %s", this.populated().to_string());
+ }
+
+ public bool populated()
+ {
+ return (this.property_get(MENUITEM_TEXT_TITLE) != null &&
+ this.property_get(MENUITEM_TEXT_TITLE) != "");
+ }
} \ No newline at end of file
diff --git a/src/music-player-bridge.vala b/src/music-player-bridge.vala
index b03ecbd..6fc9032 100644
--- a/src/music-player-bridge.vala
+++ b/src/music-player-bridge.vala
@@ -1,5 +1,4 @@
/*
-This service primarily controls PulseAudio and is driven by the sound indicator menu on the panel.
Copyright 2010 Canonical Ltd.
Authors:
@@ -21,6 +20,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
using Indicate;
using Dbusmenu;
using Gee;
+using GLib;
public class MusicPlayerBridge : GLib.Object
{
@@ -28,9 +28,11 @@ public class MusicPlayerBridge : GLib.Object
private Listener listener;
private Dbusmenu.Menuitem root_menu;
private HashMap<string, PlayerController> registered_clients;
+ private FamiliarPlayersDB playersDB;
public MusicPlayerBridge()
{
+ playersDB = new FamiliarPlayersDB();
registered_clients = new HashMap<string, PlayerController> ();
listener = Listener.ref_default();
listener.indicator_added.connect(on_indicator_added);
@@ -40,33 +42,43 @@ public class MusicPlayerBridge : GLib.Object
listener.server_removed.connect(on_server_removed);
listener.server_count_changed.connect(on_server_count_changed);
}
-
- public void set_root_menu_item(Dbusmenu.Menuitem menu)
- {
- root_menu = menu;
- }
-
- public void on_indicator_added(Indicate.ListenerServer object, Indicate.ListenerIndicator p0)
- {
- debug("MusicPlayerBridge-> on_indicator_added");
- }
-
- public void on_indicator_removed(Indicate.ListenerServer object, Indicate.ListenerIndicator p0)
- {
- debug("MusicPlayerBridge -> on_indicator_removed");
- }
-
- public void on_indicator_modified(Indicate.ListenerServer object, Indicate.ListenerIndicator p0, string s)
- {
- debug("MusicPlayerBridge -> indicator_modified with vale %s", s );
- }
-
- public void on_server_added(Indicate.ListenerServer object, string type)
+ // Alpha 2 not in use ... yet.
+ private void try_to_add_inactive_familiar_clients(){
+ // for now just use one of the entries.
+ int count = 0;
+ foreach(string app in this.playersDB.records()){
+ if(count == 0){
+ debug("we have found %s", app);
+ string[] bits = app.split("/");
+
+ try{
+ string app_name = bits[bits.length -1].split(".")[0];
+ debug("we have found %s", app_name);
+ PlayerController ctrl = new PlayerController(this.root_menu,
+ app_name,
+ false);
+ this.registered_clients.set(app_name, ctrl);
+ DesktopAppInfo info = new DesktopAppInfo.from_filename(app_name);
+ string desc = info.get_display_name();
+ debug("description from app %s", desc);
+ count += 1;
+ }
+ catch(Error er){
+ warning("desktop path in cache is not formatted as we have anticipated");
+ }
+ }
+ break;
+ }
+ }
+
+ public void on_server_added(Indicate.ListenerServer object, string type)
{
debug("MusicPlayerBridge -> on_server_added with value %s", type);
if(server_is_not_of_interest(type)) return;
- string client_name = type.split(".")[1];
+ string client_name = type.split(".")[1];
if (root_menu != null && client_name != null){
+ listener_get_server_property_cb cb = (listener_get_server_property_cb)desktop_info_callback;
+ this.listener.server_get_desktop(object, cb, this);
PlayerController ctrl = new PlayerController(root_menu, client_name, true);
registered_clients.set(client_name, ctrl);
debug("client of name %s has successfully registered with us", client_name);
@@ -94,10 +106,38 @@ public class MusicPlayerBridge : GLib.Object
return false;
}
- public void on_server_count_changed(Indicate.ListenerServer object, uint i)
+ private void desktop_info_callback(Indicate.ListenerServer server,
+ owned string path, void* data)
+ {
+ debug("we got a desktop file path hopefully: %s", path);
+ MusicPlayerBridge bridge = data as MusicPlayerBridge;
+ bridge.playersDB.insert(path);
+ }
+
+ public void set_root_menu_item(Dbusmenu.Menuitem menu)
+ {
+ this.root_menu = menu;
+ //try_to_add_inactive_familiar_clients();
+ }
+
+ public void on_server_count_changed(Indicate.ListenerServer object, uint i)
{
debug("MusicPlayerBridge-> on_server_count_changed with value %u", i);
}
+ public void on_indicator_added(Indicate.ListenerServer object, Indicate.ListenerIndicator p0)
+ {
+ debug("MusicPlayerBridge-> on_indicator_added");
+ }
+
+ public void on_indicator_removed(Indicate.ListenerServer object, Indicate.ListenerIndicator p0)
+ {
+ debug("MusicPlayerBridge -> on_indicator_removed");
+ }
+
+ public void on_indicator_modified(Indicate.ListenerServer object, Indicate.ListenerIndicator p0, string s)
+ {
+ debug("MusicPlayerBridge -> indicator_modified with vale %s", s );
+ }
}
diff --git a/src/player-controller.vala b/src/player-controller.vala
index 862bb29..0d8dc01 100644
--- a/src/player-controller.vala
+++ b/src/player-controller.vala
@@ -31,7 +31,8 @@ public class PlayerController : GLib.Object
private bool is_active;
public ArrayList<PlayerItem> custom_items;
private MprisController mpris_adaptor;
-
+ private string desktop_path;
+
public PlayerController(Dbusmenu.Menuitem root, string client_name, bool active)
{
this.root_menu = root;
@@ -48,6 +49,10 @@ public class PlayerController : GLib.Object
this.mpris_adaptor = new MprisController(this.name, this);
}
this.custom_items[TRANSPORT].set_adaptor(this.mpris_adaptor);
+
+ // At start up if there is no metadata then hide the item.
+ // TODO: NOT working -> dbus menu bug ?
+ //((MetadataMenuitem)this.custom_items[METADATA]).check_layout();
}
public void vanish()
@@ -80,13 +85,6 @@ public class PlayerController : GLib.Object
return true;
}
- //public void update_playing_info(HashMap<string, string> data)
- //{
- // debug("PlayerController - update_playing_info");
- // MetadataMenuitem item = this.custom_items[METADATA] as MetadataMenuitem;
- // item.update(data, MetadataMenuitem.attributes_format());
- //}
-
private static string format_client_name(string client_name)
{
string formatted = client_name;
diff --git a/src/player-item.vala b/src/player-item.vala
index 09b0e6b..7fcf912 100644
--- a/src/player-item.vala
+++ b/src/player-item.vala
@@ -27,18 +27,21 @@ public class PlayerItem : Dbusmenu.Menuitem
public PlayerItem()
{
}
-
+
public void update(HashTable<string, Value?> data, HashSet<string> attributes)
{
debug("PlayerItem::update()");
+ if(ensure_valid_updates(data, attributes) == false){
+ debug("PlayerItem::Update -> The hashtable update does not contain what we were expecting - just leave it!");
+ return;
+ }
foreach(string property in attributes){
string[] input_keys = property.split("-");
string search_key = input_keys[input_keys.length-1 : input_keys.length][0];
debug("search key = %s", search_key);
-
Value v = data.lookup(search_key);
-
if (v.holds (typeof (string))){
+ debug("with value : %s", v.get_string());
this.property_set(property, this.sanitize_string(v.get_string()));
}
else if (v.holds (typeof (int))){
@@ -49,6 +52,8 @@ public class PlayerItem : Dbusmenu.Menuitem
this.property_set_bool(property, v.get_boolean());
}
}
+ // TODO: not working
+ //this.check_layout();
}
public void set_adaptor(MprisController adaptor)
@@ -56,6 +61,17 @@ public class PlayerItem : Dbusmenu.Menuitem
this.mpris_adaptor = adaptor;
}
+ private static bool ensure_valid_updates(HashTable<string, Value?> data, HashSet<string> attributes)
+ {
+ if(data == null){
+ return false;
+ }
+ if(data.size() < attributes.size){
+ warning("update hash was too small for the target");
+ return false;
+ }
+ return true;
+ }
public static string sanitize_string(string st)
{
@@ -85,5 +101,9 @@ public class PlayerItem : Dbusmenu.Menuitem
separator.property_set(MENUITEM_PROP_TYPE, CLIENT_TYPES_SEPARATOR);
return separator;
}
+
+ public virtual void check_layout(){
+ warning("this should not be hit");
+ }
}
diff --git a/src/transport-menu-item.vala b/src/transport-menu-item.vala
index 39a0cab..264e153 100644
--- a/src/transport-menu-item.vala
+++ b/src/transport-menu-item.vala
@@ -41,6 +41,11 @@ public class TransportMenuitem : PlayerItem
this.mpris_adaptor.toggle_playback(input_value.get_boolean());
}
+ public override void check_layout(){
+ // nothing to be done for this item - always active
+ }
+
+
public static HashSet<string> attributes_format()
{
HashSet<string> attrs = new HashSet<string>();
diff --git a/vapi/Indicate-0.2.vapi b/vapi/Indicate-0.2.vapi
new file mode 100644
index 0000000..1381037
--- /dev/null
+++ b/vapi/Indicate-0.2.vapi
@@ -0,0 +1,218 @@
+/* Indicate-0.2.vapi generated by vapigen, do not modify. */
+
+[CCode (cprefix = "Indicate", lower_case_cprefix = "indicate_")]
+namespace Indicate {
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.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 string[] 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/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.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, void* data);
+ 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/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,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_property (uint id, owned string property, GLib.Value 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 (Dbusmenu.Server 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/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public struct ListenerIndicator {
+ public uint get_id ();
+ }
+ [CCode (type_id = "INDICATE_TYPE_LISTENER_SERVER", cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public struct ListenerServer {
+ public unowned string get_dbusname ();
+ }
+ [CCode (cprefix = "INDICATE_INTEREST_", cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public enum Interests {
+ NONE,
+ SERVER_DISPLAY,
+ SERVER_SIGNAL,
+ INDICATOR_DISPLAY,
+ INDICATOR_SIGNAL,
+ INDICATOR_COUNT,
+ LAST
+ }
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h", has_target = false)]
+ public delegate string[] indicator_list_properties_slot_t (Indicate.Indicator indicator);
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.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 = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.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 = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.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 = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.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 = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.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 (cname ="indicate_listener_get_server_property_cb", cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.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 = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.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 = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h", has_target = false)]
+ public delegate bool server_get_indicator_list_slot_t (Indicate.Server server, out unowned Indicate.Indicator[] indicators);
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h", has_target = false)]
+ public delegate bool server_get_indicator_properties_slot_t (Indicate.Server server, uint id, out string[] properties);
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h", has_target = false)]
+ public delegate bool server_get_indicator_property_group_slot_t (Indicate.Server server, uint id, string[] properties, out string[] value);
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public const int INDICATOR_H_INCLUDED__;
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public const int INDICATOR_MESSAGES_H_INCLUDED__;
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public const string INDICATOR_MESSAGES_PROP_ATTENTION;
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public const string INDICATOR_MESSAGES_PROP_COUNT;
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public const string INDICATOR_MESSAGES_PROP_ICON;
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public const string INDICATOR_MESSAGES_PROP_NAME;
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public const string INDICATOR_MESSAGES_PROP_TIME;
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public const string INDICATOR_MESSAGES_SERVER_TYPE;
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public const string INDICATOR_SIGNAL_DISPLAY;
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public const string INDICATOR_SIGNAL_DISPLAYED;
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public const string INDICATOR_SIGNAL_HIDE;
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public const string INDICATOR_SIGNAL_MODIFIED;
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public const string INDICATOR_SIGNAL_SHOW;
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public const string INDICATOR_VALUE_FALSE;
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public const string INDICATOR_VALUE_TRUE;
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public const int INTERESTS_H_INCLUDED__;
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public const int LISTENER_H_INCLUDED__;
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public const string LISTENER_SIGNAL_INDICATOR_ADDED;
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public const string LISTENER_SIGNAL_INDICATOR_MODIFIED;
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public const string LISTENER_SIGNAL_INDICATOR_REMOVED;
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public const string LISTENER_SIGNAL_SERVER_ADDED;
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public const string LISTENER_SIGNAL_SERVER_COUNT_CHANGED;
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public const string LISTENER_SIGNAL_SERVER_REMOVED;
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public const int SERVER_H_INCLUDED__;
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public const int SERVER_INDICATOR_NULL;
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public const string SERVER_SIGNAL_INDICATOR_ADDED;
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public const string SERVER_SIGNAL_INDICATOR_MODIFIED;
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public const string SERVER_SIGNAL_INDICATOR_REMOVED;
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public const string SERVER_SIGNAL_INTEREST_ADDED;
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public const string SERVER_SIGNAL_INTEREST_REMOVED;
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public const string SERVER_SIGNAL_MAX_INDICATORS_CHANGED;
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public const string SERVER_SIGNAL_SERVER_COUNT_CHANGED;
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public const string SERVER_SIGNAL_SERVER_DISPLAY;
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public const string SERVER_SIGNAL_SERVER_HIDE;
+ [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
+ public const string SERVER_SIGNAL_SERVER_SHOW;
+}