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_INTERFACE_SKELETON_H__
24 #define __G_DBUS_INTERFACE_SKELETON_H__
25
26 #include <gio/giotypes.h>
27
28 G_BEGIN_DECLS
29
30 #define G_TYPE_DBUS_INTERFACE_SKELETON (g_dbus_interface_skeleton_get_type ())
31 #define G_DBUS_INTERFACE_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_DBUS_INTERFACE_SKELETON, GDBusInterfaceSkeleton))
32 #define G_DBUS_INTERFACE_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_DBUS_INTERFACE_SKELETON, GDBusInterfaceSkeletonClass))
33 #define G_DBUS_INTERFACE_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_DBUS_INTERFACE_SKELETON, GDBusInterfaceSkeletonClass))
34 #define G_IS_DBUS_INTERFACE_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_DBUS_INTERFACE_SKELETON))
35 #define G_IS_DBUS_INTERFACE_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_DBUS_INTERFACE_SKELETON))
36
37 typedef struct _GDBusInterfaceSkeletonClass GDBusInterfaceSkeletonClass;
38 typedef struct _GDBusInterfaceSkeletonPrivate GDBusInterfaceSkeletonPrivate;
39
40 struct _GDBusInterfaceSkeleton
41 {
42 /*< private >*/
43 GObject parent_instance;
44 GDBusInterfaceSkeletonPrivate *priv;
45 };
46
47 /**
48 * GDBusInterfaceSkeletonClass:
49 * @parent_class: The parent class.
50 * @get_info: Returns a #GDBusInterfaceInfo. See g_dbus_interface_skeleton_get_info() for details.
51 * @get_vtable: Returns a #GDBusInterfaceVTable. See g_dbus_interface_skeleton_get_vtable() for details.
52 * @get_properties: Returns a #GVariant with all properties. See g_dbus_interface_skeleton_get_properties().
53 * @flush: Emits outstanding changes, if any. See g_dbus_interface_skeleton_flush().
54 * @g_authorize_method: Signal class handler for the #GDBusInterfaceSkeleton::g-authorize-method signal.
55 *
56 * Class structure for #GDBusInterfaceSkeleton.
57 *
58 * Since: 2.30
59 */
60 struct _GDBusInterfaceSkeletonClass
61 {
62 GObjectClass parent_class;
63
64 /* Virtual Functions */
65 GDBusInterfaceInfo *(*get_info) (GDBusInterfaceSkeleton *interface_);
66 GDBusInterfaceVTable *(*get_vtable) (GDBusInterfaceSkeleton *interface_);
67 GVariant *(*get_properties) (GDBusInterfaceSkeleton *interface_);
68 void (*flush) (GDBusInterfaceSkeleton *interface_);
69
70 /*< private >*/
71 gpointer vfunc_padding[8];
72 /*< public >*/
73
74 /* Signals */
75 gboolean (*g_authorize_method) (GDBusInterfaceSkeleton *interface_,
76 GDBusMethodInvocation *invocation);
77
78 /*< private >*/
79 gpointer signal_padding[8];
80 };
81
82 GIO_AVAILABLE_IN_ALL
83 GType g_dbus_interface_skeleton_get_type (void) G_GNUC_CONST;
84 GIO_AVAILABLE_IN_ALL
85 GDBusInterfaceSkeletonFlags g_dbus_interface_skeleton_get_flags (GDBusInterfaceSkeleton *interface_);
86 GIO_AVAILABLE_IN_ALL
87 void g_dbus_interface_skeleton_set_flags (GDBusInterfaceSkeleton *interface_,
88 GDBusInterfaceSkeletonFlags flags);
89 GIO_AVAILABLE_IN_ALL
90 GDBusInterfaceInfo *g_dbus_interface_skeleton_get_info (GDBusInterfaceSkeleton *interface_);
91 GIO_AVAILABLE_IN_ALL
92 GDBusInterfaceVTable *g_dbus_interface_skeleton_get_vtable (GDBusInterfaceSkeleton *interface_);
93 GIO_AVAILABLE_IN_ALL
94 GVariant *g_dbus_interface_skeleton_get_properties (GDBusInterfaceSkeleton *interface_);
95 GIO_AVAILABLE_IN_ALL
96 void g_dbus_interface_skeleton_flush (GDBusInterfaceSkeleton *interface_);
97
98 GIO_AVAILABLE_IN_ALL
99 gboolean g_dbus_interface_skeleton_export (GDBusInterfaceSkeleton *interface_,
100 GDBusConnection *connection,
101 const gchar *object_path,
102 GError **error);
103 GIO_AVAILABLE_IN_ALL
104 void g_dbus_interface_skeleton_unexport (GDBusInterfaceSkeleton *interface_);
105 GIO_AVAILABLE_IN_ALL
106 void g_dbus_interface_skeleton_unexport_from_connection (GDBusInterfaceSkeleton *interface_,
107 GDBusConnection *connection);
108
109 GIO_AVAILABLE_IN_ALL
110 GDBusConnection *g_dbus_interface_skeleton_get_connection (GDBusInterfaceSkeleton *interface_);
111 GIO_AVAILABLE_IN_ALL
112 GList *g_dbus_interface_skeleton_get_connections (GDBusInterfaceSkeleton *interface_);
113 GIO_AVAILABLE_IN_ALL
114 gboolean g_dbus_interface_skeleton_has_connection (GDBusInterfaceSkeleton *interface_,
115 GDBusConnection *connection);
116 GIO_AVAILABLE_IN_ALL
117 const gchar *g_dbus_interface_skeleton_get_object_path (GDBusInterfaceSkeleton *interface_);
118
119 G_END_DECLS
120
121 #endif /* __G_DBUS_INTERFACE_SKELETON_H */