[CCode (cname = "GUINT16_FROM_LE")]
public static uint16 from_little_endian (uint16 val);
+ [CCode (cname = "g_htons")]
+ public static uint16 to_network (uint16 val);
+ [CCode (cname = "g_ntohs")]
+ public static uint16 from_network (uint16 val);
+
[CCode (cname = "GUINT16_SWAP_BE_PDP")]
public uint16 swap_big_endian_pdp ();
[CCode (cname = "GUINT16_SWAP_LE_BE")]
[CCode (cname = "GUINT32_FROM_LE")]
public static uint32 from_little_endian (uint32 val);
+ [CCode (cname = "g_htonl")]
+ public static uint32 to_network (uint32 val);
+ [CCode (cname = "g_ntohl")]
+ public static uint32 from_network (uint32 val);
+
[CCode (cname = "GUINT32_SWAP_BE_PDP")]
public uint32 swap_big_endian_pdp ();
[CCode (cname = "GUINT32_SWAP_LE_BE")]
public unowned Json.Builder begin_object ();
public unowned Json.Builder end_array ();
public unowned Json.Builder end_object ();
- public Json.Node get_root ();
+ public Json.Node? get_root ();
public void reset ();
public unowned Json.Builder set_member_name (string member_name);
}
public uint get_indent ();
public unichar get_indent_char ();
public bool get_pretty ();
- public unowned Json.Node get_root ();
+ public unowned Json.Node? get_root ();
public void set_indent (uint indent_level);
public void set_indent_char (unichar indent_char);
public void set_pretty (bool is_pretty);
public static GLib.Quark error_quark ();
public uint get_current_line ();
public uint get_current_pos ();
- public unowned Json.Node get_root ();
+ public unowned Json.Node? get_root ();
public bool has_assignment (out unowned string variable_name);
public bool load_from_data (string data, ssize_t length = -1) throws GLib.Error;
public bool load_from_file (string filename) throws GLib.Error;
[CCode (cheader_filename = "json-glib/json-glib.h")]
public static string gobject_to_data (GLib.Object gobject, out size_t length);
[CCode (cheader_filename = "json-glib/json-glib.h")]
- public static GLib.Variant gvariant_deserialize (Json.Node json_node, string? signature) throws GLib.Error;
+ public static unowned GLib.Variant gvariant_deserialize (Json.Node json_node, string? signature) throws GLib.Error;
[CCode (cheader_filename = "json-glib/json-glib.h")]
- public static GLib.Variant gvariant_deserialize_data (string json, ssize_t length, string? signature) throws GLib.Error;
+ public static unowned GLib.Variant gvariant_deserialize_data (string json, ssize_t length, string? signature) throws GLib.Error;
[CCode (cheader_filename = "json-glib/json-glib.h")]
public static Json.Node gvariant_serialize (GLib.Variant variant);
[CCode (cheader_filename = "json-glib/json-glib.h")]