dbus-errors.inc 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. *
  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. //#include <dbus/dbus-macros.h>
  25. //#include <dbus/dbus-types.h>
  26. type
  27. PDBusError = ^DBusError;
  28. {
  29. * Object representing an exception.
  30. }
  31. DBusError = record
  32. name: PChar; {< error name }
  33. message: PChar; {< error message }
  34. dummy1: cuint; //: 1; {< placeholder }
  35. // unsigned int dummy2 : 1; {< placeholder }
  36. // unsigned int dummy3 : 1; {< placeholder }
  37. // unsigned int dummy4 : 1; {< placeholder }
  38. // unsigned int dummy5 : 1; {< placeholder }
  39. padding1: Pointer; {< placeholder }
  40. end;
  41. procedure dbus_error_init(error: PDBusError); cdecl; external LibDBus;
  42. procedure dbus_error_free(error: PDBusError); cdecl; external LibDBus;
  43. procedure dbus_set_error(error: PDBusError; const name, message: PChar; others: array of const); cdecl; external LibDBus;
  44. procedure dbus_set_error_const(error: PDBusError; const name, message: PChar); cdecl; external LibDBus;
  45. procedure dbus_move_error(src, dest: PDBusError); cdecl; external LibDBus;
  46. function dbus_error_has_name(const error: PDBusError; const name: PChar): dbus_bool_t; cdecl; external LibDBus;
  47. function dbus_error_is_set(const error: PDBusError): dbus_bool_t; cdecl; external LibDBus;