gdbusmessage.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. /* GDBus - GLib D-Bus Library
  2. *
  3. * Copyright (C) 2008-2010 Red Hat, Inc.
  4. *
  5. * This library is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU Lesser General Public
  7. * License as published by the Free Software Foundation; either
  8. * version 2 of the License, or (at your option) any later version.
  9. *
  10. * This library is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * Lesser General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Lesser General
  16. * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
  17. *
  18. * Author: David Zeuthen <davidz@redhat.com>
  19. */
  20. #ifndef __G_DBUS_MESSAGE_H__
  21. #define __G_DBUS_MESSAGE_H__
  22. #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
  23. #error "Only <gio/gio.h> can be included directly."
  24. #endif
  25. #include <gio/giotypes.h>
  26. G_BEGIN_DECLS
  27. #define G_TYPE_DBUS_MESSAGE (g_dbus_message_get_type ())
  28. #define G_DBUS_MESSAGE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_MESSAGE, GDBusMessage))
  29. #define G_IS_DBUS_MESSAGE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_MESSAGE))
  30. GLIB_AVAILABLE_IN_ALL
  31. GType g_dbus_message_get_type (void) G_GNUC_CONST;
  32. GLIB_AVAILABLE_IN_ALL
  33. GDBusMessage *g_dbus_message_new (void);
  34. GLIB_AVAILABLE_IN_ALL
  35. GDBusMessage *g_dbus_message_new_signal (const gchar *path,
  36. const gchar *interface_,
  37. const gchar *signal);
  38. GLIB_AVAILABLE_IN_ALL
  39. GDBusMessage *g_dbus_message_new_method_call (const gchar *name,
  40. const gchar *path,
  41. const gchar *interface_,
  42. const gchar *method);
  43. GLIB_AVAILABLE_IN_ALL
  44. GDBusMessage *g_dbus_message_new_method_reply (GDBusMessage *method_call_message);
  45. GLIB_AVAILABLE_IN_ALL
  46. GDBusMessage *g_dbus_message_new_method_error (GDBusMessage *method_call_message,
  47. const gchar *error_name,
  48. const gchar *error_message_format,
  49. ...);
  50. GLIB_AVAILABLE_IN_ALL
  51. GDBusMessage *g_dbus_message_new_method_error_valist (GDBusMessage *method_call_message,
  52. const gchar *error_name,
  53. const gchar *error_message_format,
  54. va_list var_args);
  55. GLIB_AVAILABLE_IN_ALL
  56. GDBusMessage *g_dbus_message_new_method_error_literal (GDBusMessage *method_call_message,
  57. const gchar *error_name,
  58. const gchar *error_message);
  59. GLIB_AVAILABLE_IN_ALL
  60. gchar *g_dbus_message_print (GDBusMessage *message,
  61. guint indent);
  62. GLIB_AVAILABLE_IN_ALL
  63. gboolean g_dbus_message_get_locked (GDBusMessage *message);
  64. GLIB_AVAILABLE_IN_ALL
  65. void g_dbus_message_lock (GDBusMessage *message);
  66. GLIB_AVAILABLE_IN_ALL
  67. GDBusMessage *g_dbus_message_copy (GDBusMessage *message,
  68. GError **error);
  69. GLIB_AVAILABLE_IN_ALL
  70. GDBusMessageByteOrder g_dbus_message_get_byte_order (GDBusMessage *message);
  71. GLIB_AVAILABLE_IN_ALL
  72. void g_dbus_message_set_byte_order (GDBusMessage *message,
  73. GDBusMessageByteOrder byte_order);
  74. GLIB_AVAILABLE_IN_ALL
  75. GDBusMessageType g_dbus_message_get_message_type (GDBusMessage *message);
  76. GLIB_AVAILABLE_IN_ALL
  77. void g_dbus_message_set_message_type (GDBusMessage *message,
  78. GDBusMessageType type);
  79. GLIB_AVAILABLE_IN_ALL
  80. GDBusMessageFlags g_dbus_message_get_flags (GDBusMessage *message);
  81. GLIB_AVAILABLE_IN_ALL
  82. void g_dbus_message_set_flags (GDBusMessage *message,
  83. GDBusMessageFlags flags);
  84. GLIB_AVAILABLE_IN_ALL
  85. guint32 g_dbus_message_get_serial (GDBusMessage *message);
  86. GLIB_AVAILABLE_IN_ALL
  87. void g_dbus_message_set_serial (GDBusMessage *message,
  88. guint32 serial);
  89. GLIB_AVAILABLE_IN_ALL
  90. GVariant *g_dbus_message_get_header (GDBusMessage *message,
  91. GDBusMessageHeaderField header_field);
  92. GLIB_AVAILABLE_IN_ALL
  93. void g_dbus_message_set_header (GDBusMessage *message,
  94. GDBusMessageHeaderField header_field,
  95. GVariant *value);
  96. GLIB_AVAILABLE_IN_ALL
  97. guchar *g_dbus_message_get_header_fields (GDBusMessage *message);
  98. GLIB_AVAILABLE_IN_ALL
  99. GVariant *g_dbus_message_get_body (GDBusMessage *message);
  100. GLIB_AVAILABLE_IN_ALL
  101. void g_dbus_message_set_body (GDBusMessage *message,
  102. GVariant *body);
  103. GLIB_AVAILABLE_IN_ALL
  104. GUnixFDList *g_dbus_message_get_unix_fd_list (GDBusMessage *message);
  105. GLIB_AVAILABLE_IN_ALL
  106. void g_dbus_message_set_unix_fd_list (GDBusMessage *message,
  107. GUnixFDList *fd_list);
  108. GLIB_AVAILABLE_IN_ALL
  109. guint32 g_dbus_message_get_reply_serial (GDBusMessage *message);
  110. GLIB_AVAILABLE_IN_ALL
  111. void g_dbus_message_set_reply_serial (GDBusMessage *message,
  112. guint32 value);
  113. GLIB_AVAILABLE_IN_ALL
  114. const gchar *g_dbus_message_get_interface (GDBusMessage *message);
  115. GLIB_AVAILABLE_IN_ALL
  116. void g_dbus_message_set_interface (GDBusMessage *message,
  117. const gchar *value);
  118. GLIB_AVAILABLE_IN_ALL
  119. const gchar *g_dbus_message_get_member (GDBusMessage *message);
  120. GLIB_AVAILABLE_IN_ALL
  121. void g_dbus_message_set_member (GDBusMessage *message,
  122. const gchar *value);
  123. GLIB_AVAILABLE_IN_ALL
  124. const gchar *g_dbus_message_get_path (GDBusMessage *message);
  125. GLIB_AVAILABLE_IN_ALL
  126. void g_dbus_message_set_path (GDBusMessage *message,
  127. const gchar *value);
  128. GLIB_AVAILABLE_IN_ALL
  129. const gchar *g_dbus_message_get_sender (GDBusMessage *message);
  130. GLIB_AVAILABLE_IN_ALL
  131. void g_dbus_message_set_sender (GDBusMessage *message,
  132. const gchar *value);
  133. GLIB_AVAILABLE_IN_ALL
  134. const gchar *g_dbus_message_get_destination (GDBusMessage *message);
  135. GLIB_AVAILABLE_IN_ALL
  136. void g_dbus_message_set_destination (GDBusMessage *message,
  137. const gchar *value);
  138. GLIB_AVAILABLE_IN_ALL
  139. const gchar *g_dbus_message_get_error_name (GDBusMessage *message);
  140. GLIB_AVAILABLE_IN_ALL
  141. void g_dbus_message_set_error_name (GDBusMessage *message,
  142. const gchar *value);
  143. GLIB_AVAILABLE_IN_ALL
  144. const gchar *g_dbus_message_get_signature (GDBusMessage *message);
  145. GLIB_AVAILABLE_IN_ALL
  146. void g_dbus_message_set_signature (GDBusMessage *message,
  147. const gchar *value);
  148. GLIB_AVAILABLE_IN_ALL
  149. guint32 g_dbus_message_get_num_unix_fds (GDBusMessage *message);
  150. GLIB_AVAILABLE_IN_ALL
  151. void g_dbus_message_set_num_unix_fds (GDBusMessage *message,
  152. guint32 value);
  153. GLIB_AVAILABLE_IN_ALL
  154. const gchar *g_dbus_message_get_arg0 (GDBusMessage *message);
  155. GLIB_AVAILABLE_IN_ALL
  156. GDBusMessage *g_dbus_message_new_from_blob (guchar *blob,
  157. gsize blob_len,
  158. GDBusCapabilityFlags capabilities,
  159. GError **error);
  160. GLIB_AVAILABLE_IN_ALL
  161. gssize g_dbus_message_bytes_needed (guchar *blob,
  162. gsize blob_len,
  163. GError **error);
  164. GLIB_AVAILABLE_IN_ALL
  165. guchar *g_dbus_message_to_blob (GDBusMessage *message,
  166. gsize *out_size,
  167. GDBusCapabilityFlags capabilities,
  168. GError **error);
  169. GLIB_AVAILABLE_IN_ALL
  170. gboolean g_dbus_message_to_gerror (GDBusMessage *message,
  171. GError **error);
  172. G_END_DECLS
  173. #endif /* __G_DBUS_MESSAGE_H__ */