glibmm 2.64.2

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Examples

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions | List of all members
Gio::DBus::ObjectManagerClient Class Reference
D-Bus API

Client-side object manager. More...

`#include <giomm/dbusobjectmanagerclient.h>`

Inheritance diagram for Gio::DBus::ObjectManagerClient:
[legend]

## Public Types
using | SlotProxyType = sigc::slot< GType(const Glib::RefPtr< Gio::DBus::ObjectManagerClient >&, const Glib::ustring&, const Glib::ustring&)>
| A slot that will be called to determine the GType to use for an interface proxy (if interface_name is not an empty string) or object proxy (if interface_name is an empty string). More...
using | MapChangedProperties = std::map< Glib::ustring, Glib::VariantBase >
Public Types inherited from Glib::Object
using | DestroyNotify = void(*)(gpointer data)
Public Types inherited from sigc::trackable
typedef internal::func_destroy_notify | func_destroy_notify

## Public Member Functions
| ObjectManagerClient (ObjectManagerClient&& src) noexcept
ObjectManagerClient& | operator= (ObjectManagerClient&& src) noexcept
| ~ObjectManagerClient () noexcept override
GDBusObjectManagerClient* | gobj ()
| Provides access to the underlying C GObject. More...
const GDBusObjectManagerClient* | gobj () const
| Provides access to the underlying C GObject. More...
GDBusObjectManagerClient* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
Glib::RefPtr< Connection > | get_connection ()
| Gets the DBusConnection used by manager. More...
Glib::RefPtr< const Connection > | get_connection () const
| Gets the DBusConnection used by manager. More...
ObjectManagerClientFlags | get_flags () const
| Gets the flags that manager was constructed with. More...
Glib::ustring | get_name () const
| Gets the name that manager is for, or `nullptr` if not a message bus connection. More...
Glib::ustring | get_name_owner () const
| The unique name that owns the name that manager is for or `nullptr` if no-one currently owns that name. More...
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Connection > > | property_connection () const
| The DBusConnection to use. More...
Glib::PropertyProxy_ReadOnly< ObjectManagerClientFlags > | property_flags () const
| Flags from the DBusObjectManagerClientFlags enumeration. More...
Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_object_path () const
| The object path the manager is for. More...
Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_name () const
| The well-known name or unique name that the manager is for. More...
Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_name_owner () const
| The unique name that owns DBusObjectManagerClient::property_name() or `nullptr` if no-one is currently owning the name. More...
Glib::SignalProxy< void, const Glib::RefPtr< Gio::DBus::ObjectProxy >&, const Glib::RefPtr< Gio::DBus::Proxy >&, const Glib::ustring&, const Glib::ustring&, const Glib::VariantContainerBase& > | signal_interface_proxy_signal ()
Glib::SignalProxy< void, const Glib::RefPtr< Gio::DBus::ObjectProxy >&, const Glib::RefPtr< Gio::DBus::Proxy >&, const MapChangedProperties&, const std::vector< Glib::ustring >& > | signal_interface_proxy_properties_changed ()
Public Member Functions inherited from Glib::Object
| Object (const Object&)=delete
Object& | operator= (const Object&)=delete
| Object (Object&& src) noexcept
Object& | operator= (Object&& src) noexcept
void* | get_data (const QueryQuark& key)
void | set_data (const Quark& key, void* data)
void | set_data (const Quark& key, void* data, DestroyNotify notify)
void | remove_data (const QueryQuark& quark)
void* | steal_data (const QueryQuark& quark)
Public Member Functions inherited from Glib::ObjectBase
| ObjectBase (const ObjectBase&)=delete
ObjectBase& | operator= (const ObjectBase&)=delete
void | set_property_value (const Glib::ustring& property_name, const Glib::ValueBase& value)
| You probably want to use a specific property_*() accessor method instead. More...
void | get_property_value (const Glib::ustring& property_name, Glib::ValueBase& value) const
| You probably want to use a specific property_*() accessor method instead. More...
template<class PropertyType >
void | set_property (const Glib::ustring& property_name, const PropertyType& value)
| You probably want to use a specific property_*() accessor method instead. More...
template<class PropertyType >
void | get_property (const Glib::ustring& property_name, PropertyType& value) const
| You probably want to use a specific property_*() accessor method instead. More...
void | connect_property_changed (const Glib::ustring& property_name, const sigc::slot< void >& slot)
| You can use the signal_changed() signal of the property proxy instead. More...
void | connect_property_changed (const Glib::ustring& property_name, sigc::slot< void >&& slot)
| You can use the signal_changed() signal of the property proxy instead. More...
sigc::connection | connect_property_changed_with_return (const Glib::ustring& property_name, const sigc::slot< void >& slot)
| You can use the signal_changed() signal of the property proxy instead. More...
sigc::connection | connect_property_changed_with_return (const Glib::ustring& property_name, sigc::slot< void >&& slot)
| You can use the signal_changed() signal of the property proxy instead. More...
void | freeze_notify ()
| Increases the freeze count on object. More...
void | thaw_notify ()
| Reverts the effect of a previous call to freeze_notify(). More...
virtual void | reference () const
| Increment the reference count for this object. More...
virtual void | unreference () const
| Decrement the reference count for this object. More...
GObject* | gobj ()
| Provides access to the underlying C GObject. More...
const GObject* | gobj () const
| Provides access to the underlying C GObject. More...
GObject* | gobj_copy () const
| Give a ref-ed copy to someone. Use for direct struct access. More...
Public Member Functions inherited from sigc::trackable
| trackable () noexcept
| trackable (const trackable &src) noexcept
| trackable (trackable &&src)
| ~trackable ()
void | add_destroy_notify_callback (void *data, func_destroy_notify func) const
void | notify_callbacks ()
trackable & | operator= (const trackable &src)
trackable & | operator= (trackable &&src)
void | remove_destroy_notify_callback (void *data) const
Public Member Functions inherited from Gio::Initable
| Initable (Initable&& src) noexcept
Initable& | operator= (Initable&& src) noexcept
| ~Initable () noexcept override
GInitable* | gobj ()
| Provides access to the underlying C GObject. More...
const GInitable* | gobj () const
| Provides access to the underlying C GObject. More...
Public Member Functions inherited from Glib::Interface
| Interface ()
| A Default constructor. More...
| Interface (Interface&& src) noexcept
Interface& | operator= (Interface&& src) noexcept
| Interface (const Glib::Interface_Class& interface_class)
| Called by constructors of derived classes. More...
| Interface (GObject* castitem)
| Called by constructors of derived classes. More...
| ~Interface () noexcept override
| Interface (const Interface&)=delete
Interface& | operator= (const Interface&)=delete
GObject* | gobj ()
const GObject* | gobj () const
Public Member Functions inherited from Gio::AsyncInitable
| AsyncInitable (AsyncInitable&& src) noexcept
AsyncInitable& | operator= (AsyncInitable&& src) noexcept
| ~AsyncInitable () noexcept override
GAsyncInitable* | gobj ()
| Provides access to the underlying C GObject. More...
const GAsyncInitable* | gobj () const
| Provides access to the underlying C GObject. More...
Public Member Functions inherited from Gio::DBus::ObjectManager
| ObjectManager (ObjectManager&& src) noexcept
ObjectManager& | operator= (ObjectManager&& src) noexcept
| ~ObjectManager () noexcept override
GDBusObjectManager* | gobj ()
| Provides access to the underlying C GObject. More...
const GDBusObjectManager* | gobj () const
| Provides access to the underlying C GObject. More...
Glib::ustring | get_object_path () const
| Gets the object path that manager is for. More...
std::vector< Glib::RefPtr< Gio::DBus::Object > > | get_objects ()
| Gets all DBusObject objects known to manager. More...
std::vector< Glib::RefPtr< const Gio::DBus::Object > > | get_objects () const
| Gets all DBusObject objects known to manager. More...
Glib::RefPtr< Gio::DBus::Object > | get_object (const Glib::ustring& object_path)
| Gets the DBusObjectProxy at object_path, if any. More...
Glib::RefPtr< const Gio::DBus::Object > | get_object (const Glib::ustring& object_path) const
| Gets the DBusObjectProxy at object_path, if any. More...
Glib::RefPtr< Gio::DBus::Interface > | get_interface (const Glib::ustring& object_path, const Glib::ustring& interface_name)
| Gets the interface proxy for interface_name at object_path, if any. More...
Glib::RefPtr< const Gio::DBus::Interface > | get_interface (const Glib::ustring& object_path, const Glib::ustring& interface_name) const
| Gets the interface proxy for interface_name at object_path, if any. More...
Glib::SignalProxy< void, const Glib::RefPtr< Gio::DBus::Object >& > | signal_object_added ()
Glib::SignalProxy< void, const Glib::RefPtr< Gio::DBus::Object >& > | signal_object_removed ()
Glib::SignalProxy< void, const Glib::RefPtr< Gio::DBus::Object >&, const Glib::RefPtr< Gio::DBus::Interface >& > | signal_interface_added ()
Glib::SignalProxy< void, const Glib::RefPtr< Gio::DBus::Object >&, const Glib::RefPtr< Gio::DBus::Interface >& > | signal_interface_removed ()

## Static Public Member Functions
static GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system. More...
static void | create (const Glib::RefPtr< Connection >& connection, const Glib::ustring& name, const Glib::ustring& object_path, const SlotAsyncReady& slot_async_ready, const Glib::RefPtr< Cancellable >& cancellable={}, const SlotProxyType& slot_proxy_type={}, ObjectManagerClientFlags flags=OBJECT_MANAGER_CLIENT_FLAGS_NONE)
| Creates a new Gio::DBus::ObjectManagerClient object. More...
static Glib::RefPtr< Gio::DBus::ObjectManagerClient > | create_finish (const Glib::RefPtr< AsyncResult >& res)
| Finishes an operation started with create(). More...
static Glib::RefPtr< Gio::DBus::ObjectManagerClient > | create_sync (const Glib::RefPtr< Connection >& connection, const Glib::ustring& name, const Glib::ustring& object_path, const Glib::RefPtr< Cancellable >& cancellable={}, const SlotProxyType& slot_proxy_type={}, ObjectManagerClientFlags flags=OBJECT_MANAGER_CLIENT_FLAGS_NONE)
| Creates a new Gio::DBus::ObjectManagerClient object. More...
static void | create_for_bus (BusType bus_type, const Glib::ustring& name, const Glib::ustring& object_path, const SlotAsyncReady& slot_async_ready, const Glib::RefPtr< Cancellable >& cancellable={}, const SlotProxyType& slot_proxy_type={}, ObjectManagerClientFlags flags=OBJECT_MANAGER_CLIENT_FLAGS_NONE)
| Creates a new Gio::DBus::ObjectManagerClient object. More...
static Glib::RefPtr< Gio::DBus::ObjectManagerClient > | create_for_bus_finish (const Glib::RefPtr< AsyncResult >& res)
| Finishes an operation started with create_for_bus(). More...
static Glib::RefPtr< Gio::DBus::ObjectManagerClient > | create_for_bus_sync (BusType bus_type, const Glib::ustring& name, const Glib::ustring& object_path, const Glib::RefPtr< Cancellable >& cancellable={}, const SlotProxyType& slot_proxy_type={}, ObjectManagerClientFlags flags=OBJECT_MANAGER_CLIENT_FLAGS_NONE)
| Creates a new Gio::DBus::ObjectManagerClient object. More...
Static Public Member Functions inherited from Gio::Initable
static void | add_interface (GType gtype_implementer)
static GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system. More...
Static Public Member Functions inherited from Gio::AsyncInitable
static void | add_interface (GType gtype_implementer)
static GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system. More...
Static Public Member Functions inherited from Gio::DBus::ObjectManager
static void | add_interface (GType gtype_implementer)
static GType | get_type ()
| Get the GType for this class, for use with the underlying GObject type system. More...

## Protected Member Functions
| ObjectManagerClient (const Glib::RefPtr< Connection >& connection, const Glib::ustring& name, const Glib::ustring& object_path, const SlotAsyncReady& slot_async_ready, const Glib::RefPtr< Cancellable >& cancellable, const SlotProxyType& slot_proxy_type, ObjectManagerClientFlags flags)
| ObjectManagerClient (BusType bus_type, const Glib::ustring& name, const Glib::ustring& object_path, const SlotAsyncReady& slot_async_ready, const Glib::RefPtr< Cancellable >& cancellable, const SlotProxyType& slot_proxy_type, ObjectManagerClientFlags flags)
virtual void | on_interface_proxy_signal (const Glib::RefPtr< Gio::DBus::ObjectProxy >& object_proxy, const Glib::RefPtr< Gio::DBus::Proxy >& interface_proxy, const Glib::ustring& sender_name, const Glib::ustring& signal_name, const Glib::VariantContainerBase& parameters)
| This is a default handler for the signal signal_interface_proxy_signal(). More...
virtual void | on_interface_proxy_properties_changed (const Glib::RefPtr< Gio::DBus::ObjectProxy >& object_proxy, const Glib::RefPtr< Gio::DBus::Proxy >& interface_proxy, const MapChangedProperties& changed_properties, const std::vector< Glib::ustring >& invalidated_properties)
| This is a default handler for the signal signal_interface_proxy_properties_changed(). More...
Protected Member Functions inherited from Glib::Object
| Object ()
| Object (const Glib::ConstructParams& construct_params)
| Object (GObject* castitem)
| ~Object () noexcept override
Protected Member Functions inherited from Glib::ObjectBase
| ObjectBase ()
| This default constructor is called implicitly from the constructor of user-derived classes, even if, for instance, Gtk::Button calls a different ObjectBase constructor. More...
| ObjectBase (const char* custom_type_name)
| A derived constructor always overrides this choice. More...
| ObjectBase (const std::type_info& custom_type_info)
| This constructor is a special feature to allow creation of derived types on the fly, without having to use g_object_new() manually. More...
| ObjectBase (ObjectBase&& src) noexcept
ObjectBase& | operator= (ObjectBase&& src) noexcept
virtual | ~ObjectBase () noexcept=0
void | initialize (GObject* castitem)
void | initialize_move (GObject* castitem, Glib::ObjectBase* previous_wrapper)
Protected Member Functions inherited from Gio::Initable
| Initable ()
| You should derive from this class to use it. More...
void | init (const Glib::RefPtr< Cancellable >& cancellable)
| Initializes the object implementing the interface. More...
void | init ()
| A init() convenience overload. More...
virtual bool | init_vfunc (const Glib::RefPtr< Cancellable >& cancellable, GError** error)
Protected Member Functions inherited from Gio::AsyncInitable
| AsyncInitable ()
| You should derive from this class to use it. More...
void | init_async (const SlotAsyncReady& slot, const Glib::RefPtr< Cancellable >& cancellable, int io_priority=Glib::PRIORITY_DEFAULT)
| Starts asynchronous initialization of the object implementing the interface. More...
void | init_async (const SlotAsyncReady& slot, int io_priority=Glib::PRIORITY_DEFAULT)
| Non-cancellable version of init_async(). More...
bool | init_finish (const Glib::RefPtr< AsyncResult >& res)
| Finishes asynchronous initialization and returns the result. More...
Glib::RefPtr< Glib::Object > | create_finish (const Glib::RefPtr< AsyncResult >& res)
| Finishes the async construction for the various g_async_initable_new calls, returning the created object or `nullptr` on error. More...
virtual void | init_async_vfunc (const SlotAsyncReady& slot, const Glib::RefPtr< Cancellable >& cancellable, int io_priority=Glib::PRIORITY_DEFAULT)
virtual bool | init_finish_vfunc (const Glib::RefPtr< AsyncResult >& res)
Protected Member Functions inherited from Gio::DBus::ObjectManager
| ObjectManager ()
| You should derive from this class to use it. More...
virtual Glib::ustring | get_object_path_vfunc () const
virtual std::vector< Glib::RefPtr< Gio::DBus::Object > > | get_objects_vfunc () const
virtual Glib::RefPtr< Gio::DBus::Object > | get_object_vfunc (const Glib::ustring& object_path) const
virtual Glib::RefPtr< Gio::DBus::Interface > | get_interface_vfunc (const Glib::ustring& object_path, const Glib::ustring& interface_name) const
virtual void | on_object_added (const Glib::RefPtr< Gio::DBus::Object >& object)
| This is a default handler for the signal signal_object_added(). More...
virtual void | on_object_removed (const Glib::RefPtr< Gio::DBus::Object >& object)
| This is a default handler for the signal signal_object_removed(). More...
virtual void | on_interface_added (const Glib::RefPtr< Gio::DBus::Object >& object, const Glib::RefPtr< Gio::DBus::Interface >& iface)
| This is a default handler for the signal signal_interface_added(). More...
virtual void | on_interface_removed (const Glib::RefPtr< Gio::DBus::Object >& object, const Glib::RefPtr< Gio::DBus::Interface >& iface)
| This is a default handler for the signal signal_interface_removed(). More...

## Related Functions
(Note that these are not member functions.)
Glib::RefPtr< Gio::DBus::ObjectManagerClient > | wrap (GDBusObjectManagerClient* object, bool take_copy=false)
| A Glib::wrap() method for this object. More...
Related Functions inherited from Glib::Object
Glib::RefPtr< Glib::Object > | wrap (GObject* object, bool take_copy=false)
Related Functions inherited from Gio::Initable
Glib::RefPtr< Gio::Initable > | wrap (GInitable* object, bool take_copy=false)
| A Glib::wrap() method for this object. More...
Related Functions inherited from Gio::AsyncInitable
Glib::RefPtr< Gio::AsyncInitable > | wrap (GAsyncInitable* object, bool take_copy=false)
| A Glib::wrap() method for this object. More...
Related Functions inherited from Gio::DBus::ObjectManager
Glib::RefPtr< Gio::DBus::ObjectManager > | wrap (GDBusObjectManager* object, bool take_copy=false)
| A Glib::wrap() method for this object. More...

## Detailed Description

Client-side object manager.

Gio::DBus::ObjectManagerClient is used to create, monitor and delete object proxies for remote objects exported by a Gio::DBus::ObjectManagerServer (or any code implementing the org.freedesktop.DBus.ObjectManager interface.

Once an instance of this type has been created, you can connect to Gio::DBus::ObjectManager::signal_object_added() and Gio::DBus::ObjectManager::signal_object_removed() and inspect the Gio::DBus::Object objects returned by Gio::DBus::ObjectManager::get_objects().

If the name for a Gio::DBus::ObjectManagerClient is not owned by anyone at object construction time, the default behavior is to request the message bus to launch an owner for the name. This behavior can be disabled using the Gio::DBus::OBJECT_MANAGER_CLIENT_FLAGS_DO_NOT_AUTO_START flag. It's also worth noting that this only works if the name of interest is activatable in the first place. E.g. in some cases it is not possible to launch an owner for the requested name. In this case, ObjectManagerClient object construction still succeeds but there will be no object proxies (e.g. get_objects() returns an empty vector) and property_name_owner() is an empty string.

The owner of the requested name can come and go (for example consider a system service being restarted) – ObjectManagerClient handles this case too; simply connect to property_name_owner().signal_changed() to watch for changes on property_name_owner(). When the name owner vanishes, the behavior is that property_name_owner() is set to an empty string (this includes emission of signal_changed()) and then signal_object_removed() signals are synthesized for all currently existing object proxies. Since property_name_owner() is an empty string when this happens, you can use this information to disambiguate a synthesized signal from a genuine signal caused by object removal on the remote Gio::DBus::ObjectManager. Similarly, when a new name owner appears, signal_object_added() signals are synthesized while property_namename_owner() is still an empty string. Only when all object proxies have been added, property_name_owner() is set to the new name owner (this includes emission of the signal_changed()). Furthermore, you are guaranteed that property_name_owner() will alternate between a name owner (e.g. `:1.42`) and an empty string even in the case where the name of interest is atomically replaced.

Ultimately, ObjectManagerClient is used to obtain Gio::DBus::Proxy instances. All signals (including the org.freedesktop.DBus.Properties::PropertiesChanged signal) delivered to Gio::DBus::Proxy instances are guaranteed to originate from the name owner. This guarantee along with the behavior described above, means that certain race conditions including the "half the proxy is from the old owner and the other half is from the new owner" problem cannot happen.

To avoid having the application connect to signals on the returned Gio::DBus::Object and Gio::DBus::Proxy objects, Gio::DBus::Object::signal_interface_added(), Gio::DBus::Object::signal_interface_removed(), Gio::DBus::Proxy::signal_properties_changed() and Gio::DBus::Proxy::signal_signal() are also emitted on the ObjectManagerClient instance managing these objects. The signals emitted are signal_interface_added(), signal_interface_removed(), signal_interface_proxy_properties_changed() and signal_interface_proxy_signal().

Note that all callbacks and signals are emitted in the thread-default main context that the ObjectManagerClient object was constructed in. Additionally, the Gio::DBus::ObjectProxy and Gio::DBus::Proxy objects originating from the ObjectManagerClient object will be created in the same context and, consequently, will deliver signals in the same main loop.

Since glibmm 2.62:

## Member Typedef Documentation

using Gio::DBus::ObjectManagerClient::MapChangedProperties = std::map<Glib::ustring, Glib::VariantBase>

using Gio::DBus::ObjectManagerClient::SlotProxyType = sigc::slot<GType(const Glib::RefPtr<Gio::DBus::ObjectManagerClient>&, const Glib::ustring&, const Glib::ustring&)>

A slot that will be called to determine the GType to use for an interface proxy (if interface_name is not an empty string) or object proxy (if interface_name is an empty string).

This function is called in the thread-default main loop that manager was constructed in.

For instance:

GType on_proxy_type(const Glib::RefPtr<Gio::DBus::ObjectManagerClient>& manager,
const Glib::ustring& object_path, const Glib::ustring& interface_name);

Parameters

  manager | A Gio::DBus::ObjectManagerClient.
  object_path | The object path of the remote object.
  interface_name | The interface name of the remote object, or an empty string if a GDBusObjectProxy GType is requested.

Returns
  A GType to use for the remote object. The returned type must be a GDBusProxy or GDBusObjectProxy-derived type.

## Constructor & Destructor Documentation

Gio::DBus::ObjectManagerClient::ObjectManagerClient | ( | ObjectManagerClient&& | src | ) |
| noexcept

Gio::DBus::ObjectManagerClient::~ObjectManagerClient | ( |  | ) |
| override noexcept

Gio::DBus::ObjectManagerClient::ObjectManagerClient | ( | const Glib::RefPtr< Connection >& | connection,
|  | const Glib::ustring& | name,
|  | const Glib::ustring& | object_path,
|  | const SlotAsyncReady & | slot_async_ready,
|  | const Glib::RefPtr< Cancellable >& | cancellable,
|  | const SlotProxyType& | slot_proxy_type,
|  | ObjectManagerClientFlags | flags
| ) |  |
| protected

Gio::DBus::ObjectManagerClient::ObjectManagerClient | ( | BusType | bus_type,
|  | const Glib::ustring& | name,
|  | const Glib::ustring& | object_path,
|  | const SlotAsyncReady & | slot_async_ready,
|  | const Glib::RefPtr< Cancellable >& | cancellable,
|  | const SlotProxyType& | slot_proxy_type,
|  | ObjectManagerClientFlags | flags
| ) |  |
| protected

## Member Function Documentation

static void Gio::DBus::ObjectManagerClient::create | ( | const Glib::RefPtr< Connection >& | connection,
|  | const Glib::ustring& | name,
|  | const Glib::ustring& | object_path,
|  | const SlotAsyncReady & | slot_async_ready,
|  | const Glib::RefPtr< Cancellable >& | cancellable = `{}`,
|  | const SlotProxyType& | slot_proxy_type = `{}`,
|  | ObjectManagerClientFlags | flags = `OBJECT_MANAGER_CLIENT_FLAGS_NONE`
| ) |  |
| static

Creates a new Gio::DBus::ObjectManagerClient object.

This is an asynchronous failable constructor. When the result is ready, slot_async_ready will be invoked in the thread-default main context of the thread you are calling this method from. You can then call create_finish() to get the result. See create_sync() for the synchronous version.

Parameters

  connection | A Gio::DBus::Connection.
  name | The owner of the control object (unique or well-known name).
  object_path | The object path of the control object.
  slot_async_ready | A SlotAsyncReady slot to call when the request is satisfied.
  cancellable | A Cancellable or an empty Glib::RefPtr.
  slot_proxy_type | A SlotProxyType slot, or an empty slot to always construct GDBusProxy or GDBusObjectProxy proxies.
  flags | Zero or more flags from the Gio::DBus::ObjectManagerClientFlags enumeration.

static Glib::RefPtr<Gio::DBus::ObjectManagerClient> Gio::DBus::ObjectManagerClient::create_finish | ( | const Glib::RefPtr< AsyncResult >& | res | ) |
| static

Finishes an operation started with create().

Parameters

  res | An AsyncResult obtained from the SlotAsyncReady passed to create().

Returns
  A Gio::DBus::ObjectManagerClient object. If an error has occurred, a Glib::Error is thrown and nothing is returned.

Exceptions

  Glib::Error. |

static void Gio::DBus::ObjectManagerClient::create_for_bus | ( | BusType | bus_type,
|  | const Glib::ustring& | name,
|  | const Glib::ustring& | object_path,
|  | const SlotAsyncReady & | slot_async_ready,
|  | const Glib::RefPtr< Cancellable >& | cancellable = `{}`,
|  | const SlotProxyType& | slot_proxy_type = `{}`,
|  | ObjectManagerClientFlags | flags = `OBJECT_MANAGER_CLIENT_FLAGS_NONE`
| ) |  |
| static

Creates a new Gio::DBus::ObjectManagerClient object.

Like create() but takes a Gio::DBus::BusType instead of a Gio::DBus::Connection.

This is an asynchronous failable constructor. When the result is ready, slot_async_ready will be invoked in the thread-default main context of the thread you are calling this method from. You can then call create_for_bus_finish() to get the result. See create_for_bus_sync() for the synchronous version.

Parameters

  bus_type | A Gio::DBus::BusType.
  name | The owner of the control object (unique or well-known name).
  object_path | The object path of the control object.
  slot_async_ready | A SlotAsyncReady slot to call when the request is satisfied.
  cancellable | A Cancellable or an empty Glib::RefPtr.
  slot_proxy_type | A SlotProxyType slot, or an empty slot to always construct GDBusProxy or GDBusObjectProxy proxies.
  flags | Zero or more flags from the Gio::DBus::ObjectManagerClientFlags enumeration.

static Glib::RefPtr<Gio::DBus::ObjectManagerClient> Gio::DBus::ObjectManagerClient::create_for_bus_finish | ( | const Glib::RefPtr< AsyncResult >& | res | ) |
| static

Finishes an operation started with create_for_bus().

Parameters

  res | An AsyncResult obtained from the SlotAsyncReady passed to create_for_bus().

Returns
  A Gio::DBus::ObjectManagerClient object. If an error has occurred, a Glib::Error is thrown and nothing is returned.

Exceptions

  Glib::Error. |

static Glib::RefPtr<Gio::DBus::ObjectManagerClient> Gio::DBus::ObjectManagerClient::create_for_bus_sync | ( | BusType | bus_type,
|  | const Glib::ustring& | name,
|  | const Glib::ustring& | object_path,
|  | const Glib::RefPtr< Cancellable >& | cancellable = `{}`,
|  | const SlotProxyType& | slot_proxy_type = `{}`,
|  | ObjectManagerClientFlags | flags = `OBJECT_MANAGER_CLIENT_FLAGS_NONE`
| ) |  |
| static

Creates a new Gio::DBus::ObjectManagerClient object.

Like create_sync() but takes a Gio::DBus::BusType instead of a Gio::DBus::Connection.

This is a synchronous failable constructor - the calling thread is blocked until a reply is received. See create_for_bus() for the asynchronous version.

Parameters

  bus_type | A Gio::DBus::BusType.
  name | The owner of the control object (unique or well-known name).
  object_path | The object path of the control object.
  cancellable | A Cancellable or an empty Glib::RefPtr.
  slot_proxy_type | A SlotProxyType slot, or an empty slot to always construct GDBusProxy or GDBusObjectProxy proxies.
  flags | Zero or more flags from the Gio::DBus::ObjectManagerClientFlags enumeration.

Exceptions

  Glib::Error |

static Glib::RefPtr<Gio::DBus::ObjectManagerClient> Gio::DBus::ObjectManagerClient::create_sync | ( | const Glib::RefPtr< Connection >& | connection,
|  | const Glib::ustring& | name,
|  | const Glib::ustring& | object_path,
|  | const Glib::RefPtr< Cancellable >& | cancellable = `{}`,
|  | const SlotProxyType& | slot_proxy_type = `{}`,
|  | ObjectManagerClientFlags | flags = `OBJECT_MANAGER_CLIENT_FLAGS_NONE`
| ) |  |
| static

Creates a new Gio::DBus::ObjectManagerClient object.

This is a synchronous failable constructor - the calling thread is blocked until a reply is received. See create() for the asynchronous version.

Parameters

  connection | A Gio::DBus::Connection.
  name | The owner of the control object (unique or well-known name).
  object_path | The object path of the control object.
  cancellable | A Cancellable or an empty Glib::RefPtr.
  slot_proxy_type | A SlotProxyType slot, or an empty slot to always construct GDBusProxy or GDBusObjectProxy proxies.
  flags | Zero or more flags from the Gio::DBus::ObjectManagerClientFlags enumeration.

Exceptions

  Glib::Error |

Glib::RefPtr<Connection> Gio::DBus::ObjectManagerClient::get_connection | ( |  | ) |

Gets the DBusConnection used by manager.

Since glibmm 2.30:

Returns
  A DBusConnection object. Do not free, the object belongs to manager.

Glib::RefPtr<const Connection> Gio::DBus::ObjectManagerClient::get_connection | ( |  | ) | const

Gets the DBusConnection used by manager.

Since glibmm 2.30:

Returns
  A DBusConnection object. Do not free, the object belongs to manager.

ObjectManagerClientFlags Gio::DBus::ObjectManagerClient::get_flags | ( |  | ) | const

Gets the flags that manager was constructed with.

Since glibmm 2.30:

Returns
  Zero of more flags from the DBusObjectManagerClientFlags enumeration.

Glib::ustring Gio::DBus::ObjectManagerClient::get_name | ( |  | ) | const

Gets the name that manager is for, or `nullptr` if not a message bus connection.

Since glibmm 2.30:

Returns
  A unique or well-known name. Do not free, the string belongs to manager.

Glib::ustring Gio::DBus::ObjectManagerClient::get_name_owner | ( |  | ) | const

The unique name that owns the name that manager is for or `nullptr` if no-one currently owns that name.

You can connect to the Object::signal_notify() signal to track changes to the DBusObjectManagerClient::property_name_owner() property.

Since glibmm 2.30:

Returns
  The name owner or `nullptr` if no name owner exists.

static GType Gio::DBus::ObjectManagerClient::get_type | ( |  | ) |
| static

Get the GType for this class, for use with the underlying GObject type system.

GDBusObjectManagerClient* Gio::DBus::ObjectManagerClient::gobj | ( |  | ) |
| inline

Provides access to the underlying C GObject.

const GDBusObjectManagerClient* Gio::DBus::ObjectManagerClient::gobj | ( |  | ) | const
| inline

Provides access to the underlying C GObject.

GDBusObjectManagerClient* Gio::DBus::ObjectManagerClient::gobj_copy | ( |  | ) |

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

virtual void Gio::DBus::ObjectManagerClient::on_interface_proxy_properties_changed | ( | const Glib::RefPtr< Gio::DBus::ObjectProxy >& | object_proxy,
|  | const Glib::RefPtr< Gio::DBus::Proxy >& | interface_proxy,
|  | const MapChangedProperties& | changed_properties,
|  | const std::vector< Glib::ustring >& | invalidated_properties
| ) |  |
| protected virtual

This is a default handler for the signal signal_interface_proxy_properties_changed().

virtual void Gio::DBus::ObjectManagerClient::on_interface_proxy_signal | ( | const Glib::RefPtr< Gio::DBus::ObjectProxy >& | object_proxy,
|  | const Glib::RefPtr< Gio::DBus::Proxy >& | interface_proxy,
|  | const Glib::ustring& | sender_name,
|  | const Glib::ustring& | signal_name,
|  | const Glib::VariantContainerBase& | parameters
| ) |  |
| protected virtual

This is a default handler for the signal signal_interface_proxy_signal().

ObjectManagerClient& Gio::DBus::ObjectManagerClient::operator= | ( | ObjectManagerClient&& | src | ) |
| noexcept

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Connection> > Gio::DBus::ObjectManagerClient::property_connection | ( |  | ) | const

The DBusConnection to use.

Since glibmm 2.30:

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< ObjectManagerClientFlags > Gio::DBus::ObjectManagerClient::property_flags | ( |  | ) | const

Flags from the DBusObjectManagerClientFlags enumeration.

Since glibmm 2.30:

Default value: DBUS_OBJECT_MANAGER_CLIENT_FLAGS_NONE

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< Glib::ustring > Gio::DBus::ObjectManagerClient::property_name | ( |  | ) | const

The well-known name or unique name that the manager is for.

Since glibmm 2.30:

Default value: ""

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< Glib::ustring > Gio::DBus::ObjectManagerClient::property_name_owner | ( |  | ) | const

The unique name that owns DBusObjectManagerClient::property_name() or `nullptr` if no-one is currently owning the name.

Connect to the Object::signal_notify() signal to track changes to this property.

Since glibmm 2.30:

Default value: ""

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

Glib::PropertyProxy_ReadOnly< Glib::ustring > Gio::DBus::ObjectManagerClient::property_object_path | ( |  | ) | const

The object path the manager is for.

Since glibmm 2.30:

Default value: ""

Returns
  A PropertyProxy_ReadOnly that allows you to get the value of the property, or receive notification when the value of the property changes.

Glib::SignalProxy< void,const Glib::RefPtr<Gio::DBus::ObjectProxy>&,const Glib::RefPtr<Gio::DBus::Proxy>&,const MapChangedProperties&,const std::vector<Glib::ustring>& > Gio::DBus::ObjectManagerClient::signal_interface_proxy_properties_changed | ( |  | ) |

Slot Prototype:
  `void on_my_interface_proxy_properties_changed(const Glib::RefPtr<Gio::DBus::ObjectProxy>& object_proxy, const Glib::RefPtr<Gio::DBus::Proxy>& interface_proxy, const MapChangedProperties& changed_properties, const std::vector<Glib::ustring>& invalidated_properties)`

Flags: Run Last

Emitted when one or more D-Bus properties on proxy changes. The local cache has already been updated when this signal fires. Note that both changed_properties and invalidated_properties are guaranteed to never be `nullptr` (either may be empty though).

This signal exists purely as a convenience to avoid having to connect signals to all interface proxies managed by manager.

This signal is emitted in the [thread-default main context][g-main-context-push-thread-default] that manager was constructed in.

Since glibmm 2.30:

Parameters

  object_proxy | The DBusObjectProxy on which an interface has properties that are changing.
  interface_proxy | The DBusProxy that has properties that are changing.
  changed_properties | A Variant containing the properties that changed (type: `a{sv}`).
  invalidated_properties | A `nullptr` terminated array of properties that were invalidated.

Glib::SignalProxy< void,const Glib::RefPtr<Gio::DBus::ObjectProxy>&,const Glib::RefPtr<Gio::DBus::Proxy>&,const Glib::ustring&,const Glib::ustring&,const Glib::VariantContainerBase& > Gio::DBus::ObjectManagerClient::signal_interface_proxy_signal | ( |  | ) |

Slot Prototype:
  `void on_my_interface_proxy_signal(const Glib::RefPtr<Gio::DBus::ObjectProxy>& object_proxy, const Glib::RefPtr<Gio::DBus::Proxy>& interface_proxy, const Glib::ustring& sender_name, const Glib::ustring& signal_name, const Glib::VariantContainerBase& parameters)`

Flags: Run Last

Emitted when a D-Bus signal is received on interface_proxy.

This signal exists purely as a convenience to avoid having to connect signals to all interface proxies managed by manager.

This signal is emitted in the [thread-default main context][g-main-context-push-thread-default] that manager was constructed in.

Since glibmm 2.30:

Parameters

  object_proxy | The DBusObjectProxy on which an interface is emitting a D-Bus signal.
  interface_proxy | The DBusProxy that is emitting a D-Bus signal.
  sender_name | The sender of the signal or `nullptr` if the connection is not a bus connection.
  signal_name | The signal name.
  parameters | A Variant tuple with parameters for the signal.

## Friends And Related Function Documentation

Glib::RefPtr< Gio::DBus::ObjectManagerClient > wrap | ( | GDBusObjectManagerClient * | object,
|  | bool | take_copy = `false`
| ) |  |
| related

A Glib::wrap() method for this object.

Parameters

  object | The C instance.
  take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref.

Returns
  A C++ instance that wraps this C instance.