dbus-message.inc 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. { -*- mode: C; c-file-style: "gnu" -*- }
  2. { dbus-message.h DBusMessage object
  3. *
  4. * Copyright (C) 2002, 2003, 2005 Red Hat Inc.
  5. *
  6. * Licensed under the Academic Free License version 2.1
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  21. *
  22. }
  23. {#include <dbus/dbus-macros.h>
  24. #include <dbus/dbus-types.h>
  25. #include <dbus/dbus-arch-deps.h>}
  26. {$include dbus-memory.inc}
  27. {#include <dbus/dbus-errors.h>
  28. #include <stdarg.h>}
  29. type
  30. DBusMessage = record end;
  31. PDBusMessage = ^DBusMessage;
  32. PDBusMessageIter = ^DBusMessageIter;
  33. {
  34. * DBusMessageIter struct; contains no public fields
  35. }
  36. DBusMessageIter = record
  37. dummy1: Pointer; {< Don't use this }
  38. dummy2: Pointer; {< Don't use this }
  39. dummy3: dbus_uint32_t; {< Don't use this }
  40. dummy4: cint; {< Don't use this }
  41. dummy5: cint; {< Don't use this }
  42. dummy6: cint; {< Don't use this }
  43. dummy7: cint; {< Don't use this }
  44. dummy8: cint; {< Don't use this }
  45. dummy9: cint; {< Don't use this }
  46. dummy10: cint; {< Don't use this }
  47. dummy11: cint; {< Don't use this }
  48. pad1: cint; {< Don't use this }
  49. pad2: cint; {< Don't use this }
  50. pad3: Pointer {< Don't use this }
  51. end;
  52. function dbus_message_new(message_type: Integer): PDBusMessage; cdecl; external LibDBus;
  53. function dbus_message_new_method_call(
  54. const bus_name, path, interface_, method: PChar): PDBusMessage; cdecl; external LibDBus;
  55. function dbus_message_new_method_return(method_call: PDBusMessage): PDBusMessage; cdecl; external LibDBus;
  56. function dbus_message_new_signal(const path, interface_, name: PChar): PDBusMessage; cdecl; external LibDBus;
  57. function dbus_message_new_error(reply_to: PDBusMessage;
  58. const error_name, error_message: PChar): PDBusMessage; cdecl; external LibDBus;
  59. function dbus_message_new_error_printf(reply_to: PDBusMessage;
  60. const error_name, error_format: PChar;
  61. others: array of const): PDBusMessage; cdecl; external LibDBus;
  62. function dbus_message_copy(const message_: PDBusMessage): PDBusMessage; cdecl; external LibDBus;
  63. function dbus_message_ref(message_: PDBusMessage): PDBusMessage; cdecl; external LibDBus;
  64. procedure dbus_message_unref(message_: PDBusMessage); cdecl; external LibDBus;
  65. function dbus_message_get_type(message_: PDBusMessage): cint; cdecl; external LibDBus;
  66. function dbus_message_set_path(message_: PDBusMessage;
  67. const object_path: PChar): dbus_bool_t; cdecl; external LibDBus;
  68. function dbus_message_get_path(message_: PDBusMessage): PChar; cdecl; external LibDBus;
  69. function dbus_message_has_path(message_: PDBusMessage;
  70. const object_path: PChar): dbus_bool_t; cdecl; external LibDBus;
  71. function dbus_message_set_interface(message_: PDBusMessage;
  72. const interface_: PChar): dbus_bool_t; cdecl; external LibDBus;
  73. function dbus_message_get_interface(message_: PDBusMessage): PChar; cdecl; external LibDBus;
  74. function dbus_message_has_interface(message_: PDBusMessage;
  75. const interface_: PChar): dbus_bool_t; cdecl; external LibDBus;
  76. function dbus_message_set_member(message_: PDBusMessage;
  77. const member: PChar): dbus_bool_t; cdecl; external LibDBus;
  78. function dbus_message_get_member(message_: PDBusMessage): PChar; cdecl; external LibDBus;
  79. function dbus_message_has_member(message_: PDBusMessage;
  80. const member: PChar): dbus_bool_t; cdecl; external LibDBus;
  81. function dbus_message_set_error_name(message_: PDBusMessage;
  82. const name: PChar): dbus_bool_t; cdecl; external LibDBus;
  83. function dbus_message_get_error_name(message_: PDBusMessage): PChar; cdecl; external LibDBus;
  84. function dbus_message_set_destination(message_: PDBusMessage;
  85. const destination: PChar): dbus_bool_t; cdecl; external LibDBus;
  86. function dbus_message_get_destination(message_: PDBusMessage): PChar; cdecl; external LibDBus;
  87. function dbus_message_set_sender(message_: PDBusMessage;
  88. const sender: PChar): dbus_bool_t; cdecl; external LibDBus;
  89. function dbus_message_get_sender(message_: PDBusMessage): PChar; cdecl; external LibDBus;
  90. function dbus_message_get_signature(message_: PDBusMessage): PChar; cdecl; external LibDBus;
  91. procedure dbus_message_set_no_reply(message_: PDBusMessage;
  92. no_reply: dbus_bool_t); cdecl; external LibDBus;
  93. function dbus_message_get_no_reply(message_: PDBusMessage): dbus_bool_t; cdecl; external LibDBus;
  94. function dbus_message_is_method_call(message_: PDBusMessage;
  95. const interface_, method: PChar): dbus_bool_t; cdecl; external LibDBus;
  96. function dbus_message_is_signal(message_: PDBusMessage;
  97. const interface_, signal_name: PChar): dbus_bool_t; cdecl; external LibDBus;
  98. function dbus_message_is_error(message_: PDBusMessage;
  99. const error_name: PChar): dbus_bool_t; cdecl; external LibDBus;
  100. function dbus_message_has_destination(message_: PDBusMessage;
  101. const bus_name: PChar): dbus_bool_t; cdecl; external LibDBus;
  102. function dbus_message_has_sender(message_: PDBusMessage;
  103. const unique_bus_name: PChar): dbus_bool_t; cdecl; external LibDBus;
  104. function dbus_message_has_signature(message_: PDBusMessage;
  105. const signature: PChar): dbus_bool_t; cdecl; external LibDBus;
  106. function dbus_message_get_serial(message_: PDBusMessage): dbus_uint32_t; cdecl; external LibDBus;
  107. function dbus_message_set_reply_serial(message_: PDBusMessage;
  108. reply_serial: dbus_uint32_t): dbus_bool_t; cdecl; external LibDBus;
  109. function dbus_message_get_reply_serial(message_: PDBusMessage): dbus_uint32_t; cdecl; external LibDBus;
  110. procedure dbus_message_set_auto_start(message_: PDBusMessage; auto_start: dbus_bool_t); cdecl; external LibDBus;
  111. function dbus_message_get_auto_start(message_: PDBusMessage): dbus_bool_t; cdecl; external LibDBus;
  112. function dbus_message_get_path_decomposed(message_: PDBusMessage; path: PPPChar): dbus_bool_t; cdecl; external LibDBus;
  113. function dbus_message_append_args(message_: PDBusMessage;
  114. first_arg_type: cint; others: array of const): dbus_bool_t; cdecl; external LibDBus;
  115. function dbus_message_append_args_valist(message_: PDBusMessage;
  116. first_arg_type: cint; var_args: va_list): dbus_bool_t; cdecl; external LibDBus;
  117. function dbus_message_get_args(message_: PDBusMessage;
  118. error: PDBusError; first_arg_type: cint; others: array of const): dbus_bool_t; cdecl; external LibDBus;
  119. function dbus_message_get_args_valist(message_: PDBusMessage;
  120. error: PDBusError; first_arg_type: cint; var_args: va_list): dbus_bool_t; cdecl; external LibDBus;
  121. function dbus_message_iter_init(message_: PDBusMessage; iter: PDBusMessageIter): dbus_bool_t; cdecl; external LibDBus;
  122. function dbus_message_iter_has_next(iter: PDBusMessageIter): dbus_bool_t; cdecl; external LibDBus;
  123. function dbus_message_iter_next(iter: PDBusMessageIter): dbus_bool_t; cdecl; external LibDBus;
  124. function dbus_message_iter_get_signature(iter: PDBusMessageIter): PChar; cdecl; external LibDBus;
  125. function dbus_message_iter_get_arg_type(iter: PDBusMessageIter): cint; cdecl; external LibDBus;
  126. function dbus_message_iter_get_element_type(iter: PDBusMessageIter): cint; cdecl; external LibDBus;
  127. procedure dbus_message_iter_recurse(iter, sub: PDBusMessageIter); cdecl; external LibDBus;
  128. procedure dbus_message_iter_get_basic(iter: PDBusMessageIter; value: Pointer); cdecl; external LibDBus;
  129. function dbus_message_iter_get_array_len(iter: PDBusMessageIter): cint; cdecl; external LibDBus;
  130. procedure dbus_message_iter_get_fixed_array(iter: PDBusMessageIter; value: Pointer; n_elements: Pcint); cdecl; external LibDBus;
  131. procedure dbus_message_iter_init_append(message_: PDBusMessage; iter: PDBusMessageIter); cdecl; external LibDBus;
  132. function dbus_message_iter_append_basic(iter: PDBusMessageIter;
  133. type_: cint; const value: Pointer): dbus_bool_t; cdecl; external LibDBus;
  134. function dbus_message_iter_append_fixed_array(iter: PDBusMessageIter;
  135. element_type: cint; const value: Pointer; n_elements: cint): dbus_bool_t; cdecl; external LibDBus;
  136. function dbus_message_iter_open_container(iter: PDBusMessageIter;
  137. type_: cint; const contained_signature: PChar; sub: PDBusMessageIter): dbus_bool_t; cdecl; external LibDBus;
  138. function dbus_message_iter_close_container(iter, sub: PDBusMessageIter): dbus_bool_t; cdecl; external LibDBus;
  139. function dbus_set_error_from_message(error: PDBusError; message_: PDBusMessage): dbus_bool_t; cdecl; external LibDBus;
  140. function dbus_message_allocate_data_slot(slot_p: Pdbus_int32_t): dbus_bool_t; cdecl; external LibDBus;
  141. procedure dbus_message_free_data_slot(slot_p: Pdbus_int32_t); cdecl; external LibDBus;
  142. function dbus_message_set_data(message_: PDBusMessage;
  143. slot: dbus_int32_t; data: Pointer; free_data_func: DBusFreeFunction): dbus_bool_t; cdecl; external LibDBus;
  144. function dbus_message_get_data(message_: PDBusMessage; slot: dbus_int32_t): Pointer; cdecl; external LibDBus;
  145. function dbus_message_type_from_string(const type_str: PChar): cint; cdecl; external LibDBus;
  146. function dbus_message_type_to_string(type_: cint): PChar; cdecl; external LibDBus;