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  * Conversion parameters:
26  * inFile  = GDBusObjectManagerClient.html
27  * outPack = gio
28  * outFile = DBusObjectManagerClient
29  * strct   = GDBusObjectManagerClient
30  * realStrct=
31  * ctorStrct=GDBusObjectManager
32  * clss    = DBusObjectManagerClient
33  * interf  = 
34  * class Code: Yes
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * 	- AsyncInitableIF
40  * 	- DBusObjectManagerIF
41  * 	- InitableIF
42  * prefixes:
43  * 	- g_dbus_object_manager_client_
44  * omit structs:
45  * omit prefixes:
46  * omit code:
47  * 	- g_dbus_object_manager_client_new_finish
48  * 	- g_dbus_object_manager_client_new_for_bus_finish
49  * omit signals:
50  * imports:
51  * 	- glib.Str
52  * 	- glib.ErrorG
53  * 	- glib.GException
54  * 	- gio.AsyncResultIF
55  * 	- gio.Cancellable
56  * 	- gio.DBusConnection
57  * 	- gio.AsyncInitableT
58  * 	- gio.AsyncInitableIF
59  * 	- gio.DBusObjectManagerT
60  * 	- gio.DBusObjectManagerIF
61  * 	- gio.InitableT
62  * 	- gio.InitableIF
63  * structWrap:
64  * 	- GAsyncResult* -> AsyncResultIF
65  * 	- GCancellable* -> Cancellable
66  * 	- GDBusConnection* -> DBusConnection
67  * module aliases:
68  * local aliases:
69  * overrides:
70  */
71 
72 module gio.DBusObjectManagerClient;
73 
74 public  import gtkc.giotypes;
75 
76 private import gtkc.gio;
77 private import glib.ConstructionException;
78 private import gobject.ObjectG;
79 
80 private import gobject.Signals;
81 public  import gtkc.gdktypes;
82 private import glib.Str;
83 private import glib.ErrorG;
84 private import glib.GException;
85 private import gio.AsyncResultIF;
86 private import gio.Cancellable;
87 private import gio.DBusConnection;
88 private import gio.AsyncInitableT;
89 private import gio.AsyncInitableIF;
90 private import gio.DBusObjectManagerT;
91 private import gio.DBusObjectManagerIF;
92 private import gio.InitableT;
93 private import gio.InitableIF;
94 
95 
96 private import gobject.ObjectG;
97 
98 /**
99  * GDBusObjectManagerClient is used to create, monitor and delete object
100  * proxies for remote objects exported by a GDBusObjectManagerServer (or any
101  * code implementing the org.freedesktop.DBus.ObjectManager
102  * interface).
103  *
104  * Once an instance of this type has been created, you can connect to
105  * the "object-added" and
106  * "object-removed" signals and inspect the
107  * GDBusObjectProxy objects returned by
108  * g_dbus_object_manager_get_objects().
109  *
110  * If the name for a GDBusObjectManagerClient is not owned by anyone at
111  * object construction time, the default behavior is to request the
112  * message bus to launch an owner for the name. This behavior can be
113  * disabled using the G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_DO_NOT_AUTO_START
114  * flag. It's also worth noting that this only works if the name of
115  * interest is activatable in the first place. E.g. in some cases it
116  * is not possible to launch an owner for the requested name. In this
117  * case, GDBusObjectManagerClient object construction still succeeds but
118  * there will be no object proxies
119  * (e.g. g_dbus_object_manager_get_objects() returns the empty list) and
120  * the "name-owner" property is NULL.
121  *
122  * The owner of the requested name can come and go (for example
123  * consider a system service being restarted) – GDBusObjectManagerClient
124  * handles this case too; simply connect to the "notify"
125  * signal to watch for changes on the "name-owner"
126  * property. When the name owner vanishes, the behavior is that
127  * "name-owner" is set to NULL (this includes
128  * emission of the "notify" signal) and then
129  * "object-removed" signals are synthesized
130  * for all currently existing object proxies. Since
131  * "name-owner" is NULL when this happens, you can
132  * use this information to disambiguate a synthesized signal from a
133  * genuine signal caused by object removal on the remote
134  * GDBusObjectManager. Similarly, when a new name owner appears,
135  * "object-added" signals are synthesized
136  * while "name-owner" is still NULL. Only when all
137  * object proxies have been added, the "name-owner"
138  * is set to the new name owner (this includes emission of the
139  * "notify" signal). Furthermore, you are guaranteed that
140  * "name-owner" will alternate between a name owner
141  * (e.g. :1.42) and NULL even in the case where
142  * the name of interest is atomically replaced
143  *
144  * Ultimately, GDBusObjectManagerClient is used to obtain GDBusProxy
145  * instances. All signals (including the
146  * org.freedesktop.DBus.Properties::PropertiesChanged
147  * signal) delivered to GDBusProxy instances are guaranteed to
148  * originate from the name owner. This guarantee along with the
149  * behavior described above, means that certain race conditions
150  * including the “half the proxy is from the old owner
151  * and the other half is from the new owner” problem
152  * cannot happen.
153  *
154  * To avoid having the application connect to signals on the returned
155  * GDBusObjectProxy and GDBusProxy objects, the
156  * "interface-added",
157  * "interface-removed",
158  * "g-properties-changed" and
159  * "g-signal" signals
160  * are also emitted on the GDBusObjectManagerClient instance managing these
161  * objects. The signals emitted are
162  * "interface-added",
163  * "interface-removed",
164  * "interface-proxy-properties-changed" and
165  * "interface-proxy-signal".
166  *
167  * Note that all callbacks and signals are emitted in the
168  * thread-default main loop
169  * that the GDBusObjectManagerClient object was constructed
170  * in. Additionally, the GDBusObjectProxy and GDBusProxy objects
171  * originating from the GDBusObjectManagerClient object will be created in
172  * the same context and, consequently, will deliver signals in the
173  * same main loop.
174  */
175 public class DBusObjectManagerClient : ObjectG, AsyncInitableIF, DBusObjectManagerIF, InitableIF
176 {
177 	
178 	/** the main Gtk struct */
179 	protected GDBusObjectManagerClient* gDBusObjectManagerClient;
180 	
181 	
182 	/** Get the main Gtk struct */
183 	public GDBusObjectManagerClient* getDBusObjectManagerClientStruct()
184 	{
185 		return gDBusObjectManagerClient;
186 	}
187 	
188 	
189 	/** the main Gtk struct as a void* */
190 	protected override void* getStruct()
191 	{
192 		return cast(void*)gDBusObjectManagerClient;
193 	}
194 	
195 	/**
196 	 * Sets our main struct and passes it to the parent class
197 	 */
198 	public this (GDBusObjectManagerClient* gDBusObjectManagerClient)
199 	{
200 		super(cast(GObject*)gDBusObjectManagerClient);
201 		this.gDBusObjectManagerClient = gDBusObjectManagerClient;
202 	}
203 	
204 	protected override void setStruct(GObject* obj)
205 	{
206 		super.setStruct(obj);
207 		gDBusObjectManagerClient = cast(GDBusObjectManagerClient*)obj;
208 	}
209 	
210 	// add the AsyncInitable capabilities
211 	mixin AsyncInitableT!(GDBusObjectManagerClient);
212 	
213 	// add the DBusObjectManager capabilities
214 	mixin DBusObjectManagerT!(GDBusObjectManagerClient);
215 	
216 	// add the Initable capabilities
217 	mixin InitableT!(GDBusObjectManagerClient);
218 	
219 	/**
220 	 * Finishes an operation started with g_dbus_object_manager_client_new().
221 	 * Since 2.30
222 	 * Params:
223 	 * res = A GAsyncResult obtained from the GAsyncReadyCallback passed to g_dbus_object_manager_client_new().
224 	 * Throws: GException on failure.
225 	 * Throws: ConstructionException GTK+ fails to create the object.
226 	 */
227 	public this (AsyncResultIF res, bool forBus = false)
228 	{
229 		// GDBusObjectManager * g_dbus_object_manager_client_new_finish  (GAsyncResult *res,  GError **error);
230 		GError* err = null;
231 		GDBusObjectManager* p;
232 		
233 		if ( forBus )
234 		{
235 			p = g_dbus_object_manager_client_new_for_bus_finish((res is null) ? null : res.getAsyncResultTStruct(), &err);
236 		}
237 		else
238 		{
239 			p = g_dbus_object_manager_client_new_finish((res is null) ? null : res.getAsyncResultTStruct(), &err);
240 		}
241 		
242 		if (err !is null)
243 		{
244 			throw new GException( new ErrorG(err) );
245 		}
246 		
247 		if(p is null)
248 		{
249 			throw new ConstructionException("null returned by g_dbus_object_manager_client_new_finish((res is null) ? null : res.getAsyncResultTStruct(), &err)");
250 		}
251 		this(cast(GDBusObjectManagerClient*) p);
252 	}
253 	
254 	/**
255 	 */
256 	int[string] connectedSignals;
257 	
258 	void delegate(GDBusObjectProxy*, GDBusProxy*, GVariant*, GStrv, DBusObjectManagerClient)[] onInterfaceProxyPropertiesChangedListeners;
259 	/**
260 	 * Emitted when one or more D-Bus properties on proxy changes. The
261 	 * local cache has already been updated when this signal fires. Note
262 	 * that both changed_properties and invalidated_properties are
263 	 * guaranteed to never be NULL (either may be empty though).
264 	 * This signal exists purely as a convenience to avoid having to
265 	 * connect signals to all interface proxies managed by manager.
266 	 * This signal is emitted in the
267 	 * thread-default main loop
268 	 * that manager was constructed in.
269 	 * Since 2.30
270 	 */
271 	void addOnInterfaceProxyPropertiesChanged(void delegate(GDBusObjectProxy*, GDBusProxy*, GVariant*, GStrv, DBusObjectManagerClient) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
272 	{
273 		if ( !("interface-proxy-properties-changed" in connectedSignals) )
274 		{
275 			Signals.connectData(
276 			getStruct(),
277 			"interface-proxy-properties-changed",
278 			cast(GCallback)&callBackInterfaceProxyPropertiesChanged,
279 			cast(void*)this,
280 			null,
281 			connectFlags);
282 			connectedSignals["interface-proxy-properties-changed"] = 1;
283 		}
284 		onInterfaceProxyPropertiesChangedListeners ~= dlg;
285 	}
286 	extern(C) static void callBackInterfaceProxyPropertiesChanged(GDBusObjectManagerClient* managerStruct, GDBusObjectProxy* objectProxy, GDBusProxy* interfaceProxy, GVariant* changedProperties, GStrv invalidatedProperties, DBusObjectManagerClient _dBusObjectManagerClient)
287 	{
288 		foreach ( void delegate(GDBusObjectProxy*, GDBusProxy*, GVariant*, GStrv, DBusObjectManagerClient) dlg ; _dBusObjectManagerClient.onInterfaceProxyPropertiesChangedListeners )
289 		{
290 			dlg(objectProxy, interfaceProxy, changedProperties, invalidatedProperties, _dBusObjectManagerClient);
291 		}
292 	}
293 	
294 	void delegate(GDBusObjectProxy*, GDBusProxy*, string, string, GVariant*, DBusObjectManagerClient)[] onInterfaceProxySignalListeners;
295 	/**
296 	 * Emitted when a D-Bus signal is received on interface_proxy.
297 	 * This signal exists purely as a convenience to avoid having to
298 	 * connect signals to all interface proxies managed by manager.
299 	 * This signal is emitted in the
300 	 * thread-default main loop
301 	 * that manager was constructed in.
302 	 * Since 2.30
303 	 */
304 	void addOnInterfaceProxySignal(void delegate(GDBusObjectProxy*, GDBusProxy*, string, string, GVariant*, DBusObjectManagerClient) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0)
305 	{
306 		if ( !("interface-proxy-signal" in connectedSignals) )
307 		{
308 			Signals.connectData(
309 			getStruct(),
310 			"interface-proxy-signal",
311 			cast(GCallback)&callBackInterfaceProxySignal,
312 			cast(void*)this,
313 			null,
314 			connectFlags);
315 			connectedSignals["interface-proxy-signal"] = 1;
316 		}
317 		onInterfaceProxySignalListeners ~= dlg;
318 	}
319 	extern(C) static void callBackInterfaceProxySignal(GDBusObjectManagerClient* managerStruct, GDBusObjectProxy* objectProxy, GDBusProxy* interfaceProxy, gchar* senderName, gchar* signalName, GVariant* parameters, DBusObjectManagerClient _dBusObjectManagerClient)
320 	{
321 		foreach ( void delegate(GDBusObjectProxy*, GDBusProxy*, string, string, GVariant*, DBusObjectManagerClient) dlg ; _dBusObjectManagerClient.onInterfaceProxySignalListeners )
322 		{
323 			dlg(objectProxy, interfaceProxy, Str.toString(senderName), Str.toString(signalName), parameters, _dBusObjectManagerClient);
324 		}
325 	}
326 	
327 	
328 	/**
329 	 * Asynchronously creates a new GDBusObjectManagerClient object.
330 	 * This is an asynchronous failable constructor. When the result is
331 	 * ready, callback will be invoked in the
332 	 * thread-default main loop
333 	 * of the thread you are calling this method from. You can
334 	 * then call g_dbus_object_manager_client_new_finish() to get the result. See
335 	 * g_dbus_object_manager_client_new_sync() for the synchronous version.
336 	 * Since 2.30
337 	 * Params:
338 	 * connection = A GDBusConnection.
339 	 * flags = Zero or more flags from the GDBusObjectManagerClientFlags enumeration.
340 	 * name = The owner of the control object (unique or well-known name).
341 	 * objectPath = The object path of the control object.
342 	 * getProxyTypeFunc = A GDBusProxyTypeFunc function or NULL to always construct GDBusProxy proxies. [allow-none]
343 	 * getProxyTypeUserData = User data to pass to get_proxy_type_func.
344 	 * getProxyTypeDestroyNotify = Free function for get_proxy_type_user_data or NULL. [allow-none]
345 	 * cancellable = A GCancellable or NULL. [allow-none]
346 	 * callback = A GAsyncReadyCallback to call when the request is satisfied.
347 	 * userData = The data to pass to callback.
348 	 */
349 	public static void newDBusObjectManagerClient(DBusConnection connection, GDBusObjectManagerClientFlags flags, string name, string objectPath, GDBusProxyTypeFunc getProxyTypeFunc, void* getProxyTypeUserData, GDestroyNotify getProxyTypeDestroyNotify, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)
350 	{
351 		// void g_dbus_object_manager_client_new (GDBusConnection *connection,  GDBusObjectManagerClientFlags flags,  const gchar *name,  const gchar *object_path,  GDBusProxyTypeFunc get_proxy_type_func,  gpointer get_proxy_type_user_data,  GDestroyNotify get_proxy_type_destroy_notify,  GCancellable *cancellable,  GAsyncReadyCallback callback,  gpointer user_data);
352 		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);
353 	}
354 	
355 	/**
356 	 * Creates a new GDBusObjectManagerClient object.
357 	 * This is a synchronous failable constructor - the calling thread is
358 	 * blocked until a reply is received. See g_dbus_object_manager_client_new()
359 	 * for the asynchronous version.
360 	 * Since 2.30
361 	 * Params:
362 	 * connection = A GDBusConnection.
363 	 * flags = Zero or more flags from the GDBusObjectManagerClientFlags enumeration.
364 	 * name = The owner of the control object (unique or well-known name), or NULL when not using a message bus connection. [allow-none]
365 	 * objectPath = The object path of the control object.
366 	 * getProxyTypeFunc = A GDBusProxyTypeFunc function or NULL to always construct GDBusProxy proxies. [allow-none]
367 	 * getProxyTypeUserData = User data to pass to get_proxy_type_func.
368 	 * getProxyTypeDestroyNotify = Free function for get_proxy_type_user_data or NULL. [allow-none]
369 	 * cancellable = A GCancellable or NULL. [allow-none]
370 	 * Throws: GException on failure.
371 	 * Throws: ConstructionException GTK+ fails to create the object.
372 	 */
373 	public this (DBusConnection connection, GDBusObjectManagerClientFlags flags, string name, string objectPath, GDBusProxyTypeFunc getProxyTypeFunc, void* getProxyTypeUserData, GDestroyNotify getProxyTypeDestroyNotify, Cancellable cancellable)
374 	{
375 		// GDBusObjectManager * g_dbus_object_manager_client_new_sync  (GDBusConnection *connection,  GDBusObjectManagerClientFlags flags,  const gchar *name,  const gchar *object_path,  GDBusProxyTypeFunc get_proxy_type_func,  gpointer get_proxy_type_user_data,  GDestroyNotify get_proxy_type_destroy_notify,  GCancellable *cancellable,  GError **error);
376 		GError* err = null;
377 		
378 		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);
379 		
380 		if (err !is null)
381 		{
382 			throw new GException( new ErrorG(err) );
383 		}
384 		
385 		if(p is null)
386 		{
387 			throw new ConstructionException("null returned by 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)");
388 		}
389 		this(cast(GDBusObjectManagerClient*) p);
390 	}
391 	
392 	/**
393 	 * Like g_dbus_object_manager_client_new() but takes a GBusType instead of a
394 	 * GDBusConnection.
395 	 * This is an asynchronous failable constructor. When the result is
396 	 * ready, callback will be invoked in the
397 	 * thread-default main loop
398 	 * of the thread you are calling this method from. You can
399 	 * then call g_dbus_object_manager_client_new_for_bus_finish() to get the result. See
400 	 * g_dbus_object_manager_client_new_for_bus_sync() for the synchronous version.
401 	 * Since 2.30
402 	 * Params:
403 	 * busType = A GBusType.
404 	 * flags = Zero or more flags from the GDBusObjectManagerClientFlags enumeration.
405 	 * name = The owner of the control object (unique or well-known name).
406 	 * objectPath = The object path of the control object.
407 	 * getProxyTypeFunc = A GDBusProxyTypeFunc function or NULL to always construct GDBusProxy proxies. [allow-none]
408 	 * getProxyTypeUserData = User data to pass to get_proxy_type_func.
409 	 * getProxyTypeDestroyNotify = Free function for get_proxy_type_user_data or NULL. [allow-none]
410 	 * cancellable = A GCancellable or NULL. [allow-none]
411 	 * callback = A GAsyncReadyCallback to call when the request is satisfied.
412 	 * userData = The data to pass to callback.
413 	 */
414 	public static void newForBus(GBusType busType, GDBusObjectManagerClientFlags flags, string name, string objectPath, GDBusProxyTypeFunc getProxyTypeFunc, void* getProxyTypeUserData, GDestroyNotify getProxyTypeDestroyNotify, Cancellable cancellable, GAsyncReadyCallback callback, void* userData)
415 	{
416 		// void g_dbus_object_manager_client_new_for_bus  (GBusType bus_type,  GDBusObjectManagerClientFlags flags,  const gchar *name,  const gchar *object_path,  GDBusProxyTypeFunc get_proxy_type_func,  gpointer get_proxy_type_user_data,  GDestroyNotify get_proxy_type_destroy_notify,  GCancellable *cancellable,  GAsyncReadyCallback callback,  gpointer user_data);
417 		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);
418 	}
419 	
420 	/**
421 	 * Like g_dbus_object_manager_client_new_sync() but takes a GBusType instead
422 	 * of a GDBusConnection.
423 	 * This is a synchronous failable constructor - the calling thread is
424 	 * blocked until a reply is received. See g_dbus_object_manager_client_new_for_bus()
425 	 * for the asynchronous version.
426 	 * Since 2.30
427 	 * Params:
428 	 * busType = A GBusType.
429 	 * flags = Zero or more flags from the GDBusObjectManagerClientFlags enumeration.
430 	 * name = The owner of the control object (unique or well-known name).
431 	 * objectPath = The object path of the control object.
432 	 * getProxyTypeFunc = A GDBusProxyTypeFunc function or NULL to always construct GDBusProxy proxies. [allow-none]
433 	 * getProxyTypeUserData = User data to pass to get_proxy_type_func.
434 	 * getProxyTypeDestroyNotify = Free function for get_proxy_type_user_data or NULL. [allow-none]
435 	 * cancellable = A GCancellable or NULL. [allow-none]
436 	 * Throws: GException on failure.
437 	 * Throws: ConstructionException GTK+ fails to create the object.
438 	 */
439 	public this (GBusType busType, GDBusObjectManagerClientFlags flags, string name, string objectPath, GDBusProxyTypeFunc getProxyTypeFunc, void* getProxyTypeUserData, GDestroyNotify getProxyTypeDestroyNotify, Cancellable cancellable)
440 	{
441 		// GDBusObjectManager * g_dbus_object_manager_client_new_for_bus_sync  (GBusType bus_type,  GDBusObjectManagerClientFlags flags,  const gchar *name,  const gchar *object_path,  GDBusProxyTypeFunc get_proxy_type_func,  gpointer get_proxy_type_user_data,  GDestroyNotify get_proxy_type_destroy_notify,  GCancellable *cancellable,  GError **error);
442 		GError* err = null;
443 		
444 		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);
445 		
446 		if (err !is null)
447 		{
448 			throw new GException( new ErrorG(err) );
449 		}
450 		
451 		if(p is null)
452 		{
453 			throw new ConstructionException("null returned by 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)");
454 		}
455 		this(cast(GDBusObjectManagerClient*) p);
456 	}
457 	
458 	/**
459 	 * Gets the GDBusConnection used by manager.
460 	 * Since 2.30
461 	 * Returns: A GDBusConnection object. Do not free, the object belongs to manager. [transfer none]
462 	 */
463 	public DBusConnection getConnection()
464 	{
465 		// GDBusConnection * g_dbus_object_manager_client_get_connection  (GDBusObjectManagerClient *manager);
466 		auto p = g_dbus_object_manager_client_get_connection(gDBusObjectManagerClient);
467 		
468 		if(p is null)
469 		{
470 			return null;
471 		}
472 		
473 		return ObjectG.getDObject!(DBusConnection)(cast(GDBusConnection*) p);
474 	}
475 	
476 	/**
477 	 * Gets the flags that manager was constructed with.
478 	 * Since 2.30
479 	 * Returns: Zero of more flags from the GDBusObjectManagerClientFlags enumeration.
480 	 */
481 	public GDBusObjectManagerClientFlags getFlags()
482 	{
483 		// GDBusObjectManagerClientFlags g_dbus_object_manager_client_get_flags  (GDBusObjectManagerClient *manager);
484 		return g_dbus_object_manager_client_get_flags(gDBusObjectManagerClient);
485 	}
486 	
487 	/**
488 	 * Gets the name that manager is for, or NULL if not a message bus
489 	 * connection.
490 	 * Since 2.30
491 	 * Returns: A unique or well-known name. Do not free, the string belongs to manager.
492 	 */
493 	public string getName()
494 	{
495 		// const gchar * g_dbus_object_manager_client_get_name  (GDBusObjectManagerClient *manager);
496 		return Str.toString(g_dbus_object_manager_client_get_name(gDBusObjectManagerClient));
497 	}
498 	
499 	/**
500 	 * The unique name that owns the name that manager is for or NULL if
501 	 * no-one currently owns that name. You can connect to the
502 	 * "notify" signal to track changes to the
503 	 * "name-owner" property.
504 	 * Since 2.30
505 	 * Returns: The name owner or NULL if no name owner exists. Free with g_free().
506 	 */
507 	public string getNameOwner()
508 	{
509 		// gchar * g_dbus_object_manager_client_get_name_owner  (GDBusObjectManagerClient *manager);
510 		return Str.toString(g_dbus_object_manager_client_get_name_owner(gDBusObjectManagerClient));
511 	}
512 }