1 /* GDBus - GLib D-Bus Library
3 * Copyright (C) 2008-2010 Red Hat, Inc.
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.1 of the License, or (at your option) any later version.
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.
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/>.
18 * Author: David Zeuthen <davidz@redhat.com>
21 #ifndef __G_DBUS_METHOD_INVOCATION_H__
22 #define __G_DBUS_METHOD_INVOCATION_H__
24 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
25 #error "Only <gio/gio.h> can be included directly."
28 #include <gio/giotypes.h>
29 #include <gio/tizen_header_glib.h> /* for TIZEN_PUBLIC_DEPRECATED_API */
33 #define G_TYPE_DBUS_METHOD_INVOCATION (g_dbus_method_invocation_get_type ())
34 #define G_DBUS_METHOD_INVOCATION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_METHOD_INVOCATION, GDBusMethodInvocation))
35 #define G_IS_DBUS_METHOD_INVOCATION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_METHOD_INVOCATION))
38 * G_DBUS_METHOD_INVOCATION_HANDLED:
40 * The value returned by handlers of the signals generated by
41 * the `gdbus-codegen` tool to indicate that a method call has been
42 * handled by an implementation. It is equal to %TRUE, but using
43 * this macro is sometimes more readable.
45 * In code that needs to be backwards-compatible with older GLib,
46 * use %TRUE instead, often written like this:
49 * g_dbus_method_invocation_return_error (invocation, ...);
50 * return TRUE; // handled
55 #define G_DBUS_METHOD_INVOCATION_HANDLED TRUE GLIB_AVAILABLE_MACRO_IN_2_68
58 * G_DBUS_METHOD_INVOCATION_UNHANDLED:
60 * The value returned by handlers of the signals generated by
61 * the `gdbus-codegen` tool to indicate that a method call has not been
62 * handled by an implementation. It is equal to %FALSE, but using
63 * this macro is sometimes more readable.
65 * In code that needs to be backwards-compatible with older GLib,
70 #define G_DBUS_METHOD_INVOCATION_UNHANDLED FALSE GLIB_AVAILABLE_MACRO_IN_2_68
73 GType g_dbus_method_invocation_get_type (void) G_GNUC_CONST TIZEN_PUBLIC_DEPRECATED_API;
75 const gchar *g_dbus_method_invocation_get_sender (GDBusMethodInvocation *invocation) TIZEN_PUBLIC_DEPRECATED_API;
77 const gchar *g_dbus_method_invocation_get_object_path (GDBusMethodInvocation *invocation) TIZEN_PUBLIC_DEPRECATED_API;
79 const gchar *g_dbus_method_invocation_get_interface_name (GDBusMethodInvocation *invocation) TIZEN_PUBLIC_DEPRECATED_API;
81 const gchar *g_dbus_method_invocation_get_method_name (GDBusMethodInvocation *invocation) TIZEN_PUBLIC_DEPRECATED_API;
83 const GDBusMethodInfo *g_dbus_method_invocation_get_method_info (GDBusMethodInvocation *invocation) TIZEN_PUBLIC_DEPRECATED_API;
84 GLIB_AVAILABLE_IN_2_38
85 const GDBusPropertyInfo *g_dbus_method_invocation_get_property_info (GDBusMethodInvocation *invocation) TIZEN_PUBLIC_DEPRECATED_API;
87 GDBusConnection *g_dbus_method_invocation_get_connection (GDBusMethodInvocation *invocation) TIZEN_PUBLIC_DEPRECATED_API;
89 GDBusMessage *g_dbus_method_invocation_get_message (GDBusMethodInvocation *invocation) TIZEN_PUBLIC_DEPRECATED_API;
91 GVariant *g_dbus_method_invocation_get_parameters (GDBusMethodInvocation *invocation) TIZEN_PUBLIC_DEPRECATED_API;
93 GLIB_AVAILABLE_IN_2_44
94 gint g_dbus_method_invocation_peek_unix_fd (GDBusMethodInvocation *invocation,
95 guint index_) TIZEN_PUBLIC_DEPRECATED_API;
98 gpointer g_dbus_method_invocation_get_user_data (GDBusMethodInvocation *invocation) TIZEN_PUBLIC_DEPRECATED_API;
100 GLIB_AVAILABLE_IN_ALL
101 void g_dbus_method_invocation_return_value (GDBusMethodInvocation *invocation,
102 GVariant *parameters) TIZEN_PUBLIC_DEPRECATED_API;
103 GLIB_AVAILABLE_IN_ALL
104 void g_dbus_method_invocation_return_value_with_unix_fd_list (GDBusMethodInvocation *invocation,
105 GVariant *parameters,
106 GUnixFDList *fd_list) TIZEN_PUBLIC_DEPRECATED_API;
107 GLIB_AVAILABLE_IN_ALL
108 void g_dbus_method_invocation_return_error (GDBusMethodInvocation *invocation,
112 ...) G_GNUC_PRINTF(4, 5) TIZEN_PUBLIC_DEPRECATED_API;
113 GLIB_AVAILABLE_IN_ALL
114 void g_dbus_method_invocation_return_error_valist (GDBusMethodInvocation *invocation,
119 G_GNUC_PRINTF(4, 0) TIZEN_PUBLIC_DEPRECATED_API;
120 GLIB_AVAILABLE_IN_ALL
121 void g_dbus_method_invocation_return_error_literal (GDBusMethodInvocation *invocation,
124 const gchar *message) TIZEN_PUBLIC_DEPRECATED_API;
125 GLIB_AVAILABLE_IN_ALL
126 void g_dbus_method_invocation_return_gerror (GDBusMethodInvocation *invocation,
127 const GError *error) TIZEN_PUBLIC_DEPRECATED_API;
128 GLIB_AVAILABLE_IN_ALL
129 void g_dbus_method_invocation_take_error (GDBusMethodInvocation *invocation,
130 GError *error) TIZEN_PUBLIC_DEPRECATED_API;
131 GLIB_AVAILABLE_IN_ALL
132 void g_dbus_method_invocation_return_dbus_error (GDBusMethodInvocation *invocation,
133 const gchar *error_name,
134 const gchar *error_message) TIZEN_PUBLIC_DEPRECATED_API;
138 #endif /* __G_DBUS_METHOD_INVOCATION_H__ */