1 /* GIO - GLib Input, Output and Streaming Library
3 * Copyright (C) 2013 Samsung Electronics
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.
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, write to the
17 * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
18 * Boston, MA 02111-1307, USA.
20 * Author: Michal Eljasiewicz <m.eljasiewic@samsung.com>
21 * Author: Lukasz Skalski <l.skalski@samsung.com>
27 #if !defined (GIO_COMPILATION)
28 #error "gkdbus.h is a private header file."
31 #include <gio/giotypes.h>
32 #include "gdbusprivate.h"
36 #define G_TYPE_KDBUS (_g_kdbus_get_type ())
37 #define G_KDBUS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_KDBUS, GKdbus))
38 #define G_KDBUS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_TYPE_KDBUS, GKdbusClass))
39 #define G_KDBUS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_TYPE_KDBUS, GKdbusClass))
40 #define G_IS_KDBUS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_KDBUS))
41 #define G_IS_KDBUS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_TYPE_KDBUS))
43 typedef struct _GKdbus GKdbus;
44 typedef struct _GKdbusClass GKdbusClass;
45 typedef struct _GKdbusPrivate GKdbusPrivate;
49 GObjectClass parent_class;
54 GObject parent_instance;
64 GType _g_kdbus_get_type (void) G_GNUC_CONST;
66 gboolean _g_kdbus_open (GKdbus *kdbus,
70 gboolean _g_kdbus_close (GKdbus *kdbus,
73 gboolean _g_kdbus_is_closed (GKdbus *kdbus);
75 GSource * _g_kdbus_create_source (GKdbus *kdbus,
76 GIOCondition condition,
77 GCancellable *cancellable);
79 GVariant * _g_kdbus_Hello (GIOStream *stream,
82 GVariant * _g_kdbus_GetBusId (GDBusConnection *connection,
85 GVariant * _g_kdbus_RequestName (GDBusConnection *connection,
87 GBusNameOwnerFlags flags,
90 GVariant * _g_kdbus_ReleaseName (GDBusConnection *connection,
94 GVariant * _g_kdbus_GetListNames (GDBusConnection *connection,
98 GVariant * _g_kdbus_GetListQueuedOwners (GDBusConnection *connection,
102 GVariant * _g_kdbus_GetNameOwner (GDBusConnection *connection,
106 GVariant * _g_kdbus_GetConnectionUnixProcessID (GDBusConnection *connection,
110 GVariant * _g_kdbus_GetConnectionUnixUser (GDBusConnection *connection,
114 void _g_kdbus_subscribe_name_acquired (GDBusConnection *connection,
117 void _g_kdbus_subscribe_name_lost (GDBusConnection *connection,
120 void _g_kdbus_unsubscribe_name_acquired (GDBusConnection *connection);
122 void _g_kdbus_unsubscribe_name_lost (GDBusConnection *connection);
124 gboolean _g_kdbus_send (GKdbus *kdbus,
125 GDBusMessage *dbus_msg,
126 GCancellable *cancellable,
129 gssize _g_kdbus_receive (GKdbus *kdbus,
130 GCancellable *cancellable,
133 GSList * _g_kdbus_get_last_msg_items (GKdbus *kdbus);
135 gchar * _g_kdbus_get_last_msg_sender (GKdbus *kdbus);
137 gchar * _g_kdbus_get_last_msg_destination (GKdbus *kdbus);
139 gchar * _g_kdbus_hexdump_all_items (GSList *kdbus_msg_items);
141 void _g_kdbus_release_kmsg (GKdbus *kdbus);
143 void _g_kdbus_attach_fds_to_msg (GKdbus *kdbus,
144 GUnixFDList **fd_list);
147 #endif /* __G_KDBUS_H__ */