Path: blob/master/thirdparty/linuxbsd_headers/dbus/dbus-errors.h
9903 views
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */1/* dbus-errors.h Error reporting2*3* Copyright (C) 2002 Red Hat Inc.4* Copyright (C) 2003 CodeFactory AB5*6* Licensed under the Academic Free License version 2.17*8* This program is free software; you can redistribute it and/or modify9* it under the terms of the GNU General Public License as published by10* the Free Software Foundation; either version 2 of the License, or11* (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 of15* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the16* GNU General Public License for more details.17*18* You should have received a copy of the GNU General Public License19* along with this program; if not, write to the Free Software20* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA21*22*/23#if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION)24#error "Only <dbus/dbus.h> can be included directly, this file may disappear or change contents."25#endif2627#ifndef DBUS_ERROR_H28#define DBUS_ERROR_H2930#include <dbus/dbus-macros.h>31#include <dbus/dbus-types.h>32#include <dbus/dbus-protocol.h>3334DBUS_BEGIN_DECLS3536/**37* @addtogroup DBusErrors38* @{39*/4041/** Mostly-opaque type representing an error that occurred */42typedef struct DBusError DBusError;4344/**45* Object representing an exception.46*/47struct DBusError48{49const char *name; /**< public error name field */50const char *message; /**< public error message field */5152unsigned int dummy1 : 1; /**< placeholder */53unsigned int dummy2 : 1; /**< placeholder */54unsigned int dummy3 : 1; /**< placeholder */55unsigned int dummy4 : 1; /**< placeholder */56unsigned int dummy5 : 1; /**< placeholder */5758void *padding1; /**< placeholder */59};6061#define DBUS_ERROR_INIT { NULL, NULL, TRUE, 0, 0, 0, 0, NULL }6263DBUS_EXPORT64void dbus_error_init (DBusError *error);65DBUS_EXPORT66void dbus_error_free (DBusError *error);67DBUS_EXPORT68void dbus_set_error (DBusError *error,69const char *name,70const char *message,71...) _DBUS_GNUC_PRINTF (3, 4);72DBUS_EXPORT73void dbus_set_error_const (DBusError *error,74const char *name,75const char *message);76DBUS_EXPORT77void dbus_move_error (DBusError *src,78DBusError *dest);79DBUS_EXPORT80dbus_bool_t dbus_error_has_name (const DBusError *error,81const char *name);82DBUS_EXPORT83dbus_bool_t dbus_error_is_set (const DBusError *error);8485/** @} */8687DBUS_END_DECLS8889#endif /* DBUS_ERROR_H */909192