epoc32/include/stdapis/dbus-1.0/dbus/dbus-errors.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:27:01 +0100
branchSymbian2
changeset 3 e1b950c65cb4
permissions -rw-r--r--
Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
     1 /* -*- mode: C; c-file-style: "gnu" -*- */
     2 /* dbus-errors.h Error reporting
     3  *
     4  * Copyright (C) 2002  Red Hat Inc.
     5  * Copyright (C) 2003  CodeFactory AB
     6  * Portion Copyright © 2008 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
     7  * Licensed under the Academic Free License version 2.1
     8  * 
     9  * This program is free software; you can redistribute it and/or modify
    10  * it under the terms of the GNU General Public License as published by
    11  * the Free Software Foundation; either version 2 of the License, or
    12  * (at your option) any later version.
    13  *
    14  * This program is distributed in the hope that it will be useful,
    15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    17  * GNU General Public License for more details.
    18  * 
    19  * You should have received a copy of the GNU General Public License
    20  * along with this program; if not, write to the Free Software
    21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    22  *
    23  */
    24 #if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION)
    25 #error "Only <dbus/dbus.h> can be included directly, this file may disappear or change contents."
    26 #endif
    27 
    28 #ifndef DBUS_ERROR_H
    29 #define DBUS_ERROR_H
    30 
    31 #include <dbus/dbus-macros.h>
    32 #include <dbus/dbus-types.h>
    33 
    34 DBUS_BEGIN_DECLS
    35 
    36 /**
    37  * @addtogroup DBusErrors
    38  * @{
    39  */
    40 
    41 /** Mostly-opaque type representing an error that occurred */
    42 typedef struct DBusError DBusError;
    43 
    44 /**
    45  * Object representing an exception.
    46  */
    47 struct DBusError
    48 {
    49   const char *name;    /**< public error name field */
    50   const char *message; /**< public error message field */
    51 
    52   unsigned int dummy1 : 1; /**< placeholder */
    53   unsigned int dummy2 : 1; /**< placeholder */
    54   unsigned int dummy3 : 1; /**< placeholder */
    55   unsigned int dummy4 : 1; /**< placeholder */
    56   unsigned int dummy5 : 1; /**< placeholder */
    57 
    58   void *padding1; /**< placeholder */
    59 };
    60 
    61 #ifdef __SYMBIAN32__
    62 IMPORT_C
    63 #endif
    64 void        dbus_error_init      (DBusError       *error);
    65 
    66 #ifdef __SYMBIAN32__
    67 IMPORT_C
    68 #endif
    69 void        dbus_error_free      (DBusError       *error);
    70 
    71 #ifdef __SYMBIAN32__
    72 IMPORT_C
    73 #endif
    74 void        dbus_set_error       (DBusError       *error,
    75                                   const char      *name,
    76                                   const char      *message,
    77                                   ...);
    78 #ifdef __SYMBIAN32__
    79 IMPORT_C
    80 #endif
    81 void        dbus_set_error_const (DBusError       *error,
    82                                   const char      *name,
    83                                   const char      *message);
    84 #ifdef __SYMBIAN32__
    85 IMPORT_C
    86 #endif
    87 void        dbus_move_error      (DBusError       *src,
    88                                   DBusError       *dest);
    89 #ifdef __SYMBIAN32__
    90 IMPORT_C
    91 #endif
    92 dbus_bool_t dbus_error_has_name  (const DBusError *error,
    93                                   const char      *name);
    94 #ifdef __SYMBIAN32__
    95 IMPORT_C
    96 #endif
    97 dbus_bool_t dbus_error_is_set    (const DBusError *error);
    98 
    99 /** @} */
   100 
   101 DBUS_END_DECLS
   102 
   103 #endif /* DBUS_ERROR_H */