Added vapi for devkit
authorEnrico Zini <enrico@enricozini.org>
Wed, 30 Sep 2009 11:40:46 +0000 (12:40 +0100)
committerEnrico Zini <enrico@enricozini.org>
Wed, 30 Sep 2009 11:40:46 +0000 (12:40 +0100)
src/Makefile.am
src/devkit-power-gobject.vapi [new file with mode: 0644]

index 543ec6845eafdb5ceaf4764dde54639583608065..b6a6c182d22fc244d1ff95ee696f2c4dae107deb 100644 (file)
@@ -47,7 +47,7 @@ zavai_VALASOURCES = \
        app_debug.vala \
        zavai.vala
 
-zavai_VAPIS = linux-input.vapi dbus-extra.vapi
+zavai_VAPIS = linux-input.vapi dbus-extra.vapi devkit-power-gobject.vapi
 
 zavai_SOURCES = \
        zavai.vala.stamp \
diff --git a/src/devkit-power-gobject.vapi b/src/devkit-power-gobject.vapi
new file mode 100644 (file)
index 0000000..80a7a75
--- /dev/null
@@ -0,0 +1,232 @@
+/* devkit-power-gobject.vapi generated by vapigen, do not modify. */
+
+[CCode (cprefix = "Dkp", lower_case_cprefix = "dkp_")]
+namespace Dkp {
+       [CCode (cheader_filename = "devkit-power-gobject.h")]
+       public class Client : GLib.Object {
+               [CCode (has_construct_function = false)]
+               public Client ();
+               public unowned GLib.PtrArray enumerate_devices () throws GLib.Error;
+               [CCode (cname = "dkp_client_can_hibernate")]
+               public bool get_can_hibernate ();
+               [CCode (cname = "dkp_client_can_suspend")]
+               public bool get_can_suspend ();
+               public unowned string get_daemon_version ();
+               [CCode (cname = "dkp_client_lid_is_closed")]
+               public bool get_lid_is_closed ();
+               [CCode (cname = "dkp_client_on_battery")]
+               public bool get_on_battery ();
+               [CCode (cname = "dkp_client_on_low_battery")]
+               public bool get_on_low_battery ();
+               public bool hibernate () throws GLib.Error;
+               public bool suspend () throws GLib.Error;
+               [NoAccessorMethod]
+               public bool can_hibernate { get; }
+               [NoAccessorMethod]
+               public bool can_suspend { get; }
+               public string daemon_version { get; }
+               [NoAccessorMethod]
+               public bool lid_is_closed { get; }
+               [NoAccessorMethod]
+               public bool lid_is_present { get; }
+               [NoAccessorMethod]
+               public bool on_battery { get; }
+               [NoAccessorMethod]
+               public bool on_low_battery { get; }
+               public virtual signal void changed ();
+               public virtual signal void device_added (void* device);
+               public virtual signal void device_changed (void* device);
+               public virtual signal void device_removed (void* device);
+       }
+       [CCode (cheader_filename = "devkit-power-gobject.h")]
+       public class Device : GLib.Object {
+               [CCode (has_construct_function = false)]
+               public Device ();
+               public unowned GLib.PtrArray get_history (string type, uint timespec, uint resolution) throws GLib.Error;
+               public unowned string get_object_path ();
+               public unowned GLib.PtrArray get_statistics (string type) throws GLib.Error;
+               public bool print ();
+               public bool refresh () throws GLib.Error;
+               public bool set_object_path (string object_path) throws GLib.Error;
+               public static Dkp.DeviceState state_from_text (string state);
+               public static unowned string state_to_text (Dkp.DeviceState state_enum);
+               public static Dkp.DeviceTechnology technology_from_text (string technology);
+               public static unowned string technology_to_text (Dkp.DeviceTechnology technology_enum);
+               public static Dkp.DeviceType type_from_text (string type);
+               public static unowned string type_to_text (Dkp.DeviceType type_enum);
+               [NoAccessorMethod]
+               public double capacity { get; set; }
+               [NoAccessorMethod]
+               public double energy { get; set; }
+               [NoAccessorMethod]
+               public double energy_empty { get; set; }
+               [NoAccessorMethod]
+               public double energy_full { get; set; }
+               [NoAccessorMethod]
+               public double energy_full_design { get; set; }
+               [NoAccessorMethod]
+               public double energy_rate { get; set; }
+               [NoAccessorMethod]
+               public bool has_history { get; set; }
+               [NoAccessorMethod]
+               public bool has_statistics { get; set; }
+               [NoAccessorMethod]
+               public bool is_present { get; set; }
+               [NoAccessorMethod]
+               public bool is_rechargeable { get; set; }
+               [NoAccessorMethod]
+               public string model { owned get; set; }
+               [NoAccessorMethod]
+               public string native_path { owned get; set; }
+               [NoAccessorMethod]
+               public bool online { get; set; }
+               [NoAccessorMethod]
+               public double percentage { get; set; }
+               [NoAccessorMethod]
+               public bool power_supply { get; set; }
+               [NoAccessorMethod]
+               public bool recall_notice { get; set; }
+               [NoAccessorMethod]
+               public string recall_url { owned get; set; }
+               [NoAccessorMethod]
+               public string recall_vendor { owned get; set; }
+               [NoAccessorMethod]
+               public string serial { owned get; set; }
+               [NoAccessorMethod]
+               public uint state { get; set; }
+               [NoAccessorMethod]
+               public uint technology { get; set; }
+               [NoAccessorMethod]
+               public int64 time_to_empty { get; set; }
+               [NoAccessorMethod]
+               public int64 time_to_full { get; set; }
+               [NoAccessorMethod]
+               public uint type { get; set; }
+               [NoAccessorMethod]
+               public uint64 update_time { get; set; }
+               [NoAccessorMethod]
+               public string vendor { owned get; set; }
+               [NoAccessorMethod]
+               public double voltage { get; set; }
+               public virtual signal void changed (void* obj);
+       }
+       [Compact]
+       [CCode (copy_function = "dkp_history_obj_copy", cheader_filename = "devkit-power-gobject.h")]
+       public class HistoryObj {
+               public Dkp.DeviceState state;
+               public uint time;
+               public double value;
+               [CCode (has_construct_function = false)]
+               public HistoryObj ();
+               public bool clear ();
+               public unowned Dkp.HistoryObj copy ();
+               public static unowned Dkp.HistoryObj create (double value, Dkp.DeviceState state);
+               public bool equal (Dkp.HistoryObj obj2);
+               public static unowned Dkp.HistoryObj from_string (string text);
+               public bool print ();
+               public unowned string to_string ();
+       }
+       [Compact]
+       [CCode (copy_function = "dkp_qos_obj_copy", cheader_filename = "devkit-power-gobject.h")]
+       public class QosObj {
+               public weak string cmdline;
+               public uint cookie;
+               public bool persistent;
+               public uint pid;
+               public weak string sender;
+               public uint64 timespec;
+               public Dkp.QosType type;
+               public uint uid;
+               public int value;
+               [CCode (has_construct_function = false)]
+               public QosObj ();
+               public unowned Dkp.QosObj copy ();
+               public bool equal (Dkp.QosObj obj2);
+               public bool print ();
+       }
+       [Compact]
+       [CCode (copy_function = "dkp_stats_obj_copy", cheader_filename = "devkit-power-gobject.h")]
+       public class StatsObj {
+               public double accuracy;
+               public double value;
+               [CCode (has_construct_function = false)]
+               public StatsObj ();
+               public unowned Dkp.StatsObj copy ();
+               public static unowned Dkp.StatsObj create (double value, double accuracy);
+               public static unowned Dkp.StatsObj from_string (string text);
+               public unowned string to_string ();
+       }
+       [CCode (cheader_filename = "devkit-power-gobject.h")]
+       public class Wakeups : GLib.Object {
+               [CCode (has_construct_function = false)]
+               public Wakeups ();
+               public unowned GLib.PtrArray get_data () throws GLib.Error;
+               public uint get_total () throws GLib.Error;
+               public bool has_capability ();
+               public virtual signal void data_changed ();
+               public virtual signal void total_changed (uint value);
+       }
+       [Compact]
+       [CCode (copy_function = "dkp_wakeups_obj_copy", cheader_filename = "devkit-power-gobject.h")]
+       public class WakeupsObj {
+               public weak string cmdline;
+               public weak string details;
+               public uint id;
+               public bool is_userspace;
+               public uint old;
+               public float value;
+               [CCode (has_construct_function = false)]
+               public WakeupsObj ();
+               public unowned Dkp.WakeupsObj copy ();
+               public bool equal (Dkp.WakeupsObj obj2);
+               public bool print ();
+       }
+       [CCode (cprefix = "DKP_DEVICE_STATE_", has_type_id = "0", cheader_filename = "devkit-power-gobject.h")]
+       public enum DeviceState {
+               UNKNOWN,
+               CHARGING,
+               DISCHARGING,
+               EMPTY,
+               FULLY_CHARGED,
+               PENDING_CHARGE,
+               PENDING_DISCHARGE,
+               LAST
+       }
+       [CCode (cprefix = "DKP_DEVICE_TECHNOLOGY_", has_type_id = "0", cheader_filename = "devkit-power-gobject.h")]
+       public enum DeviceTechnology {
+               UNKNOWN,
+               LITHIUM_ION,
+               LITHIUM_POLYMER,
+               LITHIUM_IRON_PHOSPHATE,
+               LEAD_ACID,
+               NICKEL_CADMIUM,
+               NICKEL_METAL_HYDRIDE,
+               LAST
+       }
+       [CCode (cprefix = "DKP_DEVICE_TYPE_", has_type_id = "0", cheader_filename = "devkit-power-gobject.h")]
+       public enum DeviceType {
+               UNKNOWN,
+               LINE_POWER,
+               BATTERY,
+               UPS,
+               MONITOR,
+               MOUSE,
+               KEYBOARD,
+               PDA,
+               PHONE,
+               LAST
+       }
+       [CCode (cprefix = "DKP_QOS_TYPE_", has_type_id = "0", cheader_filename = "devkit-power-gobject.h")]
+       public enum QosType {
+               UNKNOWN,
+               NETWORK,
+               CPU_DMA,
+               LAST
+       }
+       [CCode (cheader_filename = "devkit-power-gobject.h")]
+       public const int COMPILE_VERSION;
+       [CCode (cheader_filename = "devkit-power-gobject.h")]
+       public static Dkp.QosType qos_type_from_text (string type);
+       [CCode (cheader_filename = "devkit-power-gobject.h")]
+       public static unowned string qos_type_to_text (Dkp.QosType type);
+}