TestTweak

TestTweak — Tweak interface used for testing

Functions

guint test_tweak_override_properties ()
gchar * test_tweak_get_foo ()
EggDBusArraySeq * test_tweak_get_bar ()
TestPoint * test_tweak_get_baz ()
TestPair * test_tweak_get_baz_forced_to_use_pair ()
gchar * test_tweak_get_some_read_write_property ()
TestSomeExampleCType test_tweak_get_property_with_ctype ()
TestVehicle test_tweak_get_escape_vehicle ()
TestCreateFlags test_tweak_get_default_create_flags ()
void test_tweak_set_some_read_write_property ()
void test_tweak_set_property_with_ctype ()
void test_tweak_set_escape_vehicle ()
void test_tweak_set_default_create_flags ()
gboolean test_tweak_block_until_rw_property_changes_sync ()
gboolean test_tweak_change_readable_property_sync ()
gboolean test_tweak_i_can_haz_greetingz_sync ()
gboolean test_tweak_broadcastz_newz_sync ()
gboolean test_tweak_get_server_unique_name_sync ()
gboolean test_tweak_long_running_method_sync ()
gboolean test_tweak_return_gerror_sync ()
gboolean test_tweak_method_struct_disambiguation_sync ()
gboolean test_tweak_method_with_ctypes_sync ()
guint test_tweak_block_until_rw_property_changes ()
gboolean test_tweak_block_until_rw_property_changes_finish ()
guint test_tweak_change_readable_property ()
gboolean test_tweak_change_readable_property_finish ()
guint test_tweak_i_can_haz_greetingz ()
gboolean test_tweak_i_can_haz_greetingz_finish ()
guint test_tweak_broadcastz_newz ()
gboolean test_tweak_broadcastz_newz_finish ()
guint test_tweak_get_server_unique_name ()
gboolean test_tweak_get_server_unique_name_finish ()
guint test_tweak_long_running_method ()
gboolean test_tweak_long_running_method_finish ()
guint test_tweak_return_gerror ()
gboolean test_tweak_return_gerror_finish ()
guint test_tweak_method_struct_disambiguation ()
gboolean test_tweak_method_struct_disambiguation_finish ()
guint test_tweak_method_with_ctypes ()
gboolean test_tweak_method_with_ctypes_finish ()
void test_tweak_handle_block_until_rw_property_changes_finish ()
void test_tweak_handle_change_readable_property_finish ()
void test_tweak_handle_i_can_haz_greetingz_finish ()
void test_tweak_handle_broadcastz_newz_finish ()
void test_tweak_handle_get_server_unique_name_finish ()
void test_tweak_handle_long_running_method_finish ()
void test_tweak_handle_return_gerror_finish ()
void test_tweak_handle_method_struct_disambiguation_finish ()
void test_tweak_handle_method_with_ctypes_finish ()
void test_tweak_emit_signal_newz_notifz ()
void test_tweak_emit_signal_signal_struct_disambiguation ()
void test_tweak_emit_signal_signal_with_ctype ()
void test_tweak_emit_signal_escape_vehicle_changed ()

Properties

EggDBusArraySeq * bar Read
TestPoint * baz Read
TestPair * baz-forced-to-use-pair Read
TestCreateFlags default-create-flags Read / Write
TestVehicle escape-vehicle Read / Write
gchar * foo Read
gint property-with-ctype Read / Write
gchar * some-read-write-property Read / Write

Signals

void escape-vehicle-changed Run Last
void newz-notifz Run Last
void signal-struct-disambiguation Run Last
void signal-with-ctype Run Last

Types and Values

Object Hierarchy

    GInterface
    ╰── TestTweak

Description

The Tweak interface wraps the D-Bus interface com.example.Tweak. It is used in the EggDBus test suite.

Functions

test_tweak_override_properties ()

guint
test_tweak_override_properties (GObjectClass *klass,
                                guint property_id_begin);

Convenience function to override properties for a GObject derived class implementing TestTweak.

Typical usage of this function is:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
enum
{
  PROP_0
  PROP_SOME_UNRELATED_PROPERTY,
  PROP_ANOTHER_UNRELATED_PROPERTY,
  ...

  /<!-- -->* Properties from the TestTweak interface *<!-- -->/
  PROP_TEST_TWEAK_FOO,
  PROP_TEST_TWEAK_BAR,
  PROP_TEST_TWEAK_BAZ,
  PROP_TEST_TWEAK_BAZ_FORCED_TO_USE_PAIR,
  PROP_TEST_TWEAK_SOME_READ_WRITE_PROPERTY,
  PROP_TEST_TWEAK_PROPERTY_WITH_CTYPE,
  PROP_TEST_TWEAK_ESCAPE_VEHICLE,
  PROP_TEST_TWEAK_DEFAULT_CREATE_FLAGS,

  ...
};

and then in the class_init() function:

1
g_assert (test_tweak_override_properties (gobject_class, PROP_TEST_TWEAK_FOO) == PROP_TEST_TWEAK_DEFAULT_CREATE_FLAGS);

Parameters

klass

The class structure for a class deriving from GObject and implementing TestTweak.

 

property_id_begin

Property ID of first property to override.

 

Returns

Property ID of the last overridden property.


test_tweak_get_foo ()

gchar *
test_tweak_get_foo (TestTweak *instance);

C getter for the “foo” property.

Parameters

instance

A TestTweak.

 

Returns

The value of the “foo” property.


test_tweak_get_bar ()

EggDBusArraySeq *
test_tweak_get_bar (TestTweak *instance);

C getter for the “bar” property.

Parameters

instance

A TestTweak.

 

Returns

The value of the “bar” property.


test_tweak_get_baz ()

TestPoint *
test_tweak_get_baz (TestTweak *instance);

C getter for the “baz” property.

Parameters

instance

A TestTweak.

 

Returns

The value of the “baz” property.


test_tweak_get_baz_forced_to_use_pair ()

TestPair *
test_tweak_get_baz_forced_to_use_pair (TestTweak *instance);

C getter for the “baz-forced-to-use-pair” property.

Parameters

instance

A TestTweak.

 

Returns

The value of the “baz-forced-to-use-pair” property.


test_tweak_get_some_read_write_property ()

gchar *
test_tweak_get_some_read_write_property
                               (TestTweak *instance);

C getter for the “some-read-write-property” property.

Parameters

instance

A TestTweak.

 

Returns

The value of the “some-read-write-property” property.


test_tweak_get_property_with_ctype ()

TestSomeExampleCType
test_tweak_get_property_with_ctype (TestTweak *instance);

C getter for the “property-with-ctype” property.

Parameters

instance

A TestTweak.

 

Returns

The value of the “property-with-ctype” property.


test_tweak_get_escape_vehicle ()

TestVehicle
test_tweak_get_escape_vehicle (TestTweak *instance);

C getter for the “escape-vehicle” property.

Parameters

instance

A TestTweak.

 

Returns

The value of the “escape-vehicle” property.


test_tweak_get_default_create_flags ()

TestCreateFlags
test_tweak_get_default_create_flags (TestTweak *instance);

C getter for the “default-create-flags” property.

Parameters

instance

A TestTweak.

 

Returns

The value of the “default-create-flags” property.


test_tweak_set_some_read_write_property ()

void
test_tweak_set_some_read_write_property
                               (TestTweak *instance,
                                const gchar *value);

C setter for the “some-read-write-property” property.

Parameters

instance

A TestTweak.

 

value

New value for the “some-read-write-property” property.

 

test_tweak_set_property_with_ctype ()

void
test_tweak_set_property_with_ctype (TestTweak *instance,
                                    TestSomeExampleCType value);

C setter for the “property-with-ctype” property.

Parameters

instance

A TestTweak.

 

value

New value for the “property-with-ctype” property.

 

test_tweak_set_escape_vehicle ()

void
test_tweak_set_escape_vehicle (TestTweak *instance,
                               TestVehicle value);

C setter for the “escape-vehicle” property.

Parameters

instance

A TestTweak.

 

value

New value for the “escape-vehicle” property.

 

test_tweak_set_default_create_flags ()

void
test_tweak_set_default_create_flags (TestTweak *instance,
                                     TestCreateFlags value);

C setter for the “default-create-flags” property.

Parameters

instance

A TestTweak.

 

value

New value for the “default-create-flags” property.

 

test_tweak_block_until_rw_property_changes_sync ()

gboolean
test_tweak_block_until_rw_property_changes_sync
                               (TestTweak *instance,
                                EggDBusCallFlags call_flags,
                                gchar **out_new_prop_value,
                                GCancellable *cancellable,
                                GError **error);

Blocks until “SomeReadWriteProperty” changes

This function synchronously invokes the BlockUntilRWPropertyChanges() method on the com.example.Tweak interface on the object represented by instance . See test_tweak_block_until_rw_property_changes() for the asynchronous version of this function.

Parameters

instance

A TestTweak.

 

call_flags

Flags from EggDBusCallFlags detailing how the method should be invoked.

 

out_new_prop_value

The new value of “SomeReadWriteProperty”. Free with g_free().

 

cancellable

A GCancellable or NULL.

 

error

Return location for error.

 

Returns

TRUE if the method call succeeded, FALSE if error is set.


test_tweak_change_readable_property_sync ()

gboolean
test_tweak_change_readable_property_sync
                               (TestTweak *instance,
                                EggDBusCallFlags call_flags,
                                const gchar *new_value,
                                GCancellable *cancellable,
                                GError **error);

Changes the “foo” property

This function synchronously invokes the ChangeReadableProperty() method on the com.example.Tweak interface on the object represented by instance . See test_tweak_change_readable_property() for the asynchronous version of this function.

Parameters

instance

A TestTweak.

 

call_flags

Flags from EggDBusCallFlags detailing how the method should be invoked.

 

new_value

New value for the “foo” property

 

cancellable

A GCancellable or NULL.

 

error

Return location for error.

 

Returns

TRUE if the method call succeeded, FALSE if error is set.


test_tweak_i_can_haz_greetingz_sync ()

gboolean
test_tweak_i_can_haz_greetingz_sync (TestTweak *instance,
                                     EggDBusCallFlags call_flags,
                                     const gchar *greetz,
                                     gchar **out_word,
                                     GCancellable *cancellable,
                                     GError **error);

This method will take a greeting and give a rewritten greeting back

This function synchronously invokes the ICanHazGreetingz() method on the com.example.Tweak interface on the object represented by instance . See test_tweak_i_can_haz_greetingz() for the asynchronous version of this function.

Parameters

instance

A TestTweak.

 

call_flags

Flags from EggDBusCallFlags detailing how the method should be invoked.

 

greetz

Greeting to pass to method

 

out_word

Rewritten greeting. Free with g_free().

 

cancellable

A GCancellable or NULL.

 

error

Return location for error.

 

Returns

TRUE if the method call succeeded, FALSE if error is set.


test_tweak_broadcastz_newz_sync ()

gboolean
test_tweak_broadcastz_newz_sync (TestTweak *instance,
                                 EggDBusCallFlags call_flags,
                                 const gchar *newz,
                                 GCancellable *cancellable,
                                 GError **error);

Conduit to broadcast newz. This method will make the object emit the “NewzNotifz” signal using the passed in parameter newz as the news to broadcast.

This function synchronously invokes the BroadcastzNewz() method on the com.example.Tweak interface on the object represented by instance . See test_tweak_broadcastz_newz() for the asynchronous version of this function.

Parameters

instance

A TestTweak.

 

call_flags

Flags from EggDBusCallFlags detailing how the method should be invoked.

 

newz

The news to broadcast

 

cancellable

A GCancellable or NULL.

 

error

Return location for error.

 

Returns

TRUE if the method call succeeded, FALSE if error is set.


test_tweak_get_server_unique_name_sync ()

gboolean
test_tweak_get_server_unique_name_sync
                               (TestTweak *instance,
                                EggDBusCallFlags call_flags,
                                gchar **out_server_unique_name,
                                GCancellable *cancellable,
                                GError **error);

Gets the unique D-Bus name of the server

This function synchronously invokes the GetServerUniqueName() method on the com.example.Tweak interface on the object represented by instance . See test_tweak_get_server_unique_name() for the asynchronous version of this function.

Parameters

instance

A TestTweak.

 

call_flags

Flags from EggDBusCallFlags detailing how the method should be invoked.

 

out_server_unique_name

Unique D-Bus name. Free with g_free().

 

cancellable

A GCancellable or NULL.

 

error

Return location for error.

 

Returns

TRUE if the method call succeeded, FALSE if error is set.


test_tweak_long_running_method_sync ()

gboolean
test_tweak_long_running_method_sync (TestTweak *instance,
                                     EggDBusCallFlags call_flags,
                                     gint msec_to_run,
                                     GCancellable *cancellable,
                                     GError **error);

A method that takes msec_to_run milliseconds to reply

This function synchronously invokes the LongRunningMethod() method on the com.example.Tweak interface on the object represented by instance . See test_tweak_long_running_method() for the asynchronous version of this function.

Parameters

instance

A TestTweak.

 

call_flags

Flags from EggDBusCallFlags detailing how the method should be invoked.

 

msec_to_run

Number of milliseconds to wait until replying

 

cancellable

A GCancellable or NULL.

 

error

Return location for error.

 

Returns

TRUE if the method call succeeded, FALSE if error is set.


test_tweak_return_gerror_sync ()

gboolean
test_tweak_return_gerror_sync (TestTweak *instance,
                               EggDBusCallFlags call_flags,
                               const gchar *error_domain,
                               gint error_code,
                               GCancellable *cancellable,
                               GError **error);

Throws an error identified by error_domain and error_code . This is mainly for testing that we can transparently hand GError's back and forth.

This function synchronously invokes the ReturnGError() method on the com.example.Tweak interface on the object represented by instance . See test_tweak_return_gerror() for the asynchronous version of this function.

Parameters

instance

A TestTweak.

 

call_flags

Flags from EggDBusCallFlags detailing how the method should be invoked.

 

error_domain

A GError error domain

 

error_code

The error code for error_domain

 

cancellable

A GCancellable or NULL.

 

error

Return location for error.

 

Returns

TRUE if the method call succeeded, FALSE if error is set.


test_tweak_method_struct_disambiguation_sync ()

gboolean
test_tweak_method_struct_disambiguation_sync
                               (TestTweak *instance,
                                EggDBusCallFlags call_flags,
                                TestPair *pair,
                                TestPoint *point,
                                TestPoint **out_enhanced_point,
                                TestPair **out_enhanced_pair,
                                GCancellable *cancellable,
                                GError **error);

A method to check we can properly disambiguate what structure wrapper types to use

This function synchronously invokes the MethodStructDisambiguation() method on the com.example.Tweak interface on the object represented by instance . See test_tweak_method_struct_disambiguation() for the asynchronous version of this function.

Parameters

instance

A TestTweak.

 

call_flags

Flags from EggDBusCallFlags detailing how the method should be invoked.

 

pair

A pair

 

point

A point

 

out_enhanced_point

An enhanced point. Free with g_object_unref().

 

out_enhanced_pair

An enhanced pair. Free with g_object_unref().

 

cancellable

A GCancellable or NULL.

 

error

Return location for error.

 

Returns

TRUE if the method call succeeded, FALSE if error is set.


test_tweak_method_with_ctypes_sync ()

gboolean
test_tweak_method_with_ctypes_sync (TestTweak *instance,
                                    EggDBusCallFlags call_flags,
                                    TestSomeExampleCType value,
                                    TestSomeExampleCType *out_better_value,
                                    GCancellable *cancellable,
                                    GError **error);

A method to check we properly support specifying what C type to use for an integral type

This function synchronously invokes the MethodWithCTypes() method on the com.example.Tweak interface on the object represented by instance . See test_tweak_method_with_ctypes() for the asynchronous version of this function.

Parameters

instance

A TestTweak.

 

call_flags

Flags from EggDBusCallFlags detailing how the method should be invoked.

 

value

Some value

 

out_better_value

I can't believe it's a better value!

 

cancellable

A GCancellable or NULL.

 

error

Return location for error.

 

Returns

TRUE if the method call succeeded, FALSE if error is set.


test_tweak_block_until_rw_property_changes ()

guint
test_tweak_block_until_rw_property_changes
                               (TestTweak *instance,
                                EggDBusCallFlags call_flags,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

Blocks until “SomeReadWriteProperty” changes

This function asynchronously invokes the BlockUntilRWPropertyChanges() method on the com.example.Tweak 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_tweak_block_until_rw_property_changes_finish() to get the result. See test_tweak_block_until_rw_property_changes_sync() for the synchronous version of this function.

Parameters

instance

A TestTweak.

 

call_flags

Flags from EggDBusCallFlags detailing how the method should be invoked.

 

cancellable

A GCancellable or NULL.

 

callback

Callback to invoke when the reply is ready.

 

user_data

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_tweak_block_until_rw_property_changes_finish ()

gboolean
test_tweak_block_until_rw_property_changes_finish
                               (TestTweak *instance,
                                gchar **out_new_prop_value,
                                GAsyncResult *res,
                                GError **error);

Finishes an asynchronous method invocation started with test_tweak_block_until_rw_property_changes().

Parameters

instance

A TestTweak.

 

out_new_prop_value

The new value of “SomeReadWriteProperty”. Free with g_free().

 

res

A GAsyncResult obtained from the GAsyncReadyCallback function passed to test_tweak_block_until_rw_property_changes().

 

error

Return location for error.

 

Returns

TRUE if the method call succeeded, FALSE if error is set.


test_tweak_change_readable_property ()

guint
test_tweak_change_readable_property (TestTweak *instance,
                                     EggDBusCallFlags call_flags,
                                     const gchar *new_value,
                                     GCancellable *cancellable,
                                     GAsyncReadyCallback callback,
                                     gpointer user_data);

Changes the “foo” property

This function asynchronously invokes the ChangeReadableProperty() method on the com.example.Tweak 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_tweak_change_readable_property_finish() to get the result. See test_tweak_change_readable_property_sync() for the synchronous version of this function.

Parameters

instance

A TestTweak.

 

call_flags

Flags from EggDBusCallFlags detailing how the method should be invoked.

 

new_value

New value for the “foo” property

 

cancellable

A GCancellable or NULL.

 

callback

Callback to invoke when the reply is ready.

 

user_data

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_tweak_change_readable_property_finish ()

gboolean
test_tweak_change_readable_property_finish
                               (TestTweak *instance,
                                GAsyncResult *res,
                                GError **error);

Finishes an asynchronous method invocation started with test_tweak_change_readable_property().

Parameters

instance

A TestTweak.

 

res

A GAsyncResult obtained from the GAsyncReadyCallback function passed to test_tweak_change_readable_property().

 

error

Return location for error.

 

Returns

TRUE if the method call succeeded, FALSE if error is set.


test_tweak_i_can_haz_greetingz ()

guint
test_tweak_i_can_haz_greetingz (TestTweak *instance,
                                EggDBusCallFlags call_flags,
                                const gchar *greetz,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

This method will take a greeting and give a rewritten greeting back

This function asynchronously invokes the ICanHazGreetingz() method on the com.example.Tweak 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_tweak_i_can_haz_greetingz_finish() to get the result. See test_tweak_i_can_haz_greetingz_sync() for the synchronous version of this function.

Parameters

instance

A TestTweak.

 

call_flags

Flags from EggDBusCallFlags detailing how the method should be invoked.

 

greetz

Greeting to pass to method

 

cancellable

A GCancellable or NULL.

 

callback

Callback to invoke when the reply is ready.

 

user_data

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_tweak_i_can_haz_greetingz_finish ()

gboolean
test_tweak_i_can_haz_greetingz_finish (TestTweak *instance,
                                       gchar **out_word,
                                       GAsyncResult *res,
                                       GError **error);

Finishes an asynchronous method invocation started with test_tweak_i_can_haz_greetingz().

Parameters

instance

A TestTweak.

 

out_word

Rewritten greeting. Free with g_free().

 

res

A GAsyncResult obtained from the GAsyncReadyCallback function passed to test_tweak_i_can_haz_greetingz().

 

error

Return location for error.

 

Returns

TRUE if the method call succeeded, FALSE if error is set.


test_tweak_broadcastz_newz ()

guint
test_tweak_broadcastz_newz (TestTweak *instance,
                            EggDBusCallFlags call_flags,
                            const gchar *newz,
                            GCancellable *cancellable,
                            GAsyncReadyCallback callback,
                            gpointer user_data);

Conduit to broadcast newz. This method will make the object emit the “NewzNotifz” signal using the passed in parameter newz as the news to broadcast.

This function asynchronously invokes the BroadcastzNewz() method on the com.example.Tweak 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_tweak_broadcastz_newz_finish() to get the result. See test_tweak_broadcastz_newz_sync() for the synchronous version of this function.

Parameters

instance

A TestTweak.

 

call_flags

Flags from EggDBusCallFlags detailing how the method should be invoked.

 

newz

The news to broadcast

 

cancellable

A GCancellable or NULL.

 

callback

Callback to invoke when the reply is ready.

 

user_data

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_tweak_broadcastz_newz_finish ()

gboolean
test_tweak_broadcastz_newz_finish (TestTweak *instance,
                                   GAsyncResult *res,
                                   GError **error);

Finishes an asynchronous method invocation started with test_tweak_broadcastz_newz().

Parameters

instance

A TestTweak.

 

res

A GAsyncResult obtained from the GAsyncReadyCallback function passed to test_tweak_broadcastz_newz().

 

error

Return location for error.

 

Returns

TRUE if the method call succeeded, FALSE if error is set.


test_tweak_get_server_unique_name ()

guint
test_tweak_get_server_unique_name (TestTweak *instance,
                                   EggDBusCallFlags call_flags,
                                   GCancellable *cancellable,
                                   GAsyncReadyCallback callback,
                                   gpointer user_data);

Gets the unique D-Bus name of the server

This function asynchronously invokes the GetServerUniqueName() method on the com.example.Tweak 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_tweak_get_server_unique_name_finish() to get the result. See test_tweak_get_server_unique_name_sync() for the synchronous version of this function.

Parameters

instance

A TestTweak.

 

call_flags

Flags from EggDBusCallFlags detailing how the method should be invoked.

 

cancellable

A GCancellable or NULL.

 

callback

Callback to invoke when the reply is ready.

 

user_data

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_tweak_get_server_unique_name_finish ()

gboolean
test_tweak_get_server_unique_name_finish
                               (TestTweak *instance,
                                gchar **out_server_unique_name,
                                GAsyncResult *res,
                                GError **error);

Finishes an asynchronous method invocation started with test_tweak_get_server_unique_name().

Parameters

instance

A TestTweak.

 

out_server_unique_name

Unique D-Bus name. Free with g_free().

 

res

A GAsyncResult obtained from the GAsyncReadyCallback function passed to test_tweak_get_server_unique_name().

 

error

Return location for error.

 

Returns

TRUE if the method call succeeded, FALSE if error is set.


test_tweak_long_running_method ()

guint
test_tweak_long_running_method (TestTweak *instance,
                                EggDBusCallFlags call_flags,
                                gint msec_to_run,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

A method that takes msec_to_run milliseconds to reply

This function asynchronously invokes the LongRunningMethod() method on the com.example.Tweak 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_tweak_long_running_method_finish() to get the result. See test_tweak_long_running_method_sync() for the synchronous version of this function.

Parameters

instance

A TestTweak.

 

call_flags

Flags from EggDBusCallFlags detailing how the method should be invoked.

 

msec_to_run

Number of milliseconds to wait until replying

 

cancellable

A GCancellable or NULL.

 

callback

Callback to invoke when the reply is ready.

 

user_data

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_tweak_long_running_method_finish ()

gboolean
test_tweak_long_running_method_finish (TestTweak *instance,
                                       GAsyncResult *res,
                                       GError **error);

Finishes an asynchronous method invocation started with test_tweak_long_running_method().

Parameters

instance

A TestTweak.

 

res

A GAsyncResult obtained from the GAsyncReadyCallback function passed to test_tweak_long_running_method().

 

error

Return location for error.

 

Returns

TRUE if the method call succeeded, FALSE if error is set.


test_tweak_return_gerror ()

guint
test_tweak_return_gerror (TestTweak *instance,
                          EggDBusCallFlags call_flags,
                          const gchar *error_domain,
                          gint error_code,
                          GCancellable *cancellable,
                          GAsyncReadyCallback callback,
                          gpointer user_data);

Throws an error identified by error_domain and error_code . This is mainly for testing that we can transparently hand GError's back and forth.

This function asynchronously invokes the ReturnGError() method on the com.example.Tweak 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_tweak_return_gerror_finish() to get the result. See test_tweak_return_gerror_sync() for the synchronous version of this function.

Parameters

instance

A TestTweak.

 

call_flags

Flags from EggDBusCallFlags detailing how the method should be invoked.

 

error_domain

A GError error domain

 

error_code

The error code for error_domain

 

cancellable

A GCancellable or NULL.

 

callback

Callback to invoke when the reply is ready.

 

user_data

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_tweak_return_gerror_finish ()

gboolean
test_tweak_return_gerror_finish (TestTweak *instance,
                                 GAsyncResult *res,
                                 GError **error);

Finishes an asynchronous method invocation started with test_tweak_return_gerror().

Parameters

instance

A TestTweak.

 

res

A GAsyncResult obtained from the GAsyncReadyCallback function passed to test_tweak_return_gerror().

 

error

Return location for error.

 

Returns

TRUE if the method call succeeded, FALSE if error is set.


test_tweak_method_struct_disambiguation ()

guint
test_tweak_method_struct_disambiguation
                               (TestTweak *instance,
                                EggDBusCallFlags call_flags,
                                TestPair *pair,
                                TestPoint *point,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

A method to check we can properly disambiguate what structure wrapper types to use

This function asynchronously invokes the MethodStructDisambiguation() method on the com.example.Tweak 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_tweak_method_struct_disambiguation_finish() to get the result. See test_tweak_method_struct_disambiguation_sync() for the synchronous version of this function.

Parameters

instance

A TestTweak.

 

call_flags

Flags from EggDBusCallFlags detailing how the method should be invoked.

 

pair

A pair

 

point

A point

 

cancellable

A GCancellable or NULL.

 

callback

Callback to invoke when the reply is ready.

 

user_data

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_tweak_method_struct_disambiguation_finish ()

gboolean
test_tweak_method_struct_disambiguation_finish
                               (TestTweak *instance,
                                TestPoint **out_enhanced_point,
                                TestPair **out_enhanced_pair,
                                GAsyncResult *res,
                                GError **error);

Finishes an asynchronous method invocation started with test_tweak_method_struct_disambiguation().

Parameters

instance

A TestTweak.

 

out_enhanced_point

An enhanced point. Free with g_object_unref().

 

out_enhanced_pair

An enhanced pair. Free with g_object_unref().

 

res

A GAsyncResult obtained from the GAsyncReadyCallback function passed to test_tweak_method_struct_disambiguation().

 

error

Return location for error.

 

Returns

TRUE if the method call succeeded, FALSE if error is set.


test_tweak_method_with_ctypes ()

guint
test_tweak_method_with_ctypes (TestTweak *instance,
                               EggDBusCallFlags call_flags,
                               TestSomeExampleCType value,
                               GCancellable *cancellable,
                               GAsyncReadyCallback callback,
                               gpointer user_data);

A method to check we properly support specifying what C type to use for an integral type

This function asynchronously invokes the MethodWithCTypes() method on the com.example.Tweak 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_tweak_method_with_ctypes_finish() to get the result. See test_tweak_method_with_ctypes_sync() for the synchronous version of this function.

Parameters

instance

A TestTweak.

 

call_flags

Flags from EggDBusCallFlags detailing how the method should be invoked.

 

value

Some value

 

cancellable

A GCancellable or NULL.

 

callback

Callback to invoke when the reply is ready.

 

user_data

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_tweak_method_with_ctypes_finish ()

gboolean
test_tweak_method_with_ctypes_finish (TestTweak *instance,
                                      TestSomeExampleCType *out_better_value,
                                      GAsyncResult *res,
                                      GError **error);

Finishes an asynchronous method invocation started with test_tweak_method_with_ctypes().

Parameters

instance

A TestTweak.

 

out_better_value

I can't believe it's a better value!

 

res

A GAsyncResult obtained from the GAsyncReadyCallback function passed to test_tweak_method_with_ctypes().

 

error

Return location for error.

 

Returns

TRUE if the method call succeeded, FALSE if error is set.


test_tweak_handle_block_until_rw_property_changes_finish ()

void
test_tweak_handle_block_until_rw_property_changes_finish
                               (EggDBusMethodInvocation *method_invocation,
                                const gchar *out_new_prop_value);

Function to be called by implementers of the

com.example.Tweak

D-Bus interface to finish handling the

BlockUntilRWPropertyChanges() method.

Parameters

new_prop_value

The new value of “SomeReadWriteProperty”

 

method_invocation

A EggDBusMethodInvocation.

 

test_tweak_handle_change_readable_property_finish ()

void
test_tweak_handle_change_readable_property_finish
                               (EggDBusMethodInvocation *method_invocation);

Function to be called by implementers of the

com.example.Tweak

D-Bus interface to finish handling the

ChangeReadableProperty() method.

Parameters

method_invocation

A EggDBusMethodInvocation.

 

test_tweak_handle_i_can_haz_greetingz_finish ()

void
test_tweak_handle_i_can_haz_greetingz_finish
                               (EggDBusMethodInvocation *method_invocation,
                                const gchar *out_word);

Function to be called by implementers of the

com.example.Tweak

D-Bus interface to finish handling the

ICanHazGreetingz() method.

Parameters

word

Rewritten greeting

 

method_invocation

A EggDBusMethodInvocation.

 

test_tweak_handle_broadcastz_newz_finish ()

void
test_tweak_handle_broadcastz_newz_finish
                               (EggDBusMethodInvocation *method_invocation);

Function to be called by implementers of the

com.example.Tweak

D-Bus interface to finish handling the

BroadcastzNewz() method.

Parameters

method_invocation

A EggDBusMethodInvocation.

 

test_tweak_handle_get_server_unique_name_finish ()

void
test_tweak_handle_get_server_unique_name_finish
                               (EggDBusMethodInvocation *method_invocation,
                                const gchar *out_server_unique_name);

Function to be called by implementers of the

com.example.Tweak

D-Bus interface to finish handling the

GetServerUniqueName() method.

Parameters

server_unique_name

Unique D-Bus name

 

method_invocation

A EggDBusMethodInvocation.

 

test_tweak_handle_long_running_method_finish ()

void
test_tweak_handle_long_running_method_finish
                               (EggDBusMethodInvocation *method_invocation);

Function to be called by implementers of the

com.example.Tweak

D-Bus interface to finish handling the

LongRunningMethod() method.

Parameters

method_invocation

A EggDBusMethodInvocation.

 

test_tweak_handle_return_gerror_finish ()

void
test_tweak_handle_return_gerror_finish
                               (EggDBusMethodInvocation *method_invocation);

Function to be called by implementers of the

com.example.Tweak

D-Bus interface to finish handling the

ReturnGError() method.

Parameters

method_invocation

A EggDBusMethodInvocation.

 

test_tweak_handle_method_struct_disambiguation_finish ()

void
test_tweak_handle_method_struct_disambiguation_finish
                               (EggDBusMethodInvocation *method_invocation,
                                TestPoint *out_enhanced_point,
                                TestPair *out_enhanced_pair);

Function to be called by implementers of the

com.example.Tweak

D-Bus interface to finish handling the

MethodStructDisambiguation() method.

Parameters

enhanced_point

An enhanced point

 

enhanced_pair

An enhanced pair

 

method_invocation

A EggDBusMethodInvocation.

 

test_tweak_handle_method_with_ctypes_finish ()

void
test_tweak_handle_method_with_ctypes_finish
                               (EggDBusMethodInvocation *method_invocation,
                                TestSomeExampleCType out_better_value);

Function to be called by implementers of the

com.example.Tweak

D-Bus interface to finish handling the

MethodWithCTypes() method.

Parameters

better_value

I can't believe it's a better value!

 

method_invocation

A EggDBusMethodInvocation.

 

test_tweak_emit_signal_newz_notifz ()

void
test_tweak_emit_signal_newz_notifz (TestTweak *instance,
                                    const gchar *destination,
                                    const gchar *newz);

Type safe wrapper for emitting the “newz-notifz” signal.

Parameters

instance

A GObject derived type implementing the TestTweak interface.

 

destination

The destination of the signal or NULL to emit signals to all listeners.

 

newz

The newz in the tweaked world

 

test_tweak_emit_signal_signal_struct_disambiguation ()

void
test_tweak_emit_signal_signal_struct_disambiguation
                               (TestTweak *instance,
                                const gchar *destination,
                                TestPair *pair,
                                TestPoint *point);

Type safe wrapper for emitting the “signal-struct-disambiguation” signal.

Parameters

instance

A GObject derived type implementing the TestTweak interface.

 

destination

The destination of the signal or NULL to emit signals to all listeners.

 

pair

A pair

 

point

A point

 

test_tweak_emit_signal_signal_with_ctype ()

void
test_tweak_emit_signal_signal_with_ctype
                               (TestTweak *instance,
                                const gchar *destination,
                                TestSomeExampleCType better_value);

Type safe wrapper for emitting the “signal-with-ctype” signal.

Parameters

instance

A GObject derived type implementing the TestTweak interface.

 

destination

The destination of the signal or NULL to emit signals to all listeners.

 

better_value

Some value

 

test_tweak_emit_signal_escape_vehicle_changed ()

void
test_tweak_emit_signal_escape_vehicle_changed
                               (TestTweak *instance,
                                const gchar *destination,
                                TestVehicle new_escape_vehicle);

Type safe wrapper for emitting the “escape-vehicle-changed” signal.

Parameters

instance

A GObject derived type implementing the TestTweak interface.

 

destination

The destination of the signal or NULL to emit signals to all listeners.

 

new_escape_vehicle

The new escape vehicle

 

Types and Values

struct TestTweakIface

struct TestTweakIface {
  EggDBusInterfaceIface g_iface;

  void (* handle_block_until_rw_property_changes) (
      TestTweak *instance,
      EggDBusMethodInvocation *method_invocation);

  void (* handle_change_readable_property) (
      TestTweak *instance,
      const gchar *new_value,
      EggDBusMethodInvocation *method_invocation);

  void (* handle_i_can_haz_greetingz) (
      TestTweak *instance,
      const gchar *greetz,
      EggDBusMethodInvocation *method_invocation);

  void (* handle_broadcastz_newz) (
      TestTweak *instance,
      const gchar *newz,
      EggDBusMethodInvocation *method_invocation);

  void (* handle_get_server_unique_name) (
      TestTweak *instance,
      EggDBusMethodInvocation *method_invocation);

  void (* handle_long_running_method) (
      TestTweak *instance,
      gint msec_to_run,
      EggDBusMethodInvocation *method_invocation);

  void (* handle_return_gerror) (
      TestTweak *instance,
      const gchar *error_domain,
      gint error_code,
      EggDBusMethodInvocation *method_invocation);

  void (* handle_method_struct_disambiguation) (
      TestTweak *instance,
      TestPair *pair,
      TestPoint *point,
      EggDBusMethodInvocation *method_invocation);

  void (* handle_method_with_ctypes) (
      TestTweak *instance,
      TestSomeExampleCType value,
      EggDBusMethodInvocation *method_invocation);
};

Interface VTable for implementing the com.example.Tweak D-Bus interface.

Members

EggDBusInterfaceIface g_iface;

The parent interface.

 

handle_block_until_rw_property_changes ()

Blocks until “SomeReadWriteProperty” changes

 

handle_change_readable_property ()

Changes the “foo” property

 

handle_i_can_haz_greetingz ()

This method will take a greeting and give a rewritten greeting back

 

handle_broadcastz_newz ()

Conduit to broadcast newz. This method will make the object emit the “NewzNotifz” signal using the passed in parameter newz as the news to broadcast.

 

handle_get_server_unique_name ()

Gets the unique D-Bus name of the server

 

handle_long_running_method ()

A method that takes msec_to_run milliseconds to reply

 

handle_return_gerror ()

Throws an error identified by error_domain and error_code . This is mainly for testing that we can transparently hand GError's back and forth.

 

handle_method_struct_disambiguation ()

A method to check we can properly disambiguate what structure wrapper types to use

 

handle_method_with_ctypes ()

A method to check we properly support specifying what C type to use for an integral type

 

Property Details

The “bar” property

  “bar”                      EggDBusArraySeq *

The Bar factor

Flags: Read


The “baz” property

  “baz”                      TestPoint *

The Baz indicator

Flags: Read


The “baz-forced-to-use-pair” property

  “baz-forced-to-use-pair”   TestPair *

A slightly different Baz indicator

Flags: Read


The “default-create-flags” property

  “default-create-flags”     TestCreateFlags

The default create flags to use.

Flags: Read / Write

Default value: TEST_CREATE_FLAGS_USE_FROBNICATOR


The “escape-vehicle” property

  “escape-vehicle”           TestVehicle

The vehicle used for escaping.

Flags: Read / Write

Default value: TEST_VEHICLE_SPORT_UTILITY_VEHICLE


The “foo” property

  “foo”                      gchar *

The Foo value

Flags: Read

Default value: NULL


The “property-with-ctype” property

  “property-with-ctype”      gint

I'm a special C type

Flags: Read / Write

Default value: 0


The “some-read-write-property” property

  “some-read-write-property” gchar *

Hey, I'm promiscuous. I'm writeable!

Flags: Read / Write

Default value: NULL

Signal Details

The “escape-vehicle-changed” signal

void
user_function (TestTweak  *instance,
               TestVehicle new_escape_vehicle,
               gpointer    user_data)

A signal to check we properly support emitting signals with enums

Parameters

instance

A TestTweak.

 

new_escape_vehicle

The new escape vehicle

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “newz-notifz” signal

void
user_function (TestTweak *instance,
               gchar     *newz,
               gpointer   user_data)

Emitted when there are NEWZ on the Tweak interface

Parameters

instance

A TestTweak.

 

newz

The newz in the tweaked world

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “signal-struct-disambiguation” signal

void
user_function (TestTweak *instance,
               TestPair  *pair,
               TestPoint *point,
               gpointer   user_data)

A signal to check we can properly disambiguate what structure wrapper types to use

Parameters

instance

A TestTweak.

 

pair

A pair

 

point

A point

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “signal-with-ctype” signal

void
user_function (TestTweak *instance,
               gint       better_value,
               gpointer   user_data)

A signal to check we properly support specifying what C type to use for an integral type

Parameters

instance

A TestTweak.

 

better_value

Some value

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last