Commits

Iñigo Serna committed 6d9d1e8

irex: make code compatible with vala 0.13.2+

Comments (0)

Files changed (2)

 // Copyright (C) 2011  Iñigo Serna <inigoserna@gmail.com>
 // Released under GPL v3+
 //
-// Time-stamp: <2011-09-04 17:49:06 inigo>
+// Time-stamp: <2011-09-05 16:37:32 inigo>
 //////////////////////////////////////////////////////////////////////
 
 
                 "com.irexnet.sysd",
                 "sysGetBatteryState",
                 liberipc.Type.INVALID);
-            level = (int) info->args[0].value.s;
-            state = (string) info->args[1].value.s;
+            level = (int) info->args[0].value_s;
+            state = (string) info->args[1].value_s;
         }
 
         public void start_task(string command_line, string working_dir,
 
         [CCode (instance_pos = -1)]
         void on_menu_item(Context context, EventInfo info) {
-            string item = (string)(info.args[0].value.s);
-            string group = (string)(info.args[1].value.s);
-            string menu = (string)(info.args[2].value.s);
-            string state = (string)(info.args[3].value.s);
+            string item = (string)(info.args[0].value_s);
+            string group = (string)(info.args[1].value_s);
+            string menu = (string)(info.args[2].value_s);
+            string state = (string)(info.args[3].value_s);
             app.onMenuClick(item, group, menu, state);
         }
 
         [CCode (instance_pos = -1)]
         void on_window_activated(Context context, EventInfo info) {
-            int xid = (int)(info.args[0].value.s);
+            int xid = (int)(info.args[0].value_s);
             app.onWindowChange(xid, true);
             this.context.reply_bool(info.message_id, true);
         }
 
         [CCode (instance_pos = -1)]
         void on_window_deactivated(Context context, EventInfo info) {
-            int xid = (int)(info.args[0].value.s);
+            int xid = (int)(info.args[0].value_s);
             app.onWindowChange(xid, false);
             this.context.reply_bool(info.message_id, true);
         }
 
         [CCode (instance_pos = -1)]
         void on_file_open(Context context, EventInfo info) {
-            string filename = (string)(info.args[0].value.s);
+            string filename = (string)(info.args[0].value_s);
             string error = null;
             int xid = -1;
 
 
         [CCode (instance_pos = -1)]
         void on_file_close(Context context, EventInfo info) {
-            string filename = (string)(info.args[0].value.s);
+            string filename = (string)(info.args[0].value_s);
             this.context.reply_bool(info.message_id, app.onFileClose(filename));
         }
 

irex/liberipc.vapi

         REPLY_OR_ERROR,
     }
 
-    public struct ArgString {
-        public char *s;
-    }
-
     [CCode (cname = "eripc_arg_t")]
     public struct Arg {
         public int type;
         public int data_len;
-        public ArgString value;
+        [CCode (cname = "value.s")]
+        public string value_s;
     }
 
     [Compact]