Top | ![]() |
![]() |
![]() |
![]() |
All D-Bus objects are supposed to implement the EggDBusPeer D-Bus interface. The interface is designed to be a minimal interface for checking whether the other end is reachable and, if so, what machine hosts the object.
#define EGG_DBUS_QUERY_INTERFACE_PEER(object_proxy) (EGG_DBUS_PEER (egg_dbus_object_proxy_query_interface (object_proxy, EGG_DBUS_TYPE_PEER)))
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 EggDBusPeer interface. This instance can be used to access the
org.freedesktop.DBus.Peer 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_peer_ping_sync (EggDBusPeer *instance
,EggDBusCallFlags call_flags
,GCancellable *cancellable
,GError **error
);
A method used to diagnose whether an object is reachable.
This function synchronously invokes the Ping() method on the org.freedesktop.DBus.Peer interface on the object represented by instance
.
See egg_dbus_peer_ping()
for the asynchronous version of this function.
instance |
A EggDBusPeer. |
|
call_flags |
Flags from EggDBusCallFlags detailing how the method should be invoked. |
|
cancellable |
A GCancellable or |
|
error |
Return location for error. |
gboolean egg_dbus_peer_get_machine_id_sync (EggDBusPeer *instance
,EggDBusCallFlags call_flags
,gchar **out_machine_uuid
,GCancellable *cancellable
,GError **error
);
Gets the Machine UUID of the machine hosting the object.
This function synchronously invokes the GetMachineId() method on the org.freedesktop.DBus.Peer interface on the object represented by instance
.
See egg_dbus_peer_get_machine_id()
for the asynchronous version of this function.
instance |
A EggDBusPeer. |
|
call_flags |
Flags from EggDBusCallFlags detailing how the method should be invoked. |
|
out_machine_uuid |
A Universally Unique Identifier for the machine hosting the object. See the D-Bus specification for more information about D-Bus UUIDs. Free with |
|
cancellable |
A GCancellable or |
|
error |
Return location for error. |
guint egg_dbus_peer_ping (EggDBusPeer *instance
,EggDBusCallFlags call_flags
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
A method used to diagnose whether an object is reachable.
This function asynchronously invokes the Ping() method
on the org.freedesktop.DBus.Peer 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_peer_ping_finish()
to get the result.
See egg_dbus_peer_ping_sync()
for the synchronous version of this function.
instance |
A EggDBusPeer. |
|
call_flags |
Flags from EggDBusCallFlags detailing how the method should be invoked. |
|
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_peer_ping_finish (EggDBusPeer *instance
,GAsyncResult *res
,GError **error
);
Finishes an asynchronous method invocation started with egg_dbus_peer_ping()
.
instance |
A EggDBusPeer. |
|
res |
A GAsyncResult obtained from the GAsyncReadyCallback function passed to |
|
error |
Return location for error. |
guint egg_dbus_peer_get_machine_id (EggDBusPeer *instance
,EggDBusCallFlags call_flags
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Gets the Machine UUID of the machine hosting the object.
This function asynchronously invokes the GetMachineId() method
on the org.freedesktop.DBus.Peer 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_peer_get_machine_id_finish()
to get the result.
See egg_dbus_peer_get_machine_id_sync()
for the synchronous version of this function.
instance |
A EggDBusPeer. |
|
call_flags |
Flags from EggDBusCallFlags detailing how the method should be invoked. |
|
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_peer_get_machine_id_finish (EggDBusPeer *instance
,gchar **out_machine_uuid
,GAsyncResult *res
,GError **error
);
Finishes an asynchronous method invocation started with egg_dbus_peer_get_machine_id()
.
instance |
A EggDBusPeer. |
|
out_machine_uuid |
A Universally Unique Identifier for the machine hosting the object. See the D-Bus specification for more information about D-Bus UUIDs. Free with |
|
res |
A GAsyncResult obtained from the GAsyncReadyCallback function passed to |
|
error |
Return location for error. |
void
egg_dbus_peer_handle_ping_finish (EggDBusMethodInvocation *method_invocation
);
Function to be called by implementers of the
org.freedesktop.DBus.PeerD-Bus interface to finish handling the
Ping() method.void egg_dbus_peer_handle_get_machine_id_finish (EggDBusMethodInvocation *method_invocation
,const gchar *out_machine_uuid
);
Function to be called by implementers of the
org.freedesktop.DBus.PeerD-Bus interface to finish handling the
GetMachineId() method.struct EggDBusPeerIface { EggDBusInterfaceIface g_iface; void (* handle_ping) ( EggDBusPeer *instance, EggDBusMethodInvocation *method_invocation); void (* handle_get_machine_id) ( EggDBusPeer *instance, EggDBusMethodInvocation *method_invocation); };
Interface VTable for implementing the org.freedesktop.DBus.Peer D-Bus interface.