diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2013-08-10 04:26:27 +0000 |
---|---|---|
committer | Tarmac <> | 2013-08-10 04:26:27 +0000 |
commit | f28653eb1a4a310987fffc44334b93da3f547d41 (patch) | |
tree | 82a72bfbb7eeca76766d73ae20f1152c5b8392c3 /vapi | |
parent | 0391025f72e9e5fed972b40e63087635d50c9234 (diff) | |
parent | a0616908a817d6fad47c29ae703fc8a2ea379af6 (diff) | |
download | ayatana-indicator-bluetooth-f28653eb1a4a310987fffc44334b93da3f547d41.tar.gz ayatana-indicator-bluetooth-f28653eb1a4a310987fffc44334b93da3f547d41.tar.bz2 ayatana-indicator-bluetooth-f28653eb1a4a310987fffc44334b93da3f547d41.zip |
Add phone profile. Export menus & actions using gio. Drops the gtk, dbusmenu, and libindicator build dependencies. Drops runtime dependency on gnome-blueooth in the phone profile.
Approved by Ted Gould, PS Jenkins bot, Mathieu Trudel-Lapierre.
Diffstat (limited to 'vapi')
-rw-r--r-- | vapi/config.vapi | 8 | ||||
-rw-r--r-- | vapi/gnome-bluetooth-1.0.vapi | 82 | ||||
-rw-r--r-- | vapi/rfkill.vapi | 44 |
3 files changed, 134 insertions, 0 deletions
diff --git a/vapi/config.vapi b/vapi/config.vapi new file mode 100644 index 0000000..15c4c88 --- /dev/null +++ b/vapi/config.vapi @@ -0,0 +1,8 @@ +[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "../config.h")] +namespace Config { + public const string GETTEXT_PACKAGE; + public const string GNOMELOCALEDIR; + public const string PKGDATADIR; + public const string PACKAGE_NAME; + public const string PACKAGE_VERSION; +} diff --git a/vapi/gnome-bluetooth-1.0.vapi b/vapi/gnome-bluetooth-1.0.vapi new file mode 100644 index 0000000..6d6aa09 --- /dev/null +++ b/vapi/gnome-bluetooth-1.0.vapi @@ -0,0 +1,82 @@ +[CCode (cprefix = "Bluetooth", lower_case_cprefix = "bluetooth_")] +namespace GnomeBluetooth +{ + +[CCode (cheader_filename = "bluetooth-client.h")] +public class Client : GLib.Object +{ + public Client (); + public Gtk.TreeModel model { get; } + public Gtk.TreeModel adapter_model { get; } + public Gtk.TreeModel device_model { get; } + [CCode (finish_function = "bluetooth_client_connect_service_finish")] + public async bool connect_service (string device, bool connect, GLib.Cancellable? cancellable = null) throws GLib.Error; +} + +[CCode (cheader_filename = "bluetooth-enums.h", cprefix = "BLUETOOTH_COLUMN_")] +public enum Column +{ + PROXY, + ADDRESS, + ALIAS, + NAME, + TYPE, + ICON, + DEFAULT, + PAIRED, + TRUSTED, + CONNECTED, + DISCOVERABLE, + DISCOVERING, + LEGACYPAIRING, + POWERED, + SERVICES, + UUIDS +} + +[CCode (cheader_filename = "bluetooth-enums.h", cprefix = "BLUETOOTH_TYPE_")] +public enum Type +{ + ANY, + PHONE, + MODEM, + COMPUTER, + NETWORK, + HEADSET, + HEADPHONES, + OTHER_AUDIO, + KEYBOARD, + MOUSE, + CAMERA, + PRINTER, + JOYPAD, + TABLET, + VIDEO +} + +[CCode (cheader_filename = "bluetooth-utils.h")] +public void browse_address (GLib.Object? object, string address, uint timestamp, GLib.AsyncReadyCallback? callback); + +[CCode (cheader_filename = "bluetooth-utils.h")] +public void send_to_address (string address, string alias); + +[CCode (cheader_filename = "bluetooth-killswitch.h", cprefix = "BLUETOOTH_KILLSWITCH_STATE_")] +public enum KillswitchState +{ + NO_ADAPTER, + SOFT_BLOCKED, + UNBLOCKED, + HARD_BLOCKED +} + +[CCode (cheader_filename = "bluetooth-killswitch.h")] +public class Killswitch : GLib.Object +{ + public Killswitch (); + public signal void state_changed (KillswitchState state); + public bool has_killswitches (); + public KillswitchState state { get; set; } + public unowned string state_to_string (); +} + +} diff --git a/vapi/rfkill.vapi b/vapi/rfkill.vapi new file mode 100644 index 0000000..7bfd16d --- /dev/null +++ b/vapi/rfkill.vapi @@ -0,0 +1,44 @@ +// (C) Michael 'Mickey' Lauer <mickey@vanille-media.de> +// LGPL2 +// scheduled for inclusion in linux.vapi + +namespace Linux +{ + /* + * RfKill + */ + [CCode (cname = "struct rfkill_event", cheader_filename = "linux/rfkill.h")] + public struct RfKillEvent { + public uint32 idx; + public RfKillType type; + public RfKillOp op; + public uint8 soft; + public uint8 hard; + } + + [CCode (cname = "guint8", cprefix = "RFKILL_OP_", cheader_filename = "linux/rfkill.h")] + public enum RfKillOp { + ADD, + DEL, + CHANGE, + CHANGE_ALL + } + + [CCode (cname = "guint8", cprefix = "RFKILL_STATE_", cheader_filename = "linux/rfkill.h")] + public enum RfKillState { + SOFT_BLOCKED, + UNBLOCKED, + HARD_BLOCKED + } + + [CCode (cname = "guint8", cprefix = "RFKILL_TYPE_", cheader_filename = "linux/rfkill.h")] + public enum RfKillType { + ALL, + WLAN, + BLUETOOTH, + UWB, + WIMAX, + WWAN + } + +} /* namespace Linux */ |