]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
linux: add rfkill event structure, flags, and constants
authorMichael 'Mickey' Lauer <mickey@vanille-media.de>
Sat, 28 Nov 2009 16:30:02 +0000 (17:30 +0100)
committerMichael 'Mickey' Lauer <mickey@vanille-media.de>
Sat, 28 Nov 2009 16:30:02 +0000 (17:30 +0100)
vapi/linux.vapi

index e21721e54dd320c89188e28b0f42ff43d8c75388..8c6d3477b5e12b3c5781cbb509f017d2c8d24cbd 100644 (file)
@@ -83,6 +83,43 @@ namespace Linux {
     public int inotify_add_watch (int fd, string pathname, InotifyMaskFlags mask);
     public int inotify_rm_watch (int fd, int wd);
 
+    /*
+     * 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
+    }
+
     /*
      * SignalFd
      */