Tizen 2.1 base
[platform/upstream/glib2.0.git] / gio / gdbusinterfaceskeleton.h
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, write to the
17  * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
18  * Boston, MA 02111-1307, USA.
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 /**
41  * GDBusInterfaceSkeleton:
42  *
43  * The #GDBusInterfaceSkeleton structure contains private data and should
44  * only be accessed using the provided API.
45  *
46  * Since: 2.30
47  */
48 struct _GDBusInterfaceSkeleton
49 {
50   /*< private >*/
51   GObject parent_instance;
52   GDBusInterfaceSkeletonPrivate *priv;
53 };
54
55 /**
56  * GDBusInterfaceSkeletonClass:
57  * @parent_class: The parent class.
58  * @get_info: Returns a #GDBusInterfaceInfo. See g_dbus_interface_skeleton_get_info() for details.
59  * @get_vtable: Returns a #GDBusInterfaceVTable. See g_dbus_interface_skeleton_get_vtable() for details.
60  * @get_properties: Returns a #GVariant with all properties. See g_dbus_interface_skeleton_get_properties().
61  * @flush: Emits outstanding changes, if any. See g_dbus_interface_skeleton_flush().
62  * @g_authorize_method: Signal class handler for the #GDBusInterfaceSkeleton::g-authorize-method signal.
63  *
64  * Class structure for #GDBusInterfaceSkeleton.
65  *
66  * Since: 2.30
67  */
68 struct _GDBusInterfaceSkeletonClass
69 {
70   GObjectClass parent_class;
71
72   /* Virtual Functions */
73   GDBusInterfaceInfo   *(*get_info)       (GDBusInterfaceSkeleton  *interface_);
74   GDBusInterfaceVTable *(*get_vtable)     (GDBusInterfaceSkeleton  *interface_);
75   GVariant             *(*get_properties) (GDBusInterfaceSkeleton  *interface_);
76   void                  (*flush)          (GDBusInterfaceSkeleton  *interface_);
77
78   /*< private >*/
79   gpointer vfunc_padding[8];
80   /*< public >*/
81
82   /* Signals */
83   gboolean (*g_authorize_method) (GDBusInterfaceSkeleton  *interface_,
84                                   GDBusMethodInvocation   *invocation);
85
86   /*< private >*/
87   gpointer signal_padding[8];
88 };
89
90 GType                        g_dbus_interface_skeleton_get_type        (void) G_GNUC_CONST;
91 GDBusInterfaceSkeletonFlags  g_dbus_interface_skeleton_get_flags       (GDBusInterfaceSkeleton      *interface_);
92 void                         g_dbus_interface_skeleton_set_flags       (GDBusInterfaceSkeleton      *interface_,
93                                                                         GDBusInterfaceSkeletonFlags  flags);
94 GDBusInterfaceInfo          *g_dbus_interface_skeleton_get_info        (GDBusInterfaceSkeleton      *interface_);
95 GDBusInterfaceVTable        *g_dbus_interface_skeleton_get_vtable      (GDBusInterfaceSkeleton      *interface_);
96 GVariant                    *g_dbus_interface_skeleton_get_properties  (GDBusInterfaceSkeleton      *interface_);
97 void                         g_dbus_interface_skeleton_flush           (GDBusInterfaceSkeleton      *interface_);
98
99 gboolean                     g_dbus_interface_skeleton_export          (GDBusInterfaceSkeleton      *interface_,
100                                                                         GDBusConnection             *connection,
101                                                                         const gchar                 *object_path,
102                                                                         GError                     **error);
103 void                         g_dbus_interface_skeleton_unexport        (GDBusInterfaceSkeleton      *interface_);
104 void                g_dbus_interface_skeleton_unexport_from_connection (GDBusInterfaceSkeleton      *interface_,
105                                                                         GDBusConnection             *connection);
106
107 GDBusConnection             *g_dbus_interface_skeleton_get_connection  (GDBusInterfaceSkeleton      *interface_);
108 GList                       *g_dbus_interface_skeleton_get_connections (GDBusInterfaceSkeleton      *interface_);
109 gboolean                     g_dbus_interface_skeleton_has_connection  (GDBusInterfaceSkeleton      *interface_,
110                                                                         GDBusConnection             *connection);
111 const gchar                 *g_dbus_interface_skeleton_get_object_path (GDBusInterfaceSkeleton      *interface_);
112
113 G_END_DECLS
114
115 #endif /* __G_DBUS_INTERFACE_SKELETON_H */