Add org.maemo.cinaest.OpenMovie D-Bus method, second window stack
[cinaest] / vapi / libosso-fix.vapi
diff --git a/vapi/libosso-fix.vapi b/vapi/libosso-fix.vapi
new file mode 100644 (file)
index 0000000..3496be9
--- /dev/null
@@ -0,0 +1,37 @@
+[CCode (cheader_filename = "libosso.h")]
+namespace OssoFix {
+       [CCode (destroy_function = "osso_rpc_free_val", cname = "osso_rpc_t")]
+       public struct Rpc {
+               public int type;
+               [CCode (cname = "value.u")]
+               private uint32 u;
+               [CCode (cname = "value.i")]
+               private int32 i;
+               [CCode (cname = "value.b")]
+               private bool b;
+               [CCode (cname = "value.d")]
+               private double d;
+               [CCode (cname = "value.s")]
+               private unowned string s;
+               public uint32 to_uint32 () requires (type == DBus.RawType.UINT32) {
+                       return u;
+               }
+               public int32 to_int32 () requires (type == DBus.RawType.INT32) {
+                       return i;
+               }
+               public bool to_bool () requires (type == DBus.RawType.BOOLEAN) {
+                       return b;
+               }
+               public double to_double () requires (type == DBus.RawType.DOUBLE) {
+                       return d;
+               }
+               public unowned string to_string () requires (type == DBus.RawType.STRING) {
+                       return s;
+               }
+               public void set_string (string s_) {
+                       type = DBus.RawType.STRING;
+                       s = s_;
+               }
+       }
+}
+