v0.2.1 c0399be

gdbusconnection.go RawHistoryFolder

1// Package gio was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package gio
3
4import (
5	"structs"
6	"unsafe"
7
8	"github.com/ebitengine/purego"
9
10	"github.com/bnema/puregotk/pkg/core"
11	"github.com/bnema/puregotk/v4/glib"
12	"github.com/bnema/puregotk/v4/gobject"
13	"github.com/bnema/puregotk/v4/gobject/types"
14)
15
16// The type of the @get_property function in #GDBusInterfaceVTable.
17type DBusInterfaceGetPropertyFunc func(uintptr, string, string, string, string, **glib.Error, uintptr) *glib.Variant
18
19// The type of the @method_call function in #GDBusInterfaceVTable.
20//
21// @interface_name may be `NULL` if not specified by the sender, although it’s
22// encouraged for the sender to set it. If unset, and the object has only one
23// method (across all interfaces) matching @method_name, that method is invoked.
24// Otherwise, behaviour is implementation defined. See the
25// [D-Bus specification](https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-types-method).
26// It is recommended to return [error@Gio.DBusError.UNKNOWN_METHOD].
27type DBusInterfaceMethodCallFunc func(uintptr, string, string, string, string, *glib.Variant, uintptr, uintptr)
28
29// The type of the @set_property function in #GDBusInterfaceVTable.
30type DBusInterfaceSetPropertyFunc func(uintptr, string, string, string, string, *glib.Variant, **glib.Error, uintptr) bool
31
32// Signature for function used in g_dbus_connection_add_filter().
33//
34// A filter function is passed a #GDBusMessage and expected to return
35// a #GDBusMessage too. Passive filter functions that don't modify the
36// message can simply return the @message object:
37// |[
38// static GDBusMessage *
39// passive_filter (GDBusConnection *connection
40//
41//	GDBusMessage    *message,
42//	gboolean         incoming,
43//	gpointer         user_data)
44//
45//	{
46//	  // inspect @message
47//	  return message;
48//	}
49//
50// ]|
51// Filter functions that wants to drop a message can simply return %NULL:
52// |[
53// static GDBusMessage *
54// drop_filter (GDBusConnection *connection
55//
56//	GDBusMessage    *message,
57//	gboolean         incoming,
58//	gpointer         user_data)
59//
60//	{
61//	  if (should_drop_message)
62//	    {
63//	      g_object_unref (message);
64//	      message = NULL;
65//	    }
66//	  return message;
67//	}
68//
69// ]|
70// Finally, a filter function may modify a message by copying it:
71// |[
72// static GDBusMessage *
73// modifying_filter (GDBusConnection *connection
74//
75//	GDBusMessage    *message,
76//	gboolean         incoming,
77//	gpointer         user_data)
78//
79//	{
80//	  GDBusMessage *copy;
81//	  GError *error;
82//
83//	  error = NULL;
84//	  copy = g_dbus_message_copy (message, &error);
85//	  // handle @error being set
86//	  g_object_unref (message);
87//
88//	  // modify @copy
89//
90//	  return copy;
91//	}
92//
93// ]|
94// If the returned #GDBusMessage is different from @message and cannot
95// be sent on @connection (it could use features, such as file
96// descriptors, not compatible with @connection), then a warning is
97// logged to standard error. Applications can
98// check this ahead of time using g_dbus_message_to_blob() passing a
99// #GDBusCapabilityFlags value obtained from @connection.
100type DBusMessageFilterFunction func(uintptr, uintptr, bool, uintptr) uintptr
101
102// Signature for callback function used in g_dbus_connection_signal_subscribe().
103type DBusSignalCallback func(uintptr, string, string, string, string, *glib.Variant, uintptr)
104
105// The type of the @dispatch function in #GDBusSubtreeVTable.
106//
107// Subtrees are flat.  @node, if non-%NULL, is always exactly one
108// segment of the object path (ie: it never contains a slash).
109type DBusSubtreeDispatchFunc func(uintptr, string, string, string, string, uintptr, uintptr) *DBusInterfaceVTable
110
111// The type of the @enumerate function in #GDBusSubtreeVTable.
112//
113// This function is called when generating introspection data and also
114// when preparing to dispatch incoming messages in the event that the
115// %G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is not
116// specified (ie: to verify that the object path is valid).
117//
118// Hierarchies are not supported; the items that you return should not
119// contain the `/` character.
120//
121// The return value will be freed with g_strfreev().
122type DBusSubtreeEnumerateFunc func(uintptr, string, string, uintptr) []string
123
124// The type of the @introspect function in #GDBusSubtreeVTable.
125//
126// Subtrees are flat.  @node, if non-%NULL, is always exactly one
127// segment of the object path (ie: it never contains a slash).
128//
129// This function should return %NULL to indicate that there is no object
130// at this node.
131//
132// If this function returns non-%NULL, the return value is expected to
133// be a %NULL-terminated array of pointers to #GDBusInterfaceInfo
134// structures describing the interfaces implemented by @node.  This
135// array will have g_dbus_interface_info_unref() called on each item
136// before being freed with g_free().
137//
138// The difference between returning %NULL and an array containing zero
139// items is that the standard DBus interfaces will returned to the
140// remote introspector in the empty array case, but not in the %NULL
141// case.
142type DBusSubtreeIntrospectFunc func(uintptr, string, string, string, uintptr) uintptr
143
144// Virtual table for handling properties and method calls for a D-Bus
145// interface.
146//
147// Since 2.38, if you want to handle getting/setting D-Bus properties
148// asynchronously, give %NULL as your get_property() or set_property()
149// function. The D-Bus call will be directed to your @method_call function,
150// with the provided @interface_name set to "org.freedesktop.DBus.Properties".
151//
152// Ownership of the #GDBusMethodInvocation object passed to the
153// method_call() function is transferred to your handler; you must
154// call one of the methods of #GDBusMethodInvocation to return a reply
155// (possibly empty), or an error. These functions also take ownership
156// of the passed-in invocation object, so unless the invocation
157// object has otherwise been referenced, it will be then be freed.
158// Calling one of these functions may be done within your
159// method_call() implementation but it also can be done at a later
160// point to handle the method asynchronously.
161//
162// The usual checks on the validity of the calls is performed. For
163// `Get` calls, an error is automatically returned if the property does
164// not exist or the permissions do not allow access. The same checks are
165// performed for `Set` calls, and the provided value is also checked for
166// being the correct type.
167//
168// For both `Get` and `Set` calls, the #GDBusMethodInvocation
169// passed to the @method_call handler can be queried with
170// g_dbus_method_invocation_get_property_info() to get a pointer
171// to the #GDBusPropertyInfo of the property.
172//
173// If you have readable properties specified in your interface info,
174// you must ensure that you either provide a non-%NULL @get_property()
175// function or provide implementations of both the `Get` and `GetAll`
176// methods on org.freedesktop.DBus.Properties interface in your @method_call
177// function. Note that the required return type of the `Get` call is
178// `(v)`, not the type of the property. `GetAll` expects a return value
179// of type `a{sv}`.
180//
181// If you have writable properties specified in your interface info,
182// you must ensure that you either provide a non-%NULL @set_property()
183// function or provide an implementation of the `Set` call. If implementing
184// the call, you must return the value of type %G_VARIANT_TYPE_UNIT.
185type DBusInterfaceVTable struct {
186	_ structs.HostLayout
187
188	MethodCall DBusInterfaceMethodCallFunc
189
190	GetProperty DBusInterfaceGetPropertyFunc
191
192	SetProperty DBusInterfaceSetPropertyFunc
193
194	Padding [8]uintptr
195}
196
197func (x *DBusInterfaceVTable) GoPointer() uintptr {
198	return uintptr(unsafe.Pointer(x))
199}
200
201// Virtual table for handling subtrees registered with g_dbus_connection_register_subtree().
202type DBusSubtreeVTable struct {
203	_ structs.HostLayout
204
205	Enumerate DBusSubtreeEnumerateFunc
206
207	Introspect DBusSubtreeIntrospectFunc
208
209	Dispatch DBusSubtreeDispatchFunc
210
211	Padding [8]uintptr
212}
213
214func (x *DBusSubtreeVTable) GoPointer() uintptr {
215	return uintptr(unsafe.Pointer(x))
216}
217
218var xBusGet func(BusType, uintptr, uintptr, uintptr)
219
220// Asynchronously connects to the message bus specified by @bus_type.
221//
222// When the operation is finished, @callback will be invoked. You can
223// then call g_bus_get_finish() to get the result of the operation.
224//
225// This is an asynchronous failable function. See g_bus_get_sync() for
226// the synchronous version.
227func BusGet(BusTypeVar BusType, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
228
229	var CallbackVarRef uintptr
230	if CallbackVar != nil {
231		CallbackVarPtr := uintptr(unsafe.Pointer(CallbackVar))
232		if cbRefPtr, ok := glib.GetCallback(CallbackVarPtr); ok {
233			CallbackVarRef = cbRefPtr
234		} else {
235			fcb := func(arg0 uintptr, arg1 uintptr, arg2 uintptr) {
236				cbFn := *CallbackVar
237				cbFn(arg0, arg1, arg2)
238			}
239			CallbackVarRef = purego.NewCallback(fcb)
240			glib.SaveCallbackWithClosure(CallbackVarPtr, CallbackVarRef, CallbackVar)
241		}
242	}
243
244	xBusGet(BusTypeVar, CancellableVar.GoPointer(), CallbackVarRef, UserDataVar)
245
246}
247
248var xBusGetFinish func(uintptr, **glib.Error) uintptr
249
250// Finishes an operation started with g_bus_get().
251//
252// The returned object is a singleton, that is, shared with other
253// callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the
254// event that you need a private message bus connection, use
255// g_dbus_address_get_for_bus_sync() and
256// g_dbus_connection_new_for_address() with
257// G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT and
258// G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION flags.
259//
260// Note that the returned #GDBusConnection object will (usually) have
261// the #GDBusConnection:exit-on-close property set to %TRUE.
262func BusGetFinish(ResVar AsyncResult) (*DBusConnection, error) {
263	var cls *DBusConnection
264	var cerr *glib.Error
265
266	cret := xBusGetFinish(ResVar.GoPointer(), &cerr)
267
268	if cret == 0 {
269		return nil, cerr
270	}
271	cls = &DBusConnection{}
272	cls.Ptr = cret
273	if cerr == nil {
274		return cls, nil
275	}
276	return cls, cerr
277
278}
279
280var xBusGetSync func(BusType, uintptr, **glib.Error) uintptr
281
282// Synchronously connects to the message bus specified by @bus_type.
283// Note that the returned object may shared with other callers,
284// e.g. if two separate parts of a process calls this function with
285// the same @bus_type, they will share the same object.
286//
287// This is a synchronous failable function. See g_bus_get() and
288// g_bus_get_finish() for the asynchronous version.
289//
290// The returned object is a singleton, that is, shared with other
291// callers of g_bus_get() and g_bus_get_sync() for @bus_type. In the
292// event that you need a private message bus connection, use
293// g_dbus_address_get_for_bus_sync() and
294// g_dbus_connection_new_for_address() with
295// G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT and
296// G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION flags.
297//
298// Note that the returned #GDBusConnection object will (usually) have
299// the #GDBusConnection:exit-on-close property set to %TRUE.
300func BusGetSync(BusTypeVar BusType, CancellableVar *Cancellable) (*DBusConnection, error) {
301	var cls *DBusConnection
302	var cerr *glib.Error
303
304	cret := xBusGetSync(BusTypeVar, CancellableVar.GoPointer(), &cerr)
305
306	if cret == 0 {
307		return nil, cerr
308	}
309	cls = &DBusConnection{}
310	cls.Ptr = cret
311	if cerr == nil {
312		return cls, nil
313	}
314	return cls, cerr
315
316}
317
318// The `GDBusConnection` type is used for D-Bus connections to remote
319// peers such as a message buses.
320//
321// It is a low-level API that offers a lot of flexibility. For instance,
322// it lets you establish a connection over any transport that can by represented
323// as a [class@Gio.IOStream].
324//
325// This class is rarely used directly in D-Bus clients. If you are writing
326// a D-Bus client, it is often easier to use the [func@Gio.bus_own_name],
327// [func@Gio.bus_watch_name] or [func@Gio.DBusProxy.new_for_bus] APIs.
328//
329// As an exception to the usual GLib rule that a particular object must not
330// be used by two threads at the same time, `GDBusConnection`s methods may be
331// called from any thread. This is so that [func@Gio.bus_get] and
332// [func@Gio.bus_get_sync] can safely return the same `GDBusConnection` when
333// called from any thread.
334//
335// Most of the ways to obtain a `GDBusConnection` automatically initialize it
336// (i.e. connect to D-Bus): for instance, [func@Gio.DBusConnection.new] and
337// [func@Gio.bus_get], and the synchronous versions of those methods, give you
338// an initialized connection. Language bindings for GIO should use
339// [func@Gio.Initable.new] or [func@Gio.AsyncInitable.new_async], which also
340// initialize the connection.
341//
342// If you construct an uninitialized `GDBusConnection`, such as via
343// [ctor@GObject.Object.new], you must initialize it via [method@Gio.Initable.init] or
344// [method@Gio.AsyncInitable.init_async] before using its methods or properties.
345// Calling methods or accessing properties on a `GDBusConnection` that has not
346// completed initialization successfully is considered to be invalid, and leads
347// to undefined behaviour. In particular, if initialization fails with a
348// `GError`, the only valid thing you can do with that `GDBusConnection` is to
349// free it with [method@GObject.Object.unref].
350//
351// ## An example D-Bus server
352//
353// Here is an example for a D-Bus server:
354// [gdbus-example-server.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gdbus-example-server.c)
355//
356// ## An example for exporting a subtree
357//
358// Here is an example for exporting a subtree:
359// [gdbus-example-subtree.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gdbus-example-subtree.c)
360//
361// ## An example for file descriptor passing
362//
363// Here is an example for passing UNIX file descriptors:
364// [gdbus-unix-fd-client.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gdbus-example-unix-fd-client.c)
365//
366// ## An example for exporting a GObject
367//
368// Here is an example for exporting a #GObject:
369// [gdbus-example-export.c](https://gitlab.gnome.org/GNOME/glib/-/blob/HEAD/gio/tests/gdbus-example-export.c)
370type DBusConnection struct {
371	gobject.Object
372}
373
374var xDBusConnectionGLibType func() types.GType
375
376func DBusConnectionGLibType() types.GType {
377	return xDBusConnectionGLibType()
378}
379
380func DBusConnectionNewFromInternalPtr(ptr uintptr) *DBusConnection {
381	cls := &DBusConnection{}
382	cls.Ptr = ptr
383	return cls
384}
385
386var xNewDBusConnectionFinish func(uintptr, **glib.Error) uintptr
387
388// Finishes an operation started with g_dbus_connection_new().
389func NewDBusConnectionFinish(ResVar AsyncResult) (*DBusConnection, error) {
390	var cls *DBusConnection
391	var cerr *glib.Error
392
393	cret := xNewDBusConnectionFinish(ResVar.GoPointer(), &cerr)
394
395	if cret == 0 {
396		return nil, cerr
397	}
398	cls = &DBusConnection{}
399	cls.Ptr = cret
400	if cerr == nil {
401		return cls, nil
402	}
403	return cls, cerr
404
405}
406
407var xNewDBusConnectionForAddressFinish func(uintptr, **glib.Error) uintptr
408
409// Finishes an operation started with g_dbus_connection_new_for_address().
410func NewDBusConnectionForAddressFinish(ResVar AsyncResult) (*DBusConnection, error) {
411	var cls *DBusConnection
412	var cerr *glib.Error
413
414	cret := xNewDBusConnectionForAddressFinish(ResVar.GoPointer(), &cerr)
415
416	if cret == 0 {
417		return nil, cerr
418	}
419	cls = &DBusConnection{}
420	cls.Ptr = cret
421	if cerr == nil {
422		return cls, nil
423	}
424	return cls, cerr
425
426}
427
428var xNewDBusConnectionForAddressSync func(string, DBusConnectionFlags, uintptr, uintptr, **glib.Error) uintptr
429
430// Synchronously connects and sets up a D-Bus client connection for
431// exchanging D-Bus messages with an endpoint specified by @address
432// which must be in the
433// [D-Bus address format](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses).
434//
435// This constructor can only be used to initiate client-side
436// connections - use g_dbus_connection_new_sync() if you need to act
437// as the server. In particular, @flags cannot contain the
438// %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER,
439// %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS or
440// %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_REQUIRE_SAME_USER flags.
441//
442// This is a synchronous failable constructor. See
443// g_dbus_connection_new_for_address() for the asynchronous version.
444//
445// If @observer is not %NULL it may be used to control the
446// authentication process.
447func NewDBusConnectionForAddressSync(AddressVar string, FlagsVar DBusConnectionFlags, ObserverVar *DBusAuthObserver, CancellableVar *Cancellable) (*DBusConnection, error) {
448	var cls *DBusConnection
449	var cerr *glib.Error
450
451	cret := xNewDBusConnectionForAddressSync(AddressVar, FlagsVar, ObserverVar.GoPointer(), CancellableVar.GoPointer(), &cerr)
452
453	if cret == 0 {
454		return nil, cerr
455	}
456	cls = &DBusConnection{}
457	cls.Ptr = cret
458	if cerr == nil {
459		return cls, nil
460	}
461	return cls, cerr
462
463}
464
465var xNewDBusConnectionSync func(uintptr, uintptr, DBusConnectionFlags, uintptr, uintptr, **glib.Error) uintptr
466
467// Synchronously sets up a D-Bus connection for exchanging D-Bus messages
468// with the end represented by @stream.
469//
470// If @stream is a #GSocketConnection, then the corresponding #GSocket
471// will be put into non-blocking mode.
472//
473// The D-Bus connection will interact with @stream from a worker thread.
474// As a result, the caller should not interact with @stream after this
475// method has been called, except by calling g_object_unref() on it.
476//
477// If @observer is not %NULL it may be used to control the
478// authentication process.
479//
480// This is a synchronous failable constructor. See
481// g_dbus_connection_new() for the asynchronous version.
482func NewDBusConnectionSync(StreamVar *IOStream, GuidVar *string, FlagsVar DBusConnectionFlags, ObserverVar *DBusAuthObserver, CancellableVar *Cancellable) (*DBusConnection, error) {
483	var cls *DBusConnection
484	var cerr *glib.Error
485
486	GuidVarPtr := core.GStrdupNullable(GuidVar)
487	defer core.GFreeNullable(GuidVarPtr)
488
489	cret := xNewDBusConnectionSync(StreamVar.GoPointer(), GuidVarPtr, FlagsVar, ObserverVar.GoPointer(), CancellableVar.GoPointer(), &cerr)
490
491	if cret == 0 {
492		return nil, cerr
493	}
494	cls = &DBusConnection{}
495	cls.Ptr = cret
496	if cerr == nil {
497		return cls, nil
498	}
499	return cls, cerr
500
501}
502
503var xDBusConnectionAddFilter func(uintptr, uintptr, uintptr, uintptr) uint
504
505// Adds a message filter. Filters are handlers that are run on all
506// incoming and outgoing messages, prior to standard dispatch. Filters
507// are run in the order that they were added.  The same handler can be
508// added as a filter more than once, in which case it will be run more
509// than once.  Filters added during a filter callback won't be run on
510// the message being processed. Filter functions are allowed to modify
511// and even drop messages.
512//
513// Note that filters are run in a dedicated message handling thread so
514// they can't block and, generally, can't do anything but signal a
515// worker thread. Also note that filters are rarely needed - use API
516// such as g_dbus_connection_send_message_with_reply(),
517// g_dbus_connection_signal_subscribe() or g_dbus_connection_call() instead.
518//
519// If a filter consumes an incoming message the message is not
520// dispatched anywhere else - not even the standard dispatch machinery
521// (that API such as g_dbus_connection_signal_subscribe() and
522// g_dbus_connection_send_message_with_reply() relies on) will see the
523// message. Similarly, if a filter consumes an outgoing message, the
524// message will not be sent to the other peer.
525//
526// If @user_data_free_func is non-%NULL, it will be called (in the
527// thread-default main context of the thread you are calling this
528// method from) at some point after @user_data is no longer
529// needed. (It is not guaranteed to be called synchronously when the
530// filter is removed, and may be called after @connection has been
531// destroyed.)
532func (x *DBusConnection) AddFilter(FilterFunctionVar *DBusMessageFilterFunction, UserDataVar uintptr, UserDataFreeFuncVar *glib.DestroyNotify) uint {
533
534	var FilterFunctionVarRef uintptr
535	if FilterFunctionVar != nil {
536		FilterFunctionVarPtr := uintptr(unsafe.Pointer(FilterFunctionVar))
537		if cbRefPtr, ok := glib.GetCallback(FilterFunctionVarPtr); ok {
538			FilterFunctionVarRef = cbRefPtr
539		} else {
540			fcb := func(arg0 uintptr, arg1 uintptr, arg2 bool, arg3 uintptr) uintptr {
541				cbFn := *FilterFunctionVar
542				return cbFn(arg0, arg1, arg2, arg3)
543			}
544			FilterFunctionVarRef = purego.NewCallback(fcb)
545			glib.SaveCallbackWithClosure(FilterFunctionVarPtr, FilterFunctionVarRef, FilterFunctionVar)
546		}
547	}
548
549	var UserDataFreeFuncVarRef uintptr
550	if UserDataFreeFuncVar != nil {
551		UserDataFreeFuncVarPtr := uintptr(unsafe.Pointer(UserDataFreeFuncVar))
552		if cbRefPtr, ok := glib.GetCallback(UserDataFreeFuncVarPtr); ok {
553			UserDataFreeFuncVarRef = cbRefPtr
554		} else {
555			fcb := func(arg0 uintptr) {
556				cbFn := *UserDataFreeFuncVar
557				cbFn(arg0)
558			}
559			UserDataFreeFuncVarRef = purego.NewCallback(fcb)
560			glib.SaveCallbackWithClosure(UserDataFreeFuncVarPtr, UserDataFreeFuncVarRef, UserDataFreeFuncVar)
561		}
562	}
563
564	cret := xDBusConnectionAddFilter(x.GoPointer(), FilterFunctionVarRef, UserDataVar, UserDataFreeFuncVarRef)
565	return cret
566}
567
568var xDBusConnectionCall func(uintptr, uintptr, string, string, string, *glib.Variant, *glib.VariantType, DBusCallFlags, int, uintptr, uintptr, uintptr)
569
570// Asynchronously invokes the @method_name method on the
571// @interface_name D-Bus interface on the remote object at
572// @object_path owned by @bus_name.
573//
574// If @connection is closed then the operation will fail with
575// %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
576// fail with %G_IO_ERROR_CANCELLED. If @parameters contains a value
577// not compatible with the D-Bus protocol, the operation fails with
578// %G_IO_ERROR_INVALID_ARGUMENT.
579//
580// If @reply_type is non-%NULL then the reply will be checked for having this type and an
581// error will be raised if it does not match.  Said another way, if you give a @reply_type
582// then any non-%NULL return value will be of this type. Unless it’s
583// %G_VARIANT_TYPE_UNIT, the @reply_type will be a tuple containing one or more
584// values.
585//
586// If the @parameters #GVariant is floating, it is consumed. This allows
587// convenient 'inline' use of g_variant_new(), e.g.:
588// |[<!-- language="C" -->
589//
590//	g_dbus_connection_call (connection,
591//	                        "org.freedesktop.StringThings",
592//	                        "/org/freedesktop/StringThings",
593//	                        "org.freedesktop.StringThings",
594//	                        "TwoStrings",
595//	                        g_variant_new ("(ss)",
596//	                                       "Thing One",
597//	                                       "Thing Two"),
598//	                        NULL,
599//	                        G_DBUS_CALL_FLAGS_NONE,
600//	                        -1,
601//	                        NULL,
602//	                        (GAsyncReadyCallback) two_strings_done,
603//	                        NULL);
604//
605// ]|
606//
607// This is an asynchronous method. When the operation is finished,
608// @callback will be invoked in the thread-default main context
609// (see [method@GLib.MainContext.push_thread_default])
610// of the thread you are calling this method from. You can then call
611// g_dbus_connection_call_finish() to get the result of the operation.
612// See g_dbus_connection_call_sync() for the synchronous version of this
613// function.
614//
615// If @callback is %NULL then the D-Bus method call message will be sent with
616// the %G_DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED flag set.
617func (x *DBusConnection) Call(BusNameVar *string, ObjectPathVar string, InterfaceNameVar string, MethodNameVar string, ParametersVar *glib.Variant, ReplyTypeVar *glib.VariantType, FlagsVar DBusCallFlags, TimeoutMsecVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
618
619	var CallbackVarRef uintptr
620	if CallbackVar != nil {
621		CallbackVarPtr := uintptr(unsafe.Pointer(CallbackVar))
622		if cbRefPtr, ok := glib.GetCallback(CallbackVarPtr); ok {
623			CallbackVarRef = cbRefPtr
624		} else {
625			fcb := func(arg0 uintptr, arg1 uintptr, arg2 uintptr) {
626				cbFn := *CallbackVar
627				cbFn(arg0, arg1, arg2)
628			}
629			CallbackVarRef = purego.NewCallback(fcb)
630			glib.SaveCallbackWithClosure(CallbackVarPtr, CallbackVarRef, CallbackVar)
631		}
632	}
633
634	BusNameVarPtr := core.GStrdupNullable(BusNameVar)
635	defer core.GFreeNullable(BusNameVarPtr)
636
637	xDBusConnectionCall(x.GoPointer(), BusNameVarPtr, ObjectPathVar, InterfaceNameVar, MethodNameVar, ParametersVar, ReplyTypeVar, FlagsVar, TimeoutMsecVar, CancellableVar.GoPointer(), CallbackVarRef, UserDataVar)
638
639}
640
641var xDBusConnectionCallFinish func(uintptr, uintptr, **glib.Error) *glib.Variant
642
643// Finishes an operation started with g_dbus_connection_call().
644func (x *DBusConnection) CallFinish(ResVar AsyncResult) (*glib.Variant, error) {
645	var cerr *glib.Error
646
647	cret := xDBusConnectionCallFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
648	if cerr == nil {
649		return cret, nil
650	}
651	return cret, cerr
652
653}
654
655var xDBusConnectionCallSync func(uintptr, uintptr, string, string, string, *glib.Variant, *glib.VariantType, DBusCallFlags, int, uintptr, **glib.Error) *glib.Variant
656
657// Synchronously invokes the @method_name method on the
658// @interface_name D-Bus interface on the remote object at
659// @object_path owned by @bus_name.
660//
661// If @connection is closed then the operation will fail with
662// %G_IO_ERROR_CLOSED. If @cancellable is canceled, the
663// operation will fail with %G_IO_ERROR_CANCELLED. If @parameters
664// contains a value not compatible with the D-Bus protocol, the operation
665// fails with %G_IO_ERROR_INVALID_ARGUMENT.
666//
667// If @reply_type is non-%NULL then the reply will be checked for having
668// this type and an error will be raised if it does not match.  Said
669// another way, if you give a @reply_type then any non-%NULL return
670// value will be of this type.
671//
672// If the @parameters #GVariant is floating, it is consumed.
673// This allows convenient 'inline' use of g_variant_new(), e.g.:
674// |[<!-- language="C" -->
675//
676//	g_dbus_connection_call_sync (connection,
677//	                             "org.freedesktop.StringThings",
678//	                             "/org/freedesktop/StringThings",
679//	                             "org.freedesktop.StringThings",
680//	                             "TwoStrings",
681//	                             g_variant_new ("(ss)",
682//	                                            "Thing One",
683//	                                            "Thing Two"),
684//	                             NULL,
685//	                             G_DBUS_CALL_FLAGS_NONE,
686//	                             -1,
687//	                             NULL,
688//	                             &error);
689//
690// ]|
691//
692// The calling thread is blocked until a reply is received. See
693// g_dbus_connection_call() for the asynchronous version of
694// this method.
695func (x *DBusConnection) CallSync(BusNameVar *string, ObjectPathVar string, InterfaceNameVar string, MethodNameVar string, ParametersVar *glib.Variant, ReplyTypeVar *glib.VariantType, FlagsVar DBusCallFlags, TimeoutMsecVar int, CancellableVar *Cancellable) (*glib.Variant, error) {
696	var cerr *glib.Error
697
698	BusNameVarPtr := core.GStrdupNullable(BusNameVar)
699	defer core.GFreeNullable(BusNameVarPtr)
700
701	cret := xDBusConnectionCallSync(x.GoPointer(), BusNameVarPtr, ObjectPathVar, InterfaceNameVar, MethodNameVar, ParametersVar, ReplyTypeVar, FlagsVar, TimeoutMsecVar, CancellableVar.GoPointer(), &cerr)
702	if cerr == nil {
703		return cret, nil
704	}
705	return cret, cerr
706
707}
708
709var xDBusConnectionCallWithUnixFdList func(uintptr, uintptr, string, string, string, *glib.Variant, *glib.VariantType, DBusCallFlags, int, uintptr, uintptr, uintptr, uintptr)
710
711// Like g_dbus_connection_call() but also takes a #GUnixFDList object.
712//
713// The file descriptors normally correspond to %G_VARIANT_TYPE_HANDLE
714// values in the body of the message. For example, if a message contains
715// two file descriptors, @fd_list would have length 2, and
716// `g_variant_new_handle (0)` and `g_variant_new_handle (1)` would appear
717// somewhere in the body of the message (not necessarily in that order!)
718// to represent the file descriptors at indexes 0 and 1 respectively.
719//
720// When designing D-Bus APIs that are intended to be interoperable,
721// please note that non-GDBus implementations of D-Bus can usually only
722// access file descriptors if they are referenced in this way by a
723// value of type %G_VARIANT_TYPE_HANDLE in the body of the message.
724//
725// This method is only available on UNIX.
726func (x *DBusConnection) CallWithUnixFdList(BusNameVar *string, ObjectPathVar string, InterfaceNameVar string, MethodNameVar string, ParametersVar *glib.Variant, ReplyTypeVar *glib.VariantType, FlagsVar DBusCallFlags, TimeoutMsecVar int, FdListVar *UnixFDList, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
727
728	var CallbackVarRef uintptr
729	if CallbackVar != nil {
730		CallbackVarPtr := uintptr(unsafe.Pointer(CallbackVar))
731		if cbRefPtr, ok := glib.GetCallback(CallbackVarPtr); ok {
732			CallbackVarRef = cbRefPtr
733		} else {
734			fcb := func(arg0 uintptr, arg1 uintptr, arg2 uintptr) {
735				cbFn := *CallbackVar
736				cbFn(arg0, arg1, arg2)
737			}
738			CallbackVarRef = purego.NewCallback(fcb)
739			glib.SaveCallbackWithClosure(CallbackVarPtr, CallbackVarRef, CallbackVar)
740		}
741	}
742
743	BusNameVarPtr := core.GStrdupNullable(BusNameVar)
744	defer core.GFreeNullable(BusNameVarPtr)
745
746	xDBusConnectionCallWithUnixFdList(x.GoPointer(), BusNameVarPtr, ObjectPathVar, InterfaceNameVar, MethodNameVar, ParametersVar, ReplyTypeVar, FlagsVar, TimeoutMsecVar, FdListVar.GoPointer(), CancellableVar.GoPointer(), CallbackVarRef, UserDataVar)
747
748}
749
750var xDBusConnectionCallWithUnixFdListFinish func(uintptr, **UnixFDList, uintptr, **glib.Error) *glib.Variant
751
752// Finishes an operation started with g_dbus_connection_call_with_unix_fd_list().
753//
754// The file descriptors normally correspond to %G_VARIANT_TYPE_HANDLE
755// values in the body of the message. For example,
756// if g_variant_get_handle() returns 5, that is intended to be a reference
757// to the file descriptor that can be accessed by
758// `g_unix_fd_list_get (*out_fd_list, 5, ...)`.
759//
760// When designing D-Bus APIs that are intended to be interoperable,
761// please note that non-GDBus implementations of D-Bus can usually only
762// access file descriptors if they are referenced in this way by a
763// value of type %G_VARIANT_TYPE_HANDLE in the body of the message.
764func (x *DBusConnection) CallWithUnixFdListFinish(OutFdListVar **UnixFDList, ResVar AsyncResult) (*glib.Variant, error) {
765	var cerr *glib.Error
766
767	cret := xDBusConnectionCallWithUnixFdListFinish(x.GoPointer(), OutFdListVar, ResVar.GoPointer(), &cerr)
768	if cerr == nil {
769		return cret, nil
770	}
771	return cret, cerr
772
773}
774
775var xDBusConnectionCallWithUnixFdListSync func(uintptr, uintptr, string, string, string, *glib.Variant, *glib.VariantType, DBusCallFlags, int, uintptr, **UnixFDList, uintptr, **glib.Error) *glib.Variant
776
777// Like g_dbus_connection_call_sync() but also takes and returns #GUnixFDList objects.
778// See g_dbus_connection_call_with_unix_fd_list() and
779// g_dbus_connection_call_with_unix_fd_list_finish() for more details.
780//
781// This method is only available on UNIX.
782func (x *DBusConnection) CallWithUnixFdListSync(BusNameVar *string, ObjectPathVar string, InterfaceNameVar string, MethodNameVar string, ParametersVar *glib.Variant, ReplyTypeVar *glib.VariantType, FlagsVar DBusCallFlags, TimeoutMsecVar int, FdListVar *UnixFDList, OutFdListVar **UnixFDList, CancellableVar *Cancellable) (*glib.Variant, error) {
783	var cerr *glib.Error
784
785	BusNameVarPtr := core.GStrdupNullable(BusNameVar)
786	defer core.GFreeNullable(BusNameVarPtr)
787
788	cret := xDBusConnectionCallWithUnixFdListSync(x.GoPointer(), BusNameVarPtr, ObjectPathVar, InterfaceNameVar, MethodNameVar, ParametersVar, ReplyTypeVar, FlagsVar, TimeoutMsecVar, FdListVar.GoPointer(), OutFdListVar, CancellableVar.GoPointer(), &cerr)
789	if cerr == nil {
790		return cret, nil
791	}
792	return cret, cerr
793
794}
795
796var xDBusConnectionClose func(uintptr, uintptr, uintptr, uintptr)
797
798// Closes @connection. Note that this never causes the process to
799// exit (this might only happen if the other end of a shared message
800// bus connection disconnects, see #GDBusConnection:exit-on-close).
801//
802// Once the connection is closed, operations such as sending a message
803// will return with the error %G_IO_ERROR_CLOSED. Closing a connection
804// will not automatically flush the connection so queued messages may
805// be lost. Use g_dbus_connection_flush() if you need such guarantees.
806//
807// If @connection is already closed, this method fails with
808// %G_IO_ERROR_CLOSED.
809//
810// When @connection has been closed, the #GDBusConnection::closed
811// signal is emitted in the thread-default main context
812// (see [method@GLib.MainContext.push_thread_default])
813// of the thread that @connection was constructed in.
814//
815// This is an asynchronous method. When the operation is finished,
816// @callback will be invoked in the thread-default main context
817// (see [method@GLib.MainContext.push_thread_default])
818// of the thread you are calling this method from. You can
819// then call g_dbus_connection_close_finish() to get the result of the
820// operation. See g_dbus_connection_close_sync() for the synchronous
821// version.
822func (x *DBusConnection) Close(CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
823
824	var CallbackVarRef uintptr
825	if CallbackVar != nil {
826		CallbackVarPtr := uintptr(unsafe.Pointer(CallbackVar))
827		if cbRefPtr, ok := glib.GetCallback(CallbackVarPtr); ok {
828			CallbackVarRef = cbRefPtr
829		} else {
830			fcb := func(arg0 uintptr, arg1 uintptr, arg2 uintptr) {
831				cbFn := *CallbackVar
832				cbFn(arg0, arg1, arg2)
833			}
834			CallbackVarRef = purego.NewCallback(fcb)
835			glib.SaveCallbackWithClosure(CallbackVarPtr, CallbackVarRef, CallbackVar)
836		}
837	}
838
839	xDBusConnectionClose(x.GoPointer(), CancellableVar.GoPointer(), CallbackVarRef, UserDataVar)
840
841}
842
843var xDBusConnectionCloseFinish func(uintptr, uintptr, **glib.Error) bool
844
845// Finishes an operation started with g_dbus_connection_close().
846func (x *DBusConnection) CloseFinish(ResVar AsyncResult) (bool, error) {
847	var cerr *glib.Error
848
849	cret := xDBusConnectionCloseFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
850	if cerr == nil {
851		return cret, nil
852	}
853	return cret, cerr
854
855}
856
857var xDBusConnectionCloseSync func(uintptr, uintptr, **glib.Error) bool
858
859// Synchronously closes @connection. The calling thread is blocked
860// until this is done. See g_dbus_connection_close() for the
861// asynchronous version of this method and more details about what it
862// does.
863func (x *DBusConnection) CloseSync(CancellableVar *Cancellable) (bool, error) {
864	var cerr *glib.Error
865
866	cret := xDBusConnectionCloseSync(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
867	if cerr == nil {
868		return cret, nil
869	}
870	return cret, cerr
871
872}
873
874var xDBusConnectionEmitSignal func(uintptr, uintptr, string, string, string, *glib.Variant, **glib.Error) bool
875
876// Emits a signal.
877//
878// If the parameters GVariant is floating, it is consumed.
879//
880// This can only fail if @parameters is not compatible with the D-Bus protocol
881// (%G_IO_ERROR_INVALID_ARGUMENT), or if @connection has been closed
882// (%G_IO_ERROR_CLOSED).
883func (x *DBusConnection) EmitSignal(DestinationBusNameVar *string, ObjectPathVar string, InterfaceNameVar string, SignalNameVar string, ParametersVar *glib.Variant) (bool, error) {
884	var cerr *glib.Error
885
886	DestinationBusNameVarPtr := core.GStrdupNullable(DestinationBusNameVar)
887	defer core.GFreeNullable(DestinationBusNameVarPtr)
888
889	cret := xDBusConnectionEmitSignal(x.GoPointer(), DestinationBusNameVarPtr, ObjectPathVar, InterfaceNameVar, SignalNameVar, ParametersVar, &cerr)
890	if cerr == nil {
891		return cret, nil
892	}
893	return cret, cerr
894
895}
896
897var xDBusConnectionExportActionGroup func(uintptr, string, uintptr, **glib.Error) uint
898
899// Exports @action_group on @connection at @object_path.
900//
901// The implemented D-Bus API should be considered private.  It is
902// subject to change in the future.
903//
904// A given object path can only have one action group exported on it.
905// If this constraint is violated, the export will fail and 0 will be
906// returned (with @error set accordingly).
907//
908// You can unexport the action group using
909// [method@Gio.DBusConnection.unexport_action_group] with the return value of
910// this function.
911//
912// The thread default main context is taken at the time of this call.
913// All incoming action activations and state change requests are
914// reported from this context.  Any changes on the action group that
915// cause it to emit signals must also come from this same context.
916// Since incoming action activations and state change requests are
917// rather likely to cause changes on the action group, this effectively
918// limits a given action group to being exported from only one main
919// context.
920func (x *DBusConnection) ExportActionGroup(ObjectPathVar string, ActionGroupVar ActionGroup) (uint, error) {
921	var cerr *glib.Error
922
923	cret := xDBusConnectionExportActionGroup(x.GoPointer(), ObjectPathVar, ActionGroupVar.GoPointer(), &cerr)
924	if cerr == nil {
925		return cret, nil
926	}
927	return cret, cerr
928
929}
930
931var xDBusConnectionExportMenuModel func(uintptr, string, uintptr, **glib.Error) uint
932
933// Exports @menu on @connection at @object_path.
934//
935// The implemented D-Bus API should be considered private.
936// It is subject to change in the future.
937//
938// An object path can only have one menu model exported on it. If this
939// constraint is violated, the export will fail and 0 will be
940// returned (with @error set accordingly).
941//
942// Exporting menus with sections containing more than
943// %G_MENU_EXPORTER_MAX_SECTION_SIZE items is not supported and results in
944// undefined behavior.
945//
946// You can unexport the menu model using
947// g_dbus_connection_unexport_menu_model() with the return value of
948// this function.
949func (x *DBusConnection) ExportMenuModel(ObjectPathVar string, MenuVar *MenuModel) (uint, error) {
950	var cerr *glib.Error
951
952	cret := xDBusConnectionExportMenuModel(x.GoPointer(), ObjectPathVar, MenuVar.GoPointer(), &cerr)
953	if cerr == nil {
954		return cret, nil
955	}
956	return cret, cerr
957
958}
959
960var xDBusConnectionFlush func(uintptr, uintptr, uintptr, uintptr)
961
962// Asynchronously flushes @connection, that is, writes all queued
963// outgoing messages to the transport and then flushes the transport
964// (using g_output_stream_flush_async()). This is useful in programs
965// that want to emit a D-Bus signal and then exit immediately. Without
966// flushing the connection, there is no guarantee that the message has
967// been sent to the networking buffers in the OS kernel.
968//
969// This is an asynchronous method. When the operation is finished,
970// @callback will be invoked in the thread-default main context
971// (see [method@GLib.MainContext.push_thread_default])
972// of the thread you are calling this method from. You can
973// then call g_dbus_connection_flush_finish() to get the result of the
974// operation. See g_dbus_connection_flush_sync() for the synchronous
975// version.
976func (x *DBusConnection) Flush(CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
977
978	var CallbackVarRef uintptr
979	if CallbackVar != nil {
980		CallbackVarPtr := uintptr(unsafe.Pointer(CallbackVar))
981		if cbRefPtr, ok := glib.GetCallback(CallbackVarPtr); ok {
982			CallbackVarRef = cbRefPtr
983		} else {
984			fcb := func(arg0 uintptr, arg1 uintptr, arg2 uintptr) {
985				cbFn := *CallbackVar
986				cbFn(arg0, arg1, arg2)
987			}
988			CallbackVarRef = purego.NewCallback(fcb)
989			glib.SaveCallbackWithClosure(CallbackVarPtr, CallbackVarRef, CallbackVar)
990		}
991	}
992
993	xDBusConnectionFlush(x.GoPointer(), CancellableVar.GoPointer(), CallbackVarRef, UserDataVar)
994
995}
996
997var xDBusConnectionFlushFinish func(uintptr, uintptr, **glib.Error) bool
998
999// Finishes an operation started with g_dbus_connection_flush().
1000func (x *DBusConnection) FlushFinish(ResVar AsyncResult) (bool, error) {
1001	var cerr *glib.Error
1002
1003	cret := xDBusConnectionFlushFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
1004	if cerr == nil {
1005		return cret, nil
1006	}
1007	return cret, cerr
1008
1009}
1010
1011var xDBusConnectionFlushSync func(uintptr, uintptr, **glib.Error) bool
1012
1013// Synchronously flushes @connection. The calling thread is blocked
1014// until this is done. See g_dbus_connection_flush() for the
1015// asynchronous version of this method and more details about what it
1016// does.
1017func (x *DBusConnection) FlushSync(CancellableVar *Cancellable) (bool, error) {
1018	var cerr *glib.Error
1019
1020	cret := xDBusConnectionFlushSync(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
1021	if cerr == nil {
1022		return cret, nil
1023	}
1024	return cret, cerr
1025
1026}
1027
1028var xDBusConnectionGetCapabilities func(uintptr) DBusCapabilityFlags
1029
1030// Gets the capabilities negotiated with the remote peer
1031func (x *DBusConnection) GetCapabilities() DBusCapabilityFlags {
1032
1033	cret := xDBusConnectionGetCapabilities(x.GoPointer())
1034	return cret
1035}
1036
1037var xDBusConnectionGetExitOnClose func(uintptr) bool
1038
1039// Gets whether the process is terminated when @connection is
1040// closed by the remote peer. See
1041// #GDBusConnection:exit-on-close for more details.
1042func (x *DBusConnection) GetExitOnClose() bool {
1043
1044	cret := xDBusConnectionGetExitOnClose(x.GoPointer())
1045	return cret
1046}
1047
1048var xDBusConnectionGetFlags func(uintptr) DBusConnectionFlags
1049
1050// Gets the flags used to construct this connection
1051func (x *DBusConnection) GetFlags() DBusConnectionFlags {
1052
1053	cret := xDBusConnectionGetFlags(x.GoPointer())
1054	return cret
1055}
1056
1057var xDBusConnectionGetGuid func(uintptr) string
1058
1059// The GUID of the peer performing the role of server when
1060// authenticating. See #GDBusConnection:guid for more details.
1061func (x *DBusConnection) GetGuid() string {
1062
1063	cret := xDBusConnectionGetGuid(x.GoPointer())
1064	return cret
1065}
1066
1067var xDBusConnectionGetLastSerial func(uintptr) uint32
1068
1069// Retrieves the last serial number assigned to a #GDBusMessage on
1070// the current thread. This includes messages sent via both low-level
1071// API such as g_dbus_connection_send_message() as well as
1072// high-level API such as g_dbus_connection_emit_signal(),
1073// g_dbus_connection_call() or g_dbus_proxy_call().
1074func (x *DBusConnection) GetLastSerial() uint32 {
1075
1076	cret := xDBusConnectionGetLastSerial(x.GoPointer())
1077	return cret
1078}
1079
1080var xDBusConnectionGetPeerCredentials func(uintptr) uintptr
1081
1082// Gets the credentials of the authenticated peer. This will always
1083// return %NULL unless @connection acted as a server
1084// (e.g. %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER was passed)
1085// when set up and the client passed credentials as part of the
1086// authentication process.
1087//
1088// In a message bus setup, the message bus is always the server and
1089// each application is a client. So this method will always return
1090// %NULL for message bus clients.
1091func (x *DBusConnection) GetPeerCredentials() *Credentials {
1092	var cls *Credentials
1093
1094	cret := xDBusConnectionGetPeerCredentials(x.GoPointer())
1095
1096	if cret == 0 {
1097		return nil
1098	}
1099	gobject.IncreaseRef(cret)
1100	cls = &Credentials{}
1101	cls.Ptr = cret
1102	return cls
1103}
1104
1105var xDBusConnectionGetStream func(uintptr) uintptr
1106
1107// Gets the underlying stream used for IO.
1108//
1109// While the #GDBusConnection is active, it will interact with this
1110// stream from a worker thread, so it is not safe to interact with
1111// the stream directly.
1112func (x *DBusConnection) GetStream() *IOStream {
1113	var cls *IOStream
1114
1115	cret := xDBusConnectionGetStream(x.GoPointer())
1116
1117	if cret == 0 {
1118		return nil
1119	}
1120	gobject.IncreaseRef(cret)
1121	cls = &IOStream{}
1122	cls.Ptr = cret
1123	return cls
1124}
1125
1126var xDBusConnectionGetUniqueName func(uintptr) string
1127
1128// Gets the unique name of @connection as assigned by the message
1129// bus. This can also be used to figure out if @connection is a
1130// message bus connection.
1131func (x *DBusConnection) GetUniqueName() string {
1132
1133	cret := xDBusConnectionGetUniqueName(x.GoPointer())
1134	return cret
1135}
1136
1137var xDBusConnectionIsClosed func(uintptr) bool
1138
1139// Gets whether @connection is closed.
1140func (x *DBusConnection) IsClosed() bool {
1141
1142	cret := xDBusConnectionIsClosed(x.GoPointer())
1143	return cret
1144}
1145
1146var xDBusConnectionRegisterObject func(uintptr, string, *DBusInterfaceInfo, *DBusInterfaceVTable, uintptr, uintptr, **glib.Error) uint
1147
1148// Registers callbacks for exported objects at @object_path with the
1149// D-Bus interface that is described in @interface_info.
1150//
1151// Calls to functions in @vtable (and @user_data_free_func) will happen
1152// in the thread-default main context
1153// (see [method@GLib.MainContext.push_thread_default])
1154// of the thread you are calling this method from.
1155//
1156// Note that all #GVariant values passed to functions in @vtable will match
1157// the signature given in @interface_info - if a remote caller passes
1158// incorrect values, the `org.freedesktop.DBus.Error.InvalidArgs`
1159// is returned to the remote caller.
1160//
1161// Additionally, if the remote caller attempts to invoke methods or
1162// access properties not mentioned in @interface_info the
1163// `org.freedesktop.DBus.Error.UnknownMethod` resp.
1164// `org.freedesktop.DBus.Error.InvalidArgs` errors
1165// are returned to the caller.
1166//
1167// It is considered a programming error if the
1168// #GDBusInterfaceGetPropertyFunc function in @vtable returns a
1169// #GVariant of incorrect type.
1170//
1171// If an existing callback is already registered at @object_path and
1172// @interface_name, then @error is set to %G_IO_ERROR_EXISTS.
1173//
1174// GDBus automatically implements the standard D-Bus interfaces
1175// org.freedesktop.DBus.Properties, org.freedesktop.DBus.Introspectable
1176// and org.freedesktop.Peer, so you don't have to implement those for the
1177// objects you export. You can implement org.freedesktop.DBus.Properties
1178// yourself, e.g. to handle getting and setting of properties asynchronously.
1179//
1180// Note that the reference count on @interface_info will be
1181// incremented by 1 (unless allocated statically, e.g. if the
1182// reference count is -1, see g_dbus_interface_info_ref()) for as long
1183// as the object is exported. Also note that @vtable will be copied.
1184//
1185// See this [server][class@Gio.DBusConnection#an-example-d-bus-server]
1186// for an example of how to use this method.
1187func (x *DBusConnection) RegisterObject(ObjectPathVar string, InterfaceInfoVar *DBusInterfaceInfo, VtableVar *DBusInterfaceVTable, UserDataVar uintptr, UserDataFreeFuncVar *glib.DestroyNotify) (uint, error) {
1188	var cerr *glib.Error
1189
1190	var UserDataFreeFuncVarRef uintptr
1191	if UserDataFreeFuncVar != nil {
1192		UserDataFreeFuncVarPtr := uintptr(unsafe.Pointer(UserDataFreeFuncVar))
1193		if cbRefPtr, ok := glib.GetCallback(UserDataFreeFuncVarPtr); ok {
1194			UserDataFreeFuncVarRef = cbRefPtr
1195		} else {
1196			fcb := func(arg0 uintptr) {
1197				cbFn := *UserDataFreeFuncVar
1198				cbFn(arg0)
1199			}
1200			UserDataFreeFuncVarRef = purego.NewCallback(fcb)
1201			glib.SaveCallbackWithClosure(UserDataFreeFuncVarPtr, UserDataFreeFuncVarRef, UserDataFreeFuncVar)
1202		}
1203	}
1204
1205	cret := xDBusConnectionRegisterObject(x.GoPointer(), ObjectPathVar, InterfaceInfoVar, VtableVar, UserDataVar, UserDataFreeFuncVarRef, &cerr)
1206	if cerr == nil {
1207		return cret, nil
1208	}
1209	return cret, cerr
1210
1211}
1212
1213var xDBusConnectionRegisterObjectWithClosures func(uintptr, string, *DBusInterfaceInfo, *gobject.Closure, *gobject.Closure, *gobject.Closure, **glib.Error) uint
1214
1215// Version of g_dbus_connection_register_object() using closures instead of a
1216// #GDBusInterfaceVTable for easier binding in other languages.
1217//
1218// Note that the reference counting semantics of the function wrapped by
1219// @method_call_closure are the same as those of
1220// [callback@Gio.DBusInterfaceMethodCallFunc]: ownership of a reference to the
1221// [class@Gio.DBusMethodInvocation] is transferred to the function.
1222func (x *DBusConnection) RegisterObjectWithClosures(ObjectPathVar string, InterfaceInfoVar *DBusInterfaceInfo, MethodCallClosureVar *gobject.Closure, GetPropertyClosureVar *gobject.Closure, SetPropertyClosureVar *gobject.Closure) (uint, error) {
1223	var cerr *glib.Error
1224
1225	cret := xDBusConnectionRegisterObjectWithClosures(x.GoPointer(), ObjectPathVar, InterfaceInfoVar, MethodCallClosureVar, GetPropertyClosureVar, SetPropertyClosureVar, &cerr)
1226	if cerr == nil {
1227		return cret, nil
1228	}
1229	return cret, cerr
1230
1231}
1232
1233var xDBusConnectionRegisterObjectWithClosures2 func(uintptr, string, *DBusInterfaceInfo, *gobject.Closure, *gobject.Closure, *gobject.Closure, **glib.Error) uint
1234
1235// Version of [method@Gio.DBusConnection.register_object] using closures instead
1236// of a [type@Gio.DBusInterfaceVTable] for easier binding in other languages.
1237//
1238// In contrast to [method@Gio.DBusConnection.register_object] and
1239// [method@Gio.DBusConnection.register_object_with_closures], the reference
1240// counting semantics of the function wrapped by @method_call_closure are *not*
1241// the same as those of [callback@Gio.DBusInterfaceMethodCallFunc]. Ownership of
1242// a reference to the [class@Gio.DBusMethodInvocation] is *not* transferred to
1243// the function. Bindings must ensure that they add a reference to the
1244// [class@Gio.DBusMethodInvocation] before calling any
1245// `g_dbus_method_invocation_return_*()` methods on it. This should be automatic
1246// as a result of the introspection annotations on those methods.
1247func (x *DBusConnection) RegisterObjectWithClosures2(ObjectPathVar string, InterfaceInfoVar *DBusInterfaceInfo, MethodCallClosureVar *gobject.Closure, GetPropertyClosureVar *gobject.Closure, SetPropertyClosureVar *gobject.Closure) (uint, error) {
1248	var cerr *glib.Error
1249
1250	cret := xDBusConnectionRegisterObjectWithClosures2(x.GoPointer(), ObjectPathVar, InterfaceInfoVar, MethodCallClosureVar, GetPropertyClosureVar, SetPropertyClosureVar, &cerr)
1251	if cerr == nil {
1252		return cret, nil
1253	}
1254	return cret, cerr
1255
1256}
1257
1258var xDBusConnectionRegisterSubtree func(uintptr, string, *DBusSubtreeVTable, DBusSubtreeFlags, uintptr, uintptr, **glib.Error) uint
1259
1260// Registers a whole subtree of dynamic objects.
1261//
1262// The @enumerate and @introspection functions in @vtable are used to
1263// convey, to remote callers, what nodes exist in the subtree rooted
1264// by @object_path.
1265//
1266// When handling remote calls into any node in the subtree, first the
1267// @enumerate function is used to check if the node exists. If the node exists
1268// or the %G_DBUS_SUBTREE_FLAGS_DISPATCH_TO_UNENUMERATED_NODES flag is set
1269// the @introspection function is used to check if the node supports the
1270// requested method. If so, the @dispatch function is used to determine
1271// where to dispatch the call. The collected #GDBusInterfaceVTable and
1272// #gpointer will be used to call into the interface vtable for processing
1273// the request.
1274//
1275// All calls into user-provided code will be invoked in the thread-default
1276// main context (see [method@GLib.MainContext.push_thread_default])
1277// of the thread you are calling this method from.
1278//
1279// If an existing subtree is already registered at @object_path or
1280// then @error is set to %G_IO_ERROR_EXISTS.
1281//
1282// Note that it is valid to register regular objects (using
1283// g_dbus_connection_register_object()) in a subtree registered with
1284// g_dbus_connection_register_subtree() - if so, the subtree handler
1285// is tried as the last resort. One way to think about a subtree
1286// handler is to consider it a fallback handler for object paths not
1287// registered via g_dbus_connection_register_object() or other bindings.
1288//
1289// Note that @vtable will be copied so you cannot change it after
1290// registration.
1291//
1292// See this [server][class@Gio.DBusConnection#an-example-for-exporting-a-subtree]
1293// for an example of how to use this method.
1294func (x *DBusConnection) RegisterSubtree(ObjectPathVar string, VtableVar *DBusSubtreeVTable, FlagsVar DBusSubtreeFlags, UserDataVar uintptr, UserDataFreeFuncVar *glib.DestroyNotify) (uint, error) {
1295	var cerr *glib.Error
1296
1297	var UserDataFreeFuncVarRef uintptr
1298	if UserDataFreeFuncVar != nil {
1299		UserDataFreeFuncVarPtr := uintptr(unsafe.Pointer(UserDataFreeFuncVar))
1300		if cbRefPtr, ok := glib.GetCallback(UserDataFreeFuncVarPtr); ok {
1301			UserDataFreeFuncVarRef = cbRefPtr
1302		} else {
1303			fcb := func(arg0 uintptr) {
1304				cbFn := *UserDataFreeFuncVar
1305				cbFn(arg0)
1306			}
1307			UserDataFreeFuncVarRef = purego.NewCallback(fcb)
1308			glib.SaveCallbackWithClosure(UserDataFreeFuncVarPtr, UserDataFreeFuncVarRef, UserDataFreeFuncVar)
1309		}
1310	}
1311
1312	cret := xDBusConnectionRegisterSubtree(x.GoPointer(), ObjectPathVar, VtableVar, FlagsVar, UserDataVar, UserDataFreeFuncVarRef, &cerr)
1313	if cerr == nil {
1314		return cret, nil
1315	}
1316	return cret, cerr
1317
1318}
1319
1320var xDBusConnectionRemoveFilter func(uintptr, uint)
1321
1322// Removes a filter.
1323//
1324// Note that since filters run in a different thread, there is a race
1325// condition where it is possible that the filter will be running even
1326// after calling g_dbus_connection_remove_filter(), so you cannot just
1327// free data that the filter might be using. Instead, you should pass
1328// a #GDestroyNotify to g_dbus_connection_add_filter(), which will be
1329// called when it is guaranteed that the data is no longer needed.
1330func (x *DBusConnection) RemoveFilter(FilterIdVar uint) {
1331
1332	xDBusConnectionRemoveFilter(x.GoPointer(), FilterIdVar)
1333
1334}
1335
1336var xDBusConnectionSendMessage func(uintptr, uintptr, DBusSendMessageFlags, *uint32, **glib.Error) bool
1337
1338// Asynchronously sends @message to the peer represented by @connection.
1339//
1340// Unless @flags contain the
1341// %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
1342// will be assigned by @connection and set on @message via
1343// g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
1344// serial number used will be written to this location prior to
1345// submitting the message to the underlying transport. While it has a `volatile`
1346// qualifier, this is a historical artifact and the argument passed to it should
1347// not be `volatile`.
1348//
1349// If @connection is closed then the operation will fail with
1350// %G_IO_ERROR_CLOSED. If @message is not well-formed,
1351// the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
1352//
1353// See this [server][class@Gio.DBusConnection#an-example-d-bus-server]
1354// and [client][class@Gio.DBusConnection#an-example-for-file-descriptor-passing]
1355// for an example of how to use this low-level API to send and receive
1356// UNIX file descriptors.
1357//
1358// Note that @message must be unlocked, unless @flags contain the
1359// %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
1360func (x *DBusConnection) SendMessage(MessageVar *DBusMessage, FlagsVar DBusSendMessageFlags, OutSerialVar *uint32) (bool, error) {
1361	var cerr *glib.Error
1362
1363	cret := xDBusConnectionSendMessage(x.GoPointer(), MessageVar.GoPointer(), FlagsVar, OutSerialVar, &cerr)
1364	if cerr == nil {
1365		return cret, nil
1366	}
1367	return cret, cerr
1368
1369}
1370
1371var xDBusConnectionSendMessageWithReply func(uintptr, uintptr, DBusSendMessageFlags, int, *uint32, uintptr, uintptr, uintptr)
1372
1373// Asynchronously sends @message to the peer represented by @connection.
1374//
1375// Unless @flags contain the
1376// %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
1377// will be assigned by @connection and set on @message via
1378// g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
1379// serial number used will be written to this location prior to
1380// submitting the message to the underlying transport. While it has a `volatile`
1381// qualifier, this is a historical artifact and the argument passed to it should
1382// not be `volatile`.
1383//
1384// If @connection is closed then the operation will fail with
1385// %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
1386// fail with %G_IO_ERROR_CANCELLED. If @message is not well-formed,
1387// the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
1388//
1389// This is an asynchronous method. When the operation is finished, @callback
1390// will be invoked in the thread-default main context
1391// (see [method@GLib.MainContext.push_thread_default])
1392// of the thread you are calling this method from. You can then call
1393// g_dbus_connection_send_message_with_reply_finish() to get the result of the operation.
1394// See g_dbus_connection_send_message_with_reply_sync() for the synchronous version.
1395//
1396// Note that @message must be unlocked, unless @flags contain the
1397// %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
1398//
1399// See this [server][class@Gio.DBusConnection#an-example-d-bus-server]
1400// and [client][class@Gio.DBusConnection#an-example-for-file-descriptor-passing]
1401// for an example of how to use this low-level API to send and receive
1402// UNIX file descriptors.
1403func (x *DBusConnection) SendMessageWithReply(MessageVar *DBusMessage, FlagsVar DBusSendMessageFlags, TimeoutMsecVar int, OutSerialVar *uint32, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
1404
1405	var CallbackVarRef uintptr
1406	if CallbackVar != nil {
1407		CallbackVarPtr := uintptr(unsafe.Pointer(CallbackVar))
1408		if cbRefPtr, ok := glib.GetCallback(CallbackVarPtr); ok {
1409			CallbackVarRef = cbRefPtr
1410		} else {
1411			fcb := func(arg0 uintptr, arg1 uintptr, arg2 uintptr) {
1412				cbFn := *CallbackVar
1413				cbFn(arg0, arg1, arg2)
1414			}
1415			CallbackVarRef = purego.NewCallback(fcb)
1416			glib.SaveCallbackWithClosure(CallbackVarPtr, CallbackVarRef, CallbackVar)
1417		}
1418	}
1419
1420	xDBusConnectionSendMessageWithReply(x.GoPointer(), MessageVar.GoPointer(), FlagsVar, TimeoutMsecVar, OutSerialVar, CancellableVar.GoPointer(), CallbackVarRef, UserDataVar)
1421
1422}
1423
1424var xDBusConnectionSendMessageWithReplyFinish func(uintptr, uintptr, **glib.Error) uintptr
1425
1426// Finishes an operation started with g_dbus_connection_send_message_with_reply().
1427//
1428// Note that @error is only set if a local in-process error
1429// occurred. That is to say that the returned #GDBusMessage object may
1430// be of type %G_DBUS_MESSAGE_TYPE_ERROR. Use
1431// g_dbus_message_to_gerror() to transcode this to a #GError.
1432//
1433// See this [server][class@Gio.DBusConnection#an-example-d-bus-server]
1434// and [client][class@Gio.DBusConnection#an-example-for-file-descriptor-passing]
1435// for an example of how to use this low-level API to send and receive
1436// UNIX file descriptors.
1437func (x *DBusConnection) SendMessageWithReplyFinish(ResVar AsyncResult) (*DBusMessage, error) {
1438	var cls *DBusMessage
1439	var cerr *glib.Error
1440
1441	cret := xDBusConnectionSendMessageWithReplyFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
1442
1443	if cret == 0 {
1444		return nil, cerr
1445	}
1446	cls = &DBusMessage{}
1447	cls.Ptr = cret
1448	if cerr == nil {
1449		return cls, nil
1450	}
1451	return cls, cerr
1452
1453}
1454
1455var xDBusConnectionSendMessageWithReplySync func(uintptr, uintptr, DBusSendMessageFlags, int, *uint32, uintptr, **glib.Error) uintptr
1456
1457// Synchronously sends @message to the peer represented by @connection
1458// and blocks the calling thread until a reply is received or the
1459// timeout is reached. See g_dbus_connection_send_message_with_reply()
1460// for the asynchronous version of this method.
1461//
1462// Unless @flags contain the
1463// %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag, the serial number
1464// will be assigned by @connection and set on @message via
1465// g_dbus_message_set_serial(). If @out_serial is not %NULL, then the
1466// serial number used will be written to this location prior to
1467// submitting the message to the underlying transport. While it has a `volatile`
1468// qualifier, this is a historical artifact and the argument passed to it should
1469// not be `volatile`.
1470//
1471// If @connection is closed then the operation will fail with
1472// %G_IO_ERROR_CLOSED. If @cancellable is canceled, the operation will
1473// fail with %G_IO_ERROR_CANCELLED. If @message is not well-formed,
1474// the operation fails with %G_IO_ERROR_INVALID_ARGUMENT.
1475//
1476// Note that @error is only set if a local in-process error
1477// occurred. That is to say that the returned #GDBusMessage object may
1478// be of type %G_DBUS_MESSAGE_TYPE_ERROR. Use
1479// g_dbus_message_to_gerror() to transcode this to a #GError.
1480//
1481// See this [server][class@Gio.DBusConnection#an-example-d-bus-server]
1482// and [client][class@Gio.DBusConnection#an-example-for-file-descriptor-passing]
1483// for an example of how to use this low-level API to send and receive
1484// UNIX file descriptors.
1485//
1486// Note that @message must be unlocked, unless @flags contain the
1487// %G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL flag.
1488func (x *DBusConnection) SendMessageWithReplySync(MessageVar *DBusMessage, FlagsVar DBusSendMessageFlags, TimeoutMsecVar int, OutSerialVar *uint32, CancellableVar *Cancellable) (*DBusMessage, error) {
1489	var cls *DBusMessage
1490	var cerr *glib.Error
1491
1492	cret := xDBusConnectionSendMessageWithReplySync(x.GoPointer(), MessageVar.GoPointer(), FlagsVar, TimeoutMsecVar, OutSerialVar, CancellableVar.GoPointer(), &cerr)
1493
1494	if cret == 0 {
1495		return nil, cerr
1496	}
1497	cls = &DBusMessage{}
1498	cls.Ptr = cret
1499	if cerr == nil {
1500		return cls, nil
1501	}
1502	return cls, cerr
1503
1504}
1505
1506var xDBusConnectionSetExitOnClose func(uintptr, bool)
1507
1508// Sets whether the process should be terminated when @connection is
1509// closed by the remote peer. See #GDBusConnection:exit-on-close for
1510// more details.
1511//
1512// Note that this function should be used with care. Most modern UNIX
1513// desktops tie the notion of a user session with the session bus, and expect
1514// all of a user's applications to quit when their bus connection goes away.
1515// If you are setting @exit_on_close to %FALSE for the shared session
1516// bus connection, you should make sure that your application exits
1517// when the user session ends.
1518func (x *DBusConnection) SetExitOnClose(ExitOnCloseVar bool) {
1519
1520	xDBusConnectionSetExitOnClose(x.GoPointer(), ExitOnCloseVar)
1521
1522}
1523
1524var xDBusConnectionSignalSubscribe func(uintptr, uintptr, uintptr, uintptr, uintptr, uintptr, DBusSignalFlags, uintptr, uintptr, uintptr) uint
1525
1526// Subscribes to signals on @connection and invokes @callback whenever
1527// the signal is received. Note that @callback will be invoked in the
1528// thread-default main context (see [method@GLib.MainContext.push_thread_default])
1529// of the thread you are calling this method from.
1530//
1531// If @connection is not a message bus connection, @sender must be
1532// %NULL.
1533//
1534// If @sender is a well-known name note that @callback is invoked with
1535// the unique name for the owner of @sender, not the well-known name
1536// as one would expect. This is because the message bus rewrites the
1537// name. As such, to avoid certain race conditions, users should be
1538// tracking the name owner of the well-known name and use that when
1539// processing the received signal.
1540//
1541// If one of %G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_NAMESPACE or
1542// %G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_PATH are given, @arg0 is
1543// interpreted as part of a namespace or path.  The first argument
1544// of a signal is matched against that part as specified by D-Bus.
1545//
1546// If @user_data_free_func is non-%NULL, it will be called (in the
1547// thread-default main context of the thread you are calling this
1548// method from) at some point after @user_data is no longer
1549// needed. (It is not guaranteed to be called synchronously when the
1550// signal is unsubscribed from, and may be called after @connection
1551// has been destroyed.)
1552//
1553// As @callback is potentially invoked in a different thread from where it’s
1554// emitted, it’s possible for this to happen after
1555// g_dbus_connection_signal_unsubscribe() has been called in another thread.
1556// Due to this, @user_data should have a strong reference which is freed with
1557// @user_data_free_func, rather than pointing to data whose lifecycle is tied
1558// to the signal subscription. For example, if a #GObject is used to store the
1559// subscription ID from g_dbus_connection_signal_subscribe(), a strong reference
1560// to that #GObject must be passed to @user_data, and g_object_unref() passed to
1561// @user_data_free_func. You are responsible for breaking the resulting
1562// reference count cycle by explicitly unsubscribing from the signal when
1563// dropping the last external reference to the #GObject. Alternatively, a weak
1564// reference may be used.
1565//
1566// It is guaranteed that if you unsubscribe from a signal using
1567// g_dbus_connection_signal_unsubscribe() from the same thread which made the
1568// corresponding g_dbus_connection_signal_subscribe() call, @callback will not
1569// be invoked after g_dbus_connection_signal_unsubscribe() returns.
1570//
1571// The returned subscription identifier is an opaque value which is guaranteed
1572// to never be zero.
1573//
1574// This function can never fail.
1575func (x *DBusConnection) SignalSubscribe(SenderVar *string, InterfaceNameVar *string, MemberVar *string, ObjectPathVar *string, Arg0Var *string, FlagsVar DBusSignalFlags, CallbackVar *DBusSignalCallback, UserDataVar uintptr, UserDataFreeFuncVar *glib.DestroyNotify) uint {
1576
1577	var CallbackVarRef uintptr
1578	if CallbackVar != nil {
1579		CallbackVarPtr := uintptr(unsafe.Pointer(CallbackVar))
1580		if cbRefPtr, ok := glib.GetCallback(CallbackVarPtr); ok {
1581			CallbackVarRef = cbRefPtr
1582		} else {
1583			fcb := func(arg0 uintptr, arg1 uintptr, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 *glib.Variant, arg6 uintptr) {
1584				cbFn := *CallbackVar
1585				cbFn(arg0, core.GoString(arg1), core.GoString(arg2), core.GoString(arg3), core.GoString(arg4), arg5, arg6)
1586			}
1587			CallbackVarRef = purego.NewCallback(fcb)
1588			glib.SaveCallbackWithClosure(CallbackVarPtr, CallbackVarRef, CallbackVar)
1589		}
1590	}
1591
1592	var UserDataFreeFuncVarRef uintptr
1593	if UserDataFreeFuncVar != nil {
1594		UserDataFreeFuncVarPtr := uintptr(unsafe.Pointer(UserDataFreeFuncVar))
1595		if cbRefPtr, ok := glib.GetCallback(UserDataFreeFuncVarPtr); ok {
1596			UserDataFreeFuncVarRef = cbRefPtr
1597		} else {
1598			fcb := func(arg0 uintptr) {
1599				cbFn := *UserDataFreeFuncVar
1600				cbFn(arg0)
1601			}
1602			UserDataFreeFuncVarRef = purego.NewCallback(fcb)
1603			glib.SaveCallbackWithClosure(UserDataFreeFuncVarPtr, UserDataFreeFuncVarRef, UserDataFreeFuncVar)
1604		}
1605	}
1606
1607	SenderVarPtr := core.GStrdupNullable(SenderVar)
1608	defer core.GFreeNullable(SenderVarPtr)
1609
1610	InterfaceNameVarPtr := core.GStrdupNullable(InterfaceNameVar)
1611	defer core.GFreeNullable(InterfaceNameVarPtr)
1612
1613	MemberVarPtr := core.GStrdupNullable(MemberVar)
1614	defer core.GFreeNullable(MemberVarPtr)
1615
1616	ObjectPathVarPtr := core.GStrdupNullable(ObjectPathVar)
1617	defer core.GFreeNullable(ObjectPathVarPtr)
1618
1619	Arg0VarPtr := core.GStrdupNullable(Arg0Var)
1620	defer core.GFreeNullable(Arg0VarPtr)
1621
1622	cret := xDBusConnectionSignalSubscribe(x.GoPointer(), SenderVarPtr, InterfaceNameVarPtr, MemberVarPtr, ObjectPathVarPtr, Arg0VarPtr, FlagsVar, CallbackVarRef, UserDataVar, UserDataFreeFuncVarRef)
1623	return cret
1624}
1625
1626var xDBusConnectionSignalUnsubscribe func(uintptr, uint)
1627
1628// Unsubscribes from signals.
1629//
1630// Note that there may still be D-Bus traffic to process (relating to this
1631// signal subscription) in the current thread-default #GMainContext after this
1632// function has returned. You should continue to iterate the #GMainContext
1633// until the #GDestroyNotify function passed to
1634// g_dbus_connection_signal_subscribe() is called, in order to avoid memory
1635// leaks through callbacks queued on the #GMainContext after it’s stopped being
1636// iterated.
1637// Alternatively, any idle source with a priority lower than %G_PRIORITY_DEFAULT
1638// that was scheduled after unsubscription, also indicates that all resources
1639// of this subscription are released.
1640func (x *DBusConnection) SignalUnsubscribe(SubscriptionIdVar uint) {
1641
1642	xDBusConnectionSignalUnsubscribe(x.GoPointer(), SubscriptionIdVar)
1643
1644}
1645
1646var xDBusConnectionStartMessageProcessing func(uintptr)
1647
1648// If @connection was created with
1649// %G_DBUS_CONNECTION_FLAGS_DELAY_MESSAGE_PROCESSING, this method
1650// starts processing messages. Does nothing on if @connection wasn't
1651// created with this flag or if the method has already been called.
1652func (x *DBusConnection) StartMessageProcessing() {
1653
1654	xDBusConnectionStartMessageProcessing(x.GoPointer())
1655
1656}
1657
1658var xDBusConnectionUnexportActionGroup func(uintptr, uint)
1659
1660// Reverses the effect of a previous call to
1661// [method@Gio.DBusConnection.export_action_group].
1662//
1663// It is an error to call this function with an ID that wasn’t returned from
1664// [method@Gio.DBusConnection.export_action_group] or to call it with the same
1665// ID more than once.
1666func (x *DBusConnection) UnexportActionGroup(ExportIdVar uint) {
1667
1668	xDBusConnectionUnexportActionGroup(x.GoPointer(), ExportIdVar)
1669
1670}
1671
1672var xDBusConnectionUnexportMenuModel func(uintptr, uint)
1673
1674// Reverses the effect of a previous call to
1675// g_dbus_connection_export_menu_model().
1676//
1677// It is an error to call this function with an ID that wasn't returned
1678// from g_dbus_connection_export_menu_model() or to call it with the
1679// same ID more than once.
1680func (x *DBusConnection) UnexportMenuModel(ExportIdVar uint) {
1681
1682	xDBusConnectionUnexportMenuModel(x.GoPointer(), ExportIdVar)
1683
1684}
1685
1686var xDBusConnectionUnregisterObject func(uintptr, uint) bool
1687
1688// Unregisters an object.
1689func (x *DBusConnection) UnregisterObject(RegistrationIdVar uint) bool {
1690
1691	cret := xDBusConnectionUnregisterObject(x.GoPointer(), RegistrationIdVar)
1692	return cret
1693}
1694
1695var xDBusConnectionUnregisterSubtree func(uintptr, uint) bool
1696
1697// Unregisters a subtree.
1698func (x *DBusConnection) UnregisterSubtree(RegistrationIdVar uint) bool {
1699
1700	cret := xDBusConnectionUnregisterSubtree(x.GoPointer(), RegistrationIdVar)
1701	return cret
1702}
1703
1704func (c *DBusConnection) GoPointer() uintptr {
1705	if c == nil {
1706		return 0
1707	}
1708	return c.Ptr
1709}
1710
1711func (c *DBusConnection) SetGoPointer(ptr uintptr) {
1712	c.Ptr = ptr
1713}
1714
1715// SetPropertyAddress sets the "address" property.
1716// A D-Bus address specifying potential endpoints that can be used
1717// when establishing the connection.
1718func (x *DBusConnection) SetPropertyAddress(value string) {
1719	var v gobject.Value
1720	v.Init(gobject.TypeStringVal)
1721	v.SetString(&value)
1722	x.SetProperty("address", &v)
1723}
1724
1725// GetPropertyClosed gets the "closed" property.
1726// A boolean specifying whether the connection has been closed.
1727func (x *DBusConnection) GetPropertyClosed() bool {
1728	var v gobject.Value
1729	x.GetProperty("closed", &v)
1730	return v.GetBoolean()
1731}
1732
1733// SetPropertyExitOnClose sets the "exit-on-close" property.
1734// A boolean specifying whether the process will be terminated (by
1735// calling `raise(SIGTERM)`) if the connection is closed by the
1736// remote peer.
1737//
1738// Note that #GDBusConnection objects returned by g_bus_get_finish()
1739// and g_bus_get_sync() will (usually) have this property set to %TRUE.
1740func (x *DBusConnection) SetPropertyExitOnClose(value bool) {
1741	var v gobject.Value
1742	v.Init(gobject.TypeBooleanVal)
1743	v.SetBoolean(value)
1744	x.SetProperty("exit-on-close", &v)
1745}
1746
1747// GetPropertyExitOnClose gets the "exit-on-close" property.
1748// A boolean specifying whether the process will be terminated (by
1749// calling `raise(SIGTERM)`) if the connection is closed by the
1750// remote peer.
1751//
1752// Note that #GDBusConnection objects returned by g_bus_get_finish()
1753// and g_bus_get_sync() will (usually) have this property set to %TRUE.
1754func (x *DBusConnection) GetPropertyExitOnClose() bool {
1755	var v gobject.Value
1756	x.GetProperty("exit-on-close", &v)
1757	return v.GetBoolean()
1758}
1759
1760// SetPropertyGuid sets the "guid" property.
1761// The GUID of the peer performing the role of server when
1762// authenticating.
1763//
1764// If you are constructing a #GDBusConnection and pass
1765// %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER in the
1766// #GDBusConnection:flags property then you **must** also set this
1767// property to a valid guid.
1768//
1769// If you are constructing a #GDBusConnection and pass
1770// %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT in the
1771// #GDBusConnection:flags property you will be able to read the GUID
1772// of the other peer here after the connection has been successfully
1773// initialized.
1774//
1775// Note that the
1776// [D-Bus specification](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses)
1777// uses the term ‘UUID’ to refer to this, whereas GLib consistently uses the
1778// term ‘GUID’ for historical reasons.
1779//
1780// Despite its name, the format of #GDBusConnection:guid does not follow
1781// [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122) or the Microsoft
1782// GUID format.
1783func (x *DBusConnection) SetPropertyGuid(value string) {
1784	var v gobject.Value
1785	v.Init(gobject.TypeStringVal)
1786	v.SetString(&value)
1787	x.SetProperty("guid", &v)
1788}
1789
1790// GetPropertyGuid gets the "guid" property.
1791// The GUID of the peer performing the role of server when
1792// authenticating.
1793//
1794// If you are constructing a #GDBusConnection and pass
1795// %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER in the
1796// #GDBusConnection:flags property then you **must** also set this
1797// property to a valid guid.
1798//
1799// If you are constructing a #GDBusConnection and pass
1800// %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT in the
1801// #GDBusConnection:flags property you will be able to read the GUID
1802// of the other peer here after the connection has been successfully
1803// initialized.
1804//
1805// Note that the
1806// [D-Bus specification](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses)
1807// uses the term ‘UUID’ to refer to this, whereas GLib consistently uses the
1808// term ‘GUID’ for historical reasons.
1809//
1810// Despite its name, the format of #GDBusConnection:guid does not follow
1811// [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122) or the Microsoft
1812// GUID format.
1813func (x *DBusConnection) GetPropertyGuid() string {
1814	var v gobject.Value
1815	x.GetProperty("guid", &v)
1816	return v.GetString()
1817}
1818
1819// GetPropertyUniqueName gets the "unique-name" property.
1820// The unique name as assigned by the message bus or %NULL if the
1821// connection is not open or not a message bus connection.
1822func (x *DBusConnection) GetPropertyUniqueName() string {
1823	var v gobject.Value
1824	x.GetProperty("unique-name", &v)
1825	return v.GetString()
1826}
1827
1828// Emitted when the connection is closed.
1829//
1830// # The cause of this event can be
1831//
1832//   - If g_dbus_connection_close() is called. In this case
1833//     @remote_peer_vanished is set to %FALSE and @error is %NULL.
1834//
1835//   - If the remote peer closes the connection. In this case
1836//     @remote_peer_vanished is set to %TRUE and @error is set.
1837//
1838//   - If the remote peer sends invalid or malformed data. In this
1839//     case @remote_peer_vanished is set to %FALSE and @error is set.
1840//
1841// Upon receiving this signal, you should give up your reference to
1842// @connection. You are guaranteed that this signal is emitted only
1843// once.
1844func (x *DBusConnection) ConnectClosed(cb *func(DBusConnection, bool, *glib.Error)) uint {
1845	cbPtr := uintptr(unsafe.Pointer(cb))
1846	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
1847		handlerID := gobject.SignalConnect(x.GoPointer(), "closed", cbRefPtr)
1848		glib.SaveHandlerMapping(handlerID, cbPtr)
1849		return handlerID
1850	}
1851
1852	fcb := func(clsPtr uintptr, RemotePeerVanishedVarp bool, ErrorVarp uintptr) {
1853		fa := DBusConnection{}
1854		fa.Ptr = clsPtr
1855		cbFn := *cb
1856
1857		cbFn(fa, RemotePeerVanishedVarp, (*glib.Error)(unsafe.Pointer(ErrorVarp)))
1858
1859	}
1860	cbRefPtr := purego.NewCallback(fcb)
1861	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
1862	handlerID := gobject.SignalConnect(x.GoPointer(), "closed", cbRefPtr)
1863	glib.SaveHandlerMapping(handlerID, cbPtr)
1864	return handlerID
1865}
1866
1867// Starts asynchronous initialization of the object implementing the
1868// interface. This must be done before any real use of the object after
1869// initial construction. If the object also implements #GInitable you can
1870// optionally call g_initable_init() instead.
1871//
1872// This method is intended for language bindings. If writing in C,
1873// g_async_initable_new_async() should typically be used instead.
1874//
1875// When the initialization is finished, @callback will be called. You can
1876// then call g_async_initable_init_finish() to get the result of the
1877// initialization.
1878//
1879// Implementations may also support cancellation. If @cancellable is not
1880// %NULL, then initialization can be cancelled by triggering the cancellable
1881// object from another thread. If the operation was cancelled, the error
1882// %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL, and
1883// the object doesn't support cancellable initialization, the error
1884// %G_IO_ERROR_NOT_SUPPORTED will be returned.
1885//
1886// As with #GInitable, if the object is not initialized, or initialization
1887// returns with an error, then all operations on the object except
1888// g_object_ref() and g_object_unref() are considered to be invalid, and
1889// have undefined behaviour. They will often fail with g_critical() or
1890// g_warning(), but this must not be relied on.
1891//
1892// Callers should not assume that a class which implements #GAsyncInitable can
1893// be initialized multiple times; for more information, see g_initable_init().
1894// If a class explicitly supports being initialized multiple times,
1895// implementation requires yielding all subsequent calls to init_async() on the
1896// results of the first call.
1897//
1898// For classes that also support the #GInitable interface, the default
1899// implementation of this method will run the g_initable_init() function
1900// in a thread, so if you want to support asynchronous initialization via
1901// threads, just implement the #GAsyncInitable interface without overriding
1902// any interface methods.
1903func (x *DBusConnection) InitAsync(IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
1904
1905	XGAsyncInitableInitAsync(x.GoPointer(), IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
1906
1907}
1908
1909// Finishes asynchronous initialization and returns the result.
1910// See g_async_initable_init_async().
1911func (x *DBusConnection) InitFinish(ResVar AsyncResult) (bool, error) {
1912	var cerr *glib.Error
1913
1914	cret := XGAsyncInitableInitFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
1915	if cerr == nil {
1916		return cret, nil
1917	}
1918	return cret, cerr
1919
1920}
1921
1922// Finishes the async construction for the various g_async_initable_new
1923// calls, returning the created object or %NULL on error.
1924func (x *DBusConnection) NewFinish(ResVar AsyncResult) (*gobject.Object, error) {
1925	var cls *gobject.Object
1926	var cerr *glib.Error
1927
1928	cret := XGAsyncInitableNewFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
1929
1930	if cret == 0 {
1931		return nil, cerr
1932	}
1933	cls = &gobject.Object{}
1934	cls.Ptr = cret
1935	if cerr == nil {
1936		return cls, nil
1937	}
1938	return cls, cerr
1939
1940}
1941
1942// Initializes the object implementing the interface.
1943//
1944// This method is intended for language bindings. If writing in C,
1945// g_initable_new() should typically be used instead.
1946//
1947// The object must be initialized before any real use after initial
1948// construction, either with this function or g_async_initable_init_async().
1949//
1950// Implementations may also support cancellation. If @cancellable is not %NULL,
1951// then initialization can be cancelled by triggering the cancellable object
1952// from another thread. If the operation was cancelled, the error
1953// %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL and
1954// the object doesn't support cancellable initialization the error
1955// %G_IO_ERROR_NOT_SUPPORTED will be returned.
1956//
1957// If the object is not initialized, or initialization returns with an
1958// error, then all operations on the object except g_object_ref() and
1959// g_object_unref() are considered to be invalid, and have undefined
1960// behaviour. See the [description][iface@Gio.Initable#description] for more details.
1961//
1962// Callers should not assume that a class which implements #GInitable can be
1963// initialized multiple times, unless the class explicitly documents itself as
1964// supporting this. Generally, a class’ implementation of init() can assume
1965// (and assert) that it will only be called once. Previously, this documentation
1966// recommended all #GInitable implementations should be idempotent; that
1967// recommendation was relaxed in GLib 2.54.
1968//
1969// If a class explicitly supports being initialized multiple times, it is
1970// recommended that the method is idempotent: multiple calls with the same
1971// arguments should return the same results. Only the first call initializes
1972// the object; further calls return the result of the first call.
1973//
1974// One reason why a class might need to support idempotent initialization is if
1975// it is designed to be used via the singleton pattern, with a
1976// #GObjectClass.constructor that sometimes returns an existing instance.
1977// In this pattern, a caller would expect to be able to call g_initable_init()
1978// on the result of g_object_new(), regardless of whether it is in fact a new
1979// instance.
1980func (x *DBusConnection) Init(CancellableVar *Cancellable) (bool, error) {
1981	var cerr *glib.Error
1982
1983	cret := XGInitableInit(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
1984	if cerr == nil {
1985		return cret, nil
1986	}
1987	return cret, cerr
1988
1989}
1990
1991var xDBusConnectionNew func(uintptr, uintptr, DBusConnectionFlags, uintptr, uintptr, uintptr, uintptr)
1992
1993// Asynchronously sets up a D-Bus connection for exchanging D-Bus messages
1994// with the end represented by @stream.
1995//
1996// If @stream is a #GSocketConnection, then the corresponding #GSocket
1997// will be put into non-blocking mode.
1998//
1999// The D-Bus connection will interact with @stream from a worker thread.
2000// As a result, the caller should not interact with @stream after this
2001// method has been called, except by calling g_object_unref() on it.
2002//
2003// If @observer is not %NULL it may be used to control the
2004// authentication process.
2005//
2006// When the operation is finished, @callback will be invoked. You can
2007// then call g_dbus_connection_new_finish() to get the result of the
2008// operation.
2009//
2010// This is an asynchronous failable constructor. See
2011// g_dbus_connection_new_sync() for the synchronous
2012// version.
2013func DBusConnectionNew(StreamVar *IOStream, GuidVar *string, FlagsVar DBusConnectionFlags, ObserverVar *DBusAuthObserver, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
2014
2015	var CallbackVarRef uintptr
2016	if CallbackVar != nil {
2017		CallbackVarPtr := uintptr(unsafe.Pointer(CallbackVar))
2018		if cbRefPtr, ok := glib.GetCallback(CallbackVarPtr); ok {
2019			CallbackVarRef = cbRefPtr
2020		} else {
2021			fcb := func(arg0 uintptr, arg1 uintptr, arg2 uintptr) {
2022				cbFn := *CallbackVar
2023				cbFn(arg0, arg1, arg2)
2024			}
2025			CallbackVarRef = purego.NewCallback(fcb)
2026			glib.SaveCallbackWithClosure(CallbackVarPtr, CallbackVarRef, CallbackVar)
2027		}
2028	}
2029
2030	GuidVarPtr := core.GStrdupNullable(GuidVar)
2031	defer core.GFreeNullable(GuidVarPtr)
2032
2033	xDBusConnectionNew(StreamVar.GoPointer(), GuidVarPtr, FlagsVar, ObserverVar.GoPointer(), CancellableVar.GoPointer(), CallbackVarRef, UserDataVar)
2034
2035}
2036
2037var xDBusConnectionNewForAddress func(string, DBusConnectionFlags, uintptr, uintptr, uintptr, uintptr)
2038
2039// Asynchronously connects and sets up a D-Bus client connection for
2040// exchanging D-Bus messages with an endpoint specified by @address
2041// which must be in the
2042// [D-Bus address format](https://dbus.freedesktop.org/doc/dbus-specification.html#addresses).
2043//
2044// This constructor can only be used to initiate client-side
2045// connections - use g_dbus_connection_new() if you need to act as the
2046// server. In particular, @flags cannot contain the
2047// %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_SERVER,
2048// %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS or
2049// %G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_REQUIRE_SAME_USER flags.
2050//
2051// When the operation is finished, @callback will be invoked. You can
2052// then call g_dbus_connection_new_for_address_finish() to get the result of
2053// the operation.
2054//
2055// If @observer is not %NULL it may be used to control the
2056// authentication process.
2057//
2058// This is an asynchronous failable constructor. See
2059// g_dbus_connection_new_for_address_sync() for the synchronous
2060// version.
2061func DBusConnectionNewForAddress(AddressVar string, FlagsVar DBusConnectionFlags, ObserverVar *DBusAuthObserver, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
2062
2063	var CallbackVarRef uintptr
2064	if CallbackVar != nil {
2065		CallbackVarPtr := uintptr(unsafe.Pointer(CallbackVar))
2066		if cbRefPtr, ok := glib.GetCallback(CallbackVarPtr); ok {
2067			CallbackVarRef = cbRefPtr
2068		} else {
2069			fcb := func(arg0 uintptr, arg1 uintptr, arg2 uintptr) {
2070				cbFn := *CallbackVar
2071				cbFn(arg0, arg1, arg2)
2072			}
2073			CallbackVarRef = purego.NewCallback(fcb)
2074			glib.SaveCallbackWithClosure(CallbackVarPtr, CallbackVarRef, CallbackVar)
2075		}
2076	}
2077
2078	xDBusConnectionNewForAddress(AddressVar, FlagsVar, ObserverVar.GoPointer(), CancellableVar.GoPointer(), CallbackVarRef, UserDataVar)
2079
2080}
2081
2082func init() {
2083	core.SetPackageName("GIO", "gio-2.0")
2084	core.SetSharedLibraries("GIO", []string{"libgio-2.0.so.0"})
2085	var libs []uintptr
2086	for _, libPath := range core.GetPaths("GIO") {
2087		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
2088		if err != nil {
2089			panic(err)
2090		}
2091		libs = append(libs, lib)
2092	}
2093
2094	core.PuregoSafeRegister(&xBusGet, libs, "g_bus_get")
2095	core.PuregoSafeRegister(&xBusGetFinish, libs, "g_bus_get_finish")
2096	core.PuregoSafeRegister(&xBusGetSync, libs, "g_bus_get_sync")
2097
2098	core.PuregoSafeRegister(&xDBusConnectionGLibType, libs, "g_dbus_connection_get_type")
2099
2100	core.PuregoSafeRegister(&xNewDBusConnectionFinish, libs, "g_dbus_connection_new_finish")
2101	core.PuregoSafeRegister(&xNewDBusConnectionForAddressFinish, libs, "g_dbus_connection_new_for_address_finish")
2102	core.PuregoSafeRegister(&xNewDBusConnectionForAddressSync, libs, "g_dbus_connection_new_for_address_sync")
2103	core.PuregoSafeRegister(&xNewDBusConnectionSync, libs, "g_dbus_connection_new_sync")
2104
2105	core.PuregoSafeRegister(&xDBusConnectionAddFilter, libs, "g_dbus_connection_add_filter")
2106	core.PuregoSafeRegister(&xDBusConnectionCall, libs, "g_dbus_connection_call")
2107	core.PuregoSafeRegister(&xDBusConnectionCallFinish, libs, "g_dbus_connection_call_finish")
2108	core.PuregoSafeRegister(&xDBusConnectionCallSync, libs, "g_dbus_connection_call_sync")
2109	core.PuregoSafeRegister(&xDBusConnectionCallWithUnixFdList, libs, "g_dbus_connection_call_with_unix_fd_list")
2110	core.PuregoSafeRegister(&xDBusConnectionCallWithUnixFdListFinish, libs, "g_dbus_connection_call_with_unix_fd_list_finish")
2111	core.PuregoSafeRegister(&xDBusConnectionCallWithUnixFdListSync, libs, "g_dbus_connection_call_with_unix_fd_list_sync")
2112	core.PuregoSafeRegister(&xDBusConnectionClose, libs, "g_dbus_connection_close")
2113	core.PuregoSafeRegister(&xDBusConnectionCloseFinish, libs, "g_dbus_connection_close_finish")
2114	core.PuregoSafeRegister(&xDBusConnectionCloseSync, libs, "g_dbus_connection_close_sync")
2115	core.PuregoSafeRegister(&xDBusConnectionEmitSignal, libs, "g_dbus_connection_emit_signal")
2116	core.PuregoSafeRegister(&xDBusConnectionExportActionGroup, libs, "g_dbus_connection_export_action_group")
2117	core.PuregoSafeRegister(&xDBusConnectionExportMenuModel, libs, "g_dbus_connection_export_menu_model")
2118	core.PuregoSafeRegister(&xDBusConnectionFlush, libs, "g_dbus_connection_flush")
2119	core.PuregoSafeRegister(&xDBusConnectionFlushFinish, libs, "g_dbus_connection_flush_finish")
2120	core.PuregoSafeRegister(&xDBusConnectionFlushSync, libs, "g_dbus_connection_flush_sync")
2121	core.PuregoSafeRegister(&xDBusConnectionGetCapabilities, libs, "g_dbus_connection_get_capabilities")
2122	core.PuregoSafeRegister(&xDBusConnectionGetExitOnClose, libs, "g_dbus_connection_get_exit_on_close")
2123	core.PuregoSafeRegister(&xDBusConnectionGetFlags, libs, "g_dbus_connection_get_flags")
2124	core.PuregoSafeRegister(&xDBusConnectionGetGuid, libs, "g_dbus_connection_get_guid")
2125	core.PuregoSafeRegister(&xDBusConnectionGetLastSerial, libs, "g_dbus_connection_get_last_serial")
2126	core.PuregoSafeRegister(&xDBusConnectionGetPeerCredentials, libs, "g_dbus_connection_get_peer_credentials")
2127	core.PuregoSafeRegister(&xDBusConnectionGetStream, libs, "g_dbus_connection_get_stream")
2128	core.PuregoSafeRegister(&xDBusConnectionGetUniqueName, libs, "g_dbus_connection_get_unique_name")
2129	core.PuregoSafeRegister(&xDBusConnectionIsClosed, libs, "g_dbus_connection_is_closed")
2130	core.PuregoSafeRegister(&xDBusConnectionRegisterObject, libs, "g_dbus_connection_register_object")
2131	core.PuregoSafeRegister(&xDBusConnectionRegisterObjectWithClosures, libs, "g_dbus_connection_register_object_with_closures")
2132	core.PuregoSafeRegister(&xDBusConnectionRegisterObjectWithClosures2, libs, "g_dbus_connection_register_object_with_closures2")
2133	core.PuregoSafeRegister(&xDBusConnectionRegisterSubtree, libs, "g_dbus_connection_register_subtree")
2134	core.PuregoSafeRegister(&xDBusConnectionRemoveFilter, libs, "g_dbus_connection_remove_filter")
2135	core.PuregoSafeRegister(&xDBusConnectionSendMessage, libs, "g_dbus_connection_send_message")
2136	core.PuregoSafeRegister(&xDBusConnectionSendMessageWithReply, libs, "g_dbus_connection_send_message_with_reply")
2137	core.PuregoSafeRegister(&xDBusConnectionSendMessageWithReplyFinish, libs, "g_dbus_connection_send_message_with_reply_finish")
2138	core.PuregoSafeRegister(&xDBusConnectionSendMessageWithReplySync, libs, "g_dbus_connection_send_message_with_reply_sync")
2139	core.PuregoSafeRegister(&xDBusConnectionSetExitOnClose, libs, "g_dbus_connection_set_exit_on_close")
2140	core.PuregoSafeRegister(&xDBusConnectionSignalSubscribe, libs, "g_dbus_connection_signal_subscribe")
2141	core.PuregoSafeRegister(&xDBusConnectionSignalUnsubscribe, libs, "g_dbus_connection_signal_unsubscribe")
2142	core.PuregoSafeRegister(&xDBusConnectionStartMessageProcessing, libs, "g_dbus_connection_start_message_processing")
2143	core.PuregoSafeRegister(&xDBusConnectionUnexportActionGroup, libs, "g_dbus_connection_unexport_action_group")
2144	core.PuregoSafeRegister(&xDBusConnectionUnexportMenuModel, libs, "g_dbus_connection_unexport_menu_model")
2145	core.PuregoSafeRegister(&xDBusConnectionUnregisterObject, libs, "g_dbus_connection_unregister_object")
2146	core.PuregoSafeRegister(&xDBusConnectionUnregisterSubtree, libs, "g_dbus_connection_unregister_subtree")
2147
2148	core.PuregoSafeRegister(&xDBusConnectionNew, libs, "g_dbus_connection_new")
2149	core.PuregoSafeRegister(&xDBusConnectionNewForAddress, libs, "g_dbus_connection_new_for_address")
2150
2151}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 102

↑↓ moveenter openesc close