DBus-1-TQt 1.0
tqdbuserror.cpp File Reference
#include "tqdbuserror.h"
#include <dbus/dbus.h>
#include <tqmap.h>
+ Include dependency graph for tqdbuserror.cpp:

Go to the source code of this file.

Typedefs

typedef TQMap< TQString, TQT_DBusError::ErrorTypeErrorNameMap
 

Functions

static TQString qDBusErrorNameForType (TQT_DBusError::ErrorType type)
 
static void qDBusErrorSetupNameMapping ()
 
static TQT_DBusError::ErrorType qDBusErrorTypeForName (const TQString &name)
 

Variables

static ErrorNameMap errorTypesByName
 

Typedef Documentation

◆ ErrorNameMap

typedef TQMap<TQString, TQT_DBusError::ErrorType> ErrorNameMap

Definition at line 31 of file tqdbuserror.cpp.

Function Documentation

◆ qDBusErrorNameForType()

static TQString qDBusErrorNameForType ( TQT_DBusError::ErrorType  type)
static

Definition at line 34 of file tqdbuserror.cpp.

35{
36 switch (type)
37 {
39 Q_ASSERT(false);
40 return TQString();
41
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);
84
86 Q_ASSERT(false);
87 return TQString();
88 }
89
90 Q_ASSERT(false);
91 return TQString();
92}
@ TimedOut
An operation timed out.
Definition: tqdbuserror.h:226
@ NotSupported
An otherwise valid operation request could not be handled.
Definition: tqdbuserror.h:134
@ ServiceUnknown
An addressed service is neither connected nor can it be activated.
Definition: tqdbuserror.h:88
@ Failed
Generic failure cause.
Definition: tqdbuserror.h:76
@ AccessDenied
Caused by security restrictions denying an operation.
Definition: tqdbuserror.h:152
@ UnknownMethod
A method call addresses and unknown method.
Definition: tqdbuserror.h:218
@ LimitsExceeded
Use of a limited resource reached its limit.
Definition: tqdbuserror.h:141
@ FileNotFound
A file necessary for an operation is not avaiable.
Definition: tqdbuserror.h:204
@ NoNetwork
The network intended as a transport channel is not available.
Definition: tqdbuserror.h:179
@ NoMemory
An operation could not allocate enough memory.
Definition: tqdbuserror.h:83
@ AuthFailed
An authentification mechanism failed.
Definition: tqdbuserror.h:159
@ InvalidError
TQT_DBusError specific value, to represent invalid error objects.
Definition: tqdbuserror.h:66
@ UserDefined
Generic type for all errors not matching on of the other predefined.
Definition: tqdbuserror.h:248
@ BadAddress
Caused by trying to connect to a malformed address.
Definition: tqdbuserror.h:124
@ NameHasNoOwner
A non-unique name used in a message is not known.
Definition: tqdbuserror.h:97
@ InvalidArgs
Caused by invalid arguments passed to a method call.
Definition: tqdbuserror.h:197
@ FileExists
Target file exists but operation does not allow overwriting.
Definition: tqdbuserror.h:211
@ NoReply
An call failed to send a reply but one was expected.
Definition: tqdbuserror.h:104
@ NoServer
Connection to a D-Bus server failed.
Definition: tqdbuserror.h:164
@ Disconnected
Caused by trying to use an unconnected D-Bus connection.
Definition: tqdbuserror.h:186
@ IOError
An IO error occured during an operation.
Definition: tqdbuserror.h:114
@ InvalidSignature
An type signature is not valid.
Definition: tqdbuserror.h:241
@ Timeout
An timeout occured during an operation.
Definition: tqdbuserror.h:174

References TQT_DBusError::AccessDenied, TQT_DBusError::AuthFailed, TQT_DBusError::BadAddress, TQT_DBusError::Disconnected, TQT_DBusError::Failed, TQT_DBusError::FileExists, TQT_DBusError::FileNotFound, TQT_DBusError::InvalidArgs, TQT_DBusError::InvalidError, TQT_DBusError::InvalidSignature, TQT_DBusError::IOError, TQT_DBusError::LimitsExceeded, TQT_DBusError::NameHasNoOwner, TQT_DBusError::NoMemory, TQT_DBusError::NoNetwork, TQT_DBusError::NoReply, TQT_DBusError::NoServer, TQT_DBusError::NotSupported, TQT_DBusError::ServiceUnknown, TQT_DBusError::TimedOut, TQT_DBusError::Timeout, TQT_DBusError::UnknownMethod, and TQT_DBusError::UserDefined.

+ Here is the caller graph for this function:

◆ qDBusErrorSetupNameMapping()

static void qDBusErrorSetupNameMapping ( )
static

Definition at line 94 of file tqdbuserror.cpp.

95{
97 {
100 }
101}
ErrorType
Enum of standard D-Bus error types.
Definition: tqdbuserror.h:60
static TQString qDBusErrorNameForType(TQT_DBusError::ErrorType type)
Definition: tqdbuserror.cpp:34
static ErrorNameMap errorTypesByName
Definition: tqdbuserror.cpp:32

References errorTypesByName, TQT_DBusError::InvalidError, qDBusErrorNameForType(), and TQT_DBusError::UserDefined.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qDBusErrorTypeForName()

static TQT_DBusError::ErrorType qDBusErrorTypeForName ( const TQString &  name)
static

Definition at line 103 of file tqdbuserror.cpp.

104{
105 if (name.isEmpty()) return TQT_DBusError::InvalidError;
106
107 if (errorTypesByName.isEmpty())
109
110 ErrorNameMap::const_iterator it = errorTypesByName.find(name);
111 if (it != errorTypesByName.end()) return it.data();
112
114}
static void qDBusErrorSetupNameMapping()
Definition: tqdbuserror.cpp:94

References errorTypesByName, TQT_DBusError::InvalidError, qDBusErrorSetupNameMapping(), and TQT_DBusError::UserDefined.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ errorTypesByName

ErrorNameMap errorTypesByName
static

Definition at line 32 of file tqdbuserror.cpp.