27 #include <dbus/dbus.h> 43 return TQString::fromUtf8(DBUS_ERROR_FAILED);
45 return TQString::fromUtf8(DBUS_ERROR_NO_MEMORY);
47 return TQString::fromUtf8(DBUS_ERROR_SERVICE_UNKNOWN);
49 return TQString::fromUtf8(DBUS_ERROR_NAME_HAS_NO_OWNER);
51 return TQString::fromUtf8(DBUS_ERROR_NO_REPLY);
53 return TQString::fromUtf8(DBUS_ERROR_IO_ERROR);
55 return TQString::fromUtf8(DBUS_ERROR_BAD_ADDRESS);
57 return TQString::fromUtf8(DBUS_ERROR_NOT_SUPPORTED);
59 return TQString::fromUtf8(DBUS_ERROR_LIMITS_EXCEEDED);
61 return TQString::fromUtf8(DBUS_ERROR_ACCESS_DENIED);
63 return TQString::fromUtf8(DBUS_ERROR_AUTH_FAILED);
65 return TQString::fromUtf8(DBUS_ERROR_NO_SERVER);
67 return TQString::fromUtf8(DBUS_ERROR_TIMEOUT);
69 return TQString::fromUtf8(DBUS_ERROR_NO_NETWORK);
71 return TQString::fromUtf8(DBUS_ERROR_DISCONNECTED);
73 return TQString::fromUtf8(DBUS_ERROR_INVALID_ARGS);
75 return TQString::fromUtf8(DBUS_ERROR_FILE_NOT_FOUND);
77 return TQString::fromUtf8(DBUS_ERROR_FILE_EXISTS);
79 return TQString::fromUtf8(DBUS_ERROR_UNKNOWN_METHOD);
81 return TQString::fromUtf8(DBUS_ERROR_TIMED_OUT);
83 return TQString::fromUtf8(DBUS_ERROR_INVALID_SIGNATURE);
122 if (!error || !dbus_error_is_set(error))
125 nm = TQString::fromUtf8(error->name);
126 msg = TQString::fromUtf8(error->message);
static TQT_DBusError stdUnknownMethod(const TQString &message)
Creates a D-Bus standard error for an unknown methods being called.
Target file exists but operation does not allow overwriting.
TQString message() const
Returns a string describing the error.
static TQT_DBusError stdAuthFailed(const TQString &message)
Creates a D-Bus standard error for failed authentification.
static TQT_DBusError stdNoMemory(const TQString &message)
Creates a D-Bus standard error for out of memory situations.
static TQT_DBusError stdInvalidArgs(const TQString &message)
Creates a D-Bus standard error for call arguments being invalid.
An type signature is not valid.
A method call addresses and unknown method.
static TQT_DBusError::ErrorType qDBusErrorTypeForName(const TQString &name)
TQT_DBusError()
Creates an empty and invalid error object.
static void qDBusErrorSetupNameMapping()
static TQT_DBusError stdAccessDenied(const TQString &message)
Creates a D-Bus standard error for access to a resource being denied.
The network intended as a transport channel is not available.
A non-unique name used in a message is not known.
An timeout occured during an operation.
Type type() const
Returns the Type of the data object.
static TQT_DBusError stdFailed(const TQString &message)
Creates a D-Bus standard error for generic failure.
static TQT_DBusError stdFileNotFound(const TQString &message)
Creates a D-Bus standard error for a file not being available.
static TQT_DBusError stdNotSupported(const TQString &message)
Creates a D-Bus standard error for unsupported operations.
ErrorType
Enum of standard D-Bus error types.
An otherwise valid operation request could not be handled.
static ErrorNameMap errorTypesByName
Caused by trying to connect to a malformed address.
static TQT_DBusError stdInvalidSignature(const TQString &message)
Creates a D-Bus standard error for D-Bus type signature not valid.
static TQT_DBusError stdFileExists(const TQString &message)
Creates a D-Bus standard error for a file being in the way.
TQMap< TQString, TQT_DBusError::ErrorType > ErrorNameMap
An addressed service is neither connected nor can it be activated.
static TQT_DBusError stdTimeout(const TQString &message)
Creates a D-Bus standard error for timeouts during operations.
A file necessary for an operation is not avaiable.
An call failed to send a reply but one was expected.
Caused by trying to use an unconnected D-Bus connection.
Class for transporting D-Bus errors.
An IO error occured during an operation.
static TQString qDBusErrorNameForType(TQT_DBusError::ErrorType type)
bool isValid() const
Returns whether the error object is valid.
An operation could not allocate enough memory.
Caused by security restrictions denying an operation.
Connection to a D-Bus server failed.
Generic type for all errors not matching on of the other predefined.
ErrorType type() const
Returns a type for checking of standard errors.
static TQT_DBusError stdNoReply(const TQString &message)
Creates a D-Bus standard error for expected reply missing.
static TQT_DBusError stdIOError(const TQString &message)
Creates a D-Bus standard error for generic IO errors.
Caused by invalid arguments passed to a method call.
TQT_DBusError specific value, to represent invalid error objects.
static TQT_DBusError stdLimitsExceeded(const TQString &message)
Creates a D-Bus standard error for exceeding a limited resource.
An authentification mechanism failed.
Use of a limited resource reached its limit.