28#include "dbus-errors.h"
29#include "dbus-internals.h"
30#include "dbus-string.h"
31#include "dbus-protocol.h"
94message_from_error (
const char *error)
97 return "Unknown error";
99 return "Not enough memory available";
101 return "Error reading or writing data";
103 return "Could not parse address";
105 return "Feature not supported";
107 return "Resource limits exceeded";
109 return "Permission denied";
111 return "Could not authenticate to server";
113 return "No server available at address";
115 return "Connection timed out";
117 return "Network unavailable";
119 return "Address already in use";
121 return "Disconnected.";
123 return "Invalid arguments.";
125 return "Did not get a reply message.";
127 return "File doesn't exist.";
129 return "Object path already in use";
196 _dbus_return_if_fail (error !=
NULL);
217 _dbus_return_if_fail (error !=
NULL);
251 _dbus_return_if_error_is_set (error);
252 _dbus_return_if_fail (name !=
NULL);
261 message = message_from_error (name);
265 real->
name = (
char*) name;
266 real->
message = (
char *)message;
284 _dbus_return_if_error_is_set (dest);
307 _dbus_return_val_if_fail (error !=
NULL,
FALSE);
308 _dbus_return_val_if_fail (name !=
NULL,
FALSE);
333 _dbus_return_val_if_fail (error !=
NULL,
FALSE);
367 _dbus_return_if_error_is_set (error);
368 _dbus_return_if_fail (name !=
NULL);
370 va_start (args, format);
371 _dbus_set_error_valist (error, name, format, args);
398 message_from_error (name)))
434 _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_IN...
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.
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