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"
34 #define G_TYPE_KDBUS_WORKER (g_kdbus_worker_get_type ())
35 #define G_KDBUS_WORKER(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
36 G_TYPE_KDBUS_WORKER, GKDBusWorker))
37 #define G_KDBUS_WORKER_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \
38 G_TYPE_KDBUS_WORKER, GKDBusWorkerClass))
39 #define G_IS_KDBUS_WORKER(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
41 #define G_IS_KDBUS_WORKER_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \
43 #define G_KDBUS_WORKER_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \
44 G_TYPE_KDBUS_WORKER, GKDBusWorkerClass))
46 typedef struct _GKDBusWorker GKDBusWorker;
48 GType g_kdbus_worker_get_type (void);
50 GKDBusWorker * g_kdbus_worker_new (const gchar *address,
53 void g_kdbus_worker_associate (GKDBusWorker *worker,
54 GDBusCapabilityFlags capabilities,
55 GDBusWorkerMessageReceivedCallback message_received_callback,
56 GDBusWorkerMessageAboutToBeSentCallback message_about_to_be_sent_callback,
57 GDBusWorkerDisconnectedCallback disconnected_callback,
60 void g_kdbus_worker_unfreeze (GKDBusWorker *worker);
62 gboolean g_kdbus_worker_send_message (GKDBusWorker *worker,
63 GDBusMessage *message,
66 void g_kdbus_worker_stop (GKDBusWorker *worker);
68 void g_kdbus_worker_flush_sync (GKDBusWorker *worker);
70 void g_kdbus_worker_close (GKDBusWorker *worker,
71 GCancellable *cancellable,
72 GSimpleAsyncResult *result);
75 gboolean _g_kdbus_open (GKDBusWorker *kdbus,
79 void _g_kdbus_close (GKDBusWorker *kdbus);
81 gboolean _g_kdbus_is_closed (GKDBusWorker *kdbus);
83 GVariant * _g_kdbus_Hello (GKDBusWorker *worker,
86 GVariant * _g_kdbus_GetBusId (GKDBusWorker *worker,
89 GVariant * _g_kdbus_RequestName (GKDBusWorker *worker,
91 GBusNameOwnerFlags flags,
94 GVariant * _g_kdbus_ReleaseName (GKDBusWorker *worker,
98 GVariant * _g_kdbus_GetListNames (GKDBusWorker *worker,
102 GVariant * _g_kdbus_GetListQueuedOwners (GKDBusWorker *worker,
106 GVariant * _g_kdbus_GetNameOwner (GKDBusWorker *worker,
110 GVariant * _g_kdbus_GetConnectionUnixProcessID (GKDBusWorker *worker,
114 GVariant * _g_kdbus_GetConnectionUnixUser (GKDBusWorker *worker,
118 void _g_kdbus_subscribe_name_acquired (GKDBusWorker *worker,
121 void _g_kdbus_subscribe_name_lost (GKDBusWorker *worker,
124 void _g_kdbus_unsubscribe_name_acquired (GKDBusWorker *worker);
126 void _g_kdbus_unsubscribe_name_lost (GKDBusWorker *worker);
128 gchar * _g_kdbus_hexdump_all_items (GSList *kdbus_msg_items);
132 #endif /* __G_KDBUS_H__ */