Main Page   Modules   Data Structures   File List   Data Fields   Related Pages  

dbus-errors.h

00001 /* -*- mode: C; c-file-style: "gnu" -*- */
00002 /* dbus-errors.h Error reporting
00003  *
00004  * Copyright (C) 2002  Red Hat Inc.
00005  * Copyright (C) 2003  CodeFactory AB
00006  *
00007  * Licensed under the Academic Free License version 1.2
00008  * 
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  * 
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022  *
00023  */
00024 #if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION)
00025 #error "Only <dbus/dbus.h> can be included directly, this file may disappear or change contents."
00026 #endif
00027 
00028 #ifndef DBUS_ERROR_H
00029 #define DBUS_ERROR_H
00030 
00031 #include <dbus/dbus-macros.h>
00032 #include <dbus/dbus-types.h>
00033 
00034 DBUS_BEGIN_DECLS;
00035 
00036 typedef struct DBusError DBusError;
00037 
00038 struct DBusError
00039 {
00040   const char *name;    
00041   const char *message; 
00043   unsigned int dummy1 : 1; 
00044   unsigned int dummy2 : 1; 
00045   unsigned int dummy3 : 1; 
00046   unsigned int dummy4 : 1; 
00047   unsigned int dummy5 : 1; 
00049   void *padding1; 
00050 };
00051 
00052 #define DBUS_ERROR_FAILED                     "org.freedesktop.DBus.Error.Failed"
00053 #define DBUS_ERROR_ACTIVATE_SERVICE_NOT_FOUND "org.freedesktop.DBus.Activate.ServiceNotFound"
00054 #define DBUS_ERROR_SPAWN_EXEC_FAILED          "org.freedesktop.DBus.Error.Spawn.ExecFailed"
00055 #define DBUS_ERROR_SPAWN_FORK_FAILED          "org.freedesktop.DBus.Error.Spawn.ForkFailed"
00056 #define DBUS_ERROR_SPAWN_CHILD_EXITED         "org.freedesktop.DBus.Error.Spawn.ChildExited"
00057 #define DBUS_ERROR_SPAWN_CHILD_SIGNALED       "org.freedesktop.DBus.Error.Spawn.ChildSignaled"
00058 #define DBUS_ERROR_SPAWN_FAILED               "org.freedesktop.DBus.Error.Spawn.Failed"
00059 #define DBUS_ERROR_NO_MEMORY                  "org.freedesktop.DBus.Error.NoMemory"
00060 #define DBUS_ERROR_SERVICE_DOES_NOT_EXIST     "org.freedesktop.DBus.Error.ServiceDoesNotExist"
00061 #define DBUS_ERROR_NO_REPLY                   "org.freedesktop.DBus.Error.NoReply"
00062 #define DBUS_ERROR_IO_ERROR                   "org.freedesktop.DBus.Error.IOError"
00063 #define DBUS_ERROR_BAD_ADDRESS                "org.freedesktop.DBus.Error.BadAddress"
00064 #define DBUS_ERROR_NOT_SUPPORTED              "org.freedesktop.DBus.Error.NotSupported"
00065 #define DBUS_ERROR_LIMITS_EXCEEDED            "org.freedesktop.DBus.Error.LimitsExceeded"
00066 #define DBUS_ERROR_ACCESS_DENIED              "org.freedesktop.DBus.Error.AccessDenied"
00067 #define DBUS_ERROR_AUTH_FAILED                "org.freedesktop.DBus.Error.AuthFailed"
00068 #define DBUS_ERROR_NO_SERVER                  "org.freedesktop.DBus.Error.NoServer"
00069 #define DBUS_ERROR_TIMEOUT                    "org.freedesktop.DBus.Error.Timeout"
00070 #define DBUS_ERROR_NO_NETWORK                 "org.freedesktop.DBus.Error.NoNetwork"
00071 #define DBUS_ERROR_ADDRESS_IN_USE             "org.freedesktop.DBus.Error.AddressInUse"
00072 #define DBUS_ERROR_DISCONNECTED               "org.freedesktop.DBus.Error.Disconnected"
00073 #define DBUS_ERROR_INVALID_ARGS               "org.freedesktop.DBus.Error.InvalidArgs"
00074 #define DBUS_ERROR_FILE_NOT_FOUND             "org.freedesktop.DBus.Error.FileNotFound"
00075 #define DBUS_ERROR_UNKNOWN_MESSAGE            "org.freedesktop.DBus.Error.UnknownMessage"
00076 #define DBUS_ERROR_TIMED_OUT                  "org.freedesktop.DBus.Error.TimedOut"
00077 
00078 void        dbus_error_init      (DBusError       *error);
00079 void        dbus_error_free      (DBusError       *error);
00080 void        dbus_set_error       (DBusError       *error,
00081                                   const char      *name,
00082                                   const char      *message,
00083                                   ...);
00084 void        dbus_set_error_const (DBusError       *error,
00085                                   const char      *name,
00086                                   const char      *message);
00087 void        dbus_move_error      (DBusError       *src,
00088                                   DBusError       *dest);
00089 dbus_bool_t dbus_error_has_name  (const DBusError *error,
00090                                   const char      *name);
00091 dbus_bool_t dbus_error_is_set    (const DBusError *error);
00092 
00093 DBUS_END_DECLS;
00094 
00095 #endif /* DBUS_ERROR_H */

Generated on Wed Oct 22 14:05:01 2003 for D-BUS by doxygen1.3-rc3