Top | ![]() |
![]() |
![]() |
![]() |
#define | EGG_DBUS_QUERY_INTERFACE_PROPERTIES() |
gboolean | egg_dbus_properties_get_sync () |
gboolean | egg_dbus_properties_get_all_sync () |
gboolean | egg_dbus_properties_set_sync () |
guint | egg_dbus_properties_get () |
gboolean | egg_dbus_properties_get_finish () |
guint | egg_dbus_properties_get_all () |
gboolean | egg_dbus_properties_get_all_finish () |
guint | egg_dbus_properties_set () |
gboolean | egg_dbus_properties_set_finish () |
void | egg_dbus_properties_handle_get_finish () |
void | egg_dbus_properties_handle_get_all_finish () |
void | egg_dbus_properties_handle_set_finish () |
void | egg_dbus_properties_emit_signal_egg_dbus_changed () |
Many native APIs will have a concept of object properties or attributes. These can be exposed via the EggDBusProperties interface. The available properties and whether they are writable can be determined by using the EggDBusIntrospectable interface.
#define EGG_DBUS_QUERY_INTERFACE_PROPERTIES(object_proxy) (EGG_DBUS_PROPERTIES (egg_dbus_object_proxy_query_interface (object_proxy, EGG_DBUS_TYPE_PROPERTIES)))
Convenience macro to get an interface proxy for the remote object represented
by object_proxy
. See egg_dbus_object_proxy_query_interface()
for details.
An instance derived from EggDBusInterfaceProxy that implements the EggDBusProperties interface. This instance can be used to access the
org.freedesktop.DBus.Properties D-Bus interface on the remote object represented by object_proxy
. Do not ref or unref the returned instance,
it is owned by object_proxy
.
gboolean egg_dbus_properties_get_sync (EggDBusProperties *instance
,EggDBusCallFlags call_flags
,const gchar *interface_name
,const gchar *property_name
,EggDBusVariant **out_value
,GCancellable *cancellable
,GError **error
);
Gets the value of the property with name property_name
on the interface with name interface_name
.
This function synchronously invokes the Get() method on the org.freedesktop.DBus.Properties interface on the object represented by instance
.
See egg_dbus_properties_get()
for the asynchronous version of this function.
instance |
||
call_flags |
Flags from EggDBusCallFlags detailing how the method should be invoked. |
|
interface_name |
The name of the D-Bus interface. |
|
property_name |
The name of the property. |
|
out_value |
The value of the property. Free with |
|
cancellable |
A GCancellable or |
|
error |
Return location for error. |
gboolean egg_dbus_properties_get_all_sync (EggDBusProperties *instance
,EggDBusCallFlags call_flags
,const gchar *interface_name
,EggDBusHashMap **out_properties
,GCancellable *cancellable
,GError **error
);
Gets all properties on the interface with the name interface_name
.
This function synchronously invokes the GetAll() method on the org.freedesktop.DBus.Properties interface on the object represented by instance
.
See egg_dbus_properties_get_all()
for the asynchronous version of this function.
instance |
||
call_flags |
Flags from EggDBusCallFlags detailing how the method should be invoked. |
|
interface_name |
The name of the D-Bus interface. |
|
out_properties |
A dictionary containing all the properties. Free with |
|
cancellable |
A GCancellable or |
|
error |
Return location for error. |
gboolean egg_dbus_properties_set_sync (EggDBusProperties *instance
,EggDBusCallFlags call_flags
,const gchar *interface_name
,const gchar *property_name
,EggDBusVariant *value
,GCancellable *cancellable
,GError **error
);
Sets the value of the property with name property_name
on the interface with name interface_name
to value
.
This function synchronously invokes the Set() method on the org.freedesktop.DBus.Properties interface on the object represented by instance
.
See egg_dbus_properties_set()
for the asynchronous version of this function.
instance |
||
call_flags |
Flags from EggDBusCallFlags detailing how the method should be invoked. |
|
interface_name |
The name of the D-Bus interface. |
|
property_name |
The name of the property. |
|
value |
The value to set. |
|
cancellable |
A GCancellable or |
|
error |
Return location for error. |
guint egg_dbus_properties_get (EggDBusProperties *instance
,EggDBusCallFlags call_flags
,const gchar *interface_name
,const gchar *property_name
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Gets the value of the property with name property_name
on the interface with name interface_name
.
This function asynchronously invokes the Get() method
on the org.freedesktop.DBus.Properties interface
on the object represented by instance
.
When the reply is ready, callback
will be called (on the main thread).
You can then call egg_dbus_properties_get_finish()
to get the result.
See egg_dbus_properties_get_sync()
for the synchronous version of this function.
instance |
||
call_flags |
Flags from EggDBusCallFlags detailing how the method should be invoked. |
|
interface_name |
The name of the D-Bus interface. |
|
property_name |
The name of the property. |
|
cancellable |
A GCancellable or |
|
callback |
Callback to invoke when the reply is ready. |
|
user_data |
User data to pass to |
A pending call id (never zero) that can be used with egg_dbus_connection_pending_call_cancel()
or egg_dbus_connection_pending_call_block()
.
gboolean egg_dbus_properties_get_finish (EggDBusProperties *instance
,EggDBusVariant **out_value
,GAsyncResult *res
,GError **error
);
Finishes an asynchronous method invocation started with egg_dbus_properties_get()
.
instance |
||
out_value |
The value of the property. Free with |
|
res |
A GAsyncResult obtained from the GAsyncReadyCallback function passed to |
|
error |
Return location for error. |
guint egg_dbus_properties_get_all (EggDBusProperties *instance
,EggDBusCallFlags call_flags
,const gchar *interface_name
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Gets all properties on the interface with the name interface_name
.
This function asynchronously invokes the GetAll() method
on the org.freedesktop.DBus.Properties interface
on the object represented by instance
.
When the reply is ready, callback
will be called (on the main thread).
You can then call egg_dbus_properties_get_all_finish()
to get the result.
See egg_dbus_properties_get_all_sync()
for the synchronous version of this function.
instance |
||
call_flags |
Flags from EggDBusCallFlags detailing how the method should be invoked. |
|
interface_name |
The name of the D-Bus interface. |
|
cancellable |
A GCancellable or |
|
callback |
Callback to invoke when the reply is ready. |
|
user_data |
User data to pass to |
A pending call id (never zero) that can be used with egg_dbus_connection_pending_call_cancel()
or egg_dbus_connection_pending_call_block()
.
gboolean egg_dbus_properties_get_all_finish (EggDBusProperties *instance
,EggDBusHashMap **out_properties
,GAsyncResult *res
,GError **error
);
Finishes an asynchronous method invocation started with egg_dbus_properties_get_all()
.
instance |
||
out_properties |
A dictionary containing all the properties. Free with |
|
res |
A GAsyncResult obtained from the GAsyncReadyCallback function passed to |
|
error |
Return location for error. |
guint egg_dbus_properties_set (EggDBusProperties *instance
,EggDBusCallFlags call_flags
,const gchar *interface_name
,const gchar *property_name
,EggDBusVariant *value
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Sets the value of the property with name property_name
on the interface with name interface_name
to value
.
This function asynchronously invokes the Set() method
on the org.freedesktop.DBus.Properties interface
on the object represented by instance
.
When the reply is ready, callback
will be called (on the main thread).
You can then call egg_dbus_properties_set_finish()
to get the result.
See egg_dbus_properties_set_sync()
for the synchronous version of this function.
instance |
||
call_flags |
Flags from EggDBusCallFlags detailing how the method should be invoked. |
|
interface_name |
The name of the D-Bus interface. |
|
property_name |
The name of the property. |
|
value |
The value to set. |
|
cancellable |
A GCancellable or |
|
callback |
Callback to invoke when the reply is ready. |
|
user_data |
User data to pass to |
A pending call id (never zero) that can be used with egg_dbus_connection_pending_call_cancel()
or egg_dbus_connection_pending_call_block()
.
gboolean egg_dbus_properties_set_finish (EggDBusProperties *instance
,GAsyncResult *res
,GError **error
);
Finishes an asynchronous method invocation started with egg_dbus_properties_set()
.
instance |
||
res |
A GAsyncResult obtained from the GAsyncReadyCallback function passed to |
|
error |
Return location for error. |
void egg_dbus_properties_handle_get_finish (EggDBusMethodInvocation *method_invocation
,EggDBusVariant *out_value
);
Function to be called by implementers of the
org.freedesktop.DBus.PropertiesD-Bus interface to finish handling the
Get() method.void egg_dbus_properties_handle_get_all_finish (EggDBusMethodInvocation *method_invocation
,EggDBusHashMap *out_properties
);
Function to be called by implementers of the
org.freedesktop.DBus.PropertiesD-Bus interface to finish handling the
GetAll() method.void
egg_dbus_properties_handle_set_finish (EggDBusMethodInvocation *method_invocation
);
Function to be called by implementers of the
org.freedesktop.DBus.PropertiesD-Bus interface to finish handling the
Set() method.void egg_dbus_properties_emit_signal_egg_dbus_changed (EggDBusProperties *instance
,const gchar *destination
,const gchar *interface_name
,EggDBusHashMap *changed_properties
);
Type safe wrapper for emitting the “egg-dbus-changed” signal.
instance |
A GObject derived type implementing the EggDBusProperties interface. |
|
destination |
The destination of the signal or |
|
interface_name |
The name of the D-Bus interface. |
|
changed_properties |
A dictionary containing the changed properties. |
struct EggDBusPropertiesIface { EggDBusInterfaceIface g_iface; void (* handle_get) ( EggDBusProperties *instance, const gchar *interface_name, const gchar *property_name, EggDBusMethodInvocation *method_invocation); void (* handle_get_all) ( EggDBusProperties *instance, const gchar *interface_name, EggDBusMethodInvocation *method_invocation); void (* handle_set) ( EggDBusProperties *instance, const gchar *interface_name, const gchar *property_name, EggDBusVariant *value, EggDBusMethodInvocation *method_invocation); };
Interface VTable for implementing the org.freedesktop.DBus.Properties D-Bus interface.
“egg-dbus-changed”
signalvoid user_function (EggDBusProperties *instance, gchar *interface_name, EggDBusHashMap *changed_properties, gpointer user_data)
Emitted when one or more properties change on an interface. Note: this signal is proprietary to EggDBus; no other D-Bus implementation will emit it.
instance |
||
interface_name |
The name of the D-Bus interface. |
|
changed_properties |
A dictionary containing the changed properties. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last