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