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