ossrv_pub/dbus/inc/dbus-errors.h
author Shabe Razvi <shaber@symbian.org>
Tue, 29 Jun 2010 11:29:33 +0100
branchRCL_3
changeset 40 ddd39d92c350
parent 0 e4d67989cc36
permissions -rw-r--r--
Bug 3123 - libstdcppv5.dll fails to link due to missing symbols

/* -*- mode: C; c-file-style: "gnu" -*- */
/* dbus-errors.h Error reporting
 *
 * Copyright (C) 2002  Red Hat Inc.
 * Copyright (C) 2003  CodeFactory AB
 * Portion Copyright © 2008 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
 * Licensed under the Academic Free License version 2.1
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 */
#if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION)
#error "Only <dbus/dbus.h> can be included directly, this file may disappear or change contents."
#endif

#ifndef DBUS_ERROR_H
#define DBUS_ERROR_H

#include <dbus/dbus-macros.h>
#include <dbus/dbus-types.h>

DBUS_BEGIN_DECLS

/**
 * @addtogroup DBusErrors
 * @{
 */

/** Mostly-opaque type representing an error that occurred */
typedef struct DBusError DBusError;

/**
 * Object representing an exception.
 */
struct DBusError
{
  const char *name;    /**< public error name field */
  const char *message; /**< public error message field */

  unsigned int dummy1 : 1; /**< placeholder */
  unsigned int dummy2 : 1; /**< placeholder */
  unsigned int dummy3 : 1; /**< placeholder */
  unsigned int dummy4 : 1; /**< placeholder */
  unsigned int dummy5 : 1; /**< placeholder */

  void *padding1; /**< placeholder */
};

#ifdef __SYMBIAN32__
IMPORT_C
#endif
void        dbus_error_init      (DBusError       *error);

#ifdef __SYMBIAN32__
IMPORT_C
#endif
void        dbus_error_free      (DBusError       *error);

#ifdef __SYMBIAN32__
IMPORT_C
#endif
void        dbus_set_error       (DBusError       *error,
                                  const char      *name,
                                  const char      *message,
                                  ...);
#ifdef __SYMBIAN32__
IMPORT_C
#endif
void        dbus_set_error_const (DBusError       *error,
                                  const char      *name,
                                  const char      *message);
#ifdef __SYMBIAN32__
IMPORT_C
#endif
void        dbus_move_error      (DBusError       *src,
                                  DBusError       *dest);
#ifdef __SYMBIAN32__
IMPORT_C
#endif
dbus_bool_t dbus_error_has_name  (const DBusError *error,
                                  const char      *name);
#ifdef __SYMBIAN32__
IMPORT_C
#endif
dbus_bool_t dbus_error_is_set    (const DBusError *error);

/** @} */

DBUS_END_DECLS

#endif /* DBUS_ERROR_H */