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);
76 gssize _g_kdbus_receive (GKdbus *kdbus,
77 GCancellable *cancellable,
80 gsize _g_kdbus_send (GDBusWorker *worker,
82 GDBusMessage *dbus_msg,
86 GCancellable *cancellable,
89 GSource * _g_kdbus_create_source (GKdbus *kdbus,
90 GIOCondition condition,
91 GCancellable *cancellable);
93 gchar * _g_kdbus_hexdump_all_items (GSList *kdbus_msg_items);
95 void _g_kdbus_release_kmsg (GKdbus *kdbus);
97 void _g_kdbus_attach_fds_to_msg (GKdbus *kdbus,
98 GUnixFDList **fd_list);
100 GSList * _g_kdbus_get_last_msg_items (GKdbus *kdbus);
102 gchar * _g_kdbus_get_last_msg_sender (GKdbus *kdbus);
104 gchar * _g_kdbus_get_last_msg_destination (GKdbus *kdbus);
108 #endif /* __G_KDBUS_H__ */