1908
* control_serialise_bus_address:
1910
* Convert control_bus_address into JSON representation.
1912
* Returns: JSON string representing control_bus_address or NULL if
1913
* control_bus_address not set or on error.
1915
* Note: If NULL is returned, check the value of control_bus_address
1916
* itself to determine if the error is real.
1919
control_serialise_bus_address (void)
1923
/* A NULL return represents a JSON null */
1924
return control_bus_address
1925
? json_object_new_string (control_bus_address)
1930
* control_deserialise_bus_address:
1932
* @json: root of JSON-serialised state.
1934
* Convert JSON representation of control_bus_address back into a native
1937
* Returns: 0 on success, -1 on error.
1940
control_deserialise_bus_address (json_object *json)
1942
const char *address;
1945
nih_assert (! control_bus_address);
1949
/* control_bus_address was never set */
1950
if (state_check_json_type (json, null))
1953
if (! state_check_json_type (json, string))
1956
address = json_object_get_string (json);
1960
control_bus_address = nih_strdup (NULL, address);
1961
if (! control_bus_address)