Merge lp:~robert-ancell/indicator-bluetooth/bluez5 into lp:indicator-bluetooth/15.04

Proposed by Robert Ancell
Status: Merged
Approved by: Sebastien Bacher
Approved revision: 89
Merged at revision: 88
Proposed branch: lp:~robert-ancell/indicator-bluetooth/bluez5
Merge into: lp:indicator-bluetooth/15.04
Diff against target: 952 lines (+192/-561)
6 files modified
debian/control (+1/-1)
po/POTFILES.in (+0/-1)
src/Makefile.am (+0/-1)
src/bluez.vala (+191/-253)
src/desktop.vala (+0/-12)
src/org-bluez.vala (+0/-293)
To merge this branch: bzr merge lp:~robert-ancell/indicator-bluetooth/bluez5
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Mathieu Trudel-Lapierre Approve
Didier Roche-Tolomelli Approve
Review via email: mp+244375@code.launchpad.net

Commit message

Support Bluez 5

When enabling/disabling and setting discoverability we now do this for all
adapters.

This requires us to remove the "Set Up New Device" item since gnome-bluetooth no
longer has a bluetooth wizard stand alone application. Instead we rely on the
unity-control-center panel for device setup.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

Code looks good to me. I would prefer another review though (like from Mathieu) as my bluetooth is quite flaky and it only worked once (but it was already the case with bluez4).

Maybe you can as well package it and push to the ppa as ~ppa1 so that we can get broader testing?
Thanks!

review: Approve
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Looks good to me; but I agree it would be best to package it and make it available in the transitions PPA for further testing.

review: Approve
Revision history for this message
Robert Ancell (robert-ancell) wrote :

This is already in the transitions PPA as indicator-bluetooth 0.0.6+14.10.20141006-0ubuntu1+bluezfive

Revision history for this message
Charles Kerr (charlesk) wrote :

The code changes look reasonable and the transitions build of indicator-bluetooth works for me when I test it on a fresh installation of the March 6 Vivid iso. In that setup, both the on/off and visible/invisible toggles work as advertised.

Some problems:

* On desktop, "Set Up New Device..." is a feature specified in https://wiki.ubuntu.com/Bluetooth#Indicator_and_menu but is removed here. Can it be salvaged?

* After installing [bluez, indicator-bluetooth, libbluetooth3] on mako running vivid r136. The indicator's bluetooth on/off toggle had no effect. (This might be user error; I don't know if this PPA is supposed to work on the phone...)

* The transitions repository doesn't have unity-control-center in it, so I don't know how far we are for landing this in Vivid?

* The visible/invisible toggle in gnome-control-center didn't show the same state as the indicator. The indicator seemed to hold the correct state.

Revision history for this message
Amr Ibrahim (amribrahim1987) wrote :

Any news for packaging this for wily? I think bluez 5 needs broad testing in 15.10 before 16.04 LTS.

89. By Robert Ancell

Remove unused argument in DBus interface

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2014-01-14 04:39:09 +0000
3+++ debian/control 2015-08-07 02:52:49 +0000
4@@ -21,7 +21,7 @@
5 Architecture: any
6 Depends: ${misc:Depends},
7 ${shlibs:Depends},
8- bluez (>= 4.36),
9+ bluez (>= 5),
10 unity-control-center | gnome-control-center | ubuntu-system-settings,
11 gnome-bluetooth | ubuntu-system-settings,
12 Replaces: gnome-bluetooth (<< 3.6.1-0ubuntu2)
13
14=== modified file 'po/POTFILES.in'
15--- po/POTFILES.in 2013-10-01 11:06:27 +0000
16+++ po/POTFILES.in 2015-08-07 02:52:49 +0000
17@@ -8,7 +8,6 @@
18 src/device.vala
19 src/killswitch.vala
20 src/main.vala
21-src/org-bluez.vala
22 src/phone.vala
23 src/profile.vala
24 src/service.vala
25
26=== modified file 'src/Makefile.am'
27--- src/Makefile.am 2013-09-25 20:06:30 +0000
28+++ src/Makefile.am 2015-08-07 02:52:49 +0000
29@@ -1,7 +1,6 @@
30 pkglibexec_PROGRAMS = indicator-bluetooth-service
31
32 indicator_bluetooth_service_SOURCES = \
33- org-bluez.vala \
34 bluetooth.vala \
35 bluez.vala \
36 desktop.vala \
37
38=== modified file 'src/bluez.vala'
39--- src/bluez.vala 2014-09-22 13:54:50 +0000
40+++ src/bluez.vala 2015-08-07 02:52:49 +0000
41@@ -25,8 +25,7 @@
42 public class Bluez: Bluetooth, Object
43 {
44 uint next_device_id = 1;
45- org.bluez.Manager manager;
46- org.bluez.Adapter default_adapter;
47+ ObjectManager manager;
48
49 private bool _powered = false;
50
51@@ -37,21 +36,22 @@
52
53 private KillSwitch killswitch = new RfKillSwitch ();
54
55- private string adapter_path = null;
56-
57 private DBusConnection bus = null;
58
59- /* maps an org.bluez.Device's object_path to the org.bluez.Device proxy */
60- HashTable<string,org.bluez.Device> path_to_proxy;
61-
62- /* maps an org.bluez.Device's object_path to our arbitrary unique id */
63- HashTable<string,uint> path_to_id;
64+ /* maps an org.bluez.Adapter1's object_path to the BluezAdapter proxy */
65+ private HashTable<ObjectPath,BluezAdapter> path_to_adapter_proxy;
66+
67+ /* maps an org.bluez.Device1's object_path to the BluezDevice proxy */
68+ private HashTable<ObjectPath,BluezDevice> path_to_device_proxy;
69+
70+ /* maps an org.bluez.Device1's object_path to our arbitrary unique id */
71+ private HashTable<ObjectPath,uint> path_to_id;
72
73 /* maps our arbitrary unique id to an org.bluez.Device's object path */
74- HashTable<uint,string> id_to_path;
75+ private HashTable<uint,ObjectPath> id_to_path;
76
77 /* maps our arbitrary unique id to a Bluetooth.Device struct for public consumption */
78- HashTable<uint,Device> id_to_device;
79+ private HashTable<uint,Device> id_to_device;
80
81 public Bluez (KillSwitch? killswitch)
82 {
83@@ -71,121 +71,116 @@
84 update_enabled ();
85 }
86
87- id_to_path = new HashTable<uint,string> (direct_hash, direct_equal);
88- id_to_device = new HashTable<uint,Device> (direct_hash, direct_equal);
89- path_to_id = new HashTable<string,uint> (str_hash, str_equal);
90- path_to_proxy = new HashTable<string,org.bluez.Device> (str_hash, str_equal);
91-
92 reset_manager ();
93 }
94
95 private void reset_manager ()
96 {
97- string new_adapter_path = null;
98+ id_to_path = new HashTable<uint,ObjectPath> (direct_hash, direct_equal);
99+ id_to_device = new HashTable<uint,Device> (direct_hash, direct_equal);
100+ path_to_id = new HashTable<ObjectPath,uint> (str_hash, str_equal);
101+ path_to_adapter_proxy = new HashTable<ObjectPath,BluezAdapter> (str_hash, str_equal);
102+ path_to_device_proxy = new HashTable<ObjectPath,BluezDevice> (str_hash, str_equal);
103+
104 try
105 {
106 manager = bus.get_proxy_sync ("org.bluez", "/");
107
108- // if the default adapter changes, update our connections
109- manager.default_adapter_changed.connect ((object_path)
110- => on_default_adapter_changed (object_path));
111-
112- // if the current adapter disappears, call clear_adapter()
113- manager.adapter_removed.connect ((object_path) => {
114- if (object_path == adapter_path)
115- clear_adapter ();
116- });
117-
118- // get the current default adapter & watch for future default adapters
119- new_adapter_path = manager.default_adapter ();
120+ // Find the adapters and watch for changes
121+ manager.interfaces_added.connect ((object_path, interfaces_and_properties) => {
122+ var iter = HashTableIter<string, HashTable<string, Variant>> (interfaces_and_properties);
123+ string name;
124+ while (iter.next (out name, null))
125+ {
126+ if (name == "org.bluez.Adapter1")
127+ update_adapter (object_path);
128+ if (name == "org.bluez.Device1")
129+ update_device (object_path);
130+ }
131+ });
132+ manager.interfaces_removed.connect ((object_path, interfaces) => {
133+ foreach (var interface in interfaces) {
134+ if (interface == "org.bluez.Adapter1")
135+ adapter_removed (object_path);
136+ if (interface == "org.bluez.Device1")
137+ device_removed (object_path);
138+ }
139+ });
140+ var objects = manager.get_managed_objects ();
141+ var object_iter = HashTableIter<ObjectPath, HashTable<string, HashTable<string, Variant>>> (objects);
142+ ObjectPath object_path;
143+ HashTable<string, HashTable<string, Variant>> interfaces_and_properties;
144+ while (object_iter.next (out object_path, out interfaces_and_properties))
145+ {
146+ var iter = HashTableIter<string, HashTable<string, Variant>> (interfaces_and_properties);
147+ string name;
148+ while (iter.next (out name, null)) {
149+ if (name == "org.bluez.Adapter1")
150+ update_adapter (object_path);
151+ if (name == "org.bluez.Device1")
152+ update_device (object_path);
153+ }
154+ }
155 }
156 catch (Error e)
157 {
158 critical (@"$(e.message)");
159 }
160-
161- on_default_adapter_changed (new_adapter_path);
162- }
163-
164- private void clear_adapter ()
165- {
166- if (adapter_path != null)
167- debug (@"clearing adapter; was using $adapter_path");
168-
169- path_to_proxy.remove_all ();
170- path_to_id.remove_all ();
171- id_to_path.remove_all ();
172- id_to_device.remove_all ();
173-
174- default_adapter = null;
175- adapter_path = null;
176-
177- discoverable = false;
178- powered = false;
179- }
180-
181- void on_default_adapter_changed (string? object_path)
182- {
183- clear_adapter ();
184-
185- if (object_path != null) try
186- {
187- adapter_path = object_path;
188- default_adapter = Bus.get_proxy_sync (BusType.SYSTEM,
189- "org.bluez",
190- adapter_path);
191-
192- default_adapter.property_changed.connect (()
193- => on_default_adapter_properties_changed ());
194-
195- default_adapter.device_removed.connect ((adapter, path) => {
196- var id = path_to_id.lookup (path);
197- path_to_id.remove (path);
198- id_to_path.remove (id);
199- id_to_device.remove (id);
200- devices_changed ();
201- });
202-
203- default_adapter.device_created.connect ((adapter, path)
204- => add_device (path));
205-
206- foreach (var device_path in default_adapter.list_devices ())
207- add_device (device_path);
208- }
209- catch (Error e)
210- {
211- critical (@"$(e.message)");
212- }
213-
214- supported = object_path != null;
215-
216- on_default_adapter_properties_changed ();
217- }
218-
219- /* When the default adapter's properties change,
220- update our own properties "powered" and "discoverable" */
221- private void on_default_adapter_properties_changed ()
222- {
223- bool is_discoverable = false;
224- bool is_powered = false;
225-
226- if (default_adapter != null) try
227- {
228- var properties = default_adapter.get_properties ();
229-
230- var v = properties.lookup ("Discoverable");
231- is_discoverable = (v != null) && v.get_boolean ();
232-
233- v = properties.lookup ("Powered");
234- is_powered = (v != null) && v.get_boolean ();
235- }
236- catch (Error e)
237- {
238- critical (@"$(e.message)");
239- }
240-
241+ }
242+
243+ ////
244+ //// Adapter Upkeep
245+ ////
246+
247+ private void update_adapter (ObjectPath object_path)
248+ {
249+ // Create a proxy if we don't have one
250+ var adapter_proxy = path_to_adapter_proxy.lookup (object_path);
251+ if (adapter_proxy == null)
252+ {
253+ try {
254+ adapter_proxy = bus.get_proxy_sync ("org.bluez", object_path);
255+ } catch (Error e) {
256+ critical (@"$(e.message)");
257+ return;
258+ }
259+ path_to_adapter_proxy.insert (object_path, adapter_proxy);
260+ adapter_proxy.g_properties_changed.connect(() => update_adapter (object_path));
261+ }
262+
263+ update_combined_adapter_state ();
264+ }
265+
266+ private void adapter_removed (ObjectPath object_path)
267+ {
268+ path_to_adapter_proxy.remove (object_path);
269+ update_combined_adapter_state ();
270+ }
271+
272+ private void update_combined_adapter_state ()
273+ {
274+ var is_discoverable = false;
275+ var is_powered = false;
276+ var is_supported = false;
277+
278+ var iter = HashTableIter<ObjectPath,BluezAdapter> (path_to_adapter_proxy);
279+ BluezAdapter adapter_proxy;
280+ while (iter.next (null, out adapter_proxy))
281+ {
282+ var v = adapter_proxy.get_cached_property ("Discoverable");
283+ if (!is_discoverable)
284+ is_discoverable = (v != null) && v.get_boolean ();
285+
286+ v = adapter_proxy.get_cached_property ("Powered");
287+ if (!is_powered)
288+ is_powered = (v != null) && v.get_boolean ();
289+
290+ is_supported = true;
291+ }
292+
293+ discoverable = is_discoverable;
294 powered = is_powered;
295- discoverable = is_discoverable;
296+ supported = is_supported;
297 }
298
299 ////
300@@ -226,138 +221,34 @@
301 }
302
303 ////
304- //// Connectable Interfaces
305- ////
306-
307- /* Headsets, Audio Sinks, and Input devices are connectable.
308- *
309- * This continues the behavior of the old gnome-bluetooth indicator.
310- * But are there other interfaces we care about? */
311- private DBusInterfaceInfo[] get_connectable_interfaces (DBusProxy device)
312- {
313- DBusInterfaceInfo[] connectable_interfaces = {};
314-
315- try
316- {
317- var iname = "org.freedesktop.DBus.Introspectable.Introspect";
318- var intro = device.call_sync (iname, null, DBusCallFlags.NONE, -1);
319-
320- if ((intro != null) && (intro.n_children() > 0))
321- {
322- var xml = intro.get_child_value(0).get_string();
323- var info = new DBusNodeInfo.for_xml (xml);
324- if (info != null)
325- {
326- foreach (var i in info.interfaces)
327- {
328- if ((i.name == "org.bluez.AudioSink") ||
329- (i.name == "org.bluez.Headset") ||
330- (i.name == "org.bluez.Input"))
331- {
332- connectable_interfaces += i;
333- }
334- }
335- }
336- }
337- }
338- catch (Error e)
339- {
340- critical (@"$(e.message)");
341- }
342-
343- return connectable_interfaces;
344- }
345-
346- private bool device_is_connectable (DBusProxy device)
347- {
348- return get_connectable_interfaces (device).length > 0;
349- }
350-
351- // call "Connect" on the specified interface
352- private void device_connect_on_interface (DBusProxy proxy,
353- string interface_name)
354- {
355- var object_path = proxy.get_object_path ();
356-
357- debug (@"trying to connect to $object_path: $(interface_name)");
358-
359- try
360- {
361- bus.call_sync ("org.bluez", object_path, interface_name,
362- "Connect", null, null, DBusCallFlags.NONE, -1);
363- }
364- catch (Error e)
365- {
366- debug (@"$object_path $interface_name.Connect() failed: $(e.message)");
367- }
368- }
369-
370- private void device_connect (org.bluez.Device device)
371- {
372- DBusProxy proxy = device as DBusProxy;
373-
374- // call "Connect" on all the interfaces that support it
375- foreach (var i in get_connectable_interfaces (proxy))
376- device_connect_on_interface (proxy, i.name);
377- }
378-
379- private void device_disconnect (org.bluez.Device device)
380- {
381- try
382- {
383- device.disconnect ();
384- }
385- catch (Error e)
386- {
387- var object_path = (device as DBusProxy).get_object_path ();
388- critical (@"Unable to disconnect $object_path: $(e.message)");
389- }
390- }
391-
392- ////
393 //// Device Upkeep
394 ////
395
396- private void add_device (string object_path)
397- {
398- if (!path_to_proxy.contains (object_path))
399- {
400- try
401- {
402- org.bluez.Device device = Bus.get_proxy_sync (BusType.SYSTEM,
403- "org.bluez",
404- object_path);
405- path_to_proxy.insert (object_path, device);
406- device.property_changed.connect(() => update_device (device));
407- update_device (device);
408- }
409- catch (Error e)
410- {
411- critical (@"$(e.message)");
412- }
413- }
414- }
415-
416 /* Update our public Device struct from the org.bluez.Device's properties.
417 *
418 * This is called when we first walk through bluez' Devices on startup,
419 * when the org.bluez.Adapter gets a new device,
420 * and when a device's properties change s.t. we need to rebuild the proxy.
421 */
422- private void update_device (org.bluez.Device device_proxy)
423+ private void update_device (ObjectPath object_path)
424 {
425- HashTable<string, GLib.Variant> properties;
426+ // Create a proxy if we don't have one
427+ var device_proxy = path_to_device_proxy.lookup (object_path);
428+ if (device_proxy == null)
429+ {
430+ try {
431+ device_proxy = bus.get_proxy_sync ("org.bluez", object_path);
432+ } catch (Error e) {
433+ critical (@"$(e.message)");
434+ return;
435+ }
436
437- try {
438- properties = device_proxy.get_properties ();
439- } catch (Error e) {
440- critical (@"$(e.message)");
441- return;
442- }
443+ path_to_device_proxy.insert (object_path, device_proxy);
444+ device_proxy.g_properties_changed.connect(() => update_device (object_path));
445+ }
446
447 // look up our id for this device.
448 // if we don't have one yet, create one.
449- var object_path = (device_proxy as DBusProxy).get_object_path();
450 var id = path_to_id.lookup (object_path);
451 if (id == 0)
452 {
453@@ -368,35 +259,32 @@
454
455 // look up the device's type
456 Device.Type type;
457- var v = properties.lookup ("Class");
458+ var v = device_proxy.get_cached_property ("Class");
459 if (v == null)
460 type = Device.Type.OTHER;
461 else
462 type = Device.class_to_device_type (v.get_uint32());
463
464 // look up the device's human-readable name
465- v = properties.lookup ("Alias");
466+ v = device_proxy.get_cached_property ("Alias");
467 if (v == null)
468- v = properties.lookup ("Name");
469+ v = device_proxy.get_cached_property ("Name");
470 var name = v == null ? _("Unknown") : v.get_string ();
471
472 // look up the device's bus address
473- v = properties.lookup ("Address");
474+ v = device_proxy.get_cached_property ("Address");
475 var address = v.get_string ();
476
477 // look up the device's bus address
478- v = properties.lookup ("Icon");
479+ v = device_proxy.get_cached_property ("Icon");
480 var icon = new ThemedIcon (v != null ? v.get_string() : "unknown");
481
482- // derive a Connectable flag for this device
483- var is_connectable = device_is_connectable (device_proxy as DBusProxy);
484-
485 // look up the device's Connected flag
486- v = properties.lookup ("Connected");
487+ v = device_proxy.get_cached_property ("Connected");
488 var is_connected = (v != null) && v.get_boolean ();
489
490 // derive the uuid-related attributes we care about
491- v = properties.lookup ("UUIDs");
492+ v = device_proxy.get_cached_property ("UUIDs");
493 string[] uuid_strings = v.dup_strv ();
494 uint16[] uuids = {};
495 foreach (var s in uuid_strings)
496@@ -404,13 +292,12 @@
497 var supports_browsing = device_supports_browsing (uuids);
498 var supports_file_transfer = device_supports_file_transfer (uuids);
499
500- // update our lookup table with these new attributes
501 id_to_device.insert (id, new Device (id,
502 type,
503 name,
504 address,
505 icon,
506- is_connectable,
507+ true,
508 is_connected,
509 supports_browsing,
510 supports_file_transfer));
511@@ -419,6 +306,16 @@
512 update_connected ();
513 }
514
515+ private void device_removed (ObjectPath path)
516+ {
517+ var id = path_to_id.lookup (path);
518+ path_to_id.remove (path);
519+ id_to_path.remove (id);
520+ id_to_device.remove (id);
521+
522+ devices_changed ();
523+ }
524+
525 /* update the 'enabled' property by looking at the killswitch state
526 and the 'powered' property state */
527 void update_enabled ()
528@@ -452,16 +349,22 @@
529 {
530 var device = id_to_device.lookup (id);
531 var path = id_to_path.lookup (id);
532- var proxy = (path != null) ? path_to_proxy.lookup (path) : null;
533+ var proxy = (path != null) ? path_to_device_proxy.lookup (path) : null;
534
535- if ((proxy != null)
536- && (device != null)
537+ if ((device != null)
538 && (device.is_connected != connected))
539 {
540- if (connected)
541- device_connect (proxy);
542- else
543- device_disconnect (proxy);
544+ try
545+ {
546+ if (connected)
547+ proxy.connect_ ();
548+ else
549+ proxy.disconnect_ ();
550+ }
551+ catch (Error e)
552+ {
553+ debug (@"$path org.bluez.Device1 connect/disconnect failed: $(e.message)");
554+ }
555
556 update_connected ();
557 }
558@@ -471,7 +374,13 @@
559 {
560 if (discoverable != b)
561 {
562- default_adapter.set_property.begin ("Discoverable", new Variant.boolean (b));
563+ var iter = HashTableIter<ObjectPath,BluezAdapter> (path_to_adapter_proxy);
564+ ObjectPath object_path;
565+ BluezAdapter adapter_proxy;
566+ while (iter.next (out object_path, out adapter_proxy))
567+ adapter_proxy.call.begin ("org.freedesktop.DBus.Properties.Set",
568+ new Variant ("(ssv)", "org.bluez.Adapter1", "Discoverable", new Variant.boolean (b)),
569+ DBusCallFlags.NONE, -1);
570 }
571 }
572
573@@ -492,11 +401,40 @@
574 debug (@"setting killswitch blocked to $(!b)");
575 killswitch.try_set_blocked (!b);
576 }
577- else if (default_adapter != null)
578+ else
579 {
580- debug (@"setting bluez Adapter's Powered property to $b");
581- default_adapter.set_property.begin ("Powered", new Variant.boolean (b));
582- powered = b;
583+ var iter = HashTableIter<ObjectPath,BluezAdapter> (path_to_adapter_proxy);
584+ ObjectPath object_path;
585+ BluezAdapter adapter_proxy;
586+ while (iter.next (out object_path, out adapter_proxy))
587+ adapter_proxy.call.begin ("org.freedesktop.DBus.Properties.Set",
588+ new Variant ("(ssv)", "org.bluez.Adapter1", "Powered", new Variant.boolean (b)),
589+ DBusCallFlags.NONE, -1);
590 }
591 }
592 }
593+
594+[DBus (name = "org.freedesktop.DBus.ObjectManager")]
595+private interface ObjectManager : Object {
596+ [DBus (name = "GetManagedObjects")]
597+ public abstract HashTable<ObjectPath, HashTable<string, HashTable<string, Variant>>> get_managed_objects() throws DBusError, IOError;
598+
599+ [DBus (name = "InterfacesAdded")]
600+ public signal void interfaces_added(ObjectPath object_path, HashTable<string, HashTable<string, Variant>> interfaces_and_properties);
601+
602+ [DBus (name = "InterfacesRemoved")]
603+ public signal void interfaces_removed(ObjectPath object_path, string[] interfaces);
604+}
605+
606+[DBus (name = "org.bluez.Adapter1")]
607+private interface BluezAdapter : DBusProxy {
608+}
609+
610+[DBus (name = "org.bluez.Device1")]
611+private interface BluezDevice : DBusProxy {
612+ [DBus (name = "Connect")]
613+ public abstract void connect_() throws DBusError, IOError;
614+
615+ [DBus (name = "Disconnect")]
616+ public abstract void disconnect_() throws DBusError, IOError;
617+}
618
619=== modified file 'src/desktop.vala'
620--- src/desktop.vala 2014-01-21 21:29:37 +0000
621+++ src/desktop.vala 2015-08-07 02:52:49 +0000
622@@ -55,7 +55,6 @@
623 actions += create_supported_action (bluetooth);
624 actions += create_enabled_action (bluetooth);
625 actions += create_discoverable_action (bluetooth);
626- actions += create_wizard_action ();
627 actions += create_browse_files_action ();
628 actions += create_send_file_action ();
629 actions += create_show_settings_action ();
630@@ -198,8 +197,6 @@
631
632 // settings section
633 section = new Menu ();
634- section.append (_("Set Up New Deviceā€¦"),
635- "indicator.desktop-wizard");
636 section.append (_("Bluetooth Settingsā€¦"),
637 "indicator.desktop-show-settings::bluetooth");
638 menu.append_section (null, section);
639@@ -235,15 +232,6 @@
640 return action;
641 }
642
643- Action create_wizard_action ()
644- {
645- var action = new SimpleAction ("desktop-wizard", null);
646-
647- action.activate.connect (()
648- => spawn_command_line_async ("bluetooth-wizard"));
649- return action;
650- }
651-
652 Action create_browse_files_action ()
653 {
654 var action = new SimpleAction ("desktop-browse-files", VariantType.STRING);
655
656=== removed file 'src/org-bluez.vala'
657--- src/org-bluez.vala 2013-10-14 23:33:59 +0000
658+++ src/org-bluez.vala 1970-01-01 00:00:00 +0000
659@@ -1,293 +0,0 @@
660-/* Generated by vala-dbus-binding-tool 0.4.0. Do not modify! */
661-/* Generated with: vala-dbus-binding-tool --gdbus --directory=. */
662-using GLib;
663-
664-namespace org {
665-
666- namespace bluez {
667-
668- [DBus (name = "org.bluez.Manager", timeout = 120000)]
669- public interface Manager : GLib.Object {
670-
671- [DBus (name = "GetProperties")]
672- public abstract GLib.HashTable<string, GLib.Variant> get_properties() throws DBusError, IOError;
673-
674- [DBus (name = "DefaultAdapter")]
675- public abstract GLib.ObjectPath default_adapter() throws DBusError, IOError;
676-
677- [DBus (name = "FindAdapter")]
678- public abstract GLib.ObjectPath find_adapter(string pattern) throws DBusError, IOError;
679-
680- [DBus (name = "ListAdapters")]
681- public abstract GLib.ObjectPath[] list_adapters() throws DBusError, IOError;
682-
683- [DBus (name = "PropertyChanged")]
684- public signal void property_changed(string name, GLib.Variant value);
685-
686- [DBus (name = "AdapterAdded")]
687- public signal void adapter_added(GLib.ObjectPath adapter);
688-
689- [DBus (name = "AdapterRemoved")]
690- public signal void adapter_removed(GLib.ObjectPath adapter);
691-
692- [DBus (name = "DefaultAdapterChanged")]
693- public signal void default_adapter_changed(GLib.ObjectPath adapter);
694- }
695-
696- [DBus (name = "org.bluez.Manager", timeout = 120000)]
697- public interface ManagerSync : GLib.Object {
698-
699- [DBus (name = "GetProperties")]
700- public abstract GLib.HashTable<string, GLib.Variant> get_properties() throws DBusError, IOError;
701-
702- [DBus (name = "DefaultAdapter")]
703- public abstract GLib.ObjectPath default_adapter() throws DBusError, IOError;
704-
705- [DBus (name = "FindAdapter")]
706- public abstract GLib.ObjectPath find_adapter(string pattern) throws DBusError, IOError;
707-
708- [DBus (name = "ListAdapters")]
709- public abstract GLib.ObjectPath[] list_adapters() throws DBusError, IOError;
710-
711- [DBus (name = "PropertyChanged")]
712- public signal void property_changed(string name, GLib.Variant value);
713-
714- [DBus (name = "AdapterAdded")]
715- public signal void adapter_added(GLib.ObjectPath adapter);
716-
717- [DBus (name = "AdapterRemoved")]
718- public signal void adapter_removed(GLib.ObjectPath adapter);
719-
720- [DBus (name = "DefaultAdapterChanged")]
721- public signal void default_adapter_changed(GLib.ObjectPath adapter);
722- }
723-
724- [DBus (name = "org.bluez.Adapter", timeout = 120000)]
725- public interface Adapter : GLib.Object {
726-
727- [DBus (name = "GetProperties")]
728- public abstract GLib.HashTable<string, GLib.Variant> get_properties() throws DBusError, IOError;
729-
730- [DBus (name = "SetProperty")]
731- public abstract async void set_property(string name, GLib.Variant value) throws DBusError, IOError;
732-
733- [DBus (name = "RequestSession")]
734- public abstract void request_session() throws DBusError, IOError;
735-
736- [DBus (name = "ReleaseSession")]
737- public abstract void release_session() throws DBusError, IOError;
738-
739- [DBus (name = "StartDiscovery")]
740- public abstract void start_discovery() throws DBusError, IOError;
741-
742- [DBus (name = "StopDiscovery")]
743- public abstract void stop_discovery() throws DBusError, IOError;
744-
745- [DBus (name = "ListDevices")]
746- public abstract GLib.ObjectPath[] list_devices() throws DBusError, IOError;
747-
748- [DBus (name = "CreateDevice")]
749- public abstract GLib.ObjectPath create_device(string address) throws DBusError, IOError;
750-
751- [DBus (name = "CreatePairedDevice")]
752- public abstract GLib.ObjectPath create_paired_device(string address, GLib.ObjectPath agent, string capability) throws DBusError, IOError;
753-
754- [DBus (name = "CancelDeviceCreation")]
755- public abstract void cancel_device_creation(string address) throws DBusError, IOError;
756-
757- [DBus (name = "RemoveDevice")]
758- public abstract void remove_device(GLib.ObjectPath device) throws DBusError, IOError;
759-
760- [DBus (name = "FindDevice")]
761- public abstract GLib.ObjectPath find_device(string address) throws DBusError, IOError;
762-
763- [DBus (name = "RegisterAgent")]
764- public abstract void register_agent(GLib.ObjectPath agent, string capability) throws DBusError, IOError;
765-
766- [DBus (name = "UnregisterAgent")]
767- public abstract void unregister_agent(GLib.ObjectPath agent) throws DBusError, IOError;
768-
769- [DBus (name = "PropertyChanged")]
770- public signal void property_changed(string name, GLib.Variant value);
771-
772- [DBus (name = "DeviceCreated")]
773- public signal void device_created(GLib.ObjectPath device);
774-
775- [DBus (name = "DeviceRemoved")]
776- public signal void device_removed(GLib.ObjectPath device);
777-
778- [DBus (name = "DeviceFound")]
779- public signal void device_found(string address, GLib.HashTable<string, GLib.Variant> values);
780-
781- [DBus (name = "DeviceDisappeared")]
782- public signal void device_disappeared(string address);
783- }
784-
785- [DBus (name = "org.bluez.Adapter", timeout = 120000)]
786- public interface AdapterSync : GLib.Object {
787-
788- [DBus (name = "GetProperties")]
789- public abstract GLib.HashTable<string, GLib.Variant> get_properties() throws DBusError, IOError;
790-
791- [DBus (name = "SetProperty")]
792- public abstract void set_property(string name, GLib.Variant value) throws DBusError, IOError;
793-
794- [DBus (name = "RequestSession")]
795- public abstract void request_session() throws DBusError, IOError;
796-
797- [DBus (name = "ReleaseSession")]
798- public abstract void release_session() throws DBusError, IOError;
799-
800- [DBus (name = "StartDiscovery")]
801- public abstract void start_discovery() throws DBusError, IOError;
802-
803- [DBus (name = "StopDiscovery")]
804- public abstract void stop_discovery() throws DBusError, IOError;
805-
806- [DBus (name = "ListDevices")]
807- public abstract GLib.ObjectPath[] list_devices() throws DBusError, IOError;
808-
809- [DBus (name = "CreateDevice")]
810- public abstract GLib.ObjectPath create_device(string address) throws DBusError, IOError;
811-
812- [DBus (name = "CreatePairedDevice")]
813- public abstract GLib.ObjectPath create_paired_device(string address, GLib.ObjectPath agent, string capability) throws DBusError, IOError;
814-
815- [DBus (name = "CancelDeviceCreation")]
816- public abstract void cancel_device_creation(string address) throws DBusError, IOError;
817-
818- [DBus (name = "RemoveDevice")]
819- public abstract void remove_device(GLib.ObjectPath device) throws DBusError, IOError;
820-
821- [DBus (name = "FindDevice")]
822- public abstract GLib.ObjectPath find_device(string address) throws DBusError, IOError;
823-
824- [DBus (name = "RegisterAgent")]
825- public abstract void register_agent(GLib.ObjectPath agent, string capability) throws DBusError, IOError;
826-
827- [DBus (name = "UnregisterAgent")]
828- public abstract void unregister_agent(GLib.ObjectPath agent) throws DBusError, IOError;
829-
830- [DBus (name = "PropertyChanged")]
831- public signal void property_changed(string name, GLib.Variant value);
832-
833- [DBus (name = "DeviceCreated")]
834- public signal void device_created(GLib.ObjectPath device);
835-
836- [DBus (name = "DeviceRemoved")]
837- public signal void device_removed(GLib.ObjectPath device);
838-
839- [DBus (name = "DeviceFound")]
840- public signal void device_found(string address, GLib.HashTable<string, GLib.Variant> values);
841-
842- [DBus (name = "DeviceDisappeared")]
843- public signal void device_disappeared(string address);
844- }
845-
846- [DBus (name = "org.bluez.Agent", timeout = 120000)]
847- public interface Agent : GLib.Object {
848-
849- [DBus (name = "Authorize")]
850- public abstract void authorize(GLib.ObjectPath device, string uuid) throws DBusError, IOError;
851-
852- [DBus (name = "RequestPinCode")]
853- public abstract string request_pin_code(GLib.ObjectPath device) throws DBusError, IOError;
854-
855- [DBus (name = "DisplayPasskey")]
856- public abstract void display_passkey(GLib.ObjectPath device, uint passkey) throws DBusError, IOError;
857-
858- [DBus (name = "Release")]
859- public abstract void release() throws DBusError, IOError;
860-
861- [DBus (name = "Cancel")]
862- public abstract void cancel() throws DBusError, IOError;
863-
864- [DBus (name = "RequestConfirmation")]
865- public abstract void request_confirmation(GLib.ObjectPath device, uint passkey) throws DBusError, IOError;
866-
867- [DBus (name = "ConfirmModeChange")]
868- public abstract void confirm_mode_change(string mode) throws DBusError, IOError;
869-
870- [DBus (name = "RequestPasskey")]
871- public abstract uint request_passkey(GLib.ObjectPath device) throws DBusError, IOError;
872- }
873-
874- [DBus (name = "org.bluez.Agent", timeout = 120000)]
875- public interface AgentSync : GLib.Object {
876-
877- [DBus (name = "Authorize")]
878- public abstract void authorize(GLib.ObjectPath device, string uuid) throws DBusError, IOError;
879-
880- [DBus (name = "RequestPinCode")]
881- public abstract string request_pin_code(GLib.ObjectPath device) throws DBusError, IOError;
882-
883- [DBus (name = "DisplayPasskey")]
884- public abstract void display_passkey(GLib.ObjectPath device, uint passkey) throws DBusError, IOError;
885-
886- [DBus (name = "Release")]
887- public abstract void release() throws DBusError, IOError;
888-
889- [DBus (name = "Cancel")]
890- public abstract void cancel() throws DBusError, IOError;
891-
892- [DBus (name = "RequestConfirmation")]
893- public abstract void request_confirmation(GLib.ObjectPath device, uint passkey) throws DBusError, IOError;
894-
895- [DBus (name = "ConfirmModeChange")]
896- public abstract void confirm_mode_change(string mode) throws DBusError, IOError;
897-
898- [DBus (name = "RequestPasskey")]
899- public abstract uint request_passkey(GLib.ObjectPath device) throws DBusError, IOError;
900- }
901-
902- [DBus (name = "org.bluez.Device", timeout = 120000)]
903- public interface Device : GLib.Object {
904-
905- [DBus (name = "GetProperties")]
906- public abstract GLib.HashTable<string, GLib.Variant> get_properties() throws DBusError, IOError;
907-
908- [DBus (name = "SetProperty")]
909- public abstract void set_property(string name, GLib.Variant value) throws DBusError, IOError;
910-
911- [DBus (name = "DiscoverServices")]
912- public abstract GLib.HashTable<uint, string> discover_services(string pattern) throws DBusError, IOError;
913-
914- [DBus (name = "CancelDiscovery")]
915- public abstract void cancel_discovery() throws DBusError, IOError;
916-
917- [DBus (name = "Disconnect")]
918- public abstract void disconnect() throws DBusError, IOError;
919-
920- [DBus (name = "PropertyChanged")]
921- public signal void property_changed(string name, GLib.Variant value);
922-
923- [DBus (name = "DisconnectRequested")]
924- public signal void disconnect_requested();
925- }
926-
927- [DBus (name = "org.bluez.Device", timeout = 120000)]
928- public interface DeviceSync : GLib.Object {
929-
930- [DBus (name = "GetProperties")]
931- public abstract GLib.HashTable<string, GLib.Variant> get_properties() throws DBusError, IOError;
932-
933- [DBus (name = "SetProperty")]
934- public abstract void set_property(string name, GLib.Variant value) throws DBusError, IOError;
935-
936- [DBus (name = "DiscoverServices")]
937- public abstract GLib.HashTable<uint, string> discover_services(string pattern) throws DBusError, IOError;
938-
939- [DBus (name = "CancelDiscovery")]
940- public abstract void cancel_discovery() throws DBusError, IOError;
941-
942- [DBus (name = "Disconnect")]
943- public abstract void disconnect() throws DBusError, IOError;
944-
945- [DBus (name = "PropertyChanged")]
946- public signal void property_changed(string name, GLib.Variant value);
947-
948- [DBus (name = "DisconnectRequested")]
949- public signal void disconnect_requested();
950- }
951- }
952-}

Subscribers

People subscribed via source and target branches