25 #include "dbus-misc.h" 26 #include "dbus-internals.h" 27 #include "dbus-string.h" 211 int *minor_version_p,
212 int *micro_version_p)
225 #ifdef DBUS_ENABLE_EMBEDDED_TESTS 227 #ifndef DOXYGEN_SHOULD_SKIP_THIS 229 #include "dbus-test.h" 234 _dbus_misc_test (
void)
236 int major, minor, micro;
253 #define MAKE_VERSION(x, y, z) (((x) << 16) | ((y) << 8) | (z)) 256 _dbus_assert (MAKE_VERSION (1, 0, 0) > MAKE_VERSION (0, 0, 0));
257 _dbus_assert (MAKE_VERSION (1, 1, 0) > MAKE_VERSION (1, 0, 0));
258 _dbus_assert (MAKE_VERSION (1, 1, 1) > MAKE_VERSION (1, 1, 0));
260 _dbus_assert (MAKE_VERSION (2, 0, 0) > MAKE_VERSION (1, 1, 1));
261 _dbus_assert (MAKE_VERSION (2, 1, 0) > MAKE_VERSION (1, 1, 1));
262 _dbus_assert (MAKE_VERSION (2, 1, 1) > MAKE_VERSION (1, 1, 1));
dbus_bool_t dbus_error_has_name(const DBusError *error, const char *name)
Checks whether the error is set and has the given name.
const char * message
public error message field
#define NULL
A null pointer, defined appropriately for C or C++.
DBUS_PRIVATE_EXPORT dbus_bool_t _dbus_string_append_int(DBusString *str, long value)
Appends an integer to a DBusString.
dbus_bool_t _dbus_get_local_machine_uuid_encoded(DBusString *uuid_str, DBusError *error)
Gets the hex-encoded UUID of the machine this function is executed on.
#define _dbus_assert(condition)
Aborts with an error message if the condition is false.
#define DBUS_ERROR_INIT
Expands to a suitable initializer for a DBusError on the stack.
void _dbus_warn_check_failed(const char *format,...)
Prints a "critical" warning to stderr when an assertion fails; differs from _dbus_warn primarily in t...
#define DBUS_MAJOR_VERSION
The COMPILE TIME major version of libdbus, that is, the "X" in "X.Y.Z", as an integer literal...
void dbus_error_free(DBusError *error)
Frees an error that's been set (or just initialized), then reinitializes the error as in dbus_error_i...
void dbus_get_version(int *major_version_p, int *minor_version_p, int *micro_version_p)
Gets the DYNAMICALLY LINKED version of libdbus.
#define DBUS_MICRO_VERSION
The COMPILE TIME micro version of libdbus, that is, the "Z" in "X.Y.Z", as an integer literal...
dbus_bool_t _dbus_string_init(DBusString *str)
Initializes a string.
#define DBUS_VERSION_STRING
The COMPILE TIME version of libdbus, as a string "X.Y.Z".
dbus_bool_t _dbus_string_equal_c_str(const DBusString *a, const char *c_str)
Checks whether a string is equal to a C string.
dbus_uint32_t dbus_bool_t
A boolean, valid values are TRUE and FALSE.
Object representing an exception.
void dbus_set_error(DBusError *error, const char *name, const char *format,...)
Assigns an error name and message to a DBusError.
#define DBUS_MINOR_VERSION
The COMPILE TIME minor version of libdbus, that is, the "Y" in "X.Y.Z", as an integer literal...
dbus_bool_t _dbus_string_append_byte(DBusString *str, unsigned char byte)
Appends a single byte to the string, returning FALSE if not enough memory.
void _dbus_string_free(DBusString *str)
Frees a string created by _dbus_string_init().
#define TRUE
Expands to "1".
#define _dbus_assert_not_reached(explanation)
Aborts with an error message if called.
#define DBUS_VERSION
The COMPILE TIME version of libdbus, as a single integer that has 0 in the most significant byte...
char * dbus_get_local_machine_id(void)
Obtains the machine UUID of the machine this process is running on.
#define DBUS_ERROR_NO_MEMORY
There was not enough memory to complete an operation.
dbus_bool_t _dbus_string_steal_data(DBusString *str, char **data_return)
Like _dbus_string_get_data(), but removes the gotten data from the original string.
char * dbus_try_get_local_machine_id(DBusError *error)
Obtains the machine UUID of the machine this process is running on.