DBus-1-TQt 1.0
Loading...
Searching...
No Matches
tqdbuserror.h
Go to the documentation of this file.
1/* qdbuserror.h TQT_DBusError object
2 *
3 * Copyright (C) 2005 Harald Fernengel <harry@kdevelop.org>
4 * Copyright (C) 2005 Kevin Krammer <kevin.krammer@gmx.at>
5 *
6 * Licensed under the Academic Free License version 2.1
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
21 * USA.
22 *
23 */
24
25#ifndef TQDBUSERROR_H
26#define TQDBUSERROR_H
27
28#include "tqdbusmacros.h"
29#include <tqstring.h>
30
31struct DBusError;
32
41{
42public:
250
255
261 TQT_DBusError(const DBusError *error);
262
271 TQT_DBusError(const TQString& error, const TQString& message);
272
282 inline TQString name() const { return nm; }
283
295 inline TQString message() const { return msg; }
296
307 inline ErrorType type() const { return errorType; }
308
316 inline bool dbusErrorSet() const { return m_dbusErrorSet; }
317
321 inline void setDBUSError(bool err) const { m_dbusErrorSet = err; }
322
331 bool isValid() const;
332
340 static TQT_DBusError stdFailed(const TQString& message);
341
349 static TQT_DBusError stdNoMemory(const TQString& message);
350
358 static TQT_DBusError stdNoReply(const TQString& message);
359
367 static TQT_DBusError stdIOError(const TQString& message);
368
376 static TQT_DBusError stdNotSupported(const TQString& message);
377
385 static TQT_DBusError stdLimitsExceeded(const TQString& message);
386
394 static TQT_DBusError stdAccessDenied(const TQString& message);
395
403 static TQT_DBusError stdAuthFailed(const TQString& message);
404
412 static TQT_DBusError stdTimeout(const TQString& message);
413
421 static TQT_DBusError stdInvalidArgs(const TQString& message);
422
430 static TQT_DBusError stdFileNotFound(const TQString& message);
431
439 static TQT_DBusError stdFileExists(const TQString& message);
440
448 static TQT_DBusError stdUnknownMethod(const TQString& message);
449
457 static TQT_DBusError stdInvalidSignature(const TQString& message);
458
459private:
461 mutable bool m_dbusErrorSet;
462
463 TQString nm, msg;
464
473 TQT_DBusError(ErrorType type, const TQString& message);
474};
475
476#endif
Class for transporting D-Bus errors.
Definition tqdbuserror.h:41
TQString name() const
Returns the D-Bus error name.
bool dbusErrorSet() const
Returns whether the error was caused by DBUS itself.
ErrorType errorType
void setDBUSError(bool err) const
ErrorType type() const
Returns a type for checking of standard errors.
TQString message() const
Returns a string describing the error.
ErrorType
Enum of standard D-Bus error types.
Definition tqdbuserror.h:60
@ TimedOut
An operation timed out.
@ NotSupported
An otherwise valid operation request could not be handled.
@ 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.
@ UnknownMethod
A method call addresses and unknown method.
@ LimitsExceeded
Use of a limited resource reached its limit.
@ FileNotFound
A file necessary for an operation is not avaiable.
@ NoNetwork
The network intended as a transport channel is not available.
@ NoMemory
An operation could not allocate enough memory.
Definition tqdbuserror.h:83
@ AuthFailed
An authentification mechanism failed.
@ InvalidError
TQT_DBusError specific value, to represent invalid error objects.
Definition tqdbuserror.h:66
@ BadAddress
Caused by trying to connect to a malformed address.
@ 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.
@ FileExists
Target file exists but operation does not allow overwriting.
@ NoReply
An call failed to send a reply but one was expected.
@ NoServer
Connection to a D-Bus server failed.
@ Disconnected
Caused by trying to use an unconnected D-Bus connection.
@ IOError
An IO error occured during an operation.
@ InvalidSignature
An type signature is not valid.
@ Timeout
An timeout occured during an operation.
#define TQDBUS_EXPORT