Go to the documentation of this file.
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);
132 : errorType(UserDefined), m_dbusErrorSet(false), nm(error), msg(message)
143 : errorType(
type), m_dbusErrorSet(false), msg(message)
static TQT_DBusError stdIOError(const TQString &message)
Creates a D-Bus standard error for generic IO errors.
A method call addresses and unknown method.
Class for transporting D-Bus errors.
An authentification mechanism failed.
TQString message() const
Returns a string describing the error.
static TQT_DBusError stdLimitsExceeded(const TQString &message)
Creates a D-Bus standard error for exceeding a limited resource.
static TQT_DBusError stdAccessDenied(const TQString &message)
Creates a D-Bus standard error for access to a resource being denied.
static TQT_DBusError stdFailed(const TQString &message)
Creates a D-Bus standard error for generic failure.
static TQT_DBusError::ErrorType qDBusErrorTypeForName(const TQString &name)
Target file exists but operation does not allow overwriting.
ErrorType
Enum of standard D-Bus error types.
static TQT_DBusError stdUnknownMethod(const TQString &message)
Creates a D-Bus standard error for an unknown methods being called.
Use of a limited resource reached its limit.
static TQT_DBusError stdAuthFailed(const TQString &message)
Creates a D-Bus standard error for failed authentification.
TQT_DBusError()
Creates an empty and invalid error object.
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.
static void qDBusErrorSetupNameMapping()
An type signature is not valid.
static TQT_DBusError stdNotSupported(const TQString &message)
Creates a D-Bus standard error for unsupported operations.
The network intended as a transport channel is not available.
An addressed service is neither connected nor can it be activated.
A non-unique name used in a message is not known.
An otherwise valid operation request could not be handled.
static ErrorNameMap errorTypesByName
An timeout occured during an operation.
TQMap< TQString, TQT_DBusError::ErrorType > ErrorNameMap
An call failed to send a reply but one was expected.
bool isValid() const
Returns whether the error object is valid.
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 stdFileNotFound(const TQString &message)
Creates a D-Bus standard error for a file not being available.
Type type() const
Returns the Type of the data object.
Caused by security restrictions denying an operation.
Generic type for all errors not matching on of the other predefined.
An IO error occured during an operation.
A file necessary for an operation is not avaiable.
static TQT_DBusError stdFileExists(const TQString &message)
Creates a D-Bus standard error for a file being in the way.
static TQT_DBusError stdTimeout(const TQString &message)
Creates a D-Bus standard error for timeouts during operations.
static TQString qDBusErrorNameForType(TQT_DBusError::ErrorType type)
An operation could not allocate enough memory.
Caused by trying to use an unconnected D-Bus connection.
TQT_DBusError specific value, to represent invalid error objects.
static TQT_DBusError stdNoReply(const TQString &message)
Creates a D-Bus standard error for expected reply missing.
Connection to a D-Bus server failed.
ErrorType type() const
Returns a type for checking of standard errors.
Caused by invalid arguments passed to a method call.