Ejemplo n.º 1
0
// GetDbusObjectPath is a wrapper around g_application_get_dbus_object_path().
func (v *Application) GetDbusObjectPath() string {
	c := C.g_application_get_dbus_object_path(v.native())

	return C.GoString((*C.char)(c))
}
Ejemplo n.º 2
0
//Gets the D-Bus object path being used by the application, or NULL.
//If GApplication is using its D-Bus backend then this function will return the D-Bus object path that GApplication is using. If the application is the primary instance then there is an object published at this path. If the application is not the primary instance then the result of this function is undefined.
//If GApplication is not using D-Bus then this function will return NULL. This includes the situation where the D-Bus backend would normally be in use but we were unable to connect to the bus.
//This function must not be called before the application has been registered. See g_application_get_is_registered().
func (v *Application) GetDBusObjectPath() string {
	cstr := (*C.char)(C.g_application_get_dbus_object_path(v.native()))
	defer C.free(unsafe.Pointer(cstr))
	return C.GoString(cstr)
}