EggDBus Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Prerequisites | Known Implementations | Signals |
Synopsis
TestTwiddle; TestTwiddleIface; #define TEST_QUERY_INTERFACE_TWIDDLE (object_proxy) gboolean test_twiddle_broadcastz_newz_sync (TestTwiddle *instance, EggDBusCallFlags call_flags, const gchar *newz, GCancellable *cancellable, GError **error); gboolean test_twiddle_get_most_powerful_subject_sync (TestTwiddle *instance, EggDBusCallFlags call_flags, TestSubject **out_most_powerful_subject, GCancellable *cancellable, GError **error); gboolean test_twiddle_get_all_subjects_sync (TestTwiddle *instance, EggDBusCallFlags call_flags, EggDBusArraySeq **out_subject, GCancellable *cancellable, GError **error); gboolean test_twiddle_register_interface_sync (TestTwiddle *instance, EggDBusCallFlags call_flags, const gchar *object_path, gboolean impl_frob, gboolean impl_tweak, gboolean impl_twiddle, GCancellable *cancellable, GError **error); gboolean test_twiddle_unregister_interface_sync (TestTwiddle *instance, EggDBusCallFlags call_flags, const gchar *object_path, gboolean impl_frob, gboolean impl_tweak, gboolean impl_twiddle, GCancellable *cancellable, GError **error); gboolean test_twiddle_unregister_all_interfaces_sync (TestTwiddle *instance, EggDBusCallFlags call_flags, const gchar *object_path, GCancellable *cancellable, GError **error); guint test_twiddle_broadcastz_newz (TestTwiddle *instance, EggDBusCallFlags call_flags, const gchar *newz, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gboolean test_twiddle_broadcastz_newz_finish (TestTwiddle *instance, GAsyncResult *res, GError **error); guint test_twiddle_get_most_powerful_subject (TestTwiddle *instance, EggDBusCallFlags call_flags, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gboolean test_twiddle_get_most_powerful_subject_finish (TestTwiddle *instance, TestSubject **out_most_powerful_subject, GAsyncResult *res, GError **error); guint test_twiddle_get_all_subjects (TestTwiddle *instance, EggDBusCallFlags call_flags, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gboolean test_twiddle_get_all_subjects_finish (TestTwiddle *instance, EggDBusArraySeq **out_subject, GAsyncResult *res, GError **error); guint test_twiddle_register_interface (TestTwiddle *instance, EggDBusCallFlags call_flags, const gchar *object_path, gboolean impl_frob, gboolean impl_tweak, gboolean impl_twiddle, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gboolean test_twiddle_register_interface_finish (TestTwiddle *instance, GAsyncResult *res, GError **error); guint test_twiddle_unregister_interface (TestTwiddle *instance, EggDBusCallFlags call_flags, const gchar *object_path, gboolean impl_frob, gboolean impl_tweak, gboolean impl_twiddle, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gboolean test_twiddle_unregister_interface_finish (TestTwiddle *instance, GAsyncResult *res, GError **error); guint test_twiddle_unregister_all_interfaces (TestTwiddle *instance, EggDBusCallFlags call_flags, const gchar *object_path, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); gboolean test_twiddle_unregister_all_interfaces_finish (TestTwiddle *instance, GAsyncResult *res, GError **error); void test_twiddle_handle_broadcastz_newz_finish (EggDBusMethodInvocation *method_invocation); void test_twiddle_handle_get_most_powerful_subject_finish (EggDBusMethodInvocation *method_invocation, TestSubject *out_most_powerful_subject); void test_twiddle_handle_get_all_subjects_finish (EggDBusMethodInvocation *method_invocation, EggDBusArraySeq *out_subject); void test_twiddle_handle_register_interface_finish (EggDBusMethodInvocation *method_invocation); void test_twiddle_handle_unregister_interface_finish (EggDBusMethodInvocation *method_invocation); void test_twiddle_handle_unregister_all_interfaces_finish (EggDBusMethodInvocation *method_invocation); void test_twiddle_emit_signal_newz_notifz (TestTwiddle *instance, const gchar *destination, const gchar *newz);
Description
The Twiddle interface wraps the D-Bus interface com.example.Twiddle
. It is used in the EggDBus test suite.
Details
TestTwiddleIface
typedef struct { EggDBusInterfaceIface g_iface; void (* handle_broadcastz_newz) ( TestTwiddle *instance, const gchar *newz, EggDBusMethodInvocation *method_invocation); void (* handle_get_most_powerful_subject) ( TestTwiddle *instance, EggDBusMethodInvocation *method_invocation); void (* handle_get_all_subjects) ( TestTwiddle *instance, EggDBusMethodInvocation *method_invocation); void (* handle_register_interface) ( TestTwiddle *instance, const gchar *object_path, gboolean impl_frob, gboolean impl_tweak, gboolean impl_twiddle, EggDBusMethodInvocation *method_invocation); void (* handle_unregister_interface) ( TestTwiddle *instance, const gchar *object_path, gboolean impl_frob, gboolean impl_tweak, gboolean impl_twiddle, EggDBusMethodInvocation *method_invocation); void (* handle_unregister_all_interfaces) ( TestTwiddle *instance, const gchar *object_path, EggDBusMethodInvocation *method_invocation); } TestTwiddleIface;
Interface VTable for implementing the com.example.Twiddle D-Bus interface.
EggDBusInterfaceIface |
The parent interface. |
|
Broadcast newz to the world. This method will make the object emit the "NewzNotifz" signal with newz as the newz to broadcast.
|
|
Gets the most powerful subject |
|
Gets all known subjects |
|
Register a new object (or an interface) |
|
Unregister an object (or an interface of an object) |
|
Unregister all interfaces for an object |
TEST_QUERY_INTERFACE_TWIDDLE()
#define TEST_QUERY_INTERFACE_TWIDDLE(object_proxy) (TEST_TWIDDLE (egg_dbus_object_proxy_query_interface (object_proxy, TEST_TYPE_TWIDDLE)))
Convenience macro to get an interface proxy for the remote object represented
by object_proxy
. See egg_dbus_object_proxy_query_interface()
for details.
|
A EggDBusObjectProxy. |
Returns : |
An instance derived from EggDBusInterfaceProxy that implements the
TestTwiddle interface. This instance can be used to access the
com.example.Twiddle 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 .
|
test_twiddle_broadcastz_newz_sync ()
gboolean test_twiddle_broadcastz_newz_sync (TestTwiddle *instance, EggDBusCallFlags call_flags, const gchar *newz, GCancellable *cancellable, GError **error);
Broadcast newz to the world. This method will make the object emit the "NewzNotifz" signal with newz
as the newz to broadcast.
This function synchronously invokes the BroadcastzNewz() method on the com.example.Twiddle interface on the object represented by instance
.
See test_twiddle_broadcastz_newz()
for the asynchronous version of this function.
|
A TestTwiddle. |
|
Flags from EggDBusCallFlags detailing how the method should be invoked. |
|
The newz to broadcast |
|
A GCancellable or NULL .
|
|
Return location for error. |
Returns : |
TRUE if the method call succeeded, FALSE if error is set.
|
test_twiddle_get_most_powerful_subject_sync ()
gboolean test_twiddle_get_most_powerful_subject_sync (TestTwiddle *instance, EggDBusCallFlags call_flags, TestSubject **out_most_powerful_subject, GCancellable *cancellable, GError **error);
Gets the most powerful subject
This function synchronously invokes the GetMostPowerfulSubject() method on the com.example.Twiddle interface on the object represented by instance
.
See test_twiddle_get_most_powerful_subject()
for the asynchronous version of this function.
|
A TestTwiddle. |
|
Flags from EggDBusCallFlags detailing how the method should be invoked. |
|
The most powerful subject. Free with g_object_unref() .
|
|
A GCancellable or NULL .
|
|
Return location for error. |
Returns : |
TRUE if the method call succeeded, FALSE if error is set.
|
test_twiddle_get_all_subjects_sync ()
gboolean test_twiddle_get_all_subjects_sync (TestTwiddle *instance, EggDBusCallFlags call_flags, EggDBusArraySeq **out_subject, GCancellable *cancellable, GError **error);
Gets all known subjects
This function synchronously invokes the GetAllSubjects() method on the com.example.Twiddle interface on the object represented by instance
.
See test_twiddle_get_all_subjects()
for the asynchronous version of this function.
|
A TestTwiddle. |
|
Flags from EggDBusCallFlags detailing how the method should be invoked. |
|
An array of subjects. Free with g_object_unref() .
|
|
A GCancellable or NULL .
|
|
Return location for error. |
Returns : |
TRUE if the method call succeeded, FALSE if error is set.
|
test_twiddle_register_interface_sync ()
gboolean test_twiddle_register_interface_sync (TestTwiddle *instance, EggDBusCallFlags call_flags, const gchar *object_path, gboolean impl_frob, gboolean impl_tweak, gboolean impl_twiddle, GCancellable *cancellable, GError **error);
Register a new object (or an interface)
This function synchronously invokes the RegisterInterface() method on the com.example.Twiddle interface on the object represented by instance
.
See test_twiddle_register_interface()
for the asynchronous version of this function.
|
A TestTwiddle. |
|
Flags from EggDBusCallFlags detailing how the method should be invoked. |
|
The object path to register the object on |
|
Whether the object should implement the Frob interface |
|
Whether the object should implement the Tweak interface |
|
Whether the object should implement the Twiddle interface |
|
A GCancellable or NULL .
|
|
Return location for error. |
Returns : |
TRUE if the method call succeeded, FALSE if error is set.
|
test_twiddle_unregister_interface_sync ()
gboolean test_twiddle_unregister_interface_sync (TestTwiddle *instance, EggDBusCallFlags call_flags, const gchar *object_path, gboolean impl_frob, gboolean impl_tweak, gboolean impl_twiddle, GCancellable *cancellable, GError **error);
Unregister an object (or an interface of an object)
This function synchronously invokes the UnregisterInterface() method on the com.example.Twiddle interface on the object represented by instance
.
See test_twiddle_unregister_interface()
for the asynchronous version of this function.
|
A TestTwiddle. |
|
Flags from EggDBusCallFlags detailing how the method should be invoked. |
|
The object path for unregistering |
|
Remove the Frob interface if registered |
|
Remove the Tweak interface if registered |
|
Remove the Twiddle interface if registered |
|
A GCancellable or NULL .
|
|
Return location for error. |
Returns : |
TRUE if the method call succeeded, FALSE if error is set.
|
test_twiddle_unregister_all_interfaces_sync ()
gboolean test_twiddle_unregister_all_interfaces_sync (TestTwiddle *instance, EggDBusCallFlags call_flags, const gchar *object_path, GCancellable *cancellable, GError **error);
Unregister all interfaces for an object
This function synchronously invokes the UnregisterAllInterfaces() method on the com.example.Twiddle interface on the object represented by instance
.
See test_twiddle_unregister_all_interfaces()
for the asynchronous version of this function.
|
A TestTwiddle. |
|
Flags from EggDBusCallFlags detailing how the method should be invoked. |
|
The object path for unregistering |
|
A GCancellable or NULL .
|
|
Return location for error. |
Returns : |
TRUE if the method call succeeded, FALSE if error is set.
|
test_twiddle_broadcastz_newz ()
guint test_twiddle_broadcastz_newz (TestTwiddle *instance, EggDBusCallFlags call_flags, const gchar *newz, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data);
Broadcast newz to the world. This method will make the object emit the "NewzNotifz" signal with newz
as the newz to broadcast.
This function asynchronously invokes the BroadcastzNewz() method
on the com.example.Twiddle interface
on the object represented by instance
.
When the reply is ready, callback
will be called (on the main thread).
You can then call test_twiddle_broadcastz_newz_finish()
to get the result.
See test_twiddle_broadcastz_newz_sync()
for the synchronous version of this function.
|
A TestTwiddle. |
|
Flags from EggDBusCallFlags detailing how the method should be invoked. |
|
The newz to broadcast |
|
A GCancellable or NULL .
|
|
Callback to invoke when the reply is ready. |
|
User data to pass to callback .
|
Returns : |
A pending call id (never zero) that can be used with egg_dbus_connection_pending_call_cancel() or egg_dbus_connection_pending_call_block() .
|
test_twiddle_broadcastz_newz_finish ()
gboolean test_twiddle_broadcastz_newz_finish (TestTwiddle *instance, GAsyncResult *res, GError **error);
Finishes an asynchronous method invocation started with test_twiddle_broadcastz_newz()
.
|
A TestTwiddle. |
|
A GAsyncResult obtained from the GAsyncReadyCallback function passed to test_twiddle_broadcastz_newz() .
|
|
Return location for error. |
Returns : |
TRUE if the method call succeeded, FALSE if error is set.
|
test_twiddle_get_most_powerful_subject ()
guint test_twiddle_get_most_powerful_subject (TestTwiddle *instance, EggDBusCallFlags call_flags, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data);
Gets the most powerful subject
This function asynchronously invokes the GetMostPowerfulSubject() method
on the com.example.Twiddle interface
on the object represented by instance
.
When the reply is ready, callback
will be called (on the main thread).
You can then call test_twiddle_get_most_powerful_subject_finish()
to get the result.
See test_twiddle_get_most_powerful_subject_sync()
for the synchronous version of this function.
|
A TestTwiddle. |
|
Flags from EggDBusCallFlags detailing how the method should be invoked. |
|
A GCancellable or NULL .
|
|
Callback to invoke when the reply is ready. |
|
User data to pass to callback .
|
Returns : |
A pending call id (never zero) that can be used with egg_dbus_connection_pending_call_cancel() or egg_dbus_connection_pending_call_block() .
|
test_twiddle_get_most_powerful_subject_finish ()
gboolean test_twiddle_get_most_powerful_subject_finish (TestTwiddle *instance, TestSubject **out_most_powerful_subject, GAsyncResult *res, GError **error);
Finishes an asynchronous method invocation started with test_twiddle_get_most_powerful_subject()
.
|
A TestTwiddle. |
|
The most powerful subject. Free with g_object_unref() .
|
|
A GAsyncResult obtained from the GAsyncReadyCallback function passed to test_twiddle_get_most_powerful_subject() .
|
|
Return location for error. |
Returns : |
TRUE if the method call succeeded, FALSE if error is set.
|
test_twiddle_get_all_subjects ()
guint test_twiddle_get_all_subjects (TestTwiddle *instance, EggDBusCallFlags call_flags, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data);
Gets all known subjects
This function asynchronously invokes the GetAllSubjects() method
on the com.example.Twiddle interface
on the object represented by instance
.
When the reply is ready, callback
will be called (on the main thread).
You can then call test_twiddle_get_all_subjects_finish()
to get the result.
See test_twiddle_get_all_subjects_sync()
for the synchronous version of this function.
|
A TestTwiddle. |
|
Flags from EggDBusCallFlags detailing how the method should be invoked. |
|
A GCancellable or NULL .
|
|
Callback to invoke when the reply is ready. |
|
User data to pass to callback .
|
Returns : |
A pending call id (never zero) that can be used with egg_dbus_connection_pending_call_cancel() or egg_dbus_connection_pending_call_block() .
|
test_twiddle_get_all_subjects_finish ()
gboolean test_twiddle_get_all_subjects_finish (TestTwiddle *instance, EggDBusArraySeq **out_subject, GAsyncResult *res, GError **error);
Finishes an asynchronous method invocation started with test_twiddle_get_all_subjects()
.
|
A TestTwiddle. |
|
An array of subjects. Free with g_object_unref() .
|
|
A GAsyncResult obtained from the GAsyncReadyCallback function passed to test_twiddle_get_all_subjects() .
|
|
Return location for error. |
Returns : |
TRUE if the method call succeeded, FALSE if error is set.
|
test_twiddle_register_interface ()
guint test_twiddle_register_interface (TestTwiddle *instance, EggDBusCallFlags call_flags, const gchar *object_path, gboolean impl_frob, gboolean impl_tweak, gboolean impl_twiddle, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data);
Register a new object (or an interface)
This function asynchronously invokes the RegisterInterface() method
on the com.example.Twiddle interface
on the object represented by instance
.
When the reply is ready, callback
will be called (on the main thread).
You can then call test_twiddle_register_interface_finish()
to get the result.
See test_twiddle_register_interface_sync()
for the synchronous version of this function.
|
A TestTwiddle. |
|
Flags from EggDBusCallFlags detailing how the method should be invoked. |
|
The object path to register the object on |
|
Whether the object should implement the Frob interface |
|
Whether the object should implement the Tweak interface |
|
Whether the object should implement the Twiddle interface |
|
A GCancellable or NULL .
|
|
Callback to invoke when the reply is ready. |
|
User data to pass to callback .
|
Returns : |
A pending call id (never zero) that can be used with egg_dbus_connection_pending_call_cancel() or egg_dbus_connection_pending_call_block() .
|
test_twiddle_register_interface_finish ()
gboolean test_twiddle_register_interface_finish (TestTwiddle *instance, GAsyncResult *res, GError **error);
Finishes an asynchronous method invocation started with test_twiddle_register_interface()
.
|
A TestTwiddle. |
|
A GAsyncResult obtained from the GAsyncReadyCallback function passed to test_twiddle_register_interface() .
|
|
Return location for error. |
Returns : |
TRUE if the method call succeeded, FALSE if error is set.
|
test_twiddle_unregister_interface ()
guint test_twiddle_unregister_interface (TestTwiddle *instance, EggDBusCallFlags call_flags, const gchar *object_path, gboolean impl_frob, gboolean impl_tweak, gboolean impl_twiddle, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data);
Unregister an object (or an interface of an object)
This function asynchronously invokes the UnregisterInterface() method
on the com.example.Twiddle interface
on the object represented by instance
.
When the reply is ready, callback
will be called (on the main thread).
You can then call test_twiddle_unregister_interface_finish()
to get the result.
See test_twiddle_unregister_interface_sync()
for the synchronous version of this function.
|
A TestTwiddle. |
|
Flags from EggDBusCallFlags detailing how the method should be invoked. |
|
The object path for unregistering |
|
Remove the Frob interface if registered |
|
Remove the Tweak interface if registered |
|
Remove the Twiddle interface if registered |
|
A GCancellable or NULL .
|
|
Callback to invoke when the reply is ready. |
|
User data to pass to callback .
|
Returns : |
A pending call id (never zero) that can be used with egg_dbus_connection_pending_call_cancel() or egg_dbus_connection_pending_call_block() .
|
test_twiddle_unregister_interface_finish ()
gboolean test_twiddle_unregister_interface_finish (TestTwiddle *instance, GAsyncResult *res, GError **error);
Finishes an asynchronous method invocation started with test_twiddle_unregister_interface()
.
|
A TestTwiddle. |
|
A GAsyncResult obtained from the GAsyncReadyCallback function passed to test_twiddle_unregister_interface() .
|
|
Return location for error. |
Returns : |
TRUE if the method call succeeded, FALSE if error is set.
|
test_twiddle_unregister_all_interfaces ()
guint test_twiddle_unregister_all_interfaces (TestTwiddle *instance, EggDBusCallFlags call_flags, const gchar *object_path, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data);
Unregister all interfaces for an object
This function asynchronously invokes the UnregisterAllInterfaces() method
on the com.example.Twiddle interface
on the object represented by instance
.
When the reply is ready, callback
will be called (on the main thread).
You can then call test_twiddle_unregister_all_interfaces_finish()
to get the result.
See test_twiddle_unregister_all_interfaces_sync()
for the synchronous version of this function.
|
A TestTwiddle. |
|
Flags from EggDBusCallFlags detailing how the method should be invoked. |
|
The object path for unregistering |
|
A GCancellable or NULL .
|
|
Callback to invoke when the reply is ready. |
|
User data to pass to callback .
|
Returns : |
A pending call id (never zero) that can be used with egg_dbus_connection_pending_call_cancel() or egg_dbus_connection_pending_call_block() .
|
test_twiddle_unregister_all_interfaces_finish ()
gboolean test_twiddle_unregister_all_interfaces_finish (TestTwiddle *instance, GAsyncResult *res, GError **error);
Finishes an asynchronous method invocation started with test_twiddle_unregister_all_interfaces()
.
|
A TestTwiddle. |
|
A GAsyncResult obtained from the GAsyncReadyCallback function passed to test_twiddle_unregister_all_interfaces() .
|
|
Return location for error. |
Returns : |
TRUE if the method call succeeded, FALSE if error is set.
|
test_twiddle_handle_broadcastz_newz_finish ()
void test_twiddle_handle_broadcastz_newz_finish (EggDBusMethodInvocation *method_invocation);
Function to be called by implementers of the com.example.Twiddle D-Bus interface to finish handling the BroadcastzNewz() method.
|
A EggDBusMethodInvocation. |
test_twiddle_handle_get_most_powerful_subject_finish ()
void test_twiddle_handle_get_most_powerful_subject_finish (EggDBusMethodInvocation *method_invocation, TestSubject *out_most_powerful_subject);
Function to be called by implementers of the com.example.Twiddle D-Bus interface to finish handling the GetMostPowerfulSubject() method.
|
The most powerful subject |
|
A EggDBusMethodInvocation. |
test_twiddle_handle_get_all_subjects_finish ()
void test_twiddle_handle_get_all_subjects_finish (EggDBusMethodInvocation *method_invocation, EggDBusArraySeq *out_subject);
Function to be called by implementers of the com.example.Twiddle D-Bus interface to finish handling the GetAllSubjects() method.
|
An array of subjects |
|
A EggDBusMethodInvocation. |
test_twiddle_handle_register_interface_finish ()
void test_twiddle_handle_register_interface_finish (EggDBusMethodInvocation *method_invocation);
Function to be called by implementers of the com.example.Twiddle D-Bus interface to finish handling the RegisterInterface() method.
|
A EggDBusMethodInvocation. |
test_twiddle_handle_unregister_interface_finish ()
void test_twiddle_handle_unregister_interface_finish (EggDBusMethodInvocation *method_invocation);
Function to be called by implementers of the com.example.Twiddle D-Bus interface to finish handling the UnregisterInterface() method.
|
A EggDBusMethodInvocation. |
test_twiddle_handle_unregister_all_interfaces_finish ()
void test_twiddle_handle_unregister_all_interfaces_finish (EggDBusMethodInvocation *method_invocation);
Function to be called by implementers of the com.example.Twiddle D-Bus interface to finish handling the UnregisterAllInterfaces() method.
|
A EggDBusMethodInvocation. |
test_twiddle_emit_signal_newz_notifz ()
void test_twiddle_emit_signal_newz_notifz (TestTwiddle *instance, const gchar *destination, const gchar *newz);
Type safe wrapper for emitting the "newz-notifz" signal.
|
A GObject derived type implementing the TestTwiddle interface. |
|
The destination of the signal or NULL to emit signals to all listeners.
|
|
The newz being emitted |
Signal Details
The "newz-notifz"
signal
void user_function (TestTwiddle *instance, gchar *newz, gpointer user_data) : Run Last
Emitted when newz are available
|
A TestTwiddle. |
|
The newz being emitted |
|
user data set when the signal handler was connected. |