26#include "dbus-errors.h"
27#include "dbus-internals.h"
28#include "dbus-string.h"
29#include "dbus-protocol.h"
92message_from_error (
const char *error)
95 return "Unknown error";
97 return "Not enough memory available";
99 return "Error reading or writing data";
101 return "Could not parse address";
103 return "Feature not supported";
105 return "Resource limits exceeded";
107 return "Permission denied";
109 return "Could not authenticate to server";
111 return "No server available at address";
113 return "Connection timed out";
115 return "Network unavailable";
117 return "Address already in use";
119 return "Disconnected.";
121 return "Invalid arguments.";
123 return "Did not get a reply message.";
125 return "File doesn't exist.";
127 return "Object path already in use";
194 _dbus_return_if_fail (error !=
NULL);
215 _dbus_return_if_fail (error !=
NULL);
249 _dbus_return_if_error_is_set (error);
250 _dbus_return_if_fail (name !=
NULL);
259 message = message_from_error (name);
263 real->
name = (
char*) name;
264 real->
message = (
char *)message;
282 _dbus_return_if_error_is_set (dest);
305 _dbus_return_val_if_fail (error !=
NULL,
FALSE);
306 _dbus_return_val_if_fail (name !=
NULL,
FALSE);
331 _dbus_return_val_if_fail (error !=
NULL,
FALSE);
365 _dbus_return_if_error_is_set (error);
366 _dbus_return_if_fail (name !=
NULL);
368 va_start (args, format);
369 _dbus_set_error_valist (error, name, format, args);
396 message_from_error (name)))
432 _DBUS_SET_OOM (error);
void dbus_move_error(DBusError *src, DBusError *dest)
Moves an error src into dest, freeing src and overwriting dest.
void dbus_set_error_const(DBusError *error, const char *name, const char *message)
Assigns an error name and message to a DBusError.
dbus_bool_t dbus_error_has_name(const DBusError *error, const char *name)
Checks whether the error is set and has the given name.
void dbus_error_init(DBusError *error)
Initializes a DBusError structure.
void dbus_set_error(DBusError *error, const char *name, const char *format,...)
Assigns an error name and message to a DBusError.
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...
dbus_bool_t dbus_error_is_set(const DBusError *error)
Checks whether an error occurred (the error is set).
#define _dbus_assert(condition)
Aborts with an error message if the condition is false.
char * _dbus_strdup(const char *str)
Duplicates a string.
#define NULL
A null pointer, defined appropriately for C or C++.
#define TRUE
Expands to "1".
#define FALSE
Expands to "0".
void dbus_free(void *memory)
Frees a block of memory previously allocated by dbus_malloc() or dbus_malloc0().
#define DBUS_ERROR_TIMEOUT
Certain timeout errors, possibly ETIMEDOUT on a socket.
#define DBUS_ERROR_NOT_SUPPORTED
Requested operation isn't supported (like ENOSYS on UNIX).
#define DBUS_ERROR_ADDRESS_IN_USE
Can't bind a socket since its address is in use (i.e.
#define DBUS_ERROR_BAD_ADDRESS
A D-Bus bus address was malformed.
#define DBUS_ERROR_IO_ERROR
Something went wrong reading or writing to a socket, for example.
#define DBUS_ERROR_AUTH_FAILED
Authentication didn't work.
#define DBUS_ERROR_OBJECT_PATH_IN_USE
There's already an object with the requested object path.
#define DBUS_ERROR_ACCESS_DENIED
Security restrictions don't allow doing what you're trying to do.
#define DBUS_ERROR_NO_SERVER
Unable to connect to server (probably caused by ECONNREFUSED on a socket).
#define DBUS_ERROR_LIMITS_EXCEEDED
Some limited resource is exhausted.
#define DBUS_ERROR_NO_NETWORK
No network access (probably ENETUNREACH on a socket).
#define DBUS_ERROR_FAILED
A generic error; "something went wrong" - see the error message for more.
#define DBUS_ERROR_NO_MEMORY
There was not enough memory to complete an operation.
#define DBUS_ERROR_INVALID_ARGS
Invalid arguments passed to a method call.
#define DBUS_ERROR_NO_REPLY
No reply to a message expecting one, usually means a timeout occurred.
#define DBUS_ERROR_DISCONNECTED
The connection is disconnected and you're trying to use it.
#define DBUS_ERROR_FILE_NOT_FOUND
Missing file.
dbus_bool_t _dbus_string_append(DBusString *str, const char *buffer)
Appends a nul-terminated C-style string to a DBusString.
dbus_bool_t _dbus_string_init(DBusString *str)
Initializes a string.
void _dbus_string_init_const(DBusString *str, const char *value)
Initializes a constant string.
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.
void _dbus_string_free(DBusString *str)
Frees a string created by _dbus_string_init(), and fills it with the same contents as #_DBUS_STRING_I...
dbus_bool_t _dbus_string_append_printf_valist(DBusString *str, const char *format, va_list args)
Appends a printf-style formatted string to the DBusString.
dbus_bool_t _dbus_string_equal(const DBusString *a, const DBusString *b)
Tests two DBusString for equality.
dbus_uint32_t dbus_bool_t
A boolean, valid values are TRUE and FALSE.
Object representing an exception.
const char * name
public error name field
const char * message
public error message field
unsigned int dummy2
placeholder
unsigned int const_message
Message is not owned by DBusError.
unsigned int dummy5
placeholder
unsigned int dummy4
placeholder
unsigned int dummy3
placeholder
void * padding1
placeholder
char * message
error message