Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gdbusmethodinvocation.h
Go to the documentation of this file.
1/* GDBus - GLib D-Bus Library
2 *
3 * Copyright (C) 2008-2010 Red Hat, Inc.
4 *
5 * SPDX-License-Identifier: LGPL-2.1-or-later
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General
18 * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
19 *
20 * Author: David Zeuthen <davidz@redhat.com>
21 */
22
23#ifndef __G_DBUS_METHOD_INVOCATION_H__
24#define __G_DBUS_METHOD_INVOCATION_H__
25
26#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
27#error "Only <gio/gio.h> can be included directly."
28#endif
29
30#include <gio/giotypes.h>
31
33
34#define G_TYPE_DBUS_METHOD_INVOCATION (g_dbus_method_invocation_get_type ())
35#define G_DBUS_METHOD_INVOCATION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_METHOD_INVOCATION, GDBusMethodInvocation))
36#define G_IS_DBUS_METHOD_INVOCATION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_METHOD_INVOCATION))
37
38/**
39 * G_DBUS_METHOD_INVOCATION_HANDLED:
40 *
41 * The value returned by handlers of the signals generated by
42 * the `gdbus-codegen` tool to indicate that a method call has been
43 * handled by an implementation. It is equal to %TRUE, but using
44 * this macro is sometimes more readable.
45 *
46 * In code that needs to be backwards-compatible with older GLib,
47 * use %TRUE instead, often written like this:
48 *
49 * |[
50 * g_dbus_method_invocation_return_error (invocation, ...);
51 * return TRUE; // handled
52 * ]|
53 *
54 * Since: 2.68
55 */
56#define G_DBUS_METHOD_INVOCATION_HANDLED TRUE GIO_AVAILABLE_MACRO_IN_2_68
57
58/**
59 * G_DBUS_METHOD_INVOCATION_UNHANDLED:
60 *
61 * The value returned by handlers of the signals generated by
62 * the `gdbus-codegen` tool to indicate that a method call has not been
63 * handled by an implementation. It is equal to %FALSE, but using
64 * this macro is sometimes more readable.
65 *
66 * In code that needs to be backwards-compatible with older GLib,
67 * use %FALSE instead.
68 *
69 * Since: 2.68
70 */
71#define G_DBUS_METHOD_INVOCATION_UNHANDLED FALSE GIO_AVAILABLE_MACRO_IN_2_68
72
95
98 GVariant *parameters);
99#ifdef G_OS_UNIX
102 GVariant *parameters,
103 GUnixFDList *fd_list);
104#endif /* G_OS_UNIX */
107 GQuark domain,
108 gint code,
109 const gchar *format,
110 ...) G_GNUC_PRINTF(4, 5);
113 GQuark domain,
114 gint code,
115 const gchar *format,
116 va_list var_args)
117 G_GNUC_PRINTF(4, 0);
120 GQuark domain,
121 gint code,
122 const gchar *message);
125 const GError *error);
128 GError *error);
131 const gchar *error_name,
132 const gchar *error_message);
133
135
136#endif /* __G_DBUS_METHOD_INVOCATION_H__ */
GIO_AVAILABLE_IN_ALL void g_dbus_method_invocation_take_error(GDBusMethodInvocation *invocation, GError *error)
GIO_AVAILABLE_IN_ALL const gchar * g_dbus_method_invocation_get_object_path(GDBusMethodInvocation *invocation)
GIO_AVAILABLE_IN_ALL const GDBusMethodInfo * g_dbus_method_invocation_get_method_info(GDBusMethodInvocation *invocation)
GIO_AVAILABLE_IN_ALL void g_dbus_method_invocation_return_dbus_error(GDBusMethodInvocation *invocation, const gchar *error_name, const gchar *error_message)
GIO_AVAILABLE_IN_ALL GDBusConnection * g_dbus_method_invocation_get_connection(GDBusMethodInvocation *invocation)
GIO_AVAILABLE_IN_2_38 const GDBusPropertyInfo * g_dbus_method_invocation_get_property_info(GDBusMethodInvocation *invocation)
GIO_AVAILABLE_IN_ALL const gchar * g_dbus_method_invocation_get_interface_name(GDBusMethodInvocation *invocation)
GIO_AVAILABLE_IN_ALL void g_dbus_method_invocation_return_value(GDBusMethodInvocation *invocation, GVariant *parameters)
GIO_AVAILABLE_IN_ALL void GIO_AVAILABLE_IN_ALL void GIO_AVAILABLE_IN_ALL void g_dbus_method_invocation_return_error_literal(GDBusMethodInvocation *invocation, GQuark domain, gint code, const gchar *message)
GIO_AVAILABLE_IN_ALL GDBusMessage * g_dbus_method_invocation_get_message(GDBusMethodInvocation *invocation)
GIO_AVAILABLE_IN_ALL void g_dbus_method_invocation_return_error(GDBusMethodInvocation *invocation, GQuark domain, gint code, const gchar *format,...) G_GNUC_PRINTF(4
GIO_AVAILABLE_IN_ALL GVariant * g_dbus_method_invocation_get_parameters(GDBusMethodInvocation *invocation)
GIO_AVAILABLE_IN_ALL const gchar * g_dbus_method_invocation_get_sender(GDBusMethodInvocation *invocation)
GIO_AVAILABLE_IN_ALL void g_dbus_method_invocation_return_value_with_unix_fd_list(GDBusMethodInvocation *invocation, GVariant *parameters, GUnixFDList *fd_list)
GIO_AVAILABLE_IN_ALL gpointer g_dbus_method_invocation_get_user_data(GDBusMethodInvocation *invocation)
GIO_AVAILABLE_IN_ALL void GIO_AVAILABLE_IN_ALL void g_dbus_method_invocation_return_error_valist(GDBusMethodInvocation *invocation, GQuark domain, gint code, const gchar *format, va_list var_args) G_GNUC_PRINTF(4
GIO_AVAILABLE_IN_ALL void g_dbus_method_invocation_return_gerror(GDBusMethodInvocation *invocation, const GError *error)
GIO_AVAILABLE_IN_ALL const gchar * g_dbus_method_invocation_get_method_name(GDBusMethodInvocation *invocation)
GIO_AVAILABLE_IN_ALL GType g_dbus_method_invocation_get_type(void) G_GNUC_CONST
#define GIO_AVAILABLE_IN_ALL
#define GIO_AVAILABLE_IN_2_38
struct _GDBusMessage GDBusMessage
Definition giotypes.h:467
struct _GDBusMethodInvocation GDBusMethodInvocation
Definition giotypes.h:470
struct _GDBusConnection GDBusConnection
Definition giotypes.h:468
#define G_END_DECLS
Definition gmacros.h:910
#define G_GNUC_PRINTF(format_idx, arg_idx)
Definition gmacros.h:608
#define G_BEGIN_DECLS
Definition gmacros.h:909
#define G_GNUC_CONST
Definition gmacros.h:637
G_BEGIN_DECLS typedef guint32 GQuark
Definition gquark.h:38
gsize GType
Definition gtype.h:427
G_BEGIN_DECLS typedef char gchar
Definition gtypes.h:52
void * gpointer
Definition gtypes.h:109
int gint
Definition gtypes.h:55
typedefG_BEGIN_DECLS struct _GVariant GVariant
Definition gvariant.h:36
json_t format(printf, 1, 2)))
static void error(LoadState *S, const char *why)