Czech translation update (via transifex.net)
[cinaest] / vapi / libosso-fix.vapi
1 [CCode (cheader_filename = "libosso.h")]
2 namespace OssoFix {
3         [CCode (destroy_function = "osso_rpc_free_val", cname = "osso_rpc_t")]
4         public struct Rpc {
5                 public int type;
6                 [CCode (cname = "value.u")]
7                 private uint32 u;
8                 [CCode (cname = "value.i")]
9                 private int32 i;
10                 [CCode (cname = "value.b")]
11                 private bool b;
12                 [CCode (cname = "value.d")]
13                 private double d;
14                 [CCode (cname = "value.s")]
15                 private unowned string s;
16                 public uint32 to_uint32 () requires (type == DBus.RawType.UINT32) {
17                         return u;
18                 }
19                 public int32 to_int32 () requires (type == DBus.RawType.INT32) {
20                         return i;
21                 }
22                 public bool to_bool () requires (type == DBus.RawType.BOOLEAN) {
23                         return b;
24                 }
25                 public double to_double () requires (type == DBus.RawType.DOUBLE) {
26                         return d;
27                 }
28                 public unowned string to_string () requires (type == DBus.RawType.STRING) {
29                         return s;
30                 }
31                 public void set_string (string s_) {
32                         type = DBus.RawType.STRING;
33                         s = s_;
34                 }
35         }
36 }
37