mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 23:13:40 +02:00
gdbus-codegen: process C.UnixFD annotation in one place
This will make it simpler to enable this behaviour based on the method signature. https://gitlab.gnome.org/GNOME/glib/issues/1726
This commit is contained in:
@@ -2588,6 +2588,31 @@ test_standalone_interface_info (void)
|
||||
g_clear_object (&skel);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------------- */
|
||||
static gboolean
|
||||
handle_hello_fd (FooiGenFDPassing *object,
|
||||
GDBusMethodInvocation *invocation,
|
||||
GUnixFDList *fd_list,
|
||||
const gchar *arg_greeting)
|
||||
{
|
||||
foo_igen_fdpassing_complete_hello_fd (object, invocation, fd_list, arg_greeting);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Test that generated code for methods includes GUnixFDList arguments if
|
||||
* the method is explicitly annotated as C.UnixFD.
|
||||
*/
|
||||
static void
|
||||
test_unix_fd_list (void)
|
||||
{
|
||||
FooiGenFDPassingIface iface;
|
||||
|
||||
/* This method is explicitly annotated. */
|
||||
iface.handle_hello_fd = handle_hello_fd;
|
||||
|
||||
(void) iface;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------------------------------------- */
|
||||
|
||||
int
|
||||
@@ -2603,6 +2628,7 @@ main (int argc,
|
||||
g_test_add_func ("/gdbus/codegen/autocleanups", test_autocleanups);
|
||||
g_test_add_func ("/gdbus/codegen/deprecations", test_deprecations);
|
||||
g_test_add_func ("/gdbus/codegen/standalone-interface-info", test_standalone_interface_info);
|
||||
g_test_add_func ("/gdbus/codegen/unix-fd-list", test_unix_fd_list);
|
||||
|
||||
return session_bus_run ();
|
||||
}
|
||||
|
Reference in New Issue
Block a user