|
| ObjectManagerClient (ObjectManagerClient &&src) noexcept |
|
ObjectManagerClient & | operator= (ObjectManagerClient &&src) noexcept |
|
| ~ObjectManagerClient () noexcept override |
|
GDBusObjectManagerClient * | gobj () |
| Provides access to the underlying C GObject.
|
|
const GDBusObjectManagerClient * | gobj () const |
| Provides access to the underlying C GObject.
|
|
GDBusObjectManagerClient * | gobj_copy () |
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
|
|
Glib::RefPtr< Connection > | get_connection () |
| Gets the Gio::DBus::Connection used by manager.
|
|
Glib::RefPtr< const Connection > | get_connection () const |
| Gets the Gio::DBus::Connection used by manager.
|
|
Flags | get_flags () const |
| Gets the flags that manager was constructed with.
|
|
Glib::ustring | get_name () const |
| Gets the name that manager is for, or nullptr if not a message bus connection.
|
|
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.
|
|
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Connection > > | property_connection () const |
| The Gio::DBus::Connection to use.
|
|
Glib::PropertyProxy_ReadOnly< Flags > | property_flags () const |
| Flags from the DBusObjectManagerClientFlags enumeration.
|
|
Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_object_path () const |
| The object path the manager is for.
|
|
Glib::PropertyProxy_ReadOnly< Glib::ustring > | property_name () const |
| The well-known name or unique name that the manager is for.
|
|
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.
|
|
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 () |
|
| 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_with_c_callback (const Quark & key, void *data, GDestroyNotify notify) |
|
void | set_data (const Quark & key, void *data, DestroyNotify notify) |
| Prefer set_data_with_c_callback() with a callback with C linkage.
|
|
void | remove_data (const QueryQuark &quark) |
|
void * | steal_data (const QueryQuark &quark) |
|
| 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.
|
|
void | get_property_value (const Glib::ustring & property_name, Glib::ValueBase & value) const |
| You probably want to use a specific property_*() accessor method instead.
|
|
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.
|
|
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.
|
|
template<class PropertyType > |
PropertyType | get_property (const Glib::ustring & property_name) const |
| You probably want to use a specific property_*() accessor method instead.
|
|
sigc::connection | 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.
|
|
sigc::connection | connect_property_changed (const Glib::ustring & property_name, sigc::slot< void()> &&slot) |
| You can use the signal_changed() signal of the property proxy instead.
|
|
void | freeze_notify () |
| Increases the freeze count on object.
|
|
void | thaw_notify () |
| Reverts the effect of a previous call to freeze_notify().
|
|
virtual void | reference () const |
| Increment the reference count for this object.
|
|
virtual void | unreference () const |
| Decrement the reference count for this object.
|
|
GObject * | gobj () |
| Provides access to the underlying C GObject.
|
|
const GObject * | gobj () const |
| Provides access to the underlying C GObject.
|
|
GObject * | gobj_copy () const |
| Give a ref-ed copy to someone. Use for direct struct access.
|
|
| Initable (Initable &&src) noexcept |
|
Initable & | operator= (Initable &&src) noexcept |
|
| ~Initable () noexcept override |
|
GInitable * | gobj () |
| Provides access to the underlying C GObject.
|
|
const GInitable * | gobj () const |
| Provides access to the underlying C GObject.
|
|
| Interface () |
| A Default constructor.
|
|
| Interface (Interface &&src) noexcept |
|
Interface & | operator= (Interface &&src) noexcept |
|
| Interface (const Glib::Interface_Class &interface_class) |
| Called by constructors of derived classes.
|
|
| Interface (GObject *castitem) |
| Called by constructors of derived classes.
|
|
| ~Interface () noexcept override |
|
| Interface (const Interface &)=delete |
|
Interface & | operator= (const Interface &)=delete |
|
GObject * | gobj () |
|
const GObject * | gobj () const |
|
| AsyncInitable (AsyncInitable &&src) noexcept |
|
AsyncInitable & | operator= (AsyncInitable &&src) noexcept |
|
| ~AsyncInitable () noexcept override |
|
GAsyncInitable * | gobj () |
| Provides access to the underlying C GObject.
|
|
const GAsyncInitable * | gobj () const |
| Provides access to the underlying C GObject.
|
|
| ObjectManager (ObjectManager &&src) noexcept |
|
ObjectManager & | operator= (ObjectManager &&src) noexcept |
|
| ~ObjectManager () noexcept override |
|
GDBusObjectManager * | gobj () |
| Provides access to the underlying C GObject.
|
|
const GDBusObjectManager * | gobj () const |
| Provides access to the underlying C GObject.
|
|
Glib::ustring | get_object_path () const |
| Gets the object path that manager is for.
|
|
std::vector< Glib::RefPtr< Gio::DBus::Object > > | get_objects () |
| Gets all DBusObject objects known to manager.
|
|
std::vector< Glib::RefPtr< const Gio::DBus::Object > > | get_objects () const |
| Gets all DBusObject objects known to manager.
|
|
Glib::RefPtr< Gio::DBus::Object > | get_object (const Glib::ustring &object_path) |
| Gets the DBusObject at object_path, if any.
|
|
Glib::RefPtr< const Gio::DBus::Object > | get_object (const Glib::ustring &object_path) const |
| Gets the DBusObject at object_path, if any.
|
|
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.
|
|
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.
|
|
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 GType | get_type () |
| Get the GType for this class, for use with the underlying GObject type system.
|
|
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={}, Flags flags=Flags::NONE) |
| Creates a new Gio::DBus::ObjectManagerClient object.
|
|
static Glib::RefPtr< Gio::DBus::ObjectManagerClient > | create_finish (const Glib::RefPtr< AsyncResult > &res) |
| Finishes an operation started with create().
|
|
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={}, Flags flags=Flags::NONE) |
| Creates a new Gio::DBus::ObjectManagerClient object.
|
|
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={}, Flags flags=Flags::NONE) |
| Creates a new Gio::DBus::ObjectManagerClient object.
|
|
static Glib::RefPtr< Gio::DBus::ObjectManagerClient > | create_for_bus_finish (const Glib::RefPtr< AsyncResult > &res) |
| Finishes an operation started with create_for_bus().
|
|
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={}, Flags flags=Flags::NONE) |
| Creates a new Gio::DBus::ObjectManagerClient object.
|
|
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.
|
|
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.
|
|
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.
|
|
|
| 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, Flags 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, Flags 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 ¶meters) |
| This is a default handler for the signal signal_interface_proxy_signal().
|
|
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().
|
|
| Object () |
|
| Object (const Glib::ConstructParams &construct_params) |
|
| Object (GObject *castitem) |
|
| ~Object () noexcept override |
|
| 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.
|
|
| ObjectBase (const char *custom_type_name) |
| A derived constructor always overrides this choice.
|
|
| 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.
|
|
| 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) |
|
| Initable () |
| You should derive from this class to use it.
|
|
void | init (const Glib::RefPtr< Cancellable > &cancellable) |
| Initializes the object implementing the interface.
|
|
void | init () |
| A init() convenience overload.
|
|
virtual bool | init_vfunc (const Glib::RefPtr< Cancellable > &cancellable, GError **error) |
|
| AsyncInitable () |
| You should derive from this class to use it.
|
|
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.
|
|
void | init_async (const SlotAsyncReady &slot, int io_priority=Glib::PRIORITY_DEFAULT) |
| Non-cancellable version of init_async().
|
|
bool | init_finish (const Glib::RefPtr< AsyncResult > &res) |
| Finishes asynchronous initialization and returns the result.
|
|
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.
|
|
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) |
|
| ObjectManager () |
| You should derive from this class to use it.
|
|
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().
|
|
virtual void | on_object_removed (const Glib::RefPtr< Gio::DBus::Object > &object) |
| This is a default handler for the signal signal_object_removed().
|
|
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().
|
|
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().
|
|
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::ObjectManagerClient::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: