D-Bus  1.4.18
dbus-errors.h
00001 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
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 2.1
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., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  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 #include <dbus/dbus-protocol.h>
00034 
00035 DBUS_BEGIN_DECLS
00036 
00043 typedef struct DBusError DBusError;
00044 
00048 struct DBusError
00049 {
00050   const char *name;    
00051   const char *message; 
00053   unsigned int dummy1 : 1; 
00054   unsigned int dummy2 : 1; 
00055   unsigned int dummy3 : 1; 
00056   unsigned int dummy4 : 1; 
00057   unsigned int dummy5 : 1; 
00059   void *padding1; 
00060 };
00061 
00062 #define DBUS_ERROR_INIT { NULL, NULL, TRUE, 0, 0, 0, 0, NULL }
00063 
00064 DBUS_EXPORT
00065 void        dbus_error_init      (DBusError       *error);
00066 DBUS_EXPORT
00067 void        dbus_error_free      (DBusError       *error);
00068 DBUS_EXPORT
00069 void        dbus_set_error       (DBusError       *error,
00070                                   const char      *name,
00071                                   const char      *message,
00072                                   ...);
00073 DBUS_EXPORT
00074 void        dbus_set_error_const (DBusError       *error,
00075                                   const char      *name,
00076                                   const char      *message);
00077 DBUS_EXPORT
00078 void        dbus_move_error      (DBusError       *src,
00079                                   DBusError       *dest);
00080 DBUS_EXPORT
00081 dbus_bool_t dbus_error_has_name  (const DBusError *error,
00082                                   const char      *name);
00083 DBUS_EXPORT
00084 dbus_bool_t dbus_error_is_set    (const DBusError *error);
00085 
00088 DBUS_END_DECLS
00089 
00090 #endif /* DBUS_ERROR_H */