Merge lp:~cjcurran/indicator-sound/playlist-integration into lp:~indicator-applet-developers/indicator-sound/trunk_3

Proposed by Conor Curran on 2010-12-21
Status: Merged
Merged at revision: 101
Proposed branch: lp:~cjcurran/indicator-sound/playlist-integration
Merge into: lp:~indicator-applet-developers/indicator-sound/trunk_3
Diff against target: 707 lines (+233/-250)
11 files modified
src/Makefile.am (+1/-0)
src/common-defs.h (+3/-0)
src/dbus-menu-manager.c (+1/-0)
src/mpris2-controller.vala (+65/-7)
src/mpris2-interfaces.vala (+28/-1)
src/music-player-bridge.vala (+2/-2)
src/player-controller.vala (+23/-6)
src/player-item.vala (+1/-1)
src/playlists-menu-item.vala (+87/-0)
vapi/Indicate-0.2.vapi (+0/-218)
vapi/common-defs.vapi (+22/-15)
To merge this branch: bzr merge lp:~cjcurran/indicator-sound/playlist-integration
Reviewer Review Type Date Requested Status
Kalle Valo (community) 2010-12-21 Approve on 2010-12-21
Review via email: mp+44351@code.launchpad.net

Description of the Change

Playlists interface ready to go (spec compliant - tested with Banshee)

To post a comment you must log in.
Kalle Valo (kvalo) wrote :

Looks good to me, but I'm no vala expert.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Makefile.am'
2--- src/Makefile.am 2010-12-15 14:32:27 +0000
3+++ src/Makefile.am 2010-12-21 15:00:51 +0000
4@@ -65,6 +65,7 @@
5 mpris2-controller.vala \
6 player-item.vala \
7 settings-manager.vala \
8+ playlists-menu-item.vala \
9 fetch-file.vala
10
11
12
13=== modified file 'src/common-defs.h'
14--- src/common-defs.h 2010-12-07 14:18:28 +0000
15+++ src/common-defs.h 2010-12-21 15:00:51 +0000
16@@ -49,3 +49,6 @@
17 #define DBUSMENU_SCRUB_MENUITEM_POSITION "x-canonical-sound-menu-player-scrub-position"
18 #define DBUSMENU_SCRUB_MENUITEM_PLAY_STATE "x-canonical-sound-menu-player-scrub-play-state"
19
20+#define DBUSMENU_PLAYLISTS_MENUITEM_TYPE "x-canonical-sound-menu-player-playlists-type"
21+#define DBUSMENU_PLAYLISTS_MENUITEM_TITLE "x-canonical-sound-menu-player-playlists-title"
22+#define DBUSMENU_PLAYLISTS_MENUITEM_PLAYLISTS "x-canonical-sound-menu-player-playlists-playlists"
23\ No newline at end of file
24
25=== modified file 'src/dbus-menu-manager.c'
26--- src/dbus-menu-manager.c 2010-12-07 14:18:28 +0000
27+++ src/dbus-menu-manager.c 2010-12-21 15:00:51 +0000
28@@ -214,6 +214,7 @@
29 // Sound preferences dialog
30 DbusmenuMenuitem *settings_mi = dbusmenu_menuitem_new();
31 dbusmenu_menuitem_property_set(settings_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Sound Preferences..."));
32+
33 //_("Sound Preferences..."));
34 dbusmenu_menuitem_child_append(root, settings_mi);
35 g_signal_connect(G_OBJECT(settings_mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED,
36
37=== modified file 'src/mpris2-controller.vala'
38--- src/mpris2-controller.vala 2010-12-16 12:36:43 +0000
39+++ src/mpris2-controller.vala 2010-12-21 15:00:51 +0000
40@@ -18,11 +18,10 @@
41 */
42 using Dbusmenu;
43
44-
45 [DBus (name = "org.freedesktop.DBus.Properties")]
46- public interface FreeDesktopProperties : Object{
47- public signal void PropertiesChanged(string source, HashTable<string, Variant?> changed_properties,
48- string[] invalid);
49+public interface FreeDesktopProperties : Object{
50+ public signal void PropertiesChanged (string source, HashTable<string, Variant?> changed_properties,
51+ string[] invalid );
52 }
53
54 /*
55@@ -33,13 +32,14 @@
56 {
57 public MprisRoot mpris2_root {get; construct;}
58 public MprisPlayer player {get; construct;}
59+ public MprisPlaylists playlists {get; construct;}
60 public FreeDesktopProperties properties_interface {get; construct;}
61
62 public PlayerController owner {get; construct;}
63-
64+
65 public Mpris2Controller(PlayerController ctrl)
66 {
67- GLib.Object(owner: ctrl);
68+ GLib.Object(owner: ctrl);
69 }
70
71 construct{
72@@ -50,10 +50,13 @@
73 this.player = Bus.get_proxy_sync ( BusType.SESSION,
74 this.owner.dbus_name,
75 "/org/mpris/MediaPlayer2" );
76+ this.playlists = Bus.get_proxy_sync ( BusType.SESSION,
77+ this.owner.dbus_name,
78+ "/org/mpris/MediaPlayer2" );
79
80 this.properties_interface = Bus.get_proxy_sync ( BusType.SESSION,
81 "org.freedesktop.Properties.PropertiesChanged",
82- "/org/mpris/MediaPlayer2" );
83+ "/org/mpris/MediaPlayer2" );
84 this.properties_interface.PropertiesChanged.connect ( property_changed_cb );
85 }
86 catch (IOError e) {
87@@ -91,8 +94,21 @@
88 metadata.property_set_bool ( MENUITEM_PROP_VISIBLE,
89 metadata.populated(MetadataMenuitem.attributes_format()));
90 }
91+ Variant? playlist_v = changed_properties.lookup("ActivePlaylist");
92+ if ( playlist_v != null ){
93+ this.fetch_active_playlist();
94+ //Timeout.add ( 200, fetch_active_playlist );
95+ }
96 }
97
98+ public bool playlists_support_exist()
99+ {
100+ if (this.playlists == null) return false;
101+ uint32? count = this.playlists.PlaylistCount;
102+ if ( count == null || count <= 0 ) return false;
103+ return true;
104+ }
105+
106 private bool ensure_correct_playback_status(){
107 debug("TEST playback status = %s", this.player.PlaybackStatus);
108 TransportMenuitem.state p = (TransportMenuitem.state)this.determine_play_state(this.player.PlaybackStatus);
109@@ -138,6 +154,8 @@
110 GLib.HashTable<string, Value?>? cleaned_metadata = this.clean_metadata();
111 this.owner.custom_items[PlayerController.widget_order.METADATA].update(cleaned_metadata,
112 MetadataMenuitem.attributes_format());
113+ this.fetch_playlists();
114+ this.fetch_active_playlist();
115 }
116
117 public void transport_update(TransportMenuitem.action command)
118@@ -154,6 +172,32 @@
119 }
120 }
121
122+ public void fetch_playlists()
123+ {
124+ if (this.playlists == null) return;
125+
126+ PlaylistDetails[] current_playlists = this.playlists.GetPlaylists(0,
127+ 10,
128+ "Alphabetical",
129+ false);
130+ if( current_playlists != null ){
131+ debug( "Size of the playlist array = %i", current_playlists.length );
132+ PlaylistsMenuitem playlists_item = this.owner.custom_items[PlayerController.widget_order.PLAYLISTS] as PlaylistsMenuitem;
133+ playlists_item.update(current_playlists);
134+ }
135+ return;
136+ }
137+
138+ private void fetch_active_playlist()
139+ {
140+ if (this.playlists == null && this.playlists.ActivePlaylist.valid == false){
141+ warning("Playlists object is null or we don't have an active playlist");
142+ }
143+ PlaylistsMenuitem playlists_item = this.owner.custom_items[PlayerController.widget_order.PLAYLISTS] as PlaylistsMenuitem;
144+ playlists_item.update_active_playlist ( this.playlists.ActivePlaylist.details );
145+ }
146+
147+
148 public bool connected()
149 {
150 return (this.player != null && this.mpris2_root != null);
151@@ -165,4 +209,18 @@
152 this.mpris2_root.Raise.begin();
153 }
154 }
155+
156+ public void activate_playlist (ObjectPath path)
157+ {
158+ if(this.playlists == null){
159+ warning("playlists mpris instance is null !");
160+ return;
161+ }
162+ try{
163+ this.playlists.ActivatePlaylist.begin(path);
164+ }
165+ catch(IOError e){
166+ debug("Could not activate playlist %s because %s", (string)path, e.message);
167+ }
168+ }
169 }
170\ No newline at end of file
171
172=== modified file 'src/mpris2-interfaces.vala'
173--- src/mpris2-interfaces.vala 2010-12-07 14:18:28 +0000
174+++ src/mpris2-interfaces.vala 2010-12-21 15:00:51 +0000
175@@ -1,6 +1,5 @@
176 /*
177 Copyright 2010 Canonical Ltd.
178-
179 Authors:
180 Conor Curran <conor.curran@canonical.com>
181
182@@ -44,3 +43,31 @@
183 // signals
184 public signal void Seeked(int64 new_position);
185 }
186+
187+// Playlist container
188+public struct PlaylistDetails{
189+ public ObjectPath path;
190+ public string name;
191+ public string icon_path;
192+}
193+
194+// Active playlist property container
195+public struct ActivePlaylistContainer{
196+ public bool valid;
197+ public PlaylistDetails details;
198+}
199+
200+[DBus (name = "org.mpris.MediaPlayer2.Playlists")]
201+public interface MprisPlaylists : Object {
202+ //properties
203+ public abstract string[] Orderings{owned get; set;}
204+ public abstract uint32 PlaylistCount{owned get; set;}
205+ public abstract ActivePlaylistContainer ActivePlaylist {owned get; set;}
206+
207+ //methods
208+ public abstract async void ActivatePlaylist(ObjectPath playlist_id) throws IOError;
209+ public abstract PlaylistDetails[] GetPlaylists ( uint32 index,
210+ uint32 max_count,
211+ string order,
212+ bool reverse_order ) throws IOError;
213+}
214\ No newline at end of file
215
216=== modified file 'src/music-player-bridge.vala'
217--- src/music-player-bridge.vala 2010-12-16 12:36:43 +0000
218+++ src/music-player-bridge.vala 2010-12-21 15:00:51 +0000
219@@ -76,7 +76,7 @@
220 }
221 }
222
223- public void client_has_become_available ( string desktop, string dbus_name )
224+ public void client_has_become_available ( string desktop, string dbus_name )
225 {
226 if (desktop == null || desktop == ""){
227 warning("Client %s attempting to register without desktop entry being set on the mpris root",
228@@ -129,10 +129,10 @@
229 public void set_root_menu_item ( Dbusmenu.Menuitem menu )
230 {
231 this.root_menu = menu;
232+ this.try_to_add_inactive_familiar_clients();
233 this.watcher = new Mpris2Watcher ();
234 this.watcher.client_appeared += this.client_has_become_available;
235 this.watcher.client_disappeared += this.client_has_vanished;
236- this.try_to_add_inactive_familiar_clients();
237 }
238
239 private static AppInfo? create_app_info ( string path )
240
241=== modified file 'src/player-controller.vala'
242--- src/player-controller.vala 2010-12-16 16:22:51 +0000
243+++ src/player-controller.vala 2010-12-21 15:00:51 +0000
244@@ -23,13 +23,14 @@
245
246 public class PlayerController : GLib.Object
247 {
248- public const int WIDGET_QUANTITY = 4;
249+ public const int WIDGET_QUANTITY = 5;
250
251 public static enum widget_order{
252 SEPARATOR,
253 TITLE,
254 METADATA,
255- TRANSPORT
256+ TRANSPORT,
257+ PLAYLISTS
258 }
259
260 public enum state{
261@@ -130,17 +131,23 @@
262
263 public void update_layout()
264 {
265+ PlaylistsMenuitem playlists_menuitem = this.custom_items[widget_order.PLAYLISTS] as PlaylistsMenuitem;
266+
267 if(this.current_state != state.CONNECTED){
268 this.custom_items[widget_order.TRANSPORT].property_set_bool(MENUITEM_PROP_VISIBLE,
269 false);
270 this.custom_items[widget_order.METADATA].property_set_bool(MENUITEM_PROP_VISIBLE,
271 false);
272+ playlists_menuitem.root_item.property_set_bool ( MENUITEM_PROP_VISIBLE,
273+ false );
274 return;
275 }
276 this.custom_items[widget_order.METADATA].property_set_bool(MENUITEM_PROP_VISIBLE,
277 this.custom_items[widget_order.METADATA].populated(MetadataMenuitem.attributes_format()));
278 this.custom_items[widget_order.TRANSPORT].property_set_bool(MENUITEM_PROP_VISIBLE,
279 true);
280+ playlists_menuitem.root_item.property_set_bool ( MENUITEM_PROP_VISIBLE,
281+ this.mpris_bridge.playlists_support_exist() );
282 }
283
284 private void construct_widgets()
285@@ -159,9 +166,19 @@
286 // Transport item
287 TransportMenuitem transport_item = new TransportMenuitem(this);
288 this.custom_items.add(transport_item);
289-
290+
291+ // Playlist item
292+ PlaylistsMenuitem playlist_menuitem = new PlaylistsMenuitem(this);
293+ this.custom_items.add(playlist_menuitem);
294+
295 foreach(PlayerItem item in this.custom_items){
296- root_menu.child_add_position(item, this.menu_offset + this.custom_items.index_of(item));
297+ if (this.custom_items.index_of(item) != 4) {
298+ root_menu.child_add_position(item, this.menu_offset + this.custom_items.index_of(item));
299+ }
300+ else{
301+ PlaylistsMenuitem playlists_menuitem = item as PlaylistsMenuitem;
302+ root_menu.child_add_position(playlists_menuitem.root_item, this.menu_offset + this.custom_items.index_of(item));
303+ }
304 }
305 }
306
307@@ -184,11 +201,11 @@
308 if(this.mpris_bridge.connected() == true){
309 this.update_state(state.CONNECTED);
310 TitleMenuitem title = this.custom_items[widget_order.TITLE] as TitleMenuitem;
311- title.toggle_active_triangle(true);
312+ title.toggle_active_triangle(true);
313 this.mpris_bridge.initial_update();
314 }
315 else{
316 this.update_state(state.DISCONNECTED);
317 }
318- }
319+ }
320 }
321
322=== modified file 'src/player-item.vala'
323--- src/player-item.vala 2010-12-07 14:18:28 +0000
324+++ src/player-item.vala 2010-12-21 15:00:51 +0000
325@@ -54,7 +54,7 @@
326 if(data == null){
327 debug("PlayerItem::Update -> The hashtable was null - just leave it!");
328 return;
329- }
330+ }
331
332 foreach(string property in attributes){
333 string[] input_keys = property.split("-");
334
335=== added file 'src/playlists-menu-item.vala'
336--- src/playlists-menu-item.vala 1970-01-01 00:00:00 +0000
337+++ src/playlists-menu-item.vala 2010-12-21 15:00:51 +0000
338@@ -0,0 +1,87 @@
339+/*
340+Copyright 2010 Canonical Ltd.
341+
342+Authors:
343+ Conor Curran <conor.curran@canonical.com>
344+
345+This program is free software: you can redistribute it and/or modify it
346+under the terms of the GNU General Public License version 3, as published
347+by the Free Software Foundation.
348+
349+This program is distributed in the hope that it will be useful, but
350+WITHOUT ANY WARRANTY; without even the implied warranties of
351+MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
352+PURPOSE. See the GNU General Public License for more details.
353+
354+You should have received a copy of the GNU General Public License along
355+with this program. If not, see <http://www.gnu.org/licenses/>.
356+*/
357+
358+using Dbusmenu;
359+using DbusmenuPlaylists;
360+using Gee;
361+
362+public class PlaylistsMenuitem : PlayerItem
363+{
364+ private HashMap<int, PlaylistDetails?> current_playlists;
365+ public Menuitem root_item;
366+ public PlaylistsMenuitem ( PlayerController parent )
367+ {
368+ Object ( item_type: MENUITEM_TYPE, owner: parent );
369+ }
370+ construct{
371+ this.current_playlists = new HashMap<int, PlaylistDetails?>();
372+ this.root_item = new Menuitem();
373+ this.root_item.property_set ( MENUITEM_PROP_LABEL, "Choose Playlist" );
374+ }
375+
376+ public new void update (PlaylistDetails[] playlists)
377+ {
378+ foreach ( PlaylistDetails detail in playlists ){
379+ if (this.already_observed(detail)) continue;
380+ Dbusmenu.Menuitem menuitem = new Menuitem();
381+ menuitem.property_set (MENUITEM_PROP_LABEL, detail.name);
382+ menuitem.property_set (MENUITEM_PROP_ICON_NAME, "source-smart-playlist");
383+ menuitem.property_set_bool (MENUITEM_PROP_VISIBLE, true);
384+ menuitem.property_set_bool (MENUITEM_PROP_ENABLED, true);
385+ this.current_playlists.set( menuitem.id, detail );
386+ menuitem.item_activated.connect(() => {
387+ submenu_item_activated (menuitem.id );});
388+ this.root_item.child_append( menuitem );
389+ }
390+ }
391+
392+ private bool already_observed (PlaylistDetails new_detail)
393+ {
394+ foreach ( PlaylistDetails detail in this.current_playlists.values ){
395+ if (new_detail.path == detail.path) return true;
396+ }
397+ return false;
398+ }
399+
400+ public void update_active_playlist(PlaylistDetails detail)
401+ {
402+ var update = detail.name;
403+ if ( update == "" ) update = "Choose Playlist";
404+ this.root_item.property_set ( MENUITEM_PROP_LABEL, update );
405+ }
406+
407+ private void submenu_item_activated (int menu_item_id)
408+ {
409+ if(!this.current_playlists.has_key(menu_item_id)){
410+ warning( "item %i was activated but we don't have a corresponding playlist",
411+ menu_item_id );
412+ return;
413+ }
414+ this.owner.mpris_bridge.activate_playlist ( this.current_playlists[menu_item_id].path );
415+ }
416+
417+ public static HashSet<string> attributes_format()
418+ {
419+ HashSet<string> attrs = new HashSet<string>();
420+ attrs.add(MENUITEM_TITLE);
421+ attrs.add(MENUITEM_PLAYLISTS);
422+ return attrs;
423+ }
424+
425+}
426
427=== removed file 'vapi/Indicate-0.2.vapi'
428--- vapi/Indicate-0.2.vapi 2010-06-24 16:24:29 +0000
429+++ vapi/Indicate-0.2.vapi 1970-01-01 00:00:00 +0000
430@@ -1,218 +0,0 @@
431-/* Indicate-0.2.vapi generated by vapigen, do not modify. */
432-
433-[CCode (cprefix = "Indicate", lower_case_cprefix = "indicate_")]
434-namespace Indicate {
435- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
436- public class Indicator : GLib.Object {
437- public weak GLib.Object parent;
438- [CCode (has_construct_function = false)]
439- public Indicator ();
440- public bool get_displayed ();
441- public uint get_id ();
442- public virtual GLib.Value get_property (string key);
443- public GLib.Value get_property_value (string key);
444- public Indicate.Server get_server ();
445- public bool is_visible ();
446- public string[] list_properties ();
447- public void set_displayed (bool displayed);
448- public virtual void set_property (string key, GLib.Value data);
449- public void set_property_bool (string key, bool value);
450- public void set_property_int (string key, int value);
451- public void set_property_time (string key, GLib.TimeVal time);
452- public void set_property_value (string key, GLib.Value value);
453- public void set_server (Indicate.Server server);
454- [CCode (has_construct_function = false)]
455- public Indicator.with_server (Indicate.Server server);
456- public signal void displayed (bool object);
457- [HasEmitter]
458- public signal void hide ();
459- public signal void modified (string object);
460- [HasEmitter]
461- public signal void show ();
462- [HasEmitter]
463- public signal void user_display (uint object);
464- }
465- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
466- public class Listener : GLib.Object {
467- public weak GLib.Object parent;
468- [CCode (has_construct_function = false)]
469- public Listener ();
470- public void display (Indicate.ListenerServer server, Indicate.ListenerIndicator indicator, uint timestamp);
471- public void displayed (Indicate.ListenerServer server, Indicate.ListenerIndicator indicator, bool displayed);
472- public void get_property (Indicate.ListenerServer server, Indicate.ListenerIndicator indicator, owned string property, [CCode (delegate_target_pos = 0)] Indicate.listener_get_property_cb callback);
473- 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);
474- 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);
475- 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);
476- 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);
477- public static GLib.Type indicator_get_gtype ();
478- public static Indicate.Listener ref_default ();
479- public bool server_check_interest (Indicate.ListenerServer server, Indicate.Interests interest);
480- public void server_get_count (Indicate.ListenerServer server, [CCode (delegate_target_pos = 0)] Indicate.listener_get_server_uint_property_cb callback);
481- public void server_get_desktop (Indicate.ListenerServer server, [CCode (delegate_target_pos = 0)] Indicate.listener_get_server_property_cb callback, void* data);
482- public static GLib.Type server_get_gtype ();
483- public void server_get_menu (Indicate.ListenerServer server, [CCode (delegate_target_pos = 0)] Indicate.listener_get_server_property_cb callback);
484- public static void server_get_type (Indicate.Listener listener, Indicate.ListenerServer server, [CCode (delegate_target_pos = 0)] Indicate.listener_get_server_property_cb callback);
485- public void server_remove_interest (Indicate.ListenerServer server, Indicate.Interests interest);
486- public void server_show_interest (Indicate.ListenerServer server, Indicate.Interests interest);
487- public void set_default_max_indicators (int max);
488- public void set_server_max_indicators (Indicate.ListenerServer server, int max);
489- public signal void indicator_added (Indicate.ListenerServer object, Indicate.ListenerIndicator p0);
490- public signal void indicator_modified (Indicate.ListenerServer object, Indicate.ListenerIndicator p0, string p1);
491- public signal void indicator_removed (Indicate.ListenerServer object, Indicate.ListenerIndicator p0);
492- public signal void indicator_servers_report ();
493- public signal void server_added (Indicate.ListenerServer object, string p0);
494- public signal void server_count_changed (Indicate.ListenerServer object, uint p0);
495- public signal void server_removed (Indicate.ListenerServer object, string p0);
496- }
497- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
498- public class Server : GLib.Object {
499- public weak GLib.Object parent;
500- public void add_indicator (Indicate.Indicator indicator);
501- public virtual bool check_interest (Indicate.Interests interest);
502- public virtual bool get_indicator_count (out uint count) throws GLib.Error;
503- public virtual bool get_indicator_property (uint id, owned string property, GLib.Value value) throws GLib.Error;
504- public int get_max_indicators ();
505- public virtual uint get_next_id ();
506- public void hide ();
507- public virtual void indicator_added (uint id);
508- public virtual bool indicator_displayed (owned string sender, uint id, bool displayed) throws GLib.Error;
509- public virtual void indicator_removed (uint id);
510- public virtual int max_indicators_get ();
511- public virtual bool max_indicators_set (owned string sender, int max);
512- public static Indicate.Server ref_default ();
513- public void remove_indicator (Indicate.Indicator indicator);
514- public virtual bool remove_interest (owned string sender, Indicate.Interests interest);
515- public void set_count (uint count);
516- public static void set_dbus_object (string obj);
517- public void set_default ();
518- public void set_desktop_file (string path);
519- public void set_menu (Dbusmenu.Server menu);
520- public void set_type (string type);
521- public void show ();
522- public virtual bool show_indicator_to_user (uint id, uint timestamp) throws GLib.Error;
523- public virtual bool show_interest (owned string sender, Indicate.Interests interest);
524- public uint count { get; set; }
525- public string desktop { get; set; }
526- public string type { get; set; }
527- public signal void indicator_delete (uint object);
528- public signal void indicator_modified (uint object, string p0);
529- public signal void indicator_new (uint object);
530- public signal void interest_added (uint object);
531- public signal void interest_removed (uint object);
532- public signal void max_indicators_changed (int object);
533- public signal void server_count_changed (uint object);
534- public signal void server_display (uint object);
535- public signal void server_hide (string object);
536- public signal void server_show (string object);
537- }
538- [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")]
539- public struct ListenerIndicator {
540- public uint get_id ();
541- }
542- [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")]
543- public struct ListenerServer {
544- public unowned string get_dbusname ();
545- }
546- [CCode (cprefix = "INDICATE_INTEREST_", cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
547- public enum Interests {
548- NONE,
549- SERVER_DISPLAY,
550- SERVER_SIGNAL,
551- INDICATOR_DISPLAY,
552- INDICATOR_SIGNAL,
553- INDICATOR_COUNT,
554- LAST
555- }
556- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h", has_target = false)]
557- public delegate string[] indicator_list_properties_slot_t (Indicate.Indicator indicator);
558- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h", has_target = false)]
559- public delegate void listener_get_property_bool_cb (Indicate.Listener listener, Indicate.ListenerServer server, Indicate.ListenerIndicator indicator, owned string property, bool propertydata, void* data);
560- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h", has_target = false)]
561- public delegate void listener_get_property_cb (Indicate.Listener listener, Indicate.ListenerServer server, Indicate.ListenerIndicator indicator, owned string property, string propertydata, void* data);
562- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h", has_target = false)]
563- public delegate void listener_get_property_int_cb (Indicate.Listener listener, Indicate.ListenerServer server, Indicate.ListenerIndicator indicator, owned string property, int propertydata, void* data);
564- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h", has_target = false)]
565- 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);
566- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h", has_target = false)]
567- 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);
568- [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)]
569- public delegate void listener_get_server_property_cb (Indicate.Listener listener, Indicate.ListenerServer server, owned string value, void* data);
570- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h", has_target = false)]
571- public delegate void listener_get_server_uint_property_cb (Indicate.Listener listener, Indicate.ListenerServer server, uint value, void* data);
572- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h", has_target = false)]
573- public delegate bool server_get_indicator_list_slot_t (Indicate.Server server, out unowned Indicate.Indicator[] indicators);
574- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h", has_target = false)]
575- public delegate bool server_get_indicator_properties_slot_t (Indicate.Server server, uint id, out string[] properties);
576- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h", has_target = false)]
577- public delegate bool server_get_indicator_property_group_slot_t (Indicate.Server server, uint id, string[] properties, out string[] value);
578- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
579- public const int INDICATOR_H_INCLUDED__;
580- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
581- public const int INDICATOR_MESSAGES_H_INCLUDED__;
582- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
583- public const string INDICATOR_MESSAGES_PROP_ATTENTION;
584- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
585- public const string INDICATOR_MESSAGES_PROP_COUNT;
586- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
587- public const string INDICATOR_MESSAGES_PROP_ICON;
588- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
589- public const string INDICATOR_MESSAGES_PROP_NAME;
590- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
591- public const string INDICATOR_MESSAGES_PROP_TIME;
592- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
593- public const string INDICATOR_MESSAGES_SERVER_TYPE;
594- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
595- public const string INDICATOR_SIGNAL_DISPLAY;
596- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
597- public const string INDICATOR_SIGNAL_DISPLAYED;
598- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
599- public const string INDICATOR_SIGNAL_HIDE;
600- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
601- public const string INDICATOR_SIGNAL_MODIFIED;
602- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
603- public const string INDICATOR_SIGNAL_SHOW;
604- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
605- public const string INDICATOR_VALUE_FALSE;
606- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
607- public const string INDICATOR_VALUE_TRUE;
608- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
609- public const int INTERESTS_H_INCLUDED__;
610- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
611- public const int LISTENER_H_INCLUDED__;
612- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
613- public const string LISTENER_SIGNAL_INDICATOR_ADDED;
614- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
615- public const string LISTENER_SIGNAL_INDICATOR_MODIFIED;
616- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
617- public const string LISTENER_SIGNAL_INDICATOR_REMOVED;
618- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
619- public const string LISTENER_SIGNAL_SERVER_ADDED;
620- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
621- public const string LISTENER_SIGNAL_SERVER_COUNT_CHANGED;
622- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
623- public const string LISTENER_SIGNAL_SERVER_REMOVED;
624- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
625- public const int SERVER_H_INCLUDED__;
626- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
627- public const int SERVER_INDICATOR_NULL;
628- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
629- public const string SERVER_SIGNAL_INDICATOR_ADDED;
630- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
631- public const string SERVER_SIGNAL_INDICATOR_MODIFIED;
632- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
633- public const string SERVER_SIGNAL_INDICATOR_REMOVED;
634- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
635- public const string SERVER_SIGNAL_INTEREST_ADDED;
636- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
637- public const string SERVER_SIGNAL_INTEREST_REMOVED;
638- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
639- public const string SERVER_SIGNAL_MAX_INDICATORS_CHANGED;
640- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
641- public const string SERVER_SIGNAL_SERVER_COUNT_CHANGED;
642- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
643- public const string SERVER_SIGNAL_SERVER_DISPLAY;
644- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
645- public const string SERVER_SIGNAL_SERVER_HIDE;
646- [CCode (cheader_filename = "libindicate/./indicator-messages.h,libindicate/./indicator.h,libindicate/./interests.h,libindicate/./listener.h,libindicate/./server.h")]
647- public const string SERVER_SIGNAL_SERVER_SHOW;
648-}
649
650=== modified file 'vapi/common-defs.vapi'
651--- vapi/common-defs.vapi 2010-10-15 12:59:45 +0000
652+++ vapi/common-defs.vapi 2010-12-21 15:00:51 +0000
653@@ -19,31 +19,38 @@
654
655 [CCode (cheader_filename = "common-defs.h")]
656 namespace DbusmenuMetadata{
657- public const string MENUITEM_TYPE;
658- public const string MENUITEM_ARTIST;
659- public const string MENUITEM_TITLE;
660- public const string MENUITEM_ALBUM;
661- public const string MENUITEM_ARTURL;
662+ public const string MENUITEM_TYPE;
663+ public const string MENUITEM_ARTIST;
664+ public const string MENUITEM_TITLE;
665+ public const string MENUITEM_ALBUM;
666+ public const string MENUITEM_ARTURL;
667 }
668
669 [CCode (cheader_filename = "common-defs.h")]
670 namespace DbusmenuTransport{
671- public const string MENUITEM_TYPE;
672- public const string MENUITEM_PLAY_STATE;
673+ public const string MENUITEM_TYPE;
674+ public const string MENUITEM_PLAY_STATE;
675 }
676
677 [CCode (cheader_filename = "common-defs.h")]
678 namespace DbusmenuTitle{
679- public const string MENUITEM_TYPE;
680- public const string MENUITEM_NAME;
681- public const string MENUITEM_ICON;
682- public const string MENUITEM_RUNNING;
683+ public const string MENUITEM_TYPE;
684+ public const string MENUITEM_NAME;
685+ public const string MENUITEM_ICON;
686+ public const string MENUITEM_RUNNING;
687 }
688
689 [CCode (cheader_filename = "common-defs.h")]
690 namespace DbusmenuScrub{
691- public const string MENUITEM_TYPE;
692- public const string MENUITEM_POSITION;
693- public const string MENUITEM_DURATION;
694- public const string MENUITEM_PLAY_STATE;
695+ public const string MENUITEM_TYPE;
696+ public const string MENUITEM_POSITION;
697+ public const string MENUITEM_DURATION;
698+ public const string MENUITEM_PLAY_STATE;
699+}
700+
701+[CCode (cheader_filename = "common-defs.h")]
702+namespace DbusmenuPlaylists{
703+ public const string MENUITEM_TYPE;
704+ public const string MENUITEM_TITLE;
705+ public const string MENUITEM_PLAYLISTS;
706 }
707\ No newline at end of file

Subscribers

People subscribed via source and target branches