Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/dbus-1.0/dbus/dbus-errors.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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