26 #include "dbus-errors.h"    27 #include "dbus-internals.h"    28 #include "dbus-string.h"    29 #include "dbus-protocol.h"    92 message_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);
   374 _dbus_set_error_valist (
DBusError  *error,
   396                                 message_from_error (name)))
   432   _DBUS_SET_OOM (error);
 dbus_bool_t dbus_error_has_name(const DBusError *error, const char *name)
Checks whether the error is set and has the given name. 
dbus_bool_t _dbus_string_append(DBusString *str, const char *buffer)
Appends a nul-terminated C-style string to a DBusString. 
#define DBUS_ERROR_FILE_NOT_FOUND
Missing file. 
const char * message
public error message field 
#define NULL
A null pointer, defined appropriately for C or C++. 
dbus_bool_t _dbus_string_equal(const DBusString *a, const DBusString *b)
Tests two DBusString for equality. 
#define DBUS_ERROR_TIMEOUT
Certain timeout errors, possibly ETIMEDOUT on a socket. 
void dbus_free(void *memory)
Frees a block of memory previously allocated by dbus_malloc() or dbus_malloc0(). 
#define DBUS_ERROR_NOT_SUPPORTED
Requested operation isn't supported (like ENOSYS on UNIX). 
unsigned int dummy3
placeholder 
#define _dbus_assert(condition)
Aborts with an error message if the condition is false. 
unsigned int dummy2
placeholder 
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...
char * message
error message 
unsigned int const_message
Message is not owned by DBusError. 
dbus_bool_t _dbus_string_init(DBusString *str)
Initializes a string. 
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. 
#define DBUS_ERROR_IO_ERROR
Something went wrong reading or writing to a socket, for example. 
#define DBUS_ERROR_NO_SERVER
Unable to connect to server (probably caused by ECONNREFUSED on a socket). 
#define DBUS_ERROR_OBJECT_PATH_IN_USE
There's already an object with the requested object path. 
void * padding1
placeholder 
dbus_uint32_t dbus_bool_t
A boolean, valid values are TRUE and FALSE. 
void _dbus_string_init_const(DBusString *str, const char *value)
Initializes a constant string. 
#define DBUS_ERROR_NO_REPLY
No reply to a message expecting one, usually means a timeout occurred. 
Object representing an exception. 
#define DBUS_ERROR_BAD_ADDRESS
A D-Bus bus address was malformed. 
void dbus_set_error(DBusError *error, const char *name, const char *format,...)
Assigns an error name and message to a DBusError. 
#define DBUS_ERROR_ADDRESS_IN_USE
Can't bind a socket since its address is in use (i.e. 
void _dbus_string_free(DBusString *str)
Frees a string created by _dbus_string_init(). 
#define TRUE
Expands to "1". 
#define DBUS_ERROR_FAILED
A generic error; "something went wrong" - see the error message for more. 
void dbus_move_error(DBusError *src, DBusError *dest)
Moves an error src into dest, freeing src and overwriting dest. 
const char * name
public error name field 
void dbus_error_init(DBusError *error)
Initializes a DBusError structure. 
#define DBUS_ERROR_ACCESS_DENIED
Security restrictions don't allow doing what you're trying to do. 
#define DBUS_ERROR_DISCONNECTED
The connection is disconnected and you're trying to use it. 
#define DBUS_ERROR_NO_MEMORY
There was not enough memory to complete an operation. 
#define FALSE
Expands to "0". 
#define DBUS_ERROR_AUTH_FAILED
Authentication didn't work. 
void dbus_set_error_const(DBusError *error, const char *name, const char *message)
Assigns an error name and message to a DBusError. 
unsigned int dummy4
placeholder 
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_strdup(const char *str)
Duplicates a string. 
#define DBUS_ERROR_INVALID_ARGS
Invalid arguments passed to a method call. 
#define DBUS_ERROR_NO_NETWORK
No network access (probably ENETUNREACH on a socket). 
#define DBUS_ERROR_LIMITS_EXCEEDED
Some limited resource is exhausted. 
dbus_bool_t dbus_error_is_set(const DBusError *error)
Checks whether an error occurred (the error is set). 
unsigned int dummy5
placeholder