Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:55:13

0001 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
0002 /* dbus-errors.h Error reporting
0003  *
0004  * Copyright (C) 2002  Red Hat Inc.
0005  * Copyright (C) 2003  CodeFactory AB
0006  *
0007  * Licensed under the Academic Free License version 2.1
0008  *
0009  * This program is free software; you can redistribute it and/or modify
0010  * it under the terms of the GNU General Public License as published by
0011  * the Free Software Foundation; either version 2 of the License, or
0012  * (at your option) any later version.
0013  *
0014  * This program is distributed in the hope that it will be useful,
0015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0017  * GNU General Public License for more details.
0018  *
0019  * You should have received a copy of the GNU General Public License
0020  * along with this program; if not, write to the Free Software
0021  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
0022  *
0023  */
0024 #if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION)
0025 #error "Only <dbus/dbus.h> can be included directly, this file may disappear or change contents."
0026 #endif
0027 
0028 #ifndef DBUS_ERROR_H
0029 #define DBUS_ERROR_H
0030 
0031 #include <dbus/dbus-macros.h>
0032 #include <dbus/dbus-types.h>
0033 #include <dbus/dbus-protocol.h>
0034 
0035 DBUS_BEGIN_DECLS
0036 
0037 /**
0038  * @addtogroup DBusErrors
0039  * @{
0040  */
0041 
0042 /** Mostly-opaque type representing an error that occurred */
0043 typedef struct DBusError DBusError;
0044 
0045 /**
0046  * Object representing an exception.
0047  */
0048 struct DBusError
0049 {
0050   const char *name;    /**< public error name field */
0051   const char *message; /**< public error message field */
0052 
0053   unsigned int dummy1 : 1; /**< placeholder */
0054   unsigned int dummy2 : 1; /**< placeholder */
0055   unsigned int dummy3 : 1; /**< placeholder */
0056   unsigned int dummy4 : 1; /**< placeholder */
0057   unsigned int dummy5 : 1; /**< placeholder */
0058 
0059   void *padding1; /**< placeholder */
0060 };
0061 
0062 #define DBUS_ERROR_INIT { NULL, NULL, TRUE, 0, 0, 0, 0, NULL }
0063 
0064 DBUS_EXPORT
0065 void        dbus_error_init      (DBusError       *error);
0066 DBUS_EXPORT
0067 void        dbus_error_free      (DBusError       *error);
0068 DBUS_EXPORT
0069 void        dbus_set_error       (DBusError       *error,
0070                                   const char      *name,
0071                                   const char      *message,
0072                                   ...) _DBUS_GNUC_PRINTF (3, 4);
0073 DBUS_EXPORT
0074 void        dbus_set_error_const (DBusError       *error,
0075                                   const char      *name,
0076                                   const char      *message);
0077 DBUS_EXPORT
0078 void        dbus_move_error      (DBusError       *src,
0079                                   DBusError       *dest);
0080 DBUS_EXPORT
0081 dbus_bool_t dbus_error_has_name  (const DBusError *error,
0082                                   const char      *name);
0083 DBUS_EXPORT
0084 dbus_bool_t dbus_error_is_set    (const DBusError *error);
0085 
0086 /** @} */
0087 
0088 DBUS_END_DECLS
0089 
0090 #endif /* DBUS_ERROR_H */