if (!add_package (context, package) && !add_gir (context, package)) {
Report.error (null, "%s not found in specified Vala API directories or GObject-Introspection GIR directories".printf (package));
}
+ if (context.profile == Profile.GOBJECT && package == "dbus-glib-1") {
+ context.add_define ("DBUS_GLIB");
+ }
}
packages = null;
}
public Variant end ();
}
+#if !DBUS_GLIB
[CCode (cname = "char", const_cname = "const char", copy_function = "g_strdup", free_function = "g_free", cheader_filename = "stdlib.h,string.h,glib.h", type_id = "DBUS_TYPE_G_OBJECT_PATH", marshaller_type_name = "BOXED", get_value_function = "g_value_get_boxed", set_value_function = "g_value_set_boxed", type_signature = "o")]
public class ObjectPath : string {
[CCode (cname = "g_strdup")]
public ObjectPath (string path);
}
+#endif
[CCode (cname = "G_LIKELY", cheader_filename = "glib.h")]
public static bool likely (bool expression);