2
* Generated by gdbus-codegen 2.33.8. DO NOT EDIT.
4
* The license of this code is the same as for the source it was derived from.
11
#include "remote-login.h"
15
# include <gio/gunixfdlist.h>
20
GDBusArgInfo parent_struct;
21
gboolean use_gvariant;
22
} _ExtendedGDBusArgInfo;
26
GDBusMethodInfo parent_struct;
27
const gchar *signal_name;
29
} _ExtendedGDBusMethodInfo;
33
GDBusSignalInfo parent_struct;
34
const gchar *signal_name;
35
} _ExtendedGDBusSignalInfo;
39
GDBusPropertyInfo parent_struct;
40
const gchar *hyphen_name;
41
gboolean use_gvariant;
42
} _ExtendedGDBusPropertyInfo;
46
GDBusInterfaceInfo parent_struct;
47
const gchar *hyphen_name;
48
} _ExtendedGDBusInterfaceInfo;
52
const _ExtendedGDBusPropertyInfo *info;
54
GValue orig_value; /* the value before the change */
58
_changed_property_free (ChangedProperty *data)
60
g_value_unset (&data->orig_value);
65
_g_strv_equal0 (gchar **a, gchar **b)
69
if (a == NULL && b == NULL)
74
if (a == NULL || b == NULL)
76
if (g_strv_length (a) != g_strv_length (b))
78
for (n = 0; a[n] != NULL; n++)
79
if (g_strcmp0 (a[n], b[n]) != 0)
87
_g_variant_equal0 (GVariant *a, GVariant *b)
90
if (a == NULL && b == NULL)
95
if (a == NULL || b == NULL)
97
ret = g_variant_equal (a, b);
102
G_GNUC_UNUSED static gboolean
103
_g_value_equal (const GValue *a, const GValue *b)
105
gboolean ret = FALSE;
106
g_assert (G_VALUE_TYPE (a) == G_VALUE_TYPE (b));
107
switch (G_VALUE_TYPE (a))
110
ret = (g_value_get_boolean (a) == g_value_get_boolean (b));
113
ret = (g_value_get_uchar (a) == g_value_get_uchar (b));
116
ret = (g_value_get_int (a) == g_value_get_int (b));
119
ret = (g_value_get_uint (a) == g_value_get_uint (b));
122
ret = (g_value_get_int64 (a) == g_value_get_int64 (b));
125
ret = (g_value_get_uint64 (a) == g_value_get_uint64 (b));
129
/* Avoid -Wfloat-equal warnings by doing a direct bit compare */
130
gdouble da = g_value_get_double (a);
131
gdouble db = g_value_get_double (b);
132
ret = memcmp (&da, &db, sizeof (gdouble)) == 0;
136
ret = (g_strcmp0 (g_value_get_string (a), g_value_get_string (b)) == 0);
139
ret = _g_variant_equal0 (g_value_get_variant (a), g_value_get_variant (b));
142
if (G_VALUE_TYPE (a) == G_TYPE_STRV)
143
ret = _g_strv_equal0 (g_value_get_boxed (a), g_value_get_boxed (b));
145
g_critical ("_g_value_equal() does not handle type %s", g_type_name (G_VALUE_TYPE (a)));
151
/* ------------------------------------------------------------------------
152
* Code for interface com.canonical.RemoteLogin
153
* ------------------------------------------------------------------------
157
* SECTION:RemoteLogin
158
* @title: RemoteLogin
159
* @short_description: Generated C code for the com.canonical.RemoteLogin D-Bus interface
161
* This section contains code for working with the <link linkend="gdbus-interface-com-canonical-RemoteLogin.top_of_page">com.canonical.RemoteLogin</link> D-Bus interface in C.
164
/* ---- Introspection data for com.canonical.RemoteLogin ---- */
166
static const _ExtendedGDBusArgInfo _remote_login_method_info_get_servers_OUT_ARG_serverList =
170
(gchar *) "serverList",
171
(gchar *) "a(sssba(sbva{sv})a(si))",
177
static const _ExtendedGDBusArgInfo * const _remote_login_method_info_get_servers_OUT_ARG_pointers[] =
179
&_remote_login_method_info_get_servers_OUT_ARG_serverList,
183
static const _ExtendedGDBusMethodInfo _remote_login_method_info_get_servers =
187
(gchar *) "GetServers",
189
(GDBusArgInfo **) &_remote_login_method_info_get_servers_OUT_ARG_pointers,
192
"handle-get-servers",
196
static const _ExtendedGDBusArgInfo _remote_login_method_info_get_servers_for_login_IN_ARG_uri =
207
static const _ExtendedGDBusArgInfo _remote_login_method_info_get_servers_for_login_IN_ARG_emailAddress =
211
(gchar *) "emailAddress",
218
static const _ExtendedGDBusArgInfo _remote_login_method_info_get_servers_for_login_IN_ARG_password =
222
(gchar *) "password",
229
static const _ExtendedGDBusArgInfo _remote_login_method_info_get_servers_for_login_IN_ARG_allowCache =
233
(gchar *) "allowCache",
240
static const _ExtendedGDBusArgInfo * const _remote_login_method_info_get_servers_for_login_IN_ARG_pointers[] =
242
&_remote_login_method_info_get_servers_for_login_IN_ARG_uri,
243
&_remote_login_method_info_get_servers_for_login_IN_ARG_emailAddress,
244
&_remote_login_method_info_get_servers_for_login_IN_ARG_password,
245
&_remote_login_method_info_get_servers_for_login_IN_ARG_allowCache,
249
static const _ExtendedGDBusArgInfo _remote_login_method_info_get_servers_for_login_OUT_ARG_dataType =
253
(gchar *) "dataType",
260
static const _ExtendedGDBusArgInfo _remote_login_method_info_get_servers_for_login_OUT_ARG_serverList =
264
(gchar *) "serverList",
265
(gchar *) "a(sssba(sbva{sv})a(si))",
271
static const _ExtendedGDBusArgInfo * const _remote_login_method_info_get_servers_for_login_OUT_ARG_pointers[] =
273
&_remote_login_method_info_get_servers_for_login_OUT_ARG_dataType,
274
&_remote_login_method_info_get_servers_for_login_OUT_ARG_serverList,
278
static const _ExtendedGDBusMethodInfo _remote_login_method_info_get_servers_for_login =
282
(gchar *) "GetServersForLogin",
283
(GDBusArgInfo **) &_remote_login_method_info_get_servers_for_login_IN_ARG_pointers,
284
(GDBusArgInfo **) &_remote_login_method_info_get_servers_for_login_OUT_ARG_pointers,
287
"handle-get-servers-for-login",
291
static const _ExtendedGDBusArgInfo _remote_login_method_info_get_cached_domains_for_server_IN_ARG_uri =
302
static const _ExtendedGDBusArgInfo * const _remote_login_method_info_get_cached_domains_for_server_IN_ARG_pointers[] =
304
&_remote_login_method_info_get_cached_domains_for_server_IN_ARG_uri,
308
static const _ExtendedGDBusArgInfo _remote_login_method_info_get_cached_domains_for_server_OUT_ARG_domains =
319
static const _ExtendedGDBusArgInfo * const _remote_login_method_info_get_cached_domains_for_server_OUT_ARG_pointers[] =
321
&_remote_login_method_info_get_cached_domains_for_server_OUT_ARG_domains,
325
static const _ExtendedGDBusMethodInfo _remote_login_method_info_get_cached_domains_for_server =
329
(gchar *) "GetCachedDomainsForServer",
330
(GDBusArgInfo **) &_remote_login_method_info_get_cached_domains_for_server_IN_ARG_pointers,
331
(GDBusArgInfo **) &_remote_login_method_info_get_cached_domains_for_server_OUT_ARG_pointers,
334
"handle-get-cached-domains-for-server",
338
static const _ExtendedGDBusArgInfo _remote_login_method_info_set_applications_for_server_IN_ARG_uccsUri =
349
static const _ExtendedGDBusArgInfo _remote_login_method_info_set_applications_for_server_IN_ARG_serverUri =
353
(gchar *) "serverUri",
360
static const _ExtendedGDBusArgInfo _remote_login_method_info_set_applications_for_server_IN_ARG_applications =
364
(gchar *) "applications",
371
static const _ExtendedGDBusArgInfo * const _remote_login_method_info_set_applications_for_server_IN_ARG_pointers[] =
373
&_remote_login_method_info_set_applications_for_server_IN_ARG_uccsUri,
374
&_remote_login_method_info_set_applications_for_server_IN_ARG_serverUri,
375
&_remote_login_method_info_set_applications_for_server_IN_ARG_applications,
379
static const _ExtendedGDBusMethodInfo _remote_login_method_info_set_applications_for_server =
383
(gchar *) "SetApplicationsForServer",
384
(GDBusArgInfo **) &_remote_login_method_info_set_applications_for_server_IN_ARG_pointers,
388
"handle-set-applications-for-server",
392
static const _ExtendedGDBusArgInfo _remote_login_method_info_set_last_used_server_IN_ARG_uccsUri =
403
static const _ExtendedGDBusArgInfo _remote_login_method_info_set_last_used_server_IN_ARG_serverUri =
407
(gchar *) "serverUri",
414
static const _ExtendedGDBusArgInfo * const _remote_login_method_info_set_last_used_server_IN_ARG_pointers[] =
416
&_remote_login_method_info_set_last_used_server_IN_ARG_uccsUri,
417
&_remote_login_method_info_set_last_used_server_IN_ARG_serverUri,
421
static const _ExtendedGDBusMethodInfo _remote_login_method_info_set_last_used_server =
425
(gchar *) "SetLastUsedServer",
426
(GDBusArgInfo **) &_remote_login_method_info_set_last_used_server_IN_ARG_pointers,
430
"handle-set-last-used-server",
434
static const _ExtendedGDBusMethodInfo * const _remote_login_method_info_pointers[] =
436
&_remote_login_method_info_get_servers,
437
&_remote_login_method_info_get_servers_for_login,
438
&_remote_login_method_info_get_cached_domains_for_server,
439
&_remote_login_method_info_set_applications_for_server,
440
&_remote_login_method_info_set_last_used_server,
444
static const _ExtendedGDBusArgInfo _remote_login_signal_info_servers_updated_ARG_serverList =
448
(gchar *) "serverList",
449
(gchar *) "a(sssba(sbva{sv})a(si))",
455
static const _ExtendedGDBusArgInfo * const _remote_login_signal_info_servers_updated_ARG_pointers[] =
457
&_remote_login_signal_info_servers_updated_ARG_serverList,
461
static const _ExtendedGDBusSignalInfo _remote_login_signal_info_servers_updated =
465
(gchar *) "ServersUpdated",
466
(GDBusArgInfo **) &_remote_login_signal_info_servers_updated_ARG_pointers,
472
static const _ExtendedGDBusArgInfo _remote_login_signal_info_login_servers_updated_ARG_uri =
483
static const _ExtendedGDBusArgInfo _remote_login_signal_info_login_servers_updated_ARG_emailAddress =
487
(gchar *) "emailAddress",
494
static const _ExtendedGDBusArgInfo _remote_login_signal_info_login_servers_updated_ARG_dataType =
498
(gchar *) "dataType",
505
static const _ExtendedGDBusArgInfo _remote_login_signal_info_login_servers_updated_ARG_serverList =
509
(gchar *) "serverList",
510
(gchar *) "a(sssba(sbva{sv})a(si))",
516
static const _ExtendedGDBusArgInfo * const _remote_login_signal_info_login_servers_updated_ARG_pointers[] =
518
&_remote_login_signal_info_login_servers_updated_ARG_uri,
519
&_remote_login_signal_info_login_servers_updated_ARG_emailAddress,
520
&_remote_login_signal_info_login_servers_updated_ARG_dataType,
521
&_remote_login_signal_info_login_servers_updated_ARG_serverList,
525
static const _ExtendedGDBusSignalInfo _remote_login_signal_info_login_servers_updated =
529
(gchar *) "LoginServersUpdated",
530
(GDBusArgInfo **) &_remote_login_signal_info_login_servers_updated_ARG_pointers,
533
"login-servers-updated"
536
static const _ExtendedGDBusArgInfo _remote_login_signal_info_login_changed_ARG_uri =
547
static const _ExtendedGDBusArgInfo _remote_login_signal_info_login_changed_ARG_emailAddress =
551
(gchar *) "emailAddress",
558
static const _ExtendedGDBusArgInfo * const _remote_login_signal_info_login_changed_ARG_pointers[] =
560
&_remote_login_signal_info_login_changed_ARG_uri,
561
&_remote_login_signal_info_login_changed_ARG_emailAddress,
565
static const _ExtendedGDBusSignalInfo _remote_login_signal_info_login_changed =
569
(gchar *) "LoginChanged",
570
(GDBusArgInfo **) &_remote_login_signal_info_login_changed_ARG_pointers,
576
static const _ExtendedGDBusSignalInfo * const _remote_login_signal_info_pointers[] =
578
&_remote_login_signal_info_servers_updated,
579
&_remote_login_signal_info_login_servers_updated,
580
&_remote_login_signal_info_login_changed,
584
static const _ExtendedGDBusInterfaceInfo _remote_login_interface_info =
588
(gchar *) "com.canonical.RemoteLogin",
589
(GDBusMethodInfo **) &_remote_login_method_info_pointers,
590
(GDBusSignalInfo **) &_remote_login_signal_info_pointers,
599
* remote_login_interface_info:
601
* Gets a machine-readable description of the <link linkend="gdbus-interface-com-canonical-RemoteLogin.top_of_page">com.canonical.RemoteLogin</link> D-Bus interface.
603
* Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
606
remote_login_interface_info (void)
608
return (GDBusInterfaceInfo *) &_remote_login_interface_info.parent_struct;
612
* remote_login_override_properties:
613
* @klass: The class structure for a #GObject<!-- -->-derived class.
614
* @property_id_begin: The property id to assign to the first overridden property.
616
* Overrides all #GObject properties in the #RemoteLogin interface for a concrete class.
617
* The properties are overridden in the order they are defined.
619
* Returns: The last property id.
622
remote_login_override_properties (GObjectClass *klass, guint property_id_begin)
624
return property_id_begin - 1;
632
* Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-com-canonical-RemoteLogin.top_of_page">com.canonical.RemoteLogin</link>.
637
* @parent_iface: The parent interface.
638
* @handle_get_cached_domains_for_server: Handler for the #RemoteLogin::handle-get-cached-domains-for-server signal.
639
* @handle_get_servers: Handler for the #RemoteLogin::handle-get-servers signal.
640
* @handle_get_servers_for_login: Handler for the #RemoteLogin::handle-get-servers-for-login signal.
641
* @handle_set_applications_for_server: Handler for the #RemoteLogin::handle-set-applications-for-server signal.
642
* @handle_set_last_used_server: Handler for the #RemoteLogin::handle-set-last-used-server signal.
643
* @login_changed: Handler for the #RemoteLogin::login-changed signal.
644
* @login_servers_updated: Handler for the #RemoteLogin::login-servers-updated signal.
645
* @servers_updated: Handler for the #RemoteLogin::servers-updated signal.
647
* Virtual table for the D-Bus interface <link linkend="gdbus-interface-com-canonical-RemoteLogin.top_of_page">com.canonical.RemoteLogin</link>.
651
remote_login_default_init (RemoteLoginIface *iface)
653
/* GObject signals for incoming D-Bus method calls: */
655
* RemoteLogin::handle-get-servers:
656
* @object: A #RemoteLogin.
657
* @invocation: A #GDBusMethodInvocation.
659
* Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-com-canonical-RemoteLogin.GetServers">GetServers()</link> D-Bus method.
661
* If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call remote_login_complete_get_servers() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
663
* Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
665
g_signal_new ("handle-get-servers",
666
G_TYPE_FROM_INTERFACE (iface),
668
G_STRUCT_OFFSET (RemoteLoginIface, handle_get_servers),
669
g_signal_accumulator_true_handled,
671
g_cclosure_marshal_generic,
674
G_TYPE_DBUS_METHOD_INVOCATION);
677
* RemoteLogin::handle-get-servers-for-login:
678
* @object: A #RemoteLogin.
679
* @invocation: A #GDBusMethodInvocation.
680
* @arg_uri: Argument passed by remote caller.
681
* @arg_emailAddress: Argument passed by remote caller.
682
* @arg_password: Argument passed by remote caller.
683
* @arg_allowCache: Argument passed by remote caller.
685
* Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-com-canonical-RemoteLogin.GetServersForLogin">GetServersForLogin()</link> D-Bus method.
687
* If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call remote_login_complete_get_servers_for_login() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
689
* Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
691
g_signal_new ("handle-get-servers-for-login",
692
G_TYPE_FROM_INTERFACE (iface),
694
G_STRUCT_OFFSET (RemoteLoginIface, handle_get_servers_for_login),
695
g_signal_accumulator_true_handled,
697
g_cclosure_marshal_generic,
700
G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN);
703
* RemoteLogin::handle-get-cached-domains-for-server:
704
* @object: A #RemoteLogin.
705
* @invocation: A #GDBusMethodInvocation.
706
* @arg_uri: Argument passed by remote caller.
708
* Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-com-canonical-RemoteLogin.GetCachedDomainsForServer">GetCachedDomainsForServer()</link> D-Bus method.
710
* If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call remote_login_complete_get_cached_domains_for_server() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
712
* Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
714
g_signal_new ("handle-get-cached-domains-for-server",
715
G_TYPE_FROM_INTERFACE (iface),
717
G_STRUCT_OFFSET (RemoteLoginIface, handle_get_cached_domains_for_server),
718
g_signal_accumulator_true_handled,
720
g_cclosure_marshal_generic,
723
G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING);
726
* RemoteLogin::handle-set-applications-for-server:
727
* @object: A #RemoteLogin.
728
* @invocation: A #GDBusMethodInvocation.
729
* @arg_uccsUri: Argument passed by remote caller.
730
* @arg_serverUri: Argument passed by remote caller.
731
* @arg_applications: Argument passed by remote caller.
733
* Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-com-canonical-RemoteLogin.SetApplicationsForServer">SetApplicationsForServer()</link> D-Bus method.
735
* If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call remote_login_complete_set_applications_for_server() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
737
* Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
739
g_signal_new ("handle-set-applications-for-server",
740
G_TYPE_FROM_INTERFACE (iface),
742
G_STRUCT_OFFSET (RemoteLoginIface, handle_set_applications_for_server),
743
g_signal_accumulator_true_handled,
745
g_cclosure_marshal_generic,
748
G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);
751
* RemoteLogin::handle-set-last-used-server:
752
* @object: A #RemoteLogin.
753
* @invocation: A #GDBusMethodInvocation.
754
* @arg_uccsUri: Argument passed by remote caller.
755
* @arg_serverUri: Argument passed by remote caller.
757
* Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-com-canonical-RemoteLogin.SetLastUsedServer">SetLastUsedServer()</link> D-Bus method.
759
* If a signal handler returns %TRUE, it means the signal handler will handle the invocation (e.g. take a reference to @invocation and eventually call remote_login_complete_set_last_used_server() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the %G_DBUS_ERROR_UNKNOWN_METHOD error is returned.
761
* Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
763
g_signal_new ("handle-set-last-used-server",
764
G_TYPE_FROM_INTERFACE (iface),
766
G_STRUCT_OFFSET (RemoteLoginIface, handle_set_last_used_server),
767
g_signal_accumulator_true_handled,
769
g_cclosure_marshal_generic,
772
G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING);
774
/* GObject signals for received D-Bus signals: */
776
* RemoteLogin::servers-updated:
777
* @object: A #RemoteLogin.
778
* @arg_serverList: Argument.
780
* On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-com-canonical-RemoteLogin.ServersUpdated">"ServersUpdated"</link> is received.
782
* On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
784
g_signal_new ("servers-updated",
785
G_TYPE_FROM_INTERFACE (iface),
787
G_STRUCT_OFFSET (RemoteLoginIface, servers_updated),
790
g_cclosure_marshal_generic,
795
* RemoteLogin::login-servers-updated:
796
* @object: A #RemoteLogin.
797
* @arg_uri: Argument.
798
* @arg_emailAddress: Argument.
799
* @arg_dataType: Argument.
800
* @arg_serverList: Argument.
802
* On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-com-canonical-RemoteLogin.LoginServersUpdated">"LoginServersUpdated"</link> is received.
804
* On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
806
g_signal_new ("login-servers-updated",
807
G_TYPE_FROM_INTERFACE (iface),
809
G_STRUCT_OFFSET (RemoteLoginIface, login_servers_updated),
812
g_cclosure_marshal_generic,
814
4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_VARIANT);
817
* RemoteLogin::login-changed:
818
* @object: A #RemoteLogin.
819
* @arg_uri: Argument.
820
* @arg_emailAddress: Argument.
822
* On the client-side, this signal is emitted whenever the D-Bus signal <link linkend="gdbus-signal-com-canonical-RemoteLogin.LoginChanged">"LoginChanged"</link> is received.
824
* On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
826
g_signal_new ("login-changed",
827
G_TYPE_FROM_INTERFACE (iface),
829
G_STRUCT_OFFSET (RemoteLoginIface, login_changed),
832
g_cclosure_marshal_generic,
834
2, G_TYPE_STRING, G_TYPE_STRING);
838
typedef RemoteLoginIface RemoteLoginInterface;
839
G_DEFINE_INTERFACE (RemoteLogin, remote_login, G_TYPE_OBJECT);
842
* remote_login_emit_servers_updated:
843
* @object: A #RemoteLogin.
844
* @arg_serverList: Argument to pass with the signal.
846
* Emits the <link linkend="gdbus-signal-com-canonical-RemoteLogin.ServersUpdated">"ServersUpdated"</link> D-Bus signal.
849
remote_login_emit_servers_updated (
851
GVariant *arg_serverList)
853
g_signal_emit_by_name (object, "servers-updated", arg_serverList);
857
* remote_login_emit_login_servers_updated:
858
* @object: A #RemoteLogin.
859
* @arg_uri: Argument to pass with the signal.
860
* @arg_emailAddress: Argument to pass with the signal.
861
* @arg_dataType: Argument to pass with the signal.
862
* @arg_serverList: Argument to pass with the signal.
864
* Emits the <link linkend="gdbus-signal-com-canonical-RemoteLogin.LoginServersUpdated">"LoginServersUpdated"</link> D-Bus signal.
867
remote_login_emit_login_servers_updated (
869
const gchar *arg_uri,
870
const gchar *arg_emailAddress,
871
const gchar *arg_dataType,
872
GVariant *arg_serverList)
874
g_signal_emit_by_name (object, "login-servers-updated", arg_uri, arg_emailAddress, arg_dataType, arg_serverList);
878
* remote_login_emit_login_changed:
879
* @object: A #RemoteLogin.
880
* @arg_uri: Argument to pass with the signal.
881
* @arg_emailAddress: Argument to pass with the signal.
883
* Emits the <link linkend="gdbus-signal-com-canonical-RemoteLogin.LoginChanged">"LoginChanged"</link> D-Bus signal.
886
remote_login_emit_login_changed (
888
const gchar *arg_uri,
889
const gchar *arg_emailAddress)
891
g_signal_emit_by_name (object, "login-changed", arg_uri, arg_emailAddress);
895
* remote_login_call_get_servers:
896
* @proxy: A #RemoteLoginProxy.
897
* @cancellable: (allow-none): A #GCancellable or %NULL.
898
* @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
899
* @user_data: User data to pass to @callback.
901
* Asynchronously invokes the <link linkend="gdbus-method-com-canonical-RemoteLogin.GetServers">GetServers()</link> D-Bus method on @proxy.
902
* When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
903
* You can then call remote_login_call_get_servers_finish() to get the result of the operation.
905
* See remote_login_call_get_servers_sync() for the synchronous, blocking version of this method.
908
remote_login_call_get_servers (
910
GCancellable *cancellable,
911
GAsyncReadyCallback callback,
914
g_dbus_proxy_call (G_DBUS_PROXY (proxy),
916
g_variant_new ("()"),
917
G_DBUS_CALL_FLAGS_NONE,
925
* remote_login_call_get_servers_finish:
926
* @proxy: A #RemoteLoginProxy.
927
* @out_serverList: (out): Return location for return parameter or %NULL to ignore.
928
* @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to remote_login_call_get_servers().
929
* @error: Return location for error or %NULL.
931
* Finishes an operation started with remote_login_call_get_servers().
933
* Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
936
remote_login_call_get_servers_finish (
938
GVariant **out_serverList,
943
_ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
947
"(@a(sssba(sbva{sv})a(si)))",
949
g_variant_unref (_ret);
955
* remote_login_call_get_servers_sync:
956
* @proxy: A #RemoteLoginProxy.
957
* @out_serverList: (out): Return location for return parameter or %NULL to ignore.
958
* @cancellable: (allow-none): A #GCancellable or %NULL.
959
* @error: Return location for error or %NULL.
961
* Synchronously invokes the <link linkend="gdbus-method-com-canonical-RemoteLogin.GetServers">GetServers()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
963
* See remote_login_call_get_servers() for the asynchronous version of this method.
965
* Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
968
remote_login_call_get_servers_sync (
970
GVariant **out_serverList,
971
GCancellable *cancellable,
975
_ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
977
g_variant_new ("()"),
978
G_DBUS_CALL_FLAGS_NONE,
985
"(@a(sssba(sbva{sv})a(si)))",
987
g_variant_unref (_ret);
993
* remote_login_call_get_servers_for_login:
994
* @proxy: A #RemoteLoginProxy.
995
* @arg_uri: Argument to pass with the method invocation.
996
* @arg_emailAddress: Argument to pass with the method invocation.
997
* @arg_password: Argument to pass with the method invocation.
998
* @arg_allowCache: Argument to pass with the method invocation.
999
* @cancellable: (allow-none): A #GCancellable or %NULL.
1000
* @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
1001
* @user_data: User data to pass to @callback.
1003
* Asynchronously invokes the <link linkend="gdbus-method-com-canonical-RemoteLogin.GetServersForLogin">GetServersForLogin()</link> D-Bus method on @proxy.
1004
* When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
1005
* You can then call remote_login_call_get_servers_for_login_finish() to get the result of the operation.
1007
* See remote_login_call_get_servers_for_login_sync() for the synchronous, blocking version of this method.
1010
remote_login_call_get_servers_for_login (
1012
const gchar *arg_uri,
1013
const gchar *arg_emailAddress,
1014
const gchar *arg_password,
1015
gboolean arg_allowCache,
1016
GCancellable *cancellable,
1017
GAsyncReadyCallback callback,
1020
g_dbus_proxy_call (G_DBUS_PROXY (proxy),
1021
"GetServersForLogin",
1022
g_variant_new ("(sssb)",
1027
G_DBUS_CALL_FLAGS_NONE,
1035
* remote_login_call_get_servers_for_login_finish:
1036
* @proxy: A #RemoteLoginProxy.
1037
* @out_dataType: (out): Return location for return parameter or %NULL to ignore.
1038
* @out_serverList: (out): Return location for return parameter or %NULL to ignore.
1039
* @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to remote_login_call_get_servers_for_login().
1040
* @error: Return location for error or %NULL.
1042
* Finishes an operation started with remote_login_call_get_servers_for_login().
1044
* Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1047
remote_login_call_get_servers_for_login_finish (
1049
gchar **out_dataType,
1050
GVariant **out_serverList,
1055
_ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
1058
g_variant_get (_ret,
1059
"(s@a(sssba(sbva{sv})a(si)))",
1062
g_variant_unref (_ret);
1064
return _ret != NULL;
1068
* remote_login_call_get_servers_for_login_sync:
1069
* @proxy: A #RemoteLoginProxy.
1070
* @arg_uri: Argument to pass with the method invocation.
1071
* @arg_emailAddress: Argument to pass with the method invocation.
1072
* @arg_password: Argument to pass with the method invocation.
1073
* @arg_allowCache: Argument to pass with the method invocation.
1074
* @out_dataType: (out): Return location for return parameter or %NULL to ignore.
1075
* @out_serverList: (out): Return location for return parameter or %NULL to ignore.
1076
* @cancellable: (allow-none): A #GCancellable or %NULL.
1077
* @error: Return location for error or %NULL.
1079
* Synchronously invokes the <link linkend="gdbus-method-com-canonical-RemoteLogin.GetServersForLogin">GetServersForLogin()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
1081
* See remote_login_call_get_servers_for_login() for the asynchronous version of this method.
1083
* Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1086
remote_login_call_get_servers_for_login_sync (
1088
const gchar *arg_uri,
1089
const gchar *arg_emailAddress,
1090
const gchar *arg_password,
1091
gboolean arg_allowCache,
1092
gchar **out_dataType,
1093
GVariant **out_serverList,
1094
GCancellable *cancellable,
1098
_ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
1099
"GetServersForLogin",
1100
g_variant_new ("(sssb)",
1105
G_DBUS_CALL_FLAGS_NONE,
1111
g_variant_get (_ret,
1112
"(s@a(sssba(sbva{sv})a(si)))",
1115
g_variant_unref (_ret);
1117
return _ret != NULL;
1121
* remote_login_call_get_cached_domains_for_server:
1122
* @proxy: A #RemoteLoginProxy.
1123
* @arg_uri: Argument to pass with the method invocation.
1124
* @cancellable: (allow-none): A #GCancellable or %NULL.
1125
* @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
1126
* @user_data: User data to pass to @callback.
1128
* Asynchronously invokes the <link linkend="gdbus-method-com-canonical-RemoteLogin.GetCachedDomainsForServer">GetCachedDomainsForServer()</link> D-Bus method on @proxy.
1129
* When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
1130
* You can then call remote_login_call_get_cached_domains_for_server_finish() to get the result of the operation.
1132
* See remote_login_call_get_cached_domains_for_server_sync() for the synchronous, blocking version of this method.
1135
remote_login_call_get_cached_domains_for_server (
1137
const gchar *arg_uri,
1138
GCancellable *cancellable,
1139
GAsyncReadyCallback callback,
1142
g_dbus_proxy_call (G_DBUS_PROXY (proxy),
1143
"GetCachedDomainsForServer",
1144
g_variant_new ("(s)",
1146
G_DBUS_CALL_FLAGS_NONE,
1154
* remote_login_call_get_cached_domains_for_server_finish:
1155
* @proxy: A #RemoteLoginProxy.
1156
* @out_domains: (out): Return location for return parameter or %NULL to ignore.
1157
* @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to remote_login_call_get_cached_domains_for_server().
1158
* @error: Return location for error or %NULL.
1160
* Finishes an operation started with remote_login_call_get_cached_domains_for_server().
1162
* Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1165
remote_login_call_get_cached_domains_for_server_finish (
1167
gchar ***out_domains,
1172
_ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
1175
g_variant_get (_ret,
1178
g_variant_unref (_ret);
1180
return _ret != NULL;
1184
* remote_login_call_get_cached_domains_for_server_sync:
1185
* @proxy: A #RemoteLoginProxy.
1186
* @arg_uri: Argument to pass with the method invocation.
1187
* @out_domains: (out): Return location for return parameter or %NULL to ignore.
1188
* @cancellable: (allow-none): A #GCancellable or %NULL.
1189
* @error: Return location for error or %NULL.
1191
* Synchronously invokes the <link linkend="gdbus-method-com-canonical-RemoteLogin.GetCachedDomainsForServer">GetCachedDomainsForServer()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
1193
* See remote_login_call_get_cached_domains_for_server() for the asynchronous version of this method.
1195
* Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1198
remote_login_call_get_cached_domains_for_server_sync (
1200
const gchar *arg_uri,
1201
gchar ***out_domains,
1202
GCancellable *cancellable,
1206
_ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
1207
"GetCachedDomainsForServer",
1208
g_variant_new ("(s)",
1210
G_DBUS_CALL_FLAGS_NONE,
1216
g_variant_get (_ret,
1219
g_variant_unref (_ret);
1221
return _ret != NULL;
1225
* remote_login_call_set_applications_for_server:
1226
* @proxy: A #RemoteLoginProxy.
1227
* @arg_uccsUri: Argument to pass with the method invocation.
1228
* @arg_serverUri: Argument to pass with the method invocation.
1229
* @arg_applications: Argument to pass with the method invocation.
1230
* @cancellable: (allow-none): A #GCancellable or %NULL.
1231
* @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
1232
* @user_data: User data to pass to @callback.
1234
* Asynchronously invokes the <link linkend="gdbus-method-com-canonical-RemoteLogin.SetApplicationsForServer">SetApplicationsForServer()</link> D-Bus method on @proxy.
1235
* When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
1236
* You can then call remote_login_call_set_applications_for_server_finish() to get the result of the operation.
1238
* See remote_login_call_set_applications_for_server_sync() for the synchronous, blocking version of this method.
1241
remote_login_call_set_applications_for_server (
1243
const gchar *arg_uccsUri,
1244
const gchar *arg_serverUri,
1245
GVariant *arg_applications,
1246
GCancellable *cancellable,
1247
GAsyncReadyCallback callback,
1250
g_dbus_proxy_call (G_DBUS_PROXY (proxy),
1251
"SetApplicationsForServer",
1252
g_variant_new ("(ss@a(si))",
1256
G_DBUS_CALL_FLAGS_NONE,
1264
* remote_login_call_set_applications_for_server_finish:
1265
* @proxy: A #RemoteLoginProxy.
1266
* @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to remote_login_call_set_applications_for_server().
1267
* @error: Return location for error or %NULL.
1269
* Finishes an operation started with remote_login_call_set_applications_for_server().
1271
* Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1274
remote_login_call_set_applications_for_server_finish (
1280
_ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
1283
g_variant_get (_ret,
1285
g_variant_unref (_ret);
1287
return _ret != NULL;
1291
* remote_login_call_set_applications_for_server_sync:
1292
* @proxy: A #RemoteLoginProxy.
1293
* @arg_uccsUri: Argument to pass with the method invocation.
1294
* @arg_serverUri: Argument to pass with the method invocation.
1295
* @arg_applications: Argument to pass with the method invocation.
1296
* @cancellable: (allow-none): A #GCancellable or %NULL.
1297
* @error: Return location for error or %NULL.
1299
* Synchronously invokes the <link linkend="gdbus-method-com-canonical-RemoteLogin.SetApplicationsForServer">SetApplicationsForServer()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
1301
* See remote_login_call_set_applications_for_server() for the asynchronous version of this method.
1303
* Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1306
remote_login_call_set_applications_for_server_sync (
1308
const gchar *arg_uccsUri,
1309
const gchar *arg_serverUri,
1310
GVariant *arg_applications,
1311
GCancellable *cancellable,
1315
_ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
1316
"SetApplicationsForServer",
1317
g_variant_new ("(ss@a(si))",
1321
G_DBUS_CALL_FLAGS_NONE,
1327
g_variant_get (_ret,
1329
g_variant_unref (_ret);
1331
return _ret != NULL;
1335
* remote_login_call_set_last_used_server:
1336
* @proxy: A #RemoteLoginProxy.
1337
* @arg_uccsUri: Argument to pass with the method invocation.
1338
* @arg_serverUri: Argument to pass with the method invocation.
1339
* @cancellable: (allow-none): A #GCancellable or %NULL.
1340
* @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
1341
* @user_data: User data to pass to @callback.
1343
* Asynchronously invokes the <link linkend="gdbus-method-com-canonical-RemoteLogin.SetLastUsedServer">SetLastUsedServer()</link> D-Bus method on @proxy.
1344
* When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
1345
* You can then call remote_login_call_set_last_used_server_finish() to get the result of the operation.
1347
* See remote_login_call_set_last_used_server_sync() for the synchronous, blocking version of this method.
1350
remote_login_call_set_last_used_server (
1352
const gchar *arg_uccsUri,
1353
const gchar *arg_serverUri,
1354
GCancellable *cancellable,
1355
GAsyncReadyCallback callback,
1358
g_dbus_proxy_call (G_DBUS_PROXY (proxy),
1359
"SetLastUsedServer",
1360
g_variant_new ("(ss)",
1363
G_DBUS_CALL_FLAGS_NONE,
1371
* remote_login_call_set_last_used_server_finish:
1372
* @proxy: A #RemoteLoginProxy.
1373
* @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to remote_login_call_set_last_used_server().
1374
* @error: Return location for error or %NULL.
1376
* Finishes an operation started with remote_login_call_set_last_used_server().
1378
* Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1381
remote_login_call_set_last_used_server_finish (
1387
_ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
1390
g_variant_get (_ret,
1392
g_variant_unref (_ret);
1394
return _ret != NULL;
1398
* remote_login_call_set_last_used_server_sync:
1399
* @proxy: A #RemoteLoginProxy.
1400
* @arg_uccsUri: Argument to pass with the method invocation.
1401
* @arg_serverUri: Argument to pass with the method invocation.
1402
* @cancellable: (allow-none): A #GCancellable or %NULL.
1403
* @error: Return location for error or %NULL.
1405
* Synchronously invokes the <link linkend="gdbus-method-com-canonical-RemoteLogin.SetLastUsedServer">SetLastUsedServer()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
1407
* See remote_login_call_set_last_used_server() for the asynchronous version of this method.
1409
* Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
1412
remote_login_call_set_last_used_server_sync (
1414
const gchar *arg_uccsUri,
1415
const gchar *arg_serverUri,
1416
GCancellable *cancellable,
1420
_ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
1421
"SetLastUsedServer",
1422
g_variant_new ("(ss)",
1425
G_DBUS_CALL_FLAGS_NONE,
1431
g_variant_get (_ret,
1433
g_variant_unref (_ret);
1435
return _ret != NULL;
1439
* remote_login_complete_get_servers:
1440
* @object: A #RemoteLogin.
1441
* @invocation: (transfer full): A #GDBusMethodInvocation.
1442
* @serverList: Parameter to return.
1444
* Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-com-canonical-RemoteLogin.GetServers">GetServers()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
1446
* This method will free @invocation, you cannot use it afterwards.
1449
remote_login_complete_get_servers (
1450
RemoteLogin *object,
1451
GDBusMethodInvocation *invocation,
1452
GVariant *serverList)
1454
g_dbus_method_invocation_return_value (invocation,
1455
g_variant_new ("(@a(sssba(sbva{sv})a(si)))",
1460
* remote_login_complete_get_servers_for_login:
1461
* @object: A #RemoteLogin.
1462
* @invocation: (transfer full): A #GDBusMethodInvocation.
1463
* @dataType: Parameter to return.
1464
* @serverList: Parameter to return.
1466
* Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-com-canonical-RemoteLogin.GetServersForLogin">GetServersForLogin()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
1468
* This method will free @invocation, you cannot use it afterwards.
1471
remote_login_complete_get_servers_for_login (
1472
RemoteLogin *object,
1473
GDBusMethodInvocation *invocation,
1474
const gchar *dataType,
1475
GVariant *serverList)
1477
g_dbus_method_invocation_return_value (invocation,
1478
g_variant_new ("(s@a(sssba(sbva{sv})a(si)))",
1484
* remote_login_complete_get_cached_domains_for_server:
1485
* @object: A #RemoteLogin.
1486
* @invocation: (transfer full): A #GDBusMethodInvocation.
1487
* @domains: Parameter to return.
1489
* Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-com-canonical-RemoteLogin.GetCachedDomainsForServer">GetCachedDomainsForServer()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
1491
* This method will free @invocation, you cannot use it afterwards.
1494
remote_login_complete_get_cached_domains_for_server (
1495
RemoteLogin *object,
1496
GDBusMethodInvocation *invocation,
1497
const gchar *const *domains)
1499
g_dbus_method_invocation_return_value (invocation,
1500
g_variant_new ("(^as)",
1505
* remote_login_complete_set_applications_for_server:
1506
* @object: A #RemoteLogin.
1507
* @invocation: (transfer full): A #GDBusMethodInvocation.
1509
* Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-com-canonical-RemoteLogin.SetApplicationsForServer">SetApplicationsForServer()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
1511
* This method will free @invocation, you cannot use it afterwards.
1514
remote_login_complete_set_applications_for_server (
1515
RemoteLogin *object,
1516
GDBusMethodInvocation *invocation)
1518
g_dbus_method_invocation_return_value (invocation,
1519
g_variant_new ("()"));
1523
* remote_login_complete_set_last_used_server:
1524
* @object: A #RemoteLogin.
1525
* @invocation: (transfer full): A #GDBusMethodInvocation.
1527
* Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-com-canonical-RemoteLogin.SetLastUsedServer">SetLastUsedServer()</link> D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
1529
* This method will free @invocation, you cannot use it afterwards.
1532
remote_login_complete_set_last_used_server (
1533
RemoteLogin *object,
1534
GDBusMethodInvocation *invocation)
1536
g_dbus_method_invocation_return_value (invocation,
1537
g_variant_new ("()"));
1540
/* ------------------------------------------------------------------------ */
1545
* The #RemoteLoginProxy structure contains only private data and should only be accessed using the provided API.
1549
* RemoteLoginProxyClass:
1550
* @parent_class: The parent class.
1552
* Class structure for #RemoteLoginProxy.
1555
struct _RemoteLoginProxyPrivate
1560
static void remote_login_proxy_iface_init (RemoteLoginIface *iface);
1562
G_DEFINE_TYPE_WITH_CODE (RemoteLoginProxy, remote_login_proxy, G_TYPE_DBUS_PROXY,
1563
G_IMPLEMENT_INTERFACE (TYPE_REMOTE_LOGIN, remote_login_proxy_iface_init));
1566
remote_login_proxy_finalize (GObject *object)
1568
RemoteLoginProxy *proxy = REMOTE_LOGIN_PROXY (object);
1569
g_datalist_clear (&proxy->priv->qdata);
1570
G_OBJECT_CLASS (remote_login_proxy_parent_class)->finalize (object);
1574
remote_login_proxy_get_property (GObject *object,
1582
remote_login_proxy_set_property (GObject *object,
1584
const GValue *value,
1590
remote_login_proxy_g_signal (GDBusProxy *proxy,
1591
const gchar *sender_name,
1592
const gchar *signal_name,
1593
GVariant *parameters)
1595
_ExtendedGDBusSignalInfo *info;
1602
info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_remote_login_interface_info.parent_struct, signal_name);
1605
num_params = g_variant_n_children (parameters);
1606
paramv = g_new0 (GValue, num_params + 1);
1607
g_value_init (¶mv[0], TYPE_REMOTE_LOGIN);
1608
g_value_set_object (¶mv[0], proxy);
1609
g_variant_iter_init (&iter, parameters);
1611
while ((child = g_variant_iter_next_value (&iter)) != NULL)
1613
_ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
1614
if (arg_info->use_gvariant)
1616
g_value_init (¶mv[n], G_TYPE_VARIANT);
1617
g_value_set_variant (¶mv[n], child);
1621
g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
1622
g_variant_unref (child);
1624
signal_id = g_signal_lookup (info->signal_name, TYPE_REMOTE_LOGIN);
1625
g_signal_emitv (paramv, signal_id, 0, NULL);
1626
for (n = 0; n < num_params + 1; n++)
1627
g_value_unset (¶mv[n]);
1632
remote_login_proxy_g_properties_changed (GDBusProxy *_proxy,
1633
GVariant *changed_properties,
1634
const gchar *const *invalidated_properties)
1636
RemoteLoginProxy *proxy = REMOTE_LOGIN_PROXY (_proxy);
1640
_ExtendedGDBusPropertyInfo *info;
1641
g_variant_get (changed_properties, "a{sv}", &iter);
1642
while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
1644
info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_remote_login_interface_info.parent_struct, key);
1645
g_datalist_remove_data (&proxy->priv->qdata, key);
1647
g_object_notify (G_OBJECT (proxy), info->hyphen_name);
1649
g_variant_iter_free (iter);
1650
for (n = 0; invalidated_properties[n] != NULL; n++)
1652
info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_remote_login_interface_info.parent_struct, invalidated_properties[n]);
1653
g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
1655
g_object_notify (G_OBJECT (proxy), info->hyphen_name);
1660
remote_login_proxy_init (RemoteLoginProxy *proxy)
1662
proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, TYPE_REMOTE_LOGIN_PROXY, RemoteLoginProxyPrivate);
1663
g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), remote_login_interface_info ());
1667
remote_login_proxy_class_init (RemoteLoginProxyClass *klass)
1669
GObjectClass *gobject_class;
1670
GDBusProxyClass *proxy_class;
1672
g_type_class_add_private (klass, sizeof (RemoteLoginProxyPrivate));
1674
gobject_class = G_OBJECT_CLASS (klass);
1675
gobject_class->finalize = remote_login_proxy_finalize;
1676
gobject_class->get_property = remote_login_proxy_get_property;
1677
gobject_class->set_property = remote_login_proxy_set_property;
1679
proxy_class = G_DBUS_PROXY_CLASS (klass);
1680
proxy_class->g_signal = remote_login_proxy_g_signal;
1681
proxy_class->g_properties_changed = remote_login_proxy_g_properties_changed;
1686
remote_login_proxy_iface_init (RemoteLoginIface *iface)
1691
* remote_login_proxy_new:
1692
* @connection: A #GDBusConnection.
1693
* @flags: Flags from the #GDBusProxyFlags enumeration.
1694
* @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
1695
* @object_path: An object path.
1696
* @cancellable: (allow-none): A #GCancellable or %NULL.
1697
* @callback: A #GAsyncReadyCallback to call when the request is satisfied.
1698
* @user_data: User data to pass to @callback.
1700
* Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-com-canonical-RemoteLogin.top_of_page">com.canonical.RemoteLogin</link>. See g_dbus_proxy_new() for more details.
1702
* When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
1703
* You can then call remote_login_proxy_new_finish() to get the result of the operation.
1705
* See remote_login_proxy_new_sync() for the synchronous, blocking version of this constructor.
1708
remote_login_proxy_new (
1709
GDBusConnection *connection,
1710
GDBusProxyFlags flags,
1712
const gchar *object_path,
1713
GCancellable *cancellable,
1714
GAsyncReadyCallback callback,
1717
g_async_initable_new_async (TYPE_REMOTE_LOGIN_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "com.canonical.RemoteLogin", NULL);
1721
* remote_login_proxy_new_finish:
1722
* @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to remote_login_proxy_new().
1723
* @error: Return location for error or %NULL
1725
* Finishes an operation started with remote_login_proxy_new().
1727
* Returns: (transfer full) (type RemoteLoginProxy): The constructed proxy object or %NULL if @error is set.
1730
remote_login_proxy_new_finish (
1735
GObject *source_object;
1736
source_object = g_async_result_get_source_object (res);
1737
ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
1738
g_object_unref (source_object);
1740
return REMOTE_LOGIN (ret);
1746
* remote_login_proxy_new_sync:
1747
* @connection: A #GDBusConnection.
1748
* @flags: Flags from the #GDBusProxyFlags enumeration.
1749
* @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
1750
* @object_path: An object path.
1751
* @cancellable: (allow-none): A #GCancellable or %NULL.
1752
* @error: Return location for error or %NULL
1754
* Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-com-canonical-RemoteLogin.top_of_page">com.canonical.RemoteLogin</link>. See g_dbus_proxy_new_sync() for more details.
1756
* The calling thread is blocked until a reply is received.
1758
* See remote_login_proxy_new() for the asynchronous version of this constructor.
1760
* Returns: (transfer full) (type RemoteLoginProxy): The constructed proxy object or %NULL if @error is set.
1763
remote_login_proxy_new_sync (
1764
GDBusConnection *connection,
1765
GDBusProxyFlags flags,
1767
const gchar *object_path,
1768
GCancellable *cancellable,
1772
ret = g_initable_new (TYPE_REMOTE_LOGIN_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "com.canonical.RemoteLogin", NULL);
1774
return REMOTE_LOGIN (ret);
1781
* remote_login_proxy_new_for_bus:
1782
* @bus_type: A #GBusType.
1783
* @flags: Flags from the #GDBusProxyFlags enumeration.
1784
* @name: A bus name (well-known or unique).
1785
* @object_path: An object path.
1786
* @cancellable: (allow-none): A #GCancellable or %NULL.
1787
* @callback: A #GAsyncReadyCallback to call when the request is satisfied.
1788
* @user_data: User data to pass to @callback.
1790
* Like remote_login_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
1792
* When the operation is finished, @callback will be invoked in the <link linkend="g-main-context-push-thread-default">thread-default main loop</link> of the thread you are calling this method from.
1793
* You can then call remote_login_proxy_new_for_bus_finish() to get the result of the operation.
1795
* See remote_login_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
1798
remote_login_proxy_new_for_bus (
1800
GDBusProxyFlags flags,
1802
const gchar *object_path,
1803
GCancellable *cancellable,
1804
GAsyncReadyCallback callback,
1807
g_async_initable_new_async (TYPE_REMOTE_LOGIN_PROXY, G_PRIORITY_DEFAULT, cancellable, callback, user_data, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "com.canonical.RemoteLogin", NULL);
1811
* remote_login_proxy_new_for_bus_finish:
1812
* @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to remote_login_proxy_new_for_bus().
1813
* @error: Return location for error or %NULL
1815
* Finishes an operation started with remote_login_proxy_new_for_bus().
1817
* Returns: (transfer full) (type RemoteLoginProxy): The constructed proxy object or %NULL if @error is set.
1820
remote_login_proxy_new_for_bus_finish (
1825
GObject *source_object;
1826
source_object = g_async_result_get_source_object (res);
1827
ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
1828
g_object_unref (source_object);
1830
return REMOTE_LOGIN (ret);
1836
* remote_login_proxy_new_for_bus_sync:
1837
* @bus_type: A #GBusType.
1838
* @flags: Flags from the #GDBusProxyFlags enumeration.
1839
* @name: A bus name (well-known or unique).
1840
* @object_path: An object path.
1841
* @cancellable: (allow-none): A #GCancellable or %NULL.
1842
* @error: Return location for error or %NULL
1844
* Like remote_login_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
1846
* The calling thread is blocked until a reply is received.
1848
* See remote_login_proxy_new_for_bus() for the asynchronous version of this constructor.
1850
* Returns: (transfer full) (type RemoteLoginProxy): The constructed proxy object or %NULL if @error is set.
1853
remote_login_proxy_new_for_bus_sync (
1855
GDBusProxyFlags flags,
1857
const gchar *object_path,
1858
GCancellable *cancellable,
1862
ret = g_initable_new (TYPE_REMOTE_LOGIN_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "com.canonical.RemoteLogin", NULL);
1864
return REMOTE_LOGIN (ret);
1870
/* ------------------------------------------------------------------------ */
1873
* RemoteLoginSkeleton:
1875
* The #RemoteLoginSkeleton structure contains only private data and should only be accessed using the provided API.
1879
* RemoteLoginSkeletonClass:
1880
* @parent_class: The parent class.
1882
* Class structure for #RemoteLoginSkeleton.
1885
struct _RemoteLoginSkeletonPrivate
1888
GList *changed_properties;
1889
GSource *changed_properties_idle_source;
1890
GMainContext *context;
1895
_remote_login_skeleton_handle_method_call (
1896
GDBusConnection *connection,
1897
const gchar *sender,
1898
const gchar *object_path,
1899
const gchar *interface_name,
1900
const gchar *method_name,
1901
GVariant *parameters,
1902
GDBusMethodInvocation *invocation,
1905
RemoteLoginSkeleton *skeleton = REMOTE_LOGIN_SKELETON (user_data);
1906
_ExtendedGDBusMethodInfo *info;
1914
GValue return_value = G_VALUE_INIT;
1915
info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
1916
g_assert (info != NULL);
1917
num_params = g_variant_n_children (parameters);
1918
num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra);
1920
g_value_init (¶mv[n], TYPE_REMOTE_LOGIN);
1921
g_value_set_object (¶mv[n++], skeleton);
1922
g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION);
1923
g_value_set_object (¶mv[n++], invocation);
1924
if (info->pass_fdlist)
1927
g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST);
1928
g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
1930
g_assert_not_reached ();
1933
g_variant_iter_init (&iter, parameters);
1934
while ((child = g_variant_iter_next_value (&iter)) != NULL)
1936
_ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
1937
if (arg_info->use_gvariant)
1939
g_value_init (¶mv[n], G_TYPE_VARIANT);
1940
g_value_set_variant (¶mv[n], child);
1944
g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
1945
g_variant_unref (child);
1947
signal_id = g_signal_lookup (info->signal_name, TYPE_REMOTE_LOGIN);
1948
g_value_init (&return_value, G_TYPE_BOOLEAN);
1949
g_signal_emitv (paramv, signal_id, 0, &return_value);
1950
if (!g_value_get_boolean (&return_value))
1951
g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR, G_DBUS_ERROR_UNKNOWN_METHOD, "Method %s is not implemented on interface %s", method_name, interface_name);
1952
g_value_unset (&return_value);
1953
for (n = 0; n < num_params + num_extra; n++)
1954
g_value_unset (¶mv[n]);
1959
_remote_login_skeleton_handle_get_property (
1960
GDBusConnection *connection,
1961
const gchar *sender,
1962
const gchar *object_path,
1963
const gchar *interface_name,
1964
const gchar *property_name,
1968
RemoteLoginSkeleton *skeleton = REMOTE_LOGIN_SKELETON (user_data);
1969
GValue value = G_VALUE_INIT;
1971
_ExtendedGDBusPropertyInfo *info;
1974
info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_remote_login_interface_info.parent_struct, property_name);
1975
g_assert (info != NULL);
1976
pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
1979
g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
1983
g_value_init (&value, pspec->value_type);
1984
g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
1985
ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
1986
g_value_unset (&value);
1992
_remote_login_skeleton_handle_set_property (
1993
GDBusConnection *connection,
1994
const gchar *sender,
1995
const gchar *object_path,
1996
const gchar *interface_name,
1997
const gchar *property_name,
2002
RemoteLoginSkeleton *skeleton = REMOTE_LOGIN_SKELETON (user_data);
2003
GValue value = G_VALUE_INIT;
2005
_ExtendedGDBusPropertyInfo *info;
2008
info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_remote_login_interface_info.parent_struct, property_name);
2009
g_assert (info != NULL);
2010
pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
2013
g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
2017
if (info->use_gvariant)
2018
g_value_set_variant (&value, variant);
2020
g_dbus_gvariant_to_gvalue (variant, &value);
2021
g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
2022
g_value_unset (&value);
2028
static const GDBusInterfaceVTable _remote_login_skeleton_vtable =
2030
_remote_login_skeleton_handle_method_call,
2031
_remote_login_skeleton_handle_get_property,
2032
_remote_login_skeleton_handle_set_property
2035
static GDBusInterfaceInfo *
2036
remote_login_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton)
2038
return remote_login_interface_info ();
2041
static GDBusInterfaceVTable *
2042
remote_login_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton)
2044
return (GDBusInterfaceVTable *) &_remote_login_skeleton_vtable;
2048
remote_login_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
2050
RemoteLoginSkeleton *skeleton = REMOTE_LOGIN_SKELETON (_skeleton);
2052
GVariantBuilder builder;
2054
g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
2055
if (_remote_login_interface_info.parent_struct.properties == NULL)
2057
for (n = 0; _remote_login_interface_info.parent_struct.properties[n] != NULL; n++)
2059
GDBusPropertyInfo *info = _remote_login_interface_info.parent_struct.properties[n];
2060
if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
2063
value = _remote_login_skeleton_handle_get_property (g_dbus_interface_skeleton_get_connection (G_DBUS_INTERFACE_SKELETON (skeleton)), NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.canonical.RemoteLogin", info->name, NULL, skeleton);
2066
g_variant_take_ref (value);
2067
g_variant_builder_add (&builder, "{sv}", info->name, value);
2068
g_variant_unref (value);
2073
return g_variant_builder_end (&builder);
2077
remote_login_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
2082
_remote_login_on_signal_servers_updated (
2083
RemoteLogin *object,
2084
GVariant *arg_serverList)
2086
RemoteLoginSkeleton *skeleton = REMOTE_LOGIN_SKELETON (object);
2088
GList *connections, *l;
2089
GVariant *signal_variant;
2090
connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
2092
signal_variant = g_variant_ref_sink (g_variant_new ("(@a(sssba(sbva{sv})a(si)))",
2094
for (l = connections; l != NULL; l = l->next)
2096
GDBusConnection *connection = l->data;
2097
g_dbus_connection_emit_signal (connection,
2098
NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.canonical.RemoteLogin", "ServersUpdated",
2099
signal_variant, NULL);
2101
g_variant_unref (signal_variant);
2102
g_list_free_full (connections, g_object_unref);
2106
_remote_login_on_signal_login_servers_updated (
2107
RemoteLogin *object,
2108
const gchar *arg_uri,
2109
const gchar *arg_emailAddress,
2110
const gchar *arg_dataType,
2111
GVariant *arg_serverList)
2113
RemoteLoginSkeleton *skeleton = REMOTE_LOGIN_SKELETON (object);
2115
GList *connections, *l;
2116
GVariant *signal_variant;
2117
connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
2119
signal_variant = g_variant_ref_sink (g_variant_new ("(sss@a(sssba(sbva{sv})a(si)))",
2124
for (l = connections; l != NULL; l = l->next)
2126
GDBusConnection *connection = l->data;
2127
g_dbus_connection_emit_signal (connection,
2128
NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.canonical.RemoteLogin", "LoginServersUpdated",
2129
signal_variant, NULL);
2131
g_variant_unref (signal_variant);
2132
g_list_free_full (connections, g_object_unref);
2136
_remote_login_on_signal_login_changed (
2137
RemoteLogin *object,
2138
const gchar *arg_uri,
2139
const gchar *arg_emailAddress)
2141
RemoteLoginSkeleton *skeleton = REMOTE_LOGIN_SKELETON (object);
2143
GList *connections, *l;
2144
GVariant *signal_variant;
2145
connections = g_dbus_interface_skeleton_get_connections (G_DBUS_INTERFACE_SKELETON (skeleton));
2147
signal_variant = g_variant_ref_sink (g_variant_new ("(ss)",
2150
for (l = connections; l != NULL; l = l->next)
2152
GDBusConnection *connection = l->data;
2153
g_dbus_connection_emit_signal (connection,
2154
NULL, g_dbus_interface_skeleton_get_object_path (G_DBUS_INTERFACE_SKELETON (skeleton)), "com.canonical.RemoteLogin", "LoginChanged",
2155
signal_variant, NULL);
2157
g_variant_unref (signal_variant);
2158
g_list_free_full (connections, g_object_unref);
2161
static void remote_login_skeleton_iface_init (RemoteLoginIface *iface);
2162
G_DEFINE_TYPE_WITH_CODE (RemoteLoginSkeleton, remote_login_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
2163
G_IMPLEMENT_INTERFACE (TYPE_REMOTE_LOGIN, remote_login_skeleton_iface_init));
2166
remote_login_skeleton_finalize (GObject *object)
2168
RemoteLoginSkeleton *skeleton = REMOTE_LOGIN_SKELETON (object);
2169
g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
2170
if (skeleton->priv->changed_properties_idle_source != NULL)
2171
g_source_destroy (skeleton->priv->changed_properties_idle_source);
2172
g_main_context_unref (skeleton->priv->context);
2173
g_mutex_clear (&skeleton->priv->lock);
2174
G_OBJECT_CLASS (remote_login_skeleton_parent_class)->finalize (object);
2178
remote_login_skeleton_init (RemoteLoginSkeleton *skeleton)
2180
skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, TYPE_REMOTE_LOGIN_SKELETON, RemoteLoginSkeletonPrivate);
2181
g_mutex_init (&skeleton->priv->lock);
2182
skeleton->priv->context = g_main_context_ref_thread_default ();
2186
remote_login_skeleton_class_init (RemoteLoginSkeletonClass *klass)
2188
GObjectClass *gobject_class;
2189
GDBusInterfaceSkeletonClass *skeleton_class;
2191
g_type_class_add_private (klass, sizeof (RemoteLoginSkeletonPrivate));
2193
gobject_class = G_OBJECT_CLASS (klass);
2194
gobject_class->finalize = remote_login_skeleton_finalize;
2196
skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
2197
skeleton_class->get_info = remote_login_skeleton_dbus_interface_get_info;
2198
skeleton_class->get_properties = remote_login_skeleton_dbus_interface_get_properties;
2199
skeleton_class->flush = remote_login_skeleton_dbus_interface_flush;
2200
skeleton_class->get_vtable = remote_login_skeleton_dbus_interface_get_vtable;
2204
remote_login_skeleton_iface_init (RemoteLoginIface *iface)
2206
iface->servers_updated = _remote_login_on_signal_servers_updated;
2207
iface->login_servers_updated = _remote_login_on_signal_login_servers_updated;
2208
iface->login_changed = _remote_login_on_signal_login_changed;
2212
* remote_login_skeleton_new:
2214
* Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-com-canonical-RemoteLogin.top_of_page">com.canonical.RemoteLogin</link>.
2216
* Returns: (transfer full) (type RemoteLoginSkeleton): The skeleton object.
2219
remote_login_skeleton_new (void)
2221
return REMOTE_LOGIN (g_object_new (TYPE_REMOTE_LOGIN_SKELETON, NULL));