glibmm: Gio::DBus::Proxy Class Reference

glibmm 2.38.1

- 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::Proxy Class Reference
D-Bus API

A client-side proxy. More...

`#include <giomm/dbusproxy.h>`

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

## Public Types
typedef std::map < Glib::ustring, Glib::VariantBase > | MapChangedProperties
Public Types inherited from Glib::Object
typedef void(* | DestroyNotify )(gpointer data)

## Public Member Functions
virtual | ~Proxy ()
GDBusProxy* | gobj ()
| Provides access to the underlying C GObject. More...
const GDBusProxy* | gobj () const
| Provides access to the underlying C GObject. More...
GDBusProxy* | gobj_copy ()
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
ProxyFlags | get_flags () const
| Gets the flags that proxy was constructed with. More...
Glib::RefPtr< Connection > | get_connection ()
| Gets the connection proxy is for. More...
Glib::RefPtr< const Connection > | get_connection () const
| Gets the connection proxy is for. More...
Glib::ustring | get_name () const
| Gets the name that proxy was constructed for. More...
Glib::ustring | get_name_owner () const
| The unique name that owns the name that proxy is for or `0` if no-one currently owns that name. More...
Glib::ustring | get_object_path () const
| Gets the object path proxy is for. More...
Glib::ustring | get_interface_name () const
| Gets the D-Bus interface name proxy is for. More...
int | get_default_timeout () const
| Gets the timeout to use if -1 (specifying default timeout) is passed as timeout_msec in the g_dbus_proxy_call() and g_dbus_proxy_call_sync() functions. More...
void | set_default_timeout (int timeout_msec=-1)
| Sets the timeout to use if -1 (specifying default timeout) is passed as timeout_msec in the g_dbus_proxy_call() and g_dbus_proxy_call_sync() functions. More...
void | get_cached_property (Glib::VariantBase& property, const Glib::ustring& property_name) const
| Looks up the value for a property from the cache. More...
void | set_cached_property (const Glib::ustring& property_name, const Glib::VariantBase&value)
| If value is not `0`, sets the cached value for the property with name property_name to the value in value. More...
Glib::StringArrayHandle | get_cached_property_names () const
| Gets the names of all cached properties on proxy. More...
void | set_interface_info (const Glib::RefPtr< InterfaceInfo >& info)
| Ensure that interactions with proxy conform to the given interface. More...
Glib::RefPtr< InterfaceInfo > | get_interface_info ()
| Returns the DBusInterfaceInfo, if any, specifying the interface that proxy conforms to. More...
Glib::RefPtr< const InterfaceInfo > | get_interface_info () const
| Returns the DBusInterfaceInfo, if any, specifying the interface that proxy conforms to. More...
void | call (const Glib::ustring& method_name, const SlotAsyncReady& slot, const Glib::RefPtr< Cancellable >& cancellable, const Glib::VariantContainerBase& parameters=Glib::VariantContainerBase(), int timeout_msec=-1, CallFlags flags=Gio::DBus::CALL_FLAGS_NONE)
| Asynchronously invokes the method_name method on proxy. More...
void | call (const Glib::ustring& method_name, const SlotAsyncReady& slot, const Glib::VariantContainerBase& parameters=Glib::VariantContainerBase(), int timeout_msec=-1, CallFlags flags=Gio::DBus::CALL_FLAGS_NONE)
| A non-cancellable version of call(). More...
Glib::VariantContainerBase | call_finish (const Glib::RefPtr< AsyncResult >& res)
| Finishes an operation started with call(). More...
Glib::VariantContainerBase | call_sync (const Glib::ustring& method_name, const Glib::RefPtr< Cancellable >& cancellable, const Glib::VariantContainerBase& parameters=Glib::VariantContainerBase(), int timeout_msec=-1, CallFlags flags=Gio::DBus::CALL_FLAGS_NONE)
| Synchronously invokes the method_name method on proxy. More...
Glib::VariantContainerBase | call_sync (const Glib::ustring& method_name, const Glib::VariantContainerBase& parameters=Glib::VariantContainerBase(), int timeout_msec=-1, CallFlags flags=Gio::DBus::CALL_FLAGS_NONE)
| A non-cancellable version of call_sync(). More...
void | call (const Glib::ustring& method_name, const Glib::VariantContainerBase& parameters, const SlotAsyncReady& slot, const Glib::RefPtr< Cancellable >& cancellable, const Glib::RefPtr< UnixFDList >& fd_list, int timeout_msec=-1, CallFlags flags=Gio::DBus::CALL_FLAGS_NONE)
| Like call() but also takes a GUnixFDList object. More...
void | call (const Glib::ustring& method_name, const Glib::VariantContainerBase& parameters, const SlotAsyncReady& slot, const Glib::RefPtr< UnixFDList >& fd_list, int timeout_msec=-1, CallFlags flags=Gio::DBus::CALL_FLAGS_NONE)
| A non-cancellable version of call() (with a UnixFDList). More...
Glib::VariantContainerBase | call_finish (const Glib::RefPtr< AsyncResult >& res, Glib::RefPtr< UnixFDList >& out_fd_list)
| Finishes an operation started with call() (with a UnixFDList). More...
Glib::VariantContainerBase | call_sync (const Glib::ustring& method_name, const Glib::VariantContainerBase& parameters, const Glib::RefPtr< Cancellable >& cancellable, const Glib::RefPtr< UnixFDList >& fd_list, Glib::RefPtr< UnixFDList >& out_fd_list, int timeout_msec=-1, CallFlags flags=Gio::DBus::CALL_FLAGS_NONE)
| Like g_dbus_proxy_call_sync() but also takes and returns UnixFDList objects. More...
Glib::VariantContainerBase | call_sync (const Glib::ustring& method_name, const Glib::VariantContainerBase& parameters, const Glib::RefPtr< UnixFDList >& fd_list, Glib::RefPtr< UnixFDList >& out_fd_list, int timeout_msec=-1, CallFlags flags=Gio::DBus::CALL_FLAGS_NONE)
| A call_sync() convenience overload. More...
Glib::PropertyProxy_ReadOnly < Glib::RefPtr< Connection > > | property_g_connection () const
| The connection the proxy is for. More...
Glib::PropertyProxy< int > | property_g_default_timeout ()
| Timeout for remote method invocation. More...
Glib::PropertyProxy_ReadOnly< int > | property_g_default_timeout () const
| Timeout for remote method invocation. More...
Glib::PropertyProxy_ReadOnly < ProxyFlags > | property_g_flags () const
| Flags for the proxy. More...
Glib::PropertyProxy < Glib::RefPtr< InterfaceInfo > > | property_g_interface_info ()
| Interface Information. More...
Glib::PropertyProxy_ReadOnly < Glib::RefPtr< InterfaceInfo > > | property_g_interface_info () const
| Interface Information. More...
Glib::PropertyProxy_ReadOnly < Glib::ustring > | property_g_interface_name () const
| The D-Bus interface name the proxy is for. More...
Glib::PropertyProxy_ReadOnly < Glib::ustring > | property_g_name () const
| The well-known or unique name that the proxy is for. More...
Glib::PropertyProxy_ReadOnly < Glib::ustring > | property_g_name_owner () const
| The unique name for the owner. More...
Glib::PropertyProxy_ReadOnly < Glib::ustring > | property_g_object_path () const
| The object path the proxy is for. More...
Glib::SignalProxy2< void, const MapChangedProperties &, const std::vector < Glib::ustring >& > | signal_properties_changed ()
Glib::SignalProxy3< void, const Glib::ustring&, const Glib::ustring&, const Glib::VariantContainerBase& > | signal_signal ()
Public Member Functions inherited from Glib::Object
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
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, but this is necessary when using the reduced API. 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, but this is necessary when using the reduced API. 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 Gio::Initable
virtual | ~Initable ()
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 (const Glib::Interface_Class& interface_class)
| Called by constructors of derived classes. More...
| Interface (GObject* castitem)
| Called by constructors of derived classes. More...
virtual | ~Interface ()
GObject* | gobj ()
const GObject* | gobj () const
Public Member Functions inherited from Gio::AsyncInitable
virtual | ~AsyncInitable ()
GAsyncInitable* | gobj ()
| Provides access to the underlying C GObject. More...
const GAsyncInitable* | gobj () const
| Provides access to the underlying C GObject. More...

## 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 Glib::ustring& interface_name, const SlotAsyncReady& slot, const Glib::RefPtr< Cancellable >& cancellable, const Glib::RefPtr< InterfaceInfo >& info=Glib::RefPtr< InterfaceInfo >(), ProxyFlags flags=PROXY_FLAGS_NONE)
| Creates a proxy for accessing interface_name on the remote object at object_path owned by name at connection and asynchronously loads D-Bus properties unless the DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used. More...
static void | create (const Glib::RefPtr< Connection >& connection, const Glib::ustring& name, const Glib::ustring& object_path, const Glib::ustring& interface_name, const SlotAsyncReady& slot, const Glib::RefPtr< InterfaceInfo >& info=Glib::RefPtr< InterfaceInfo >(), ProxyFlags flags=PROXY_FLAGS_NONE)
| Non-cancellable version of create(). More...
static Glib::RefPtr< Proxy > | create_finish (const Glib::RefPtr< AsyncResult >& res)
| Finishes creating a DBusProxy. More...
static Glib::RefPtr< Proxy > | create_sync (const Glib::RefPtr< Connection >& connection, const Glib::ustring& name, const Glib::ustring& object_path, const Glib::ustring& interface_name, const Glib::RefPtr< Cancellable >& cancellable, const Glib::RefPtr< InterfaceInfo >& info=Glib::RefPtr< InterfaceInfo >(), ProxyFlags flags=PROXY_FLAGS_NONE)
| Creates a proxy for accessing interface_name on the remote object at object_path owned by name at connection and synchronously loads D-Bus properties unless the DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used. More...
static Glib::RefPtr< Proxy > | create_sync (const Glib::RefPtr< Connection >& connection, const Glib::ustring& name, const Glib::ustring& object_path, const Glib::ustring& interface_name, const Glib::RefPtr< InterfaceInfo >& info=Glib::RefPtr< InterfaceInfo >(), ProxyFlags flags=PROXY_FLAGS_NONE)
| Non-cancellable version of create_sync(). More...
static void | create_for_bus (BusType bus_type, const Glib::ustring& name, const Glib::ustring& object_path, const Glib::ustring& interface_name, const SlotAsyncReady& slot, const Glib::RefPtr< Cancellable >& cancellable, const Glib::RefPtr< InterfaceInfo >& info=Glib::RefPtr< InterfaceInfo >(), ProxyFlags flags=PROXY_FLAGS_NONE)
| Like g_dbus_proxy_new() but takes a BusType instead of a DBusConnection. More...
static void | create_for_bus (BusType bus_type, const Glib::ustring& name, const Glib::ustring& object_path, const Glib::ustring& interface_name, const SlotAsyncReady& slot, const Glib::RefPtr< InterfaceInfo >& info=Glib::RefPtr< InterfaceInfo >(), ProxyFlags flags=PROXY_FLAGS_NONE)
| Non-cancellable version of create_for_bus(). More...
static Glib::RefPtr< Proxy > | create_for_bus_finish (const Glib::RefPtr< AsyncResult >& res)
| Finishes creating a DBusProxy. More...
static Glib::RefPtr< Proxy > | create_for_bus_sync (BusType bus_type, const Glib::ustring& name, const Glib::ustring& object_path, const Glib::ustring& interface_name, const Glib::RefPtr< Cancellable >& cancellable, const Glib::RefPtr< InterfaceInfo >& info=Glib::RefPtr< InterfaceInfo >(), ProxyFlags flags=PROXY_FLAGS_NONE)
| Like g_dbus_proxy_new_sync() but takes a BusType instead of a DBusConnection. More...
static Glib::RefPtr< Proxy > | create_for_bus_sync (BusType bus_type, const Glib::ustring& name, const Glib::ustring& object_path, const Glib::ustring& interface_name, const Glib::RefPtr< InterfaceInfo >& info=Glib::RefPtr< InterfaceInfo >(), ProxyFlags flags=PROXY_FLAGS_NONE)
| Non-cancellable version of create_for_bus_sync(). 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...

## Protected Member Functions
| Proxy (const Glib::RefPtr< Connection >& connection, const Glib::ustring& name, const Glib::ustring& object_path, const Glib::ustring& interface_name, const SlotAsyncReady& slot, const Glib::RefPtr< Cancellable >& cancellable, const Glib::RefPtr< InterfaceInfo >& info=Glib::RefPtr< InterfaceInfo >(), ProxyFlags flags=PROXY_FLAGS_NONE)
| Proxy (const Glib::RefPtr< Connection >& connection, const Glib::ustring& name, const Glib::ustring& object_path, const Glib::ustring& interface_name, const SlotAsyncReady& slot, const Glib::RefPtr< InterfaceInfo >& info=Glib::RefPtr< InterfaceInfo >(), ProxyFlags flags=PROXY_FLAGS_NONE)
| Proxy (const Glib::RefPtr< Connection >& connection, const Glib::ustring& name, const Glib::ustring& object_path, const Glib::ustring& interface_name, const Glib::RefPtr< Cancellable >& cancellable, const Glib::RefPtr< InterfaceInfo >& info=Glib::RefPtr< InterfaceInfo >(), ProxyFlags flags=PROXY_FLAGS_NONE)
| Proxy (const Glib::RefPtr< Connection >& connection, const Glib::ustring& name, const Glib::ustring& object_path, const Glib::ustring& interface_name, const Glib::RefPtr< InterfaceInfo >& info=Glib::RefPtr< InterfaceInfo >(), ProxyFlags flags=PROXY_FLAGS_NONE)
| Proxy (BusType bus_type, const Glib::ustring& name, const Glib::ustring& object_path, const Glib::ustring& interface_name, const SlotAsyncReady& slot, const Glib::RefPtr< Cancellable >& cancellable, const Glib::RefPtr< InterfaceInfo >& info=Glib::RefPtr< InterfaceInfo >(), ProxyFlags flags=PROXY_FLAGS_NONE)
| Proxy (BusType bus_type, const Glib::ustring& name, const Glib::ustring& object_path, const Glib::ustring& interface_name, const SlotAsyncReady& slot, const Glib::RefPtr< InterfaceInfo >& info=Glib::RefPtr< InterfaceInfo >(), ProxyFlags flags=PROXY_FLAGS_NONE)
| Proxy (BusType bus_type, const Glib::ustring& name, const Glib::ustring& object_path, const Glib::ustring& interface_name, const Glib::RefPtr< Cancellable >& cancellable, const Glib::RefPtr< InterfaceInfo >& info=Glib::RefPtr< InterfaceInfo >(), ProxyFlags flags=PROXY_FLAGS_NONE)
| Proxy (BusType bus_type, const Glib::ustring& name, const Glib::ustring& object_path, const Glib::ustring& interface_name, const Glib::RefPtr< InterfaceInfo >& info=Glib::RefPtr< InterfaceInfo >(), ProxyFlags flags=PROXY_FLAGS_NONE)
virtual void | on_properties_changed (const MapChangedProperties& changed_properties, const std::vector< Glib::ustring >& invalidated_properties)
| This is a default handler for the signal signal_properties_changed(). More...
virtual void | on_signal (const Glib::ustring& sender_name, const Glib::ustring& signal_name, const Glib::VariantContainerBase& parameters)
| This is a default handler for the signal signal_signal(). More...
Protected Member Functions inherited from Glib::Object
| Object ()
| Object (const Glib::ConstructParams& construct_params)
| Object (GObject* castitem)
virtual | ~Object ()
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...
virtual | ~ObjectBase ()=0
void | initialize (GObject* castitem)
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 `0` 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)

## Related Functions
(Note that these are not member functions.)
Glib::RefPtr< Gio::DBus::Proxy > | wrap (GDBusProxy* 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...

## Detailed Description

A client-side proxy.

This is a base class used for proxies to access a D-Bus interface on a remote object. It can be constructed for both well-known and unique names.

By default, Proxy will cache all properties (and listen to changes) of the remote object, and proxy all signals that gets emitted. This behaviour can be changed by passing suitable ProxyFlags when the proxy is created. If the proxy is for a well-known name, the property cache is flushed when the name owner vanishes and reloaded when a name owner appears.

If a Proxy is used for a well-known name, the owner of the name is tracked and can be read from property_g_name_owner().

The generic signal_g_properties_changed() and signal_g_signal() signals are not very convenient to work with. Therefore, the recommended way of working with proxies is to subclass Proxy, and have more natural properties and signals in your derived class.

This documentation was adapted from the C API documentation. The C API docs has more information and an example.

Since glibmm 2.28:

## Member Typedef Documentation

typedef std::map<Glib::ustring, Glib::VariantBase> Gio::DBus::Proxy::MapChangedProperties

## Constructor & Destructor Documentation

virtual Gio::DBus::Proxy::~Proxy | ( |  | ) |
| virtual

Gio::DBus::Proxy::Proxy | ( | const Glib::RefPtr< Connection >& | connection,
|  | const Glib::ustring& | name,
|  | const Glib::ustring& | object_path,
|  | const Glib::ustring& | interface_name,
|  | const SlotAsyncReady& | slot,
|  | const Glib::RefPtr< Cancellable >& | cancellable,
|  | const Glib::RefPtr< InterfaceInfo >& | info = `Glib::RefPtr< InterfaceInfo >()`,
|  | ProxyFlags | flags = `PROXY_FLAGS_NONE`
| ) |  |
| protected

Gio::DBus::Proxy::Proxy | ( | const Glib::RefPtr< Connection >& | connection,
|  | const Glib::ustring& | name,
|  | const Glib::ustring& | object_path,
|  | const Glib::ustring& | interface_name,
|  | const SlotAsyncReady& | slot,
|  | const Glib::RefPtr< InterfaceInfo >& | info = `Glib::RefPtr< InterfaceInfo >()`,
|  | ProxyFlags | flags = `PROXY_FLAGS_NONE`
| ) |  |
| protected

Gio::DBus::Proxy::Proxy | ( | const Glib::RefPtr< Connection >& | connection,
|  | const Glib::ustring& | name,
|  | const Glib::ustring& | object_path,
|  | const Glib::ustring& | interface_name,
|  | const Glib::RefPtr< Cancellable >& | cancellable,
|  | const Glib::RefPtr< InterfaceInfo >& | info = `Glib::RefPtr< InterfaceInfo >()`,
|  | ProxyFlags | flags = `PROXY_FLAGS_NONE`
| ) |  |
| protected

Gio::DBus::Proxy::Proxy | ( | const Glib::RefPtr< Connection >& | connection,
|  | const Glib::ustring& | name,
|  | const Glib::ustring& | object_path,
|  | const Glib::ustring& | interface_name,
|  | const Glib::RefPtr< InterfaceInfo >& | info = `Glib::RefPtr< InterfaceInfo >()`,
|  | ProxyFlags | flags = `PROXY_FLAGS_NONE`
| ) |  |
| protected

Gio::DBus::Proxy::Proxy | ( | BusType | bus_type,
|  | const Glib::ustring& | name,
|  | const Glib::ustring& | object_path,
|  | const Glib::ustring& | interface_name,
|  | const SlotAsyncReady& | slot,
|  | const Glib::RefPtr< Cancellable >& | cancellable,
|  | const Glib::RefPtr< InterfaceInfo >& | info = `Glib::RefPtr< InterfaceInfo >()`,
|  | ProxyFlags | flags = `PROXY_FLAGS_NONE`
| ) |  |
| protected

Gio::DBus::Proxy::Proxy | ( | BusType | bus_type,
|  | const Glib::ustring& | name,
|  | const Glib::ustring& | object_path,
|  | const Glib::ustring& | interface_name,
|  | const SlotAsyncReady& | slot,
|  | const Glib::RefPtr< InterfaceInfo >& | info = `Glib::RefPtr< InterfaceInfo >()`,
|  | ProxyFlags | flags = `PROXY_FLAGS_NONE`
| ) |  |
| protected

Gio::DBus::Proxy::Proxy | ( | BusType | bus_type,
|  | const Glib::ustring& | name,
|  | const Glib::ustring& | object_path,
|  | const Glib::ustring& | interface_name,
|  | const Glib::RefPtr< Cancellable >& | cancellable,
|  | const Glib::RefPtr< InterfaceInfo >& | info = `Glib::RefPtr< InterfaceInfo >()`,
|  | ProxyFlags | flags = `PROXY_FLAGS_NONE`
| ) |  |
| protected

Gio::DBus::Proxy::Proxy | ( | BusType | bus_type,
|  | const Glib::ustring& | name,
|  | const Glib::ustring& | object_path,
|  | const Glib::ustring& | interface_name,
|  | const Glib::RefPtr< InterfaceInfo >& | info = `Glib::RefPtr< InterfaceInfo >()`,
|  | ProxyFlags | flags = `PROXY_FLAGS_NONE`
| ) |  |
| protected

## Member Function Documentation

void Gio::DBus::Proxy::call | ( | const Glib::ustring& | method_name,
|  | const SlotAsyncReady& | slot,
|  | const Glib::RefPtr< Cancellable >& | cancellable,
|  | const Glib::VariantContainerBase& | parameters = `Glib::VariantContainerBase()`,
|  | int | timeout_msec = `-1`,
|  | CallFlags | flags = `Gio::DBus::CALL_FLAGS_NONE`
| ) |  |

Asynchronously invokes the method_name method on proxy.

If method_name contains any dots, then name is split into interface and method name parts. This allows using proxy for invoking methods on other interfaces.

If the DBusConnection associated with proxy is closed then the operation will fail with IO_ERROR_CLOSED. If cancellable is canceled, the operation will fail with IO_ERROR_CANCELLED. If parameters contains a value not compatible with the D-Bus protocol, the operation fails with IO_ERROR_INVALID_ARGUMENT.

If the parameters Variant is floating, it is consumed. This allows convenient 'inline' use of Glib::variant_new(), e.g.:

[C example ellipted]

If proxy has an expected interface (see DBusProxy::property_g_interface_info()) and method_name is referenced by it, then the return value is checked against the return type.

This is an asynchronous method. When the operation is finished, slot will be invoked in the thread-default main loop of the thread you are calling this method from. You can then call g_dbus_proxy_call_finish() to get the result of the operation. See g_dbus_proxy_call_sync() for the synchronous version of this method.

If slot is `0` then the D-Bus method call message will be sent with the DBUS_MESSAGE_FLAGS_NO_REPLY_EXPECTED flag set.

Since glibmm 2.26:

Parameters

  method_name | Name of method to invoke.
  parameters | A Variant tuple with parameters for the signal or `0` if not passing parameters.
  flags | Flags from the DBusCallFlags enumeration.
  timeout_msec | The timeout in milliseconds (with MAXINT meaning "infinite") or -1 to use the proxy default timeout.
  cancellable | A Cancellable or `0`.
  slot | A SlotAsyncReady to call when the request is satisfied or `0` if you don't care about the result of the method invocation.
  user_data | The data to pass to callback.

void Gio::DBus::Proxy::call | ( | const Glib::ustring& | method_name,
|  | const SlotAsyncReady& | slot,
|  | const Glib::VariantContainerBase& | parameters = `Glib::VariantContainerBase()`,
|  | int | timeout_msec = `-1`,
|  | CallFlags | flags = `Gio::DBus::CALL_FLAGS_NONE`
| ) |  |

A non-cancellable version of call().

void Gio::DBus::Proxy::call | ( | const Glib::ustring& | method_name,
|  | const Glib::VariantContainerBase& | parameters,
|  | const SlotAsyncReady& | slot,
|  | const Glib::RefPtr< Cancellable >& | cancellable,
|  | const Glib::RefPtr< UnixFDList >& | fd_list,
|  | int | timeout_msec = `-1`,
|  | CallFlags | flags = `Gio::DBus::CALL_FLAGS_NONE`
| ) |  |

Like call() but also takes a GUnixFDList object.

This method is only available on UNIX.

This is an asynchronous method. When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from. You can then call call_with_unix_fd_finish() to get the result of the operation. See call_sync() for the synchronous version of this function.

Parameters

  method_name | The name of the method to invoke.
  parameters | A Glib::VariantContainerBase tuple with parameters for the method or `0` if not passing parameters.
  slot | A SlotAsyncReady to call when the request is satisfied.
  cancellable | A Cancellable.
  fd_list | A UnixFDList.
  timeout_msec | The timeout in milliseconds, -1 to use the default timeout or G_MAXINT for no timeout.
  flags | Flags from the Gio::DBus::CallFlags enumeration.

Since glibmm 2.34:

void Gio::DBus::Proxy::call | ( | const Glib::ustring& | method_name,
|  | const Glib::VariantContainerBase& | parameters,
|  | const SlotAsyncReady& | slot,
|  | const Glib::RefPtr< UnixFDList >& | fd_list,
|  | int | timeout_msec = `-1`,
|  | CallFlags | flags = `Gio::DBus::CALL_FLAGS_NONE`
| ) |  |

A non-cancellable version of call() (with a UnixFDList).

Since glibmm 2.34:

Glib::VariantContainerBase Gio::DBus::Proxy::call_finish | ( | const Glib::RefPtr< AsyncResult >& | res | ) |

Finishes an operation started with call().

Parameters

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

Returns
  A Variant tuple with return values.

Exceptions

  Glib::Error. |

Glib::VariantContainerBase Gio::DBus::Proxy::call_finish | ( | const Glib::RefPtr< AsyncResult >& | res,
|  | Glib::RefPtr< UnixFDList >& | out_fd_list
| ) |  |

Finishes an operation started with call() (with a UnixFDList).

Parameters

  res | A AsyncResult obtained from the SlotAsyncReady passed to call().

Returns
  A Variant tuple with return values.

Exceptions

  Glib::Error. |

Since glibmm 2.34:

Glib::VariantContainerBase Gio::DBus::Proxy::call_sync | ( | const Glib::ustring& | method_name,
|  | const Glib::RefPtr< Cancellable >& | cancellable,
|  | const Glib::VariantContainerBase& | parameters = `Glib::VariantContainerBase()`,
|  | int | timeout_msec = `-1`,
|  | CallFlags | flags = `Gio::DBus::CALL_FLAGS_NONE`
| ) |  |

Synchronously invokes the method_name method on proxy.

See call(), the asynchronous version of this method for more information.

Parameters

  method_name | Name of method to invoke.
  timeout_msec | The timeout in milliseconds or -1 to use the proxy default timeout.
  flags | Flags from the CallFlags enumeration.
  parameters | A Glib::VariantContainerBase tuple with parameters for the signal.
  cancellable | A Cancellable.

Returns
  A Variant tuple with return values.

Exceptions

  Glib::Error. |

Glib::VariantContainerBase Gio::DBus::Proxy::call_sync | ( | const Glib::ustring& | method_name,
|  | const Glib::VariantContainerBase& | parameters = `Glib::VariantContainerBase()`,
|  | int | timeout_msec = `-1`,
|  | CallFlags | flags = `Gio::DBus::CALL_FLAGS_NONE`
| ) |  |

A non-cancellable version of call_sync().

Glib::VariantContainerBase Gio::DBus::Proxy::call_sync | ( | const Glib::ustring& | method_name,
|  | const Glib::VariantContainerBase& | parameters,
|  | const Glib::RefPtr< Cancellable >& | cancellable,
|  | const Glib::RefPtr< UnixFDList >& | fd_list,
|  | Glib::RefPtr< UnixFDList >& | out_fd_list,
|  | int | timeout_msec = `-1`,
|  | CallFlags | flags = `Gio::DBus::CALL_FLAGS_NONE`
| ) |  |

Like g_dbus_proxy_call_sync() but also takes and returns UnixFDList objects.

This method is only available on UNIX.

Since glibmm 2.30:

Parameters

  method_name | Name of method to invoke.
  parameters | A Variant tuple with parameters for the signal or `0` if not passing parameters.
  flags | Flags from the DBusCallFlags enumeration.
  timeout_msec | The timeout in milliseconds (with MAXINT meaning "infinite") or -1 to use the proxy default timeout.
  fd_list | A UnixFDList or `0`.
  out_fd_list | Return location for a UnixFDList or `0`.
  cancellable | A Cancellable or `0`.

Returns
  `0` if error is set. Otherwise a Variant tuple with return values. Free with Glib::variant_unref().

Glib::VariantContainerBase Gio::DBus::Proxy::call_sync | ( | const Glib::ustring& | method_name,
|  | const Glib::VariantContainerBase& | parameters,
|  | const Glib::RefPtr< UnixFDList >& | fd_list,
|  | Glib::RefPtr< UnixFDList >& | out_fd_list,
|  | int | timeout_msec = `-1`,
|  | CallFlags | flags = `Gio::DBus::CALL_FLAGS_NONE`
| ) |  |

A call_sync() convenience overload.

static void Gio::DBus::Proxy::create | ( | const Glib::RefPtr< Connection >& | connection,
|  | const Glib::ustring& | name,
|  | const Glib::ustring& | object_path,
|  | const Glib::ustring& | interface_name,
|  | const SlotAsyncReady& | slot,
|  | const Glib::RefPtr< Cancellable >& | cancellable,
|  | const Glib::RefPtr< InterfaceInfo >& | info = `Glib::RefPtr< InterfaceInfo >()`,
|  | ProxyFlags | flags = `PROXY_FLAGS_NONE`
| ) |  |
| static

Creates a proxy for accessing interface_name on the remote object at object_path owned by name at connection and asynchronously loads D-Bus properties unless the DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used.

Connect to the DBusProxy::signal_g_properties_changed() signal to get notified about property changes.

If the DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up match rules for signals. Connect to the DBusProxy::signal_g_signal() signal to handle signals from the remote object.

If name is a well-known name and the DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag isn't set and no name owner currently exists, the message bus will be requested to launch a name owner for the name.

This is a failable asynchronous constructor - when the proxy is ready, slot will be invoked and you can use g_dbus_proxy_new_finish() to get the result.

See g_dbus_proxy_new_sync() and for a synchronous version of this constructor.

See <xref linkend="gdbus-wellknown-proxy"> for an example of how DBusProxy can be used.

Since glibmm 2.26:

Parameters

  connection | A DBusConnection.
  flags | Flags used when constructing the proxy.
  info | A DBusInterfaceInfo specifying the minimal interface that proxy conforms to or `0`.
  name | A bus name (well-known or unique) or `0` if connection is not a message bus connection.
  object_path | An object path.
  interface_name | A D-Bus interface name.
  cancellable | A Cancellable or `0`.
  slot | Callback function to invoke when the proxy is ready.
  user_data | User data to pass to callback.

static void Gio::DBus::Proxy::create | ( | const Glib::RefPtr< Connection >& | connection,
|  | const Glib::ustring& | name,
|  | const Glib::ustring& | object_path,
|  | const Glib::ustring& | interface_name,
|  | const SlotAsyncReady& | slot,
|  | const Glib::RefPtr< InterfaceInfo >& | info = `Glib::RefPtr< InterfaceInfo >()`,
|  | ProxyFlags | flags = `PROXY_FLAGS_NONE`
| ) |  |
| static

Non-cancellable version of create().

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

Finishes creating a DBusProxy.

Since glibmm 2.26:

Parameters

  res | A AsyncResult obtained from the SlotAsyncReady function passed to g_dbus_proxy_new().

Returns
  A DBusProxy or `0` if error is set. Free with Glib::object_unref().

Exceptions

  Glib::Error. |

static void Gio::DBus::Proxy::create_for_bus | ( | BusType | bus_type,
|  | const Glib::ustring& | name,
|  | const Glib::ustring& | object_path,
|  | const Glib::ustring& | interface_name,
|  | const SlotAsyncReady& | slot,
|  | const Glib::RefPtr< Cancellable >& | cancellable,
|  | const Glib::RefPtr< InterfaceInfo >& | info = `Glib::RefPtr< InterfaceInfo >()`,
|  | ProxyFlags | flags = `PROXY_FLAGS_NONE`
| ) |  |
| static

Like g_dbus_proxy_new() but takes a BusType instead of a DBusConnection.

See <xref linkend="gdbus-wellknown-proxy"> for an example of how DBusProxy can be used.

Since glibmm 2.26:

Parameters

  bus_type | A BusType.
  flags | Flags used when constructing the proxy.
  info | A DBusInterfaceInfo specifying the minimal interface that proxy conforms to or `0`.
  name | A bus name (well-known or unique).
  object_path | An object path.
  interface_name | A D-Bus interface name.
  cancellable | A Cancellable or `0`.
  slot | Callback function to invoke when the proxy is ready.
  user_data | User data to pass to callback.

static void Gio::DBus::Proxy::create_for_bus | ( | BusType | bus_type,
|  | const Glib::ustring& | name,
|  | const Glib::ustring& | object_path,
|  | const Glib::ustring& | interface_name,
|  | const SlotAsyncReady& | slot,
|  | const Glib::RefPtr< InterfaceInfo >& | info = `Glib::RefPtr< InterfaceInfo >()`,
|  | ProxyFlags | flags = `PROXY_FLAGS_NONE`
| ) |  |
| static

Non-cancellable version of create_for_bus().

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

Finishes creating a DBusProxy.

Since glibmm 2.26:

Parameters

  res | A AsyncResult obtained from the SlotAsyncReady function passed to g_dbus_proxy_new_for_bus().

Returns
  A DBusProxy or `0` if error is set. Free with Glib::object_unref().

Exceptions

  Glib::Error. |

static Glib::RefPtr<Proxy> Gio::DBus::Proxy::create_for_bus_sync | ( | BusType | bus_type,
|  | const Glib::ustring& | name,
|  | const Glib::ustring& | object_path,
|  | const Glib::ustring& | interface_name,
|  | const Glib::RefPtr< Cancellable >& | cancellable,
|  | const Glib::RefPtr< InterfaceInfo >& | info = `Glib::RefPtr< InterfaceInfo >()`,
|  | ProxyFlags | flags = `PROXY_FLAGS_NONE`
| ) |  |
| static

Like g_dbus_proxy_new_sync() but takes a BusType instead of a DBusConnection.

See <xref linkend="gdbus-wellknown-proxy"> for an example of how DBusProxy can be used.

Since glibmm 2.26:

Parameters

  bus_type | A BusType.
  flags | Flags used when constructing the proxy.
  info | A DBusInterfaceInfo specifying the minimal interface that proxy conforms to or `0`.
  name | A bus name (well-known or unique).
  object_path | An object path.
  interface_name | A D-Bus interface name.
  cancellable | A Cancellable or `0`.

Returns
  A DBusProxy or `0` if error is set. Free with Glib::object_unref().

static Glib::RefPtr<Proxy> Gio::DBus::Proxy::create_for_bus_sync | ( | BusType | bus_type,
|  | const Glib::ustring& | name,
|  | const Glib::ustring& | object_path,
|  | const Glib::ustring& | interface_name,
|  | const Glib::RefPtr< InterfaceInfo >& | info = `Glib::RefPtr< InterfaceInfo >()`,
|  | ProxyFlags | flags = `PROXY_FLAGS_NONE`
| ) |  |
| static

Non-cancellable version of create_for_bus_sync().

static Glib::RefPtr<Proxy> Gio::DBus::Proxy::create_sync | ( | const Glib::RefPtr< Connection >& | connection,
|  | const Glib::ustring& | name,
|  | const Glib::ustring& | object_path,
|  | const Glib::ustring& | interface_name,
|  | const Glib::RefPtr< Cancellable >& | cancellable,
|  | const Glib::RefPtr< InterfaceInfo >& | info = `Glib::RefPtr< InterfaceInfo >()`,
|  | ProxyFlags | flags = `PROXY_FLAGS_NONE`
| ) |  |
| static

Creates a proxy for accessing interface_name on the remote object at object_path owned by name at connection and synchronously loads D-Bus properties unless the DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES flag is used.

If the DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS flag is not set, also sets up match rules for signals. Connect to the DBusProxy::signal_g_signal() signal to handle signals from the remote object.

If name is a well-known name and the DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag isn't set and no name owner currently exists, the message bus will be requested to launch a name owner for the name.

This is a synchronous failable constructor. See g_dbus_proxy_new() and g_dbus_proxy_new_finish() for the asynchronous version.

See <xref linkend="gdbus-wellknown-proxy"> for an example of how DBusProxy can be used.

Since glibmm 2.26:

Parameters

  connection | A DBusConnection.
  flags | Flags used when constructing the proxy.
  info | A DBusInterfaceInfo specifying the minimal interface that proxy conforms to or `0`.
  name | A bus name (well-known or unique) or `0` if connection is not a message bus connection.
  object_path | An object path.
  interface_name | A D-Bus interface name.
  cancellable | A Cancellable or `0`.

Returns
  A DBusProxy or `0` if error is set. Free with Glib::object_unref().

static Glib::RefPtr<Proxy> Gio::DBus::Proxy::create_sync | ( | const Glib::RefPtr< Connection >& | connection,
|  | const Glib::ustring& | name,
|  | const Glib::ustring& | object_path,
|  | const Glib::ustring& | interface_name,
|  | const Glib::RefPtr< InterfaceInfo >& | info = `Glib::RefPtr< InterfaceInfo >()`,
|  | ProxyFlags | flags = `PROXY_FLAGS_NONE`
| ) |  |
| static

Non-cancellable version of create_sync().

void Gio::DBus::Proxy::get_cached_property | ( | Glib::VariantBase& | property,
|  | const Glib::ustring& | property_name
| ) |  | const

Looks up the value for a property from the cache.

This call does no blocking IO.

If proxy has an expected interface (see property_g_interface_info()), then property_name (for existence) is checked against it.

Parameters

  property | An output parameter in which to hold to the variant instance that holds the value for property_name.
  property_name | Property name.

Since glibmm 2.28:

Glib::StringArrayHandle Gio::DBus::Proxy::get_cached_property_names | ( |  | ) | const

Gets the names of all cached properties on proxy.

Since glibmm 2.26:

Returns
  A `0`-terminated array of strings or `0` if proxy has no cached properties. Free the returned array with Glib::strfreev().

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

Gets the connection proxy is for.

Since glibmm 2.26:

Returns
  A DBusConnection owned by proxy. Do not free.

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

Gets the connection proxy is for.

Since glibmm 2.26:

Returns
  A DBusConnection owned by proxy. Do not free.

int Gio::DBus::Proxy::get_default_timeout | ( |  | ) | const

Gets the timeout to use if -1 (specifying default timeout) is passed as timeout_msec in the g_dbus_proxy_call() and g_dbus_proxy_call_sync() functions.

See the DBusProxy::property_g_default_timeout() property for more details.

Since glibmm 2.26:

Returns
  Timeout to use for proxy.

ProxyFlags Gio::DBus::Proxy::get_flags | ( |  | ) | const

Gets the flags that proxy was constructed with.

Since glibmm 2.26:

Returns
  Flags from the DBusProxyFlags enumeration.

Glib::RefPtr<InterfaceInfo> Gio::DBus::Proxy::get_interface_info | ( |  | ) |

Returns the DBusInterfaceInfo, if any, specifying the interface that proxy conforms to.

See the DBusProxy::property_g_interface_info() property for more details.

Since glibmm 2.26:

Returns
  A DBusInterfaceInfo or `0`. Do not unref the returned object, it is owned by proxy.

Glib::RefPtr<const InterfaceInfo> Gio::DBus::Proxy::get_interface_info | ( |  | ) | const

Returns the DBusInterfaceInfo, if any, specifying the interface that proxy conforms to.

See the DBusProxy::property_g_interface_info() property for more details.

Since glibmm 2.26:

Returns
  A DBusInterfaceInfo or `0`. Do not unref the returned object, it is owned by proxy.

Glib::ustring Gio::DBus::Proxy::get_interface_name | ( |  | ) | const

Gets the D-Bus interface name proxy is for.

Since glibmm 2.26:

Returns
  A string owned by proxy. Do not free.

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

Gets the name that proxy was constructed for.

Since glibmm 2.26:

Returns
  A string owned by proxy. Do not free.

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

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

You may connect to the Object::signal_notify() signal to track changes to the DBusProxy::property_g_name_owner() property.

Since glibmm 2.26:

Returns
  The name owner or `0` if no name owner exists. Free with Glib::free().

Glib::ustring Gio::DBus::Proxy::get_object_path | ( |  | ) | const

Gets the object path proxy is for.

Since glibmm 2.26:

Returns
  A string owned by proxy. Do not free.

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

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

GDBusProxy* Gio::DBus::Proxy::gobj | ( |  | ) |
| inline

Provides access to the underlying C GObject.

const GDBusProxy* Gio::DBus::Proxy::gobj | ( |  | ) | const
| inline

Provides access to the underlying C GObject.

GDBusProxy* Gio::DBus::Proxy::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::Proxy::on_properties_changed | ( | const MapChangedProperties& | changed_properties,
|  | const std::vector< Glib::ustring >& | invalidated_properties
| ) |  |
| protectedvirtual

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

virtual void Gio::DBus::Proxy::on_signal | ( | const Glib::ustring& | sender_name,
|  | const Glib::ustring& | signal_name,
|  | const Glib::VariantContainerBase& | parameters
| ) |  |
| protectedvirtual

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

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Connection> > Gio::DBus::Proxy::property_g_connection | ( |  | ) | const

The connection the proxy is for.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

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< int > Gio::DBus::Proxy::property_g_default_timeout | ( |  | ) |

Timeout for remote method invocation.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

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

Glib::PropertyProxy_ReadOnly< int > Gio::DBus::Proxy::property_g_default_timeout | ( |  | ) | const

Timeout for remote method invocation.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

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< ProxyFlags > Gio::DBus::Proxy::property_g_flags | ( |  | ) | const

Flags for the proxy.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

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< Glib::RefPtr<InterfaceInfo> > Gio::DBus::Proxy::property_g_interface_info | ( |  | ) |

Interface Information.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

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

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<InterfaceInfo> > Gio::DBus::Proxy::property_g_interface_info | ( |  | ) | const

Interface Information.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

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::Proxy::property_g_interface_name | ( |  | ) | const

The D-Bus interface name the proxy is for.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

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::Proxy::property_g_name | ( |  | ) | const

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

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

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::Proxy::property_g_name_owner | ( |  | ) | const

The unique name for the owner.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

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::Proxy::property_g_object_path | ( |  | ) | const

The object path the proxy is for.

You rarely need to use properties because there are get_ and set_ methods for almost all of them.

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

void Gio::DBus::Proxy::set_cached_property | ( | const Glib::ustring& | property_name,
|  | const Glib::VariantBase& | value
| ) |  |

If value is not `0`, sets the cached value for the property with name property_name to the value in value.

If value is `0`, then the cached value is removed from the property cache.

If proxy has an expected interface (see DBusProxy::property_g_interface_info()) and property_name is referenced by it, then value is checked against the type of the property.

If the value Variant is floating, it is consumed. This allows convenient 'inline' use of Glib::variant_new(), e.g.

[C example ellipted]

Normally you will not need to use this method since proxy is tracking changes using the `org.freedesktop.DBus.Properties.PropertiesChanged` D-Bus signal. However, for performance reasons an object may decide to not use this signal for some properties and instead use a proprietary out-of-band mechanism to transmit changes.

As a concrete example, consider an object with a property `ChatroomParticipants` which is an array of strings. Instead of transmitting the same (long) array every time the property changes, it is more efficient to only transmit the delta using e.g. signals `ChatroomParticipantJoined(String name)` and `ChatroomParticipantParted(String name)`.

Since glibmm 2.26:

Parameters

  property_name | Property name.
  value | Value for the property or `0` to remove it from the cache.

void Gio::DBus::Proxy::set_default_timeout | ( | int | timeout_msec = `-1` | ) |

Sets the timeout to use if -1 (specifying default timeout) is passed as timeout_msec in the g_dbus_proxy_call() and g_dbus_proxy_call_sync() functions.

See the DBusProxy::property_g_default_timeout() property for more details.

Since glibmm 2.26:

Parameters

  timeout_msec | Timeout in milliseconds.

void Gio::DBus::Proxy::set_interface_info | ( | const Glib::RefPtr< InterfaceInfo >& | info | ) |

Ensure that interactions with proxy conform to the given interface.

See the DBusProxy::property_g_interface_info() property for more details.

Since glibmm 2.26:

Parameters

  info | Minimum interface this proxy conforms to or `0` to unset.

Glib::SignalProxy2< void,const MapChangedProperties&,const std::vector<Glib::ustring>& > Gio::DBus::Proxy::signal_properties_changed | ( |  | ) |

Slot Prototype:
  `void on_my_properties_changed(const MapChangedProperties& changed_properties, const std::vector<Glib::ustring>& invalidated_properties)`

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 `0` (either may be empty though).

If the proxy has the flag DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES set, then invalidated_properties will always be empty.

This signal corresponds to the `PropertiesChanged` D-Bus signal on the `org.freedesktop.DBus.Properties` interface.

Since glibmm 2.26:

Parameters

  changed_properties | A Variant containing the properties that changed.
  invalidated_properties | A `0` terminated array of properties that was invalidated.

Glib::SignalProxy3< void,const Glib::ustring&,const Glib::ustring&,const Glib::VariantContainerBase& > Gio::DBus::Proxy::signal_signal | ( |  | ) |

Slot Prototype:
  `void on_my_signal(const Glib::ustring& sender_name, const Glib::ustring& signal_name, const Glib::VariantContainerBase& parameters)`

Emitted when a signal from the remote object and interface that proxy is for, has been received.

Since glibmm 2.26:

Parameters

  sender_name | The sender of the signal or `0` if the connection is not a bus connection.
  signal_name | The name of the signal.
  parameters | A Variant tuple with parameters for the signal.

## Friends And Related Function Documentation

Glib::RefPtr< Gio::DBus::Proxy > wrap | ( | GDBusProxy * | 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.