sl@0: /* -*- mode: C; c-file-style: "gnu" -*- */ sl@0: /* dbus-errors.h Error reporting sl@0: * sl@0: * Copyright (C) 2002 Red Hat Inc. sl@0: * Copyright (C) 2003 CodeFactory AB sl@0: * Portion Copyright © 2008 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. sl@0: * Licensed under the Academic Free License version 2.1 sl@0: * sl@0: * This program is free software; you can redistribute it and/or modify sl@0: * it under the terms of the GNU General Public License as published by sl@0: * the Free Software Foundation; either version 2 of the License, or sl@0: * (at your option) any later version. sl@0: * sl@0: * This program is distributed in the hope that it will be useful, sl@0: * but WITHOUT ANY WARRANTY; without even the implied warranty of sl@0: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the sl@0: * GNU General Public License for more details. sl@0: * sl@0: * You should have received a copy of the GNU General Public License sl@0: * along with this program; if not, write to the Free Software sl@0: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA sl@0: * sl@0: */ sl@0: #if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) sl@0: #error "Only can be included directly, this file may disappear or change contents." sl@0: #endif sl@0: sl@0: #ifndef DBUS_ERROR_H sl@0: #define DBUS_ERROR_H sl@0: sl@0: #include sl@0: #include sl@0: sl@0: DBUS_BEGIN_DECLS sl@0: sl@0: /** sl@0: * @addtogroup DBusErrors sl@0: * @{ sl@0: */ sl@0: sl@0: /** Mostly-opaque type representing an error that occurred */ sl@0: typedef struct DBusError DBusError; sl@0: sl@0: /** sl@0: * Object representing an exception. sl@0: */ sl@0: struct DBusError sl@0: { sl@0: const char *name; /**< public error name field */ sl@0: const char *message; /**< public error message field */ sl@0: sl@0: unsigned int dummy1 : 1; /**< placeholder */ sl@0: unsigned int dummy2 : 1; /**< placeholder */ sl@0: unsigned int dummy3 : 1; /**< placeholder */ sl@0: unsigned int dummy4 : 1; /**< placeholder */ sl@0: unsigned int dummy5 : 1; /**< placeholder */ sl@0: sl@0: void *padding1; /**< placeholder */ sl@0: }; sl@0: sl@0: #ifdef __SYMBIAN32__ sl@0: IMPORT_C sl@0: #endif sl@0: void dbus_error_init (DBusError *error); sl@0: sl@0: #ifdef __SYMBIAN32__ sl@0: IMPORT_C sl@0: #endif sl@0: void dbus_error_free (DBusError *error); sl@0: sl@0: #ifdef __SYMBIAN32__ sl@0: IMPORT_C sl@0: #endif sl@0: void dbus_set_error (DBusError *error, sl@0: const char *name, sl@0: const char *message, sl@0: ...); sl@0: #ifdef __SYMBIAN32__ sl@0: IMPORT_C sl@0: #endif sl@0: void dbus_set_error_const (DBusError *error, sl@0: const char *name, sl@0: const char *message); sl@0: #ifdef __SYMBIAN32__ sl@0: IMPORT_C sl@0: #endif sl@0: void dbus_move_error (DBusError *src, sl@0: DBusError *dest); sl@0: #ifdef __SYMBIAN32__ sl@0: IMPORT_C sl@0: #endif sl@0: dbus_bool_t dbus_error_has_name (const DBusError *error, sl@0: const char *name); sl@0: #ifdef __SYMBIAN32__ sl@0: IMPORT_C sl@0: #endif sl@0: dbus_bool_t dbus_error_is_set (const DBusError *error); sl@0: sl@0: /** @} */ sl@0: sl@0: DBUS_END_DECLS sl@0: sl@0: #endif /* DBUS_ERROR_H */