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,
54 GDBusCapabilityFlags capabilities,
55 gboolean initially_frozen,
56 GDBusWorkerMessageReceivedCallback message_received_callback,
57 GDBusWorkerMessageAboutToBeSentCallback message_about_to_be_sent_callback,
58 GDBusWorkerDisconnectedCallback disconnected_callback,
62 void g_kdbus_worker_unfreeze (GKDBusWorker *worker);
64 gboolean g_kdbus_worker_send_message (GKDBusWorker *worker,
65 GDBusMessage *message,
68 void g_kdbus_worker_stop (GKDBusWorker *worker);
70 void g_kdbus_worker_flush_sync (GKDBusWorker *worker);
72 void g_kdbus_worker_close (GKDBusWorker *worker,
73 GCancellable *cancellable,
74 GSimpleAsyncResult *result);
77 gboolean _g_kdbus_open (GKDBusWorker *kdbus,
81 void _g_kdbus_close (GKDBusWorker *kdbus);
83 gboolean _g_kdbus_is_closed (GKDBusWorker *kdbus);
85 GVariant * _g_kdbus_Hello (GKDBusWorker *worker,
88 GVariant * _g_kdbus_GetBusId (GKDBusWorker *worker,
91 GVariant * _g_kdbus_RequestName (GKDBusWorker *worker,
93 GBusNameOwnerFlags flags,
96 GVariant * _g_kdbus_ReleaseName (GKDBusWorker *worker,
100 GVariant * _g_kdbus_GetListNames (GKDBusWorker *worker,
104 GVariant * _g_kdbus_GetListQueuedOwners (GKDBusWorker *worker,
108 GVariant * _g_kdbus_GetNameOwner (GKDBusWorker *worker,
112 GVariant * _g_kdbus_GetConnectionUnixProcessID (GKDBusWorker *worker,
116 GVariant * _g_kdbus_GetConnectionUnixUser (GKDBusWorker *worker,
120 void _g_kdbus_subscribe_name_acquired (GKDBusWorker *worker,
123 void _g_kdbus_subscribe_name_lost (GKDBusWorker *worker,
126 void _g_kdbus_unsubscribe_name_acquired (GKDBusWorker *worker);
128 void _g_kdbus_unsubscribe_name_lost (GKDBusWorker *worker);
130 gchar * _g_kdbus_hexdump_all_items (GSList *kdbus_msg_items);
134 #endif /* __G_KDBUS_H__ */