Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:59:55

0001 /* GDBus - GLib D-Bus Library
0002  *
0003  * Copyright (C) 2008-2010 Red Hat, Inc.
0004  *
0005  * SPDX-License-Identifier: LGPL-2.1-or-later
0006  *
0007  * This library is free software; you can redistribute it and/or
0008  * modify it under the terms of the GNU Lesser General Public
0009  * License as published by the Free Software Foundation; either
0010  * version 2.1 of the License, or (at your option) any later version.
0011  *
0012  * This library is distributed in the hope that it will be useful,
0013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0015  * Lesser General Public License for more details.
0016  *
0017  * You should have received a copy of the GNU Lesser General
0018  * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
0019  *
0020  * Author: David Zeuthen <davidz@redhat.com>
0021  */
0022 
0023 #ifndef __G_DBUS_METHOD_INVOCATION_H__
0024 #define __G_DBUS_METHOD_INVOCATION_H__
0025 
0026 #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
0027 #error "Only <gio/gio.h> can be included directly."
0028 #endif
0029 
0030 #include <gio/giotypes.h>
0031 
0032 G_BEGIN_DECLS
0033 
0034 #define G_TYPE_DBUS_METHOD_INVOCATION         (g_dbus_method_invocation_get_type ())
0035 #define G_DBUS_METHOD_INVOCATION(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_METHOD_INVOCATION, GDBusMethodInvocation))
0036 #define G_IS_DBUS_METHOD_INVOCATION(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_METHOD_INVOCATION))
0037 
0038 /**
0039  * G_DBUS_METHOD_INVOCATION_HANDLED:
0040  *
0041  * The value returned by handlers of the signals generated by
0042  * the `gdbus-codegen` tool to indicate that a method call has been
0043  * handled by an implementation. It is equal to %TRUE, but using
0044  * this macro is sometimes more readable.
0045  *
0046  * In code that needs to be backwards-compatible with older GLib,
0047  * use %TRUE instead, often written like this:
0048  *
0049  * |[
0050  *   g_dbus_method_invocation_return_error (invocation, ...);
0051  *   return TRUE;    // handled
0052  * ]|
0053  *
0054  * Since: 2.68
0055  */
0056 #define G_DBUS_METHOD_INVOCATION_HANDLED TRUE GIO_AVAILABLE_MACRO_IN_2_68
0057 
0058 /**
0059  * G_DBUS_METHOD_INVOCATION_UNHANDLED:
0060  *
0061  * The value returned by handlers of the signals generated by
0062  * the `gdbus-codegen` tool to indicate that a method call has not been
0063  * handled by an implementation. It is equal to %FALSE, but using
0064  * this macro is sometimes more readable.
0065  *
0066  * In code that needs to be backwards-compatible with older GLib,
0067  * use %FALSE instead.
0068  *
0069  * Since: 2.68
0070  */
0071 #define G_DBUS_METHOD_INVOCATION_UNHANDLED FALSE GIO_AVAILABLE_MACRO_IN_2_68
0072 
0073 GIO_AVAILABLE_IN_ALL
0074 GType                  g_dbus_method_invocation_get_type             (void) G_GNUC_CONST;
0075 GIO_AVAILABLE_IN_ALL
0076 const gchar           *g_dbus_method_invocation_get_sender           (GDBusMethodInvocation *invocation);
0077 GIO_AVAILABLE_IN_ALL
0078 const gchar           *g_dbus_method_invocation_get_object_path      (GDBusMethodInvocation *invocation);
0079 GIO_AVAILABLE_IN_ALL
0080 const gchar           *g_dbus_method_invocation_get_interface_name   (GDBusMethodInvocation *invocation);
0081 GIO_AVAILABLE_IN_ALL
0082 const gchar           *g_dbus_method_invocation_get_method_name      (GDBusMethodInvocation *invocation);
0083 GIO_AVAILABLE_IN_ALL
0084 const GDBusMethodInfo *g_dbus_method_invocation_get_method_info      (GDBusMethodInvocation *invocation);
0085 GIO_AVAILABLE_IN_2_38
0086 const GDBusPropertyInfo *g_dbus_method_invocation_get_property_info  (GDBusMethodInvocation *invocation);
0087 GIO_AVAILABLE_IN_ALL
0088 GDBusConnection       *g_dbus_method_invocation_get_connection       (GDBusMethodInvocation *invocation);
0089 GIO_AVAILABLE_IN_ALL
0090 GDBusMessage          *g_dbus_method_invocation_get_message          (GDBusMethodInvocation *invocation);
0091 GIO_AVAILABLE_IN_ALL
0092 GVariant              *g_dbus_method_invocation_get_parameters       (GDBusMethodInvocation *invocation);
0093 GIO_AVAILABLE_IN_ALL
0094 gpointer               g_dbus_method_invocation_get_user_data        (GDBusMethodInvocation *invocation);
0095 
0096 GIO_AVAILABLE_IN_ALL
0097 void                   g_dbus_method_invocation_return_value         (GDBusMethodInvocation *invocation,
0098                                                                       GVariant              *parameters);
0099 #ifdef G_OS_UNIX
0100 GIO_AVAILABLE_IN_ALL
0101 void                   g_dbus_method_invocation_return_value_with_unix_fd_list (GDBusMethodInvocation *invocation,
0102                                                                                 GVariant              *parameters,
0103                                                                                 GUnixFDList           *fd_list);
0104 #endif /* G_OS_UNIX */
0105 GIO_AVAILABLE_IN_ALL
0106 void                   g_dbus_method_invocation_return_error         (GDBusMethodInvocation *invocation,
0107                                                                       GQuark                 domain,
0108                                                                       gint                   code,
0109                                                                       const gchar           *format,
0110                                                                       ...) G_GNUC_PRINTF(4, 5);
0111 GIO_AVAILABLE_IN_ALL
0112 void                   g_dbus_method_invocation_return_error_valist  (GDBusMethodInvocation *invocation,
0113                                                                       GQuark                 domain,
0114                                                                       gint                   code,
0115                                                                       const gchar           *format,
0116                                                                       va_list                var_args)
0117                                                                       G_GNUC_PRINTF(4, 0);
0118 GIO_AVAILABLE_IN_ALL
0119 void                   g_dbus_method_invocation_return_error_literal (GDBusMethodInvocation *invocation,
0120                                                                       GQuark                 domain,
0121                                                                       gint                   code,
0122                                                                       const gchar           *message);
0123 GIO_AVAILABLE_IN_ALL
0124 void                   g_dbus_method_invocation_return_gerror        (GDBusMethodInvocation *invocation,
0125                                                                       const GError          *error);
0126 GIO_AVAILABLE_IN_ALL
0127 void                   g_dbus_method_invocation_take_error           (GDBusMethodInvocation *invocation,
0128                                                                       GError                *error);
0129 GIO_AVAILABLE_IN_ALL
0130 void                   g_dbus_method_invocation_return_dbus_error    (GDBusMethodInvocation *invocation,
0131                                                                       const gchar           *error_name,
0132                                                                       const gchar           *error_message);
0133 
0134 G_END_DECLS
0135 
0136 #endif /* __G_DBUS_METHOD_INVOCATION_H__ */