1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD 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
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19 
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 
25 module gio.DBusObjectManagerClient;
26 
27 private import gio.AsyncInitableIF;
28 private import gio.AsyncInitableT;
29 private import gio.Cancellable;
30 private import gio.DBusConnection;
31 private import gio.DBusObjectManagerIF;
32 private import gio.DBusObjectManagerT;
33 private import gio.DBusObjectProxy;
34 private import gio.DBusProxy;
35 private import gio.InitableIF;
36 private import gio.InitableT;
37 private import gio.c.functions;
38 public  import gio.c.types;
39 private import glib.ConstructionException;
40 private import glib.ErrorG;
41 private import glib.GException;
42 private import glib.Str;
43 private import glib.Variant;
44 private import gobject.ObjectG;
45 private import gobject.Signals;
46 public  import gtkc.giotypes;
47 private import std.algorithm;
48 
49 
50 /**
51  * #GDBusObjectManagerClient is used to create, monitor and delete object
52  * proxies for remote objects exported by a #GDBusObjectManagerServer (or any
53  * code implementing the
54  * [org.freedesktop.DBus.ObjectManager](http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager)
55  * interface).
56  * 
57  * Once an instance of this type has been created, you can connect to
58  * the #GDBusObjectManager::object-added and
59  * #GDBusObjectManager::object-removed signals and inspect the
60  * #GDBusObjectProxy objects returned by
61  * g_dbus_object_manager_get_objects().
62  * 
63  * If the name for a #GDBusObjectManagerClient is not owned by anyone at
64  * object construction time, the default behavior is to request the
65  * message bus to launch an owner for the name. This behavior can be
66  * disabled using the %G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_DO_NOT_AUTO_START
67  * flag. It's also worth noting that this only works if the name of
68  * interest is activatable in the first place. E.g. in some cases it
69  * is not possible to launch an owner for the requested name. In this
70  * case, #GDBusObjectManagerClient object construction still succeeds but
71  * there will be no object proxies
72  * (e.g. g_dbus_object_manager_get_objects() returns the empty list) and
73  * the #GDBusObjectManagerClient:name-owner property is %NULL.
74  * 
75  * The owner of the requested name can come and go (for example
76  * consider a system service being restarted) – #GDBusObjectManagerClient
77  * handles this case too; simply connect to the #GObject::notify
78  * signal to watch for changes on the #GDBusObjectManagerClient:name-owner
79  * property. When the name owner vanishes, the behavior is that
80  * #GDBusObjectManagerClient:name-owner is set to %NULL (this includes
81  * emission of the #GObject::notify signal) and then
82  * #GDBusObjectManager::object-removed signals are synthesized
83  * for all currently existing object proxies. Since
84  * #GDBusObjectManagerClient:name-owner is %NULL when this happens, you can
85  * use this information to disambiguate a synthesized signal from a
86  * genuine signal caused by object removal on the remote
87  * #GDBusObjectManager. Similarly, when a new name owner appears,
88  * #GDBusObjectManager::object-added signals are synthesized
89  * while #GDBusObjectManagerClient:name-owner is still %NULL. Only when all
90  * object proxies have been added, the #GDBusObjectManagerClient:name-owner
91  * is set to the new name owner (this includes emission of the
92  * #GObject::notify signal).  Furthermore, you are guaranteed that
93  * #GDBusObjectManagerClient:name-owner will alternate between a name owner
94  * (e.g. `:1.42`) and %NULL even in the case where
95  * the name of interest is atomically replaced
96  * 
97  * Ultimately, #GDBusObjectManagerClient is used to obtain #GDBusProxy
98  * instances. All signals (including the
99  * org.freedesktop.DBus.Properties::PropertiesChanged signal)
100  * delivered to #GDBusProxy instances are guaranteed to originate
101  * from the name owner. This guarantee along with the behavior
102  * described above, means that certain race conditions including the
103  * "half the proxy is from the old owner and the other half is from
104  * the new owner" problem cannot happen.
105  * 
106  * To avoid having the application connect to signals on the returned
107  * #GDBusObjectProxy and #GDBusProxy objects, the
108  * #GDBusObject::interface-added,
109  * #GDBusObject::interface-removed,
110  * #GDBusProxy::g-properties-changed and
111  * #GDBusProxy::g-signal signals
112  * are also emitted on the #GDBusObjectManagerClient instance managing these
113  * objects. The signals emitted are
114  * #GDBusObjectManager::interface-added,
115  * #GDBusObjectManager::interface-removed,
116  * #GDBusObjectManagerClient::interface-proxy-properties-changed and
117  * #GDBusObjectManagerClient::interface-proxy-signal.
118  * 
119  * Note that all callbacks and signals are emitted in the
120  * [thread-default main context][g-main-context-push-thread-default]
121  * that the #GDBusObjectManagerClient object was constructed
122  * in. Additionally, the #GDBusObjectProxy and #GDBusProxy objects
123  * originating from the #GDBusObjectManagerClient object will be created in
124  * the same context and, consequently, will deliver signals in the
125  * same main loop.
126  *
127  * Since: 2.30
128  */
129 public class DBusObjectManagerClient : ObjectG, AsyncInitableIF, DBusObjectManagerIF, InitableIF
130 {
131 	/** the main Gtk struct */
132 	protected GDBusObjectManagerClient* gDBusObjectManagerClient;
133 
134 	/** Get the main Gtk struct */
135 	public GDBusObjectManagerClient* getDBusObjectManagerClientStruct(bool transferOwnership = false)
136 	{
137 		if (transferOwnership)
138 			ownedRef = false;
139 		return gDBusObjectManagerClient;
140 	}
141 
142 	/** the main Gtk struct as a void* */
143 	protected override void* getStruct()
144 	{
145 		return cast(void*)gDBusObjectManagerClient;
146 	}
147 
148 	protected override void setStruct(GObject* obj)
149 	{
150 		gDBusObjectManagerClient = cast(GDBusObjectManagerClient*)obj;
151 		super.setStruct(obj);
152 	}
153 
154 	/**
155 	 * Sets our main struct and passes it to the parent class.
156 	 */
157 	public this (GDBusObjectManagerClient* gDBusObjectManagerClient, bool ownedRef = false)
158 	{
159 		this.gDBusObjectManagerClient = gDBusObjectManagerClient;
160 		super(cast(GObject*)gDBusObjectManagerClient, ownedRef);
161 	}
162 
163 	// add the AsyncInitable capabilities
164 	mixin AsyncInitableT!(GDBusObjectManagerClient);
165 
166 	// add the DBusObjectManager capabilities
167 	mixin DBusObjectManagerT!(GDBusObjectManagerClient);
168 
169 	// add the Initable capabilities
170 	mixin InitableT!(GDBusObjectManagerClient);
171 
172 	/**
173 	 * Finishes an operation started with g_dbus_object_manager_client_new().
174 	 *
175 	 * Params:
176 	 *     res    = A GAsyncResult obtained from the GAsyncReadyCallback passed to the DBusObjectManager constructor.
177 	 *     forBus = If true finish an address.
178 	 *
179 	 * Throws: GException on failure.
180 	 * Throws: ConstructionException GTK+ fails to create the object.
181 	 *
182 	 * Since: 2.30
183 	 */
184 	public this (AsyncResultIF res, bool forBus = false)
185 	{
186 		GError* err = null;
187 		GDBusObjectManager* p;
188 
189 		if ( forBus )
190 		{
191 			p = g_dbus_object_manager_client_new_for_bus_finish((res is null) ? null : res.getAsyncResultStruct(), &err);
192 		}
193 		else
194 		{
195 			p = g_dbus_object_manager_client_new_finish((res is null) ? null : res.getAsyncResultStruct(), &err);
196 		}
197 
198 		if (err !is null)
199 		{
200 			throw new GException( new ErrorG(err) );
201 		}
202 
203 		if(p is null)
204 		{
205 			throw new ConstructionException("null returned by g_dbus_object_manager_client_new_finish((res is null) ? null : res.getAsyncResultStruct(), &err)");
206 		}
207 		this(cast(GDBusObjectManagerClient*) p, true);
208 	}
209 
210 	/**
211 	 */
212 
213 	/** */
214 	public static GType getType()
215 	{
216 		return g_dbus_object_manager_client_get_type();
217 	}
218 
219 	/**
220 	 * Like g_dbus_object_manager_client_new_sync() but takes a #GBusType instead
221 	 * of a #GDBusConnection.
222 	 *
223 	 * This is a synchronous failable constructor - the calling thread is
224 	 * blocked until a reply is received. See g_dbus_object_manager_client_new_for_bus()
225 	 * for the asynchronous version.
226 	 *
227 	 * Params:
228 	 *     busType = A #GBusType.
229 	 *     flags = Zero or more flags from the #GDBusObjectManagerClientFlags enumeration.
230 	 *     name = The owner of the control object (unique or well-known name).
231 	 *     objectPath = The object path of the control object.
232 	 *     getProxyTypeFunc = A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies.
233 	 *     getProxyTypeUserData = User data to pass to @get_proxy_type_func.
234 	 *     getProxyTypeDestroyNotify = Free function for @get_proxy_type_user_data or %NULL.
235 	 *     cancellable = A #GCancellable or %NULL
236 	 *
237 	 * Returns: A
238 	 *     #GDBusObjectManagerClient object or %NULL if @error is set. Free
239 	 *     with g_object_unref().
240 	 *
241 	 * Since: 2.30
242 	 *
243 	 * Throws: GException on failure.
244 	 * Throws: ConstructionException GTK+ fails to create the object.
245 	 */
246 	public this(GBusType busType, GDBusObjectManagerClientFlags flags, string name, string objectPath, GDBusProxyTypeFunc getProxyTypeFunc, void* getProxyTypeUserData, GDestroyNotify getProxyTypeDestroyNotify, Cancellable cancellable)
247 	{
248 		GError* err = null;
249 
250 		auto p = g_dbus_object_manager_client_new_for_bus_sync(busType, flags, Str.toStringz(name), Str.toStringz(objectPath), getProxyTypeFunc, getProxyTypeUserData, getProxyTypeDestroyNotify, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err);
251 
252 		if (err !is null)
253 		{
254 			throw new GException( new ErrorG(err) );
255 		}
256 
257 		if(p is null)
258 		{
259 			throw new ConstructionException("null returned by new_for_bus_sync");
260 		}
261 
262 		this(cast(GDBusObjectManagerClient*) p, true);
263 	}
264 
265 	/**
266 	 * Creates a new #GDBusObjectManagerClient object.
267 	 *
268 	 * This is a synchronous failable constructor - the calling thread is
269 	 * blocked until a reply is received. See g_dbus_object_manager_client_new()
270 	 * for the asynchronous version.
271 	 *
272 	 * Params:
273 	 *     connection = A #GDBusConnection.
274 	 *     flags = Zero or more flags from the #GDBusObjectManagerClientFlags enumeration.
275 	 *     name = The owner of the control object (unique or well-known name), or %NULL when not using a message bus connection.
276 	 *     objectPath = The object path of the control object.
277 	 *     getProxyTypeFunc = A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies.
278 	 *     getProxyTypeUserData = User data to pass to @get_proxy_type_func.
279 	 *     getProxyTypeDestroyNotify = Free function for @get_proxy_type_user_data or %NULL.
280 	 *     cancellable = A #GCancellable or %NULL
281 	 *
282 	 * Returns: A
283 	 *     #GDBusObjectManagerClient object or %NULL if @error is set. Free
284 	 *     with g_object_unref().
285 	 *
286 	 * Since: 2.30
287 	 *
288 	 * Throws: GException on failure.
289 	 * Throws: ConstructionException GTK+ fails to create the object.
290 	 */
291 	public this(DBusConnection connection, GDBusObjectManagerClientFlags flags, string name, string objectPath, GDBusProxyTypeFunc getProxyTypeFunc, void* getProxyTypeUserData, GDestroyNotify getProxyTypeDestroyNotify, Cancellable cancellable)
292 	{
293 		GError* err = null;
294 
295 		auto p = g_dbus_object_manager_client_new_sync((connection is null) ? null : connection.getDBusConnectionStruct(), flags, Str.toStringz(name), Str.toStringz(objectPath), getProxyTypeFunc, getProxyTypeUserData, getProxyTypeDestroyNotify, (cancellable is null) ? null : cancellable.getCancellableStruct(), &err);
296 
297 		if (err !is null)
298 		{
299 			throw new GException( new ErrorG(err) );
300 		}
301 
302 		if(p is null)
303 		{
304 			throw new ConstructionException("null returned by new_sync");
305 		}
306 
307 		this(cast(GDBusObjectManagerClient*) p, true);
308 	}
309 
310 	/**
311 	 * Asynchronously creates a new #GDBusObjectManagerClient object.
312 	 *
313 	 * This is an asynchronous failable constructor. When the result is
314 	 * ready, @callback will be invoked in the
315 	 * [thread-default main context][g-main-context-push-thread-default]
316 	 * of the thread you are calling this method from. You can
317 	 * then call g_dbus_object_manager_client_new_finish() to get the result. See
318 	 * g_dbus_object_manager_client_new_sync() for the synchronous version.
319 	 *
320 	 * Params:
321 	 *     connection = A #GDBusConnection.
322 	 *     flags = Zero or more flags from the #GDBusObjectManagerClientFlags enumeration.
323 	 *     name = The owner of the control object (unique or well-known name).
324 	 *     objectPath = The object path of the control object.
325 	 *     getProxyTypeFunc = A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies.
326 	 *     getProxyTypeUserData = User data to pass to @get_proxy_type_func.
327 	 *     getProxyTypeDestroyNotify = Free function for @get_proxy_type_user_data or %NULL.
328 	 *     cancellable = A #GCancellable or %NULL
329 	 *     callback = A #GAsyncReadyCallback to call when the request is satisfied.
330 	 *     userData = The data to pass to @callback.
331 	 *
332 	 * Since: 2.30
333 	 */
334 	public static void newObjectManagerClient(DBusConnection connection, GDBusObjectManagerClientFlags flags, string name, string objectPath, GDBusProxyTypeFunc getProxyTypeFunc, void* getProxyTypeUserData, GDestroyNotify getProxyTypeDestroyNotify, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)
335 	{
336 		g_dbus_object_manager_client_new((connection is null) ? null : connection.getDBusConnectionStruct(), flags, Str.toStringz(name), Str.toStringz(objectPath), getProxyTypeFunc, getProxyTypeUserData, getProxyTypeDestroyNotify, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData);
337 	}
338 
339 	/**
340 	 * Like g_dbus_object_manager_client_new() but takes a #GBusType instead of a
341 	 * #GDBusConnection.
342 	 *
343 	 * This is an asynchronous failable constructor. When the result is
344 	 * ready, @callback will be invoked in the
345 	 * [thread-default main loop][g-main-context-push-thread-default]
346 	 * of the thread you are calling this method from. You can
347 	 * then call g_dbus_object_manager_client_new_for_bus_finish() to get the result. See
348 	 * g_dbus_object_manager_client_new_for_bus_sync() for the synchronous version.
349 	 *
350 	 * Params:
351 	 *     busType = A #GBusType.
352 	 *     flags = Zero or more flags from the #GDBusObjectManagerClientFlags enumeration.
353 	 *     name = The owner of the control object (unique or well-known name).
354 	 *     objectPath = The object path of the control object.
355 	 *     getProxyTypeFunc = A #GDBusProxyTypeFunc function or %NULL to always construct #GDBusProxy proxies.
356 	 *     getProxyTypeUserData = User data to pass to @get_proxy_type_func.
357 	 *     getProxyTypeDestroyNotify = Free function for @get_proxy_type_user_data or %NULL.
358 	 *     cancellable = A #GCancellable or %NULL
359 	 *     callback = A #GAsyncReadyCallback to call when the request is satisfied.
360 	 *     userData = The data to pass to @callback.
361 	 *
362 	 * Since: 2.30
363 	 */
364 	public static void newForBus(GBusType busType, GDBusObjectManagerClientFlags flags, string name, string objectPath, GDBusProxyTypeFunc getProxyTypeFunc, void* getProxyTypeUserData, GDestroyNotify getProxyTypeDestroyNotify, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)
365 	{
366 		g_dbus_object_manager_client_new_for_bus(busType, flags, Str.toStringz(name), Str.toStringz(objectPath), getProxyTypeFunc, getProxyTypeUserData, getProxyTypeDestroyNotify, (cancellable is null) ? null : cancellable.getCancellableStruct(), callback, userData);
367 	}
368 
369 	/**
370 	 * Gets the #GDBusConnection used by @manager.
371 	 *
372 	 * Returns: A #GDBusConnection object. Do not free,
373 	 *     the object belongs to @manager.
374 	 *
375 	 * Since: 2.30
376 	 */
377 	public DBusConnection getConnection()
378 	{
379 		auto p = g_dbus_object_manager_client_get_connection(gDBusObjectManagerClient);
380 
381 		if(p is null)
382 		{
383 			return null;
384 		}
385 
386 		return ObjectG.getDObject!(DBusConnection)(cast(GDBusConnection*) p);
387 	}
388 
389 	/**
390 	 * Gets the flags that @manager was constructed with.
391 	 *
392 	 * Returns: Zero of more flags from the #GDBusObjectManagerClientFlags
393 	 *     enumeration.
394 	 *
395 	 * Since: 2.30
396 	 */
397 	public GDBusObjectManagerClientFlags getFlags()
398 	{
399 		return g_dbus_object_manager_client_get_flags(gDBusObjectManagerClient);
400 	}
401 
402 	/**
403 	 * Gets the name that @manager is for, or %NULL if not a message bus
404 	 * connection.
405 	 *
406 	 * Returns: A unique or well-known name. Do not free, the string
407 	 *     belongs to @manager.
408 	 *
409 	 * Since: 2.30
410 	 */
411 	public string getName()
412 	{
413 		return Str.toString(g_dbus_object_manager_client_get_name(gDBusObjectManagerClient));
414 	}
415 
416 	/**
417 	 * The unique name that owns the name that @manager is for or %NULL if
418 	 * no-one currently owns that name. You can connect to the
419 	 * #GObject::notify signal to track changes to the
420 	 * #GDBusObjectManagerClient:name-owner property.
421 	 *
422 	 * Returns: The name owner or %NULL if no name owner
423 	 *     exists. Free with g_free().
424 	 *
425 	 * Since: 2.30
426 	 */
427 	public string getNameOwner()
428 	{
429 		auto retStr = g_dbus_object_manager_client_get_name_owner(gDBusObjectManagerClient);
430 
431 		scope(exit) Str.freeString(retStr);
432 		return Str.toString(retStr);
433 	}
434 
435 	protected class OnInterfaceProxyPropertiesChangedDelegateWrapper
436 	{
437 		void delegate(DBusObjectProxy, DBusProxy, Variant, string[], DBusObjectManagerClient) dlg;
438 		gulong handlerId;
439 
440 		this(void delegate(DBusObjectProxy, DBusProxy, Variant, string[], DBusObjectManagerClient) dlg)
441 		{
442 			this.dlg = dlg;
443 			onInterfaceProxyPropertiesChangedListeners ~= this;
444 		}
445 
446 		void remove(OnInterfaceProxyPropertiesChangedDelegateWrapper source)
447 		{
448 			foreach(index, wrapper; onInterfaceProxyPropertiesChangedListeners)
449 			{
450 				if (wrapper.handlerId == source.handlerId)
451 				{
452 					onInterfaceProxyPropertiesChangedListeners[index] = null;
453 					onInterfaceProxyPropertiesChangedListeners = std.algorithm.remove(onInterfaceProxyPropertiesChangedListeners, index);
454 					break;
455 				}
456 			}
457 		}
458 	}
459 	OnInterfaceProxyPropertiesChangedDelegateWrapper[] onInterfaceProxyPropertiesChangedListeners;
460 
461 	/**
462 	 * Emitted when one or more D-Bus properties on proxy changes. The
463 	 * local cache has already been updated when this signal fires. Note
464 	 * that both @changed_properties and @invalidated_properties are
465 	 * guaranteed to never be %NULL (either may be empty though).
466 	 *
467 	 * This signal exists purely as a convenience to avoid having to
468 	 * connect signals to all interface proxies managed by @manager.
469 	 *
470 	 * This signal is emitted in the
471 	 * [thread-default main context][g-main-context-push-thread-default]
472 	 * that @manager was constructed in.
473 	 *
474 	 * Params:
475 	 *     objectProxy = The #GDBusObjectProxy on which an interface has properties that are changing.
476 	 *     interfaceProxy = The #GDBusProxy that has properties that are changing.
477 	 *     changedProperties = A #GVariant containing the properties that changed.
478 	 *     invalidatedProperties = A %NULL terminated array of properties that was invalidated.
479 	 *
480 	 * Since: 2.30
481 	 */
482 	gulong addOnInterfaceProxyPropertiesChanged(void delegate(DBusObjectProxy, DBusProxy, Variant, string[], DBusObjectManagerClient) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
483 	{
484 		auto wrapper = new OnInterfaceProxyPropertiesChangedDelegateWrapper(dlg);
485 		wrapper.handlerId = Signals.connectData(
486 			this,
487 			"interface-proxy-properties-changed",
488 			cast(GCallback)&callBackInterfaceProxyPropertiesChanged,
489 			cast(void*)wrapper,
490 			cast(GClosureNotify)&callBackInterfaceProxyPropertiesChangedDestroy,
491 			connectFlags);
492 		return wrapper.handlerId;
493 	}
494 
495 	extern(C) static void callBackInterfaceProxyPropertiesChanged(GDBusObjectManagerClient* dbusobjectmanagerclientStruct, GDBusObjectProxy* objectProxy, GDBusProxy* interfaceProxy, GVariant* changedProperties, char** invalidatedProperties, OnInterfaceProxyPropertiesChangedDelegateWrapper wrapper)
496 	{
497 		wrapper.dlg(ObjectG.getDObject!(DBusObjectProxy)(objectProxy), ObjectG.getDObject!(DBusProxy)(interfaceProxy), new Variant(changedProperties), Str.toStringArray(invalidatedProperties), wrapper.outer);
498 	}
499 
500 	extern(C) static void callBackInterfaceProxyPropertiesChangedDestroy(OnInterfaceProxyPropertiesChangedDelegateWrapper wrapper, GClosure* closure)
501 	{
502 		wrapper.remove(wrapper);
503 	}
504 
505 	protected class OnInterfaceProxySignalDelegateWrapper
506 	{
507 		void delegate(DBusObjectProxy, DBusProxy, string, string, Variant, DBusObjectManagerClient) dlg;
508 		gulong handlerId;
509 
510 		this(void delegate(DBusObjectProxy, DBusProxy, string, string, Variant, DBusObjectManagerClient) dlg)
511 		{
512 			this.dlg = dlg;
513 			onInterfaceProxySignalListeners ~= this;
514 		}
515 
516 		void remove(OnInterfaceProxySignalDelegateWrapper source)
517 		{
518 			foreach(index, wrapper; onInterfaceProxySignalListeners)
519 			{
520 				if (wrapper.handlerId == source.handlerId)
521 				{
522 					onInterfaceProxySignalListeners[index] = null;
523 					onInterfaceProxySignalListeners = std.algorithm.remove(onInterfaceProxySignalListeners, index);
524 					break;
525 				}
526 			}
527 		}
528 	}
529 	OnInterfaceProxySignalDelegateWrapper[] onInterfaceProxySignalListeners;
530 
531 	/**
532 	 * Emitted when a D-Bus signal is received on @interface_proxy.
533 	 *
534 	 * This signal exists purely as a convenience to avoid having to
535 	 * connect signals to all interface proxies managed by @manager.
536 	 *
537 	 * This signal is emitted in the
538 	 * [thread-default main context][g-main-context-push-thread-default]
539 	 * that @manager was constructed in.
540 	 *
541 	 * Params:
542 	 *     objectProxy = The #GDBusObjectProxy on which an interface is emitting a D-Bus signal.
543 	 *     interfaceProxy = The #GDBusProxy that is emitting a D-Bus signal.
544 	 *     senderName = The sender of the signal or NULL if the connection is not a bus connection.
545 	 *     signalName = The signal name.
546 	 *     parameters = A #GVariant tuple with parameters for the signal.
547 	 *
548 	 * Since: 2.30
549 	 */
550 	gulong addOnInterfaceProxySignal(void delegate(DBusObjectProxy, DBusProxy, string, string, Variant, DBusObjectManagerClient) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
551 	{
552 		auto wrapper = new OnInterfaceProxySignalDelegateWrapper(dlg);
553 		wrapper.handlerId = Signals.connectData(
554 			this,
555 			"interface-proxy-signal",
556 			cast(GCallback)&callBackInterfaceProxySignal,
557 			cast(void*)wrapper,
558 			cast(GClosureNotify)&callBackInterfaceProxySignalDestroy,
559 			connectFlags);
560 		return wrapper.handlerId;
561 	}
562 
563 	extern(C) static void callBackInterfaceProxySignal(GDBusObjectManagerClient* dbusobjectmanagerclientStruct, GDBusObjectProxy* objectProxy, GDBusProxy* interfaceProxy, char* senderName, char* signalName, GVariant* parameters, OnInterfaceProxySignalDelegateWrapper wrapper)
564 	{
565 		wrapper.dlg(ObjectG.getDObject!(DBusObjectProxy)(objectProxy), ObjectG.getDObject!(DBusProxy)(interfaceProxy), Str.toString(senderName), Str.toString(signalName), new Variant(parameters), wrapper.outer);
566 	}
567 
568 	extern(C) static void callBackInterfaceProxySignalDestroy(OnInterfaceProxySignalDelegateWrapper wrapper, GClosure* closure)
569 	{
570 		wrapper.remove(wrapper);
571 	}
572 }