3108
3108
/* ------------------------------------------------------------------------
3109
* Code for interface org.gnome.evolution.dataserver.Source.RemoteCreatable
3110
* ------------------------------------------------------------------------
3114
* SECTION:EDBusSourceRemoteCreatable
3115
* @title: EDBusSourceRemoteCreatable
3116
* @short_description: Generated C code for the org.gnome.evolution.dataserver.Source.RemoteCreatable D-Bus interface
3118
* This section contains code for working with the <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-RemoteCreatable.top_of_page">org.gnome.evolution.dataserver.Source.RemoteCreatable</link> D-Bus interface in C.
3121
/* ---- Introspection data for org.gnome.evolution.dataserver.Source.RemoteCreatable ---- */
3123
static const _ExtendedGDBusArgInfo _e_dbus_source_remote_creatable_method_info_create_IN_ARG_uid =
3134
static const _ExtendedGDBusArgInfo _e_dbus_source_remote_creatable_method_info_create_IN_ARG_data =
3145
static const _ExtendedGDBusArgInfo * const _e_dbus_source_remote_creatable_method_info_create_IN_ARG_pointers[] =
3147
&_e_dbus_source_remote_creatable_method_info_create_IN_ARG_uid,
3148
&_e_dbus_source_remote_creatable_method_info_create_IN_ARG_data,
3152
static const _ExtendedGDBusMethodInfo _e_dbus_source_remote_creatable_method_info_create =
3157
(GDBusArgInfo **) &_e_dbus_source_remote_creatable_method_info_create_IN_ARG_pointers,
3165
static const _ExtendedGDBusMethodInfo * const _e_dbus_source_remote_creatable_method_info_pointers[] =
3167
&_e_dbus_source_remote_creatable_method_info_create,
3171
static const _ExtendedGDBusInterfaceInfo _e_dbus_source_remote_creatable_interface_info =
3175
(gchar *) "org.gnome.evolution.dataserver.Source.RemoteCreatable",
3176
(GDBusMethodInfo **) &_e_dbus_source_remote_creatable_method_info_pointers,
3181
"source-remote-creatable",
3186
* e_dbus_source_remote_creatable_interface_info:
3188
* Gets a machine-readable description of the <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-RemoteCreatable.top_of_page">org.gnome.evolution.dataserver.Source.RemoteCreatable</link> D-Bus interface.
3190
* Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
3192
GDBusInterfaceInfo *
3193
e_dbus_source_remote_creatable_interface_info (void)
3195
return (GDBusInterfaceInfo *) &_e_dbus_source_remote_creatable_interface_info.parent_struct;
3199
* e_dbus_source_remote_creatable_override_properties:
3200
* @klass: The class structure for a #GObject<!-- -->-derived class.
3201
* @property_id_begin: The property id to assign to the first overridden property.
3203
* Overrides all #GObject properties in the #EDBusSourceRemoteCreatable interface for a concrete class.
3204
* The properties are overridden in the order they are defined.
3206
* Returns: The last property id.
3209
e_dbus_source_remote_creatable_override_properties (GObjectClass *klass, guint property_id_begin)
3211
return property_id_begin - 1;
3217
* EDBusSourceRemoteCreatable:
3219
* Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-RemoteCreatable.top_of_page">org.gnome.evolution.dataserver.Source.RemoteCreatable</link>.
3223
* EDBusSourceRemoteCreatableIface:
3224
* @parent_iface: The parent interface.
3225
* @handle_create: Handler for the #EDBusSourceRemoteCreatable::handle-create signal.
3227
* Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-RemoteCreatable.top_of_page">org.gnome.evolution.dataserver.Source.RemoteCreatable</link>.
3231
e_dbus_source_remote_creatable_default_init (EDBusSourceRemoteCreatableIface *iface)
3233
/* GObject signals for incoming D-Bus method calls: */
3235
* EDBusSourceRemoteCreatable::handle-create:
3236
* @object: A #EDBusSourceRemoteCreatable.
3237
* @invocation: A #GDBusMethodInvocation.
3238
* @arg_uid: Argument passed by remote caller.
3239
* @arg_data: Argument passed by remote caller.
3241
* Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source-RemoteCreatable.Create">Create()</link> D-Bus method.
3243
* 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 e_dbus_source_remote_creatable_complete_create() 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.
3245
* Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
3247
g_signal_new ("handle-create",
3248
G_TYPE_FROM_INTERFACE (iface),
3250
G_STRUCT_OFFSET (EDBusSourceRemoteCreatableIface, handle_create),
3251
g_signal_accumulator_true_handled,
3253
g_cclosure_marshal_generic,
3256
G_TYPE_DBUS_METHOD_INVOCATION, G_TYPE_STRING, G_TYPE_STRING);
3260
typedef EDBusSourceRemoteCreatableIface EDBusSourceRemoteCreatableInterface;
3261
G_DEFINE_INTERFACE (EDBusSourceRemoteCreatable, e_dbus_source_remote_creatable, G_TYPE_OBJECT);
3264
* e_dbus_source_remote_creatable_call_create:
3265
* @proxy: A #EDBusSourceRemoteCreatableProxy.
3266
* @arg_uid: Argument to pass with the method invocation.
3267
* @arg_data: Argument to pass with the method invocation.
3268
* @cancellable: (allow-none): A #GCancellable or %NULL.
3269
* @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
3270
* @user_data: User data to pass to @callback.
3272
* Asynchronously invokes the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source-RemoteCreatable.Create">Create()</link> D-Bus method on @proxy.
3273
* 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.
3274
* You can then call e_dbus_source_remote_creatable_call_create_finish() to get the result of the operation.
3276
* See e_dbus_source_remote_creatable_call_create_sync() for the synchronous, blocking version of this method.
3279
e_dbus_source_remote_creatable_call_create (
3280
EDBusSourceRemoteCreatable *proxy,
3281
const gchar *arg_uid,
3282
const gchar *arg_data,
3283
GCancellable *cancellable,
3284
GAsyncReadyCallback callback,
3287
g_dbus_proxy_call (G_DBUS_PROXY (proxy),
3289
g_variant_new ("(ss)",
3292
G_DBUS_CALL_FLAGS_NONE,
3300
* e_dbus_source_remote_creatable_call_create_finish:
3301
* @proxy: A #EDBusSourceRemoteCreatableProxy.
3302
* @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to e_dbus_source_remote_creatable_call_create().
3303
* @error: Return location for error or %NULL.
3305
* Finishes an operation started with e_dbus_source_remote_creatable_call_create().
3307
* Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
3310
e_dbus_source_remote_creatable_call_create_finish (
3311
EDBusSourceRemoteCreatable *proxy,
3316
_ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
3319
g_variant_get (_ret,
3321
g_variant_unref (_ret);
3323
return _ret != NULL;
3327
* e_dbus_source_remote_creatable_call_create_sync:
3328
* @proxy: A #EDBusSourceRemoteCreatableProxy.
3329
* @arg_uid: Argument to pass with the method invocation.
3330
* @arg_data: Argument to pass with the method invocation.
3331
* @cancellable: (allow-none): A #GCancellable or %NULL.
3332
* @error: Return location for error or %NULL.
3334
* Synchronously invokes the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source-RemoteCreatable.Create">Create()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
3336
* See e_dbus_source_remote_creatable_call_create() for the asynchronous version of this method.
3338
* Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
3341
e_dbus_source_remote_creatable_call_create_sync (
3342
EDBusSourceRemoteCreatable *proxy,
3343
const gchar *arg_uid,
3344
const gchar *arg_data,
3345
GCancellable *cancellable,
3349
_ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
3351
g_variant_new ("(ss)",
3354
G_DBUS_CALL_FLAGS_NONE,
3360
g_variant_get (_ret,
3362
g_variant_unref (_ret);
3364
return _ret != NULL;
3368
* e_dbus_source_remote_creatable_complete_create:
3369
* @object: A #EDBusSourceRemoteCreatable.
3370
* @invocation: (transfer full): A #GDBusMethodInvocation.
3372
* Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source-RemoteCreatable.Create">Create()</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.
3374
* This method will free @invocation, you cannot use it afterwards.
3377
e_dbus_source_remote_creatable_complete_create (
3378
EDBusSourceRemoteCreatable *object,
3379
GDBusMethodInvocation *invocation)
3381
g_dbus_method_invocation_return_value (invocation,
3382
g_variant_new ("()"));
3385
/* ------------------------------------------------------------------------ */
3388
* EDBusSourceRemoteCreatableProxy:
3390
* The #EDBusSourceRemoteCreatableProxy structure contains only private data and should only be accessed using the provided API.
3394
* EDBusSourceRemoteCreatableProxyClass:
3395
* @parent_class: The parent class.
3397
* Class structure for #EDBusSourceRemoteCreatableProxy.
3400
struct _EDBusSourceRemoteCreatableProxyPrivate
3405
static void e_dbus_source_remote_creatable_proxy_iface_init (EDBusSourceRemoteCreatableIface *iface);
3407
G_DEFINE_TYPE_WITH_CODE (EDBusSourceRemoteCreatableProxy, e_dbus_source_remote_creatable_proxy, G_TYPE_DBUS_PROXY,
3408
G_IMPLEMENT_INTERFACE (E_DBUS_TYPE_SOURCE_REMOTE_CREATABLE, e_dbus_source_remote_creatable_proxy_iface_init));
3411
e_dbus_source_remote_creatable_proxy_finalize (GObject *object)
3413
EDBusSourceRemoteCreatableProxy *proxy = E_DBUS_SOURCE_REMOTE_CREATABLE_PROXY (object);
3414
g_datalist_clear (&proxy->priv->qdata);
3415
G_OBJECT_CLASS (e_dbus_source_remote_creatable_proxy_parent_class)->finalize (object);
3419
e_dbus_source_remote_creatable_proxy_get_property (GObject *object,
3427
e_dbus_source_remote_creatable_proxy_set_property (GObject *object,
3429
const GValue *value,
3435
e_dbus_source_remote_creatable_proxy_g_signal (GDBusProxy *proxy,
3436
const gchar *sender_name,
3437
const gchar *signal_name,
3438
GVariant *parameters)
3440
_ExtendedGDBusSignalInfo *info;
3447
info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_e_dbus_source_remote_creatable_interface_info.parent_struct, signal_name);
3450
num_params = g_variant_n_children (parameters);
3451
paramv = g_new0 (GValue, num_params + 1);
3452
g_value_init (¶mv[0], E_DBUS_TYPE_SOURCE_REMOTE_CREATABLE);
3453
g_value_set_object (¶mv[0], proxy);
3454
g_variant_iter_init (&iter, parameters);
3456
while ((child = g_variant_iter_next_value (&iter)) != NULL)
3458
_ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
3459
if (arg_info->use_gvariant)
3461
g_value_init (¶mv[n], G_TYPE_VARIANT);
3462
g_value_set_variant (¶mv[n], child);
3466
g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
3467
g_variant_unref (child);
3469
signal_id = g_signal_lookup (info->signal_name, E_DBUS_TYPE_SOURCE_REMOTE_CREATABLE);
3470
g_signal_emitv (paramv, signal_id, 0, NULL);
3471
for (n = 0; n < num_params + 1; n++)
3472
g_value_unset (¶mv[n]);
3477
e_dbus_source_remote_creatable_proxy_g_properties_changed (GDBusProxy *_proxy,
3478
GVariant *changed_properties,
3479
const gchar *const *invalidated_properties)
3481
EDBusSourceRemoteCreatableProxy *proxy = E_DBUS_SOURCE_REMOTE_CREATABLE_PROXY (_proxy);
3485
_ExtendedGDBusPropertyInfo *info;
3486
g_variant_get (changed_properties, "a{sv}", &iter);
3487
while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
3489
info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_e_dbus_source_remote_creatable_interface_info.parent_struct, key);
3490
g_datalist_remove_data (&proxy->priv->qdata, key);
3492
g_object_notify (G_OBJECT (proxy), info->hyphen_name);
3494
g_variant_iter_free (iter);
3495
for (n = 0; invalidated_properties[n] != NULL; n++)
3497
info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_e_dbus_source_remote_creatable_interface_info.parent_struct, invalidated_properties[n]);
3498
g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
3500
g_object_notify (G_OBJECT (proxy), info->hyphen_name);
3505
e_dbus_source_remote_creatable_proxy_init (EDBusSourceRemoteCreatableProxy *proxy)
3507
proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, E_DBUS_TYPE_SOURCE_REMOTE_CREATABLE_PROXY, EDBusSourceRemoteCreatableProxyPrivate);
3508
g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), e_dbus_source_remote_creatable_interface_info ());
3512
e_dbus_source_remote_creatable_proxy_class_init (EDBusSourceRemoteCreatableProxyClass *klass)
3514
GObjectClass *gobject_class;
3515
GDBusProxyClass *proxy_class;
3517
g_type_class_add_private (klass, sizeof (EDBusSourceRemoteCreatableProxyPrivate));
3519
gobject_class = G_OBJECT_CLASS (klass);
3520
gobject_class->finalize = e_dbus_source_remote_creatable_proxy_finalize;
3521
gobject_class->get_property = e_dbus_source_remote_creatable_proxy_get_property;
3522
gobject_class->set_property = e_dbus_source_remote_creatable_proxy_set_property;
3524
proxy_class = G_DBUS_PROXY_CLASS (klass);
3525
proxy_class->g_signal = e_dbus_source_remote_creatable_proxy_g_signal;
3526
proxy_class->g_properties_changed = e_dbus_source_remote_creatable_proxy_g_properties_changed;
3531
e_dbus_source_remote_creatable_proxy_iface_init (EDBusSourceRemoteCreatableIface *iface)
3536
* e_dbus_source_remote_creatable_proxy_new:
3537
* @connection: A #GDBusConnection.
3538
* @flags: Flags from the #GDBusProxyFlags enumeration.
3539
* @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
3540
* @object_path: An object path.
3541
* @cancellable: (allow-none): A #GCancellable or %NULL.
3542
* @callback: A #GAsyncReadyCallback to call when the request is satisfied.
3543
* @user_data: User data to pass to @callback.
3545
* Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-RemoteCreatable.top_of_page">org.gnome.evolution.dataserver.Source.RemoteCreatable</link>. See g_dbus_proxy_new() for more details.
3547
* 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.
3548
* You can then call e_dbus_source_remote_creatable_proxy_new_finish() to get the result of the operation.
3550
* See e_dbus_source_remote_creatable_proxy_new_sync() for the synchronous, blocking version of this constructor.
3553
e_dbus_source_remote_creatable_proxy_new (
3554
GDBusConnection *connection,
3555
GDBusProxyFlags flags,
3557
const gchar *object_path,
3558
GCancellable *cancellable,
3559
GAsyncReadyCallback callback,
3562
g_async_initable_new_async (E_DBUS_TYPE_SOURCE_REMOTE_CREATABLE_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", "org.gnome.evolution.dataserver.Source.RemoteCreatable", NULL);
3566
* e_dbus_source_remote_creatable_proxy_new_finish:
3567
* @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to e_dbus_source_remote_creatable_proxy_new().
3568
* @error: Return location for error or %NULL
3570
* Finishes an operation started with e_dbus_source_remote_creatable_proxy_new().
3572
* Returns: (transfer full) (type EDBusSourceRemoteCreatableProxy): The constructed proxy object or %NULL if @error is set.
3574
EDBusSourceRemoteCreatable *
3575
e_dbus_source_remote_creatable_proxy_new_finish (
3580
GObject *source_object;
3581
source_object = g_async_result_get_source_object (res);
3582
ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
3583
g_object_unref (source_object);
3585
return E_DBUS_SOURCE_REMOTE_CREATABLE (ret);
3591
* e_dbus_source_remote_creatable_proxy_new_sync:
3592
* @connection: A #GDBusConnection.
3593
* @flags: Flags from the #GDBusProxyFlags enumeration.
3594
* @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
3595
* @object_path: An object path.
3596
* @cancellable: (allow-none): A #GCancellable or %NULL.
3597
* @error: Return location for error or %NULL
3599
* Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-RemoteCreatable.top_of_page">org.gnome.evolution.dataserver.Source.RemoteCreatable</link>. See g_dbus_proxy_new_sync() for more details.
3601
* The calling thread is blocked until a reply is received.
3603
* See e_dbus_source_remote_creatable_proxy_new() for the asynchronous version of this constructor.
3605
* Returns: (transfer full) (type EDBusSourceRemoteCreatableProxy): The constructed proxy object or %NULL if @error is set.
3607
EDBusSourceRemoteCreatable *
3608
e_dbus_source_remote_creatable_proxy_new_sync (
3609
GDBusConnection *connection,
3610
GDBusProxyFlags flags,
3612
const gchar *object_path,
3613
GCancellable *cancellable,
3617
ret = g_initable_new (E_DBUS_TYPE_SOURCE_REMOTE_CREATABLE_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.gnome.evolution.dataserver.Source.RemoteCreatable", NULL);
3619
return E_DBUS_SOURCE_REMOTE_CREATABLE (ret);
3626
* e_dbus_source_remote_creatable_proxy_new_for_bus:
3627
* @bus_type: A #GBusType.
3628
* @flags: Flags from the #GDBusProxyFlags enumeration.
3629
* @name: A bus name (well-known or unique).
3630
* @object_path: An object path.
3631
* @cancellable: (allow-none): A #GCancellable or %NULL.
3632
* @callback: A #GAsyncReadyCallback to call when the request is satisfied.
3633
* @user_data: User data to pass to @callback.
3635
* Like e_dbus_source_remote_creatable_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
3637
* 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.
3638
* You can then call e_dbus_source_remote_creatable_proxy_new_for_bus_finish() to get the result of the operation.
3640
* See e_dbus_source_remote_creatable_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
3643
e_dbus_source_remote_creatable_proxy_new_for_bus (
3645
GDBusProxyFlags flags,
3647
const gchar *object_path,
3648
GCancellable *cancellable,
3649
GAsyncReadyCallback callback,
3652
g_async_initable_new_async (E_DBUS_TYPE_SOURCE_REMOTE_CREATABLE_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", "org.gnome.evolution.dataserver.Source.RemoteCreatable", NULL);
3656
* e_dbus_source_remote_creatable_proxy_new_for_bus_finish:
3657
* @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to e_dbus_source_remote_creatable_proxy_new_for_bus().
3658
* @error: Return location for error or %NULL
3660
* Finishes an operation started with e_dbus_source_remote_creatable_proxy_new_for_bus().
3662
* Returns: (transfer full) (type EDBusSourceRemoteCreatableProxy): The constructed proxy object or %NULL if @error is set.
3664
EDBusSourceRemoteCreatable *
3665
e_dbus_source_remote_creatable_proxy_new_for_bus_finish (
3670
GObject *source_object;
3671
source_object = g_async_result_get_source_object (res);
3672
ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
3673
g_object_unref (source_object);
3675
return E_DBUS_SOURCE_REMOTE_CREATABLE (ret);
3681
* e_dbus_source_remote_creatable_proxy_new_for_bus_sync:
3682
* @bus_type: A #GBusType.
3683
* @flags: Flags from the #GDBusProxyFlags enumeration.
3684
* @name: A bus name (well-known or unique).
3685
* @object_path: An object path.
3686
* @cancellable: (allow-none): A #GCancellable or %NULL.
3687
* @error: Return location for error or %NULL
3689
* Like e_dbus_source_remote_creatable_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
3691
* The calling thread is blocked until a reply is received.
3693
* See e_dbus_source_remote_creatable_proxy_new_for_bus() for the asynchronous version of this constructor.
3695
* Returns: (transfer full) (type EDBusSourceRemoteCreatableProxy): The constructed proxy object or %NULL if @error is set.
3697
EDBusSourceRemoteCreatable *
3698
e_dbus_source_remote_creatable_proxy_new_for_bus_sync (
3700
GDBusProxyFlags flags,
3702
const gchar *object_path,
3703
GCancellable *cancellable,
3707
ret = g_initable_new (E_DBUS_TYPE_SOURCE_REMOTE_CREATABLE_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.gnome.evolution.dataserver.Source.RemoteCreatable", NULL);
3709
return E_DBUS_SOURCE_REMOTE_CREATABLE (ret);
3715
/* ------------------------------------------------------------------------ */
3718
* EDBusSourceRemoteCreatableSkeleton:
3720
* The #EDBusSourceRemoteCreatableSkeleton structure contains only private data and should only be accessed using the provided API.
3724
* EDBusSourceRemoteCreatableSkeletonClass:
3725
* @parent_class: The parent class.
3727
* Class structure for #EDBusSourceRemoteCreatableSkeleton.
3730
struct _EDBusSourceRemoteCreatableSkeletonPrivate
3733
GList *changed_properties;
3734
GSource *changed_properties_idle_source;
3735
GMainContext *context;
3740
_e_dbus_source_remote_creatable_skeleton_handle_method_call (
3741
GDBusConnection *connection,
3742
const gchar *sender,
3743
const gchar *object_path,
3744
const gchar *interface_name,
3745
const gchar *method_name,
3746
GVariant *parameters,
3747
GDBusMethodInvocation *invocation,
3750
EDBusSourceRemoteCreatableSkeleton *skeleton = E_DBUS_SOURCE_REMOTE_CREATABLE_SKELETON (user_data);
3751
_ExtendedGDBusMethodInfo *info;
3759
GValue return_value = G_VALUE_INIT;
3760
info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
3761
g_assert (info != NULL);
3762
num_params = g_variant_n_children (parameters);
3763
num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra);
3765
g_value_init (¶mv[n], E_DBUS_TYPE_SOURCE_REMOTE_CREATABLE);
3766
g_value_set_object (¶mv[n++], skeleton);
3767
g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION);
3768
g_value_set_object (¶mv[n++], invocation);
3769
if (info->pass_fdlist)
3772
g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST);
3773
g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
3775
g_assert_not_reached ();
3778
g_variant_iter_init (&iter, parameters);
3779
while ((child = g_variant_iter_next_value (&iter)) != NULL)
3781
_ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
3782
if (arg_info->use_gvariant)
3784
g_value_init (¶mv[n], G_TYPE_VARIANT);
3785
g_value_set_variant (¶mv[n], child);
3789
g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
3790
g_variant_unref (child);
3792
signal_id = g_signal_lookup (info->signal_name, E_DBUS_TYPE_SOURCE_REMOTE_CREATABLE);
3793
g_value_init (&return_value, G_TYPE_BOOLEAN);
3794
g_signal_emitv (paramv, signal_id, 0, &return_value);
3795
if (!g_value_get_boolean (&return_value))
3796
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);
3797
g_value_unset (&return_value);
3798
for (n = 0; n < num_params + num_extra; n++)
3799
g_value_unset (¶mv[n]);
3804
_e_dbus_source_remote_creatable_skeleton_handle_get_property (
3805
GDBusConnection *connection,
3806
const gchar *sender,
3807
const gchar *object_path,
3808
const gchar *interface_name,
3809
const gchar *property_name,
3813
EDBusSourceRemoteCreatableSkeleton *skeleton = E_DBUS_SOURCE_REMOTE_CREATABLE_SKELETON (user_data);
3814
GValue value = G_VALUE_INIT;
3816
_ExtendedGDBusPropertyInfo *info;
3819
info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_e_dbus_source_remote_creatable_interface_info.parent_struct, property_name);
3820
g_assert (info != NULL);
3821
pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
3824
g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
3828
g_value_init (&value, pspec->value_type);
3829
g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
3830
ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
3831
g_value_unset (&value);
3837
_e_dbus_source_remote_creatable_skeleton_handle_set_property (
3838
GDBusConnection *connection,
3839
const gchar *sender,
3840
const gchar *object_path,
3841
const gchar *interface_name,
3842
const gchar *property_name,
3847
EDBusSourceRemoteCreatableSkeleton *skeleton = E_DBUS_SOURCE_REMOTE_CREATABLE_SKELETON (user_data);
3848
GValue value = G_VALUE_INIT;
3850
_ExtendedGDBusPropertyInfo *info;
3853
info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_e_dbus_source_remote_creatable_interface_info.parent_struct, property_name);
3854
g_assert (info != NULL);
3855
pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
3858
g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
3862
if (info->use_gvariant)
3863
g_value_set_variant (&value, variant);
3865
g_dbus_gvariant_to_gvalue (variant, &value);
3866
g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
3867
g_value_unset (&value);
3873
static const GDBusInterfaceVTable _e_dbus_source_remote_creatable_skeleton_vtable =
3875
_e_dbus_source_remote_creatable_skeleton_handle_method_call,
3876
_e_dbus_source_remote_creatable_skeleton_handle_get_property,
3877
_e_dbus_source_remote_creatable_skeleton_handle_set_property
3880
static GDBusInterfaceInfo *
3881
e_dbus_source_remote_creatable_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton)
3883
return e_dbus_source_remote_creatable_interface_info ();
3886
static GDBusInterfaceVTable *
3887
e_dbus_source_remote_creatable_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton)
3889
return (GDBusInterfaceVTable *) &_e_dbus_source_remote_creatable_skeleton_vtable;
3893
e_dbus_source_remote_creatable_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
3895
EDBusSourceRemoteCreatableSkeleton *skeleton = E_DBUS_SOURCE_REMOTE_CREATABLE_SKELETON (_skeleton);
3897
GVariantBuilder builder;
3899
g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
3900
if (_e_dbus_source_remote_creatable_interface_info.parent_struct.properties == NULL)
3902
for (n = 0; _e_dbus_source_remote_creatable_interface_info.parent_struct.properties[n] != NULL; n++)
3904
GDBusPropertyInfo *info = _e_dbus_source_remote_creatable_interface_info.parent_struct.properties[n];
3905
if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
3908
value = _e_dbus_source_remote_creatable_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)), "org.gnome.evolution.dataserver.Source.RemoteCreatable", info->name, NULL, skeleton);
3911
g_variant_take_ref (value);
3912
g_variant_builder_add (&builder, "{sv}", info->name, value);
3913
g_variant_unref (value);
3918
return g_variant_builder_end (&builder);
3922
e_dbus_source_remote_creatable_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
3926
static void e_dbus_source_remote_creatable_skeleton_iface_init (EDBusSourceRemoteCreatableIface *iface);
3927
G_DEFINE_TYPE_WITH_CODE (EDBusSourceRemoteCreatableSkeleton, e_dbus_source_remote_creatable_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
3928
G_IMPLEMENT_INTERFACE (E_DBUS_TYPE_SOURCE_REMOTE_CREATABLE, e_dbus_source_remote_creatable_skeleton_iface_init));
3931
e_dbus_source_remote_creatable_skeleton_finalize (GObject *object)
3933
EDBusSourceRemoteCreatableSkeleton *skeleton = E_DBUS_SOURCE_REMOTE_CREATABLE_SKELETON (object);
3934
g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
3935
if (skeleton->priv->changed_properties_idle_source != NULL)
3936
g_source_destroy (skeleton->priv->changed_properties_idle_source);
3937
g_main_context_unref (skeleton->priv->context);
3938
g_mutex_clear (&skeleton->priv->lock);
3939
G_OBJECT_CLASS (e_dbus_source_remote_creatable_skeleton_parent_class)->finalize (object);
3943
e_dbus_source_remote_creatable_skeleton_init (EDBusSourceRemoteCreatableSkeleton *skeleton)
3945
skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, E_DBUS_TYPE_SOURCE_REMOTE_CREATABLE_SKELETON, EDBusSourceRemoteCreatableSkeletonPrivate);
3946
g_mutex_init (&skeleton->priv->lock);
3947
skeleton->priv->context = g_main_context_ref_thread_default ();
3951
e_dbus_source_remote_creatable_skeleton_class_init (EDBusSourceRemoteCreatableSkeletonClass *klass)
3953
GObjectClass *gobject_class;
3954
GDBusInterfaceSkeletonClass *skeleton_class;
3956
g_type_class_add_private (klass, sizeof (EDBusSourceRemoteCreatableSkeletonPrivate));
3958
gobject_class = G_OBJECT_CLASS (klass);
3959
gobject_class->finalize = e_dbus_source_remote_creatable_skeleton_finalize;
3961
skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
3962
skeleton_class->get_info = e_dbus_source_remote_creatable_skeleton_dbus_interface_get_info;
3963
skeleton_class->get_properties = e_dbus_source_remote_creatable_skeleton_dbus_interface_get_properties;
3964
skeleton_class->flush = e_dbus_source_remote_creatable_skeleton_dbus_interface_flush;
3965
skeleton_class->get_vtable = e_dbus_source_remote_creatable_skeleton_dbus_interface_get_vtable;
3969
e_dbus_source_remote_creatable_skeleton_iface_init (EDBusSourceRemoteCreatableIface *iface)
3974
* e_dbus_source_remote_creatable_skeleton_new:
3976
* Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-RemoteCreatable.top_of_page">org.gnome.evolution.dataserver.Source.RemoteCreatable</link>.
3978
* Returns: (transfer full) (type EDBusSourceRemoteCreatableSkeleton): The skeleton object.
3980
EDBusSourceRemoteCreatable *
3981
e_dbus_source_remote_creatable_skeleton_new (void)
3983
return E_DBUS_SOURCE_REMOTE_CREATABLE (g_object_new (E_DBUS_TYPE_SOURCE_REMOTE_CREATABLE_SKELETON, NULL));
3986
/* ------------------------------------------------------------------------
3987
* Code for interface org.gnome.evolution.dataserver.Source.RemoteDeletable
3988
* ------------------------------------------------------------------------
3992
* SECTION:EDBusSourceRemoteDeletable
3993
* @title: EDBusSourceRemoteDeletable
3994
* @short_description: Generated C code for the org.gnome.evolution.dataserver.Source.RemoteDeletable D-Bus interface
3996
* This section contains code for working with the <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-RemoteDeletable.top_of_page">org.gnome.evolution.dataserver.Source.RemoteDeletable</link> D-Bus interface in C.
3999
/* ---- Introspection data for org.gnome.evolution.dataserver.Source.RemoteDeletable ---- */
4001
static const _ExtendedGDBusMethodInfo _e_dbus_source_remote_deletable_method_info_delete =
4014
static const _ExtendedGDBusMethodInfo * const _e_dbus_source_remote_deletable_method_info_pointers[] =
4016
&_e_dbus_source_remote_deletable_method_info_delete,
4020
static const _ExtendedGDBusInterfaceInfo _e_dbus_source_remote_deletable_interface_info =
4024
(gchar *) "org.gnome.evolution.dataserver.Source.RemoteDeletable",
4025
(GDBusMethodInfo **) &_e_dbus_source_remote_deletable_method_info_pointers,
4030
"source-remote-deletable",
4035
* e_dbus_source_remote_deletable_interface_info:
4037
* Gets a machine-readable description of the <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-RemoteDeletable.top_of_page">org.gnome.evolution.dataserver.Source.RemoteDeletable</link> D-Bus interface.
4039
* Returns: (transfer none): A #GDBusInterfaceInfo. Do not free.
4041
GDBusInterfaceInfo *
4042
e_dbus_source_remote_deletable_interface_info (void)
4044
return (GDBusInterfaceInfo *) &_e_dbus_source_remote_deletable_interface_info.parent_struct;
4048
* e_dbus_source_remote_deletable_override_properties:
4049
* @klass: The class structure for a #GObject<!-- -->-derived class.
4050
* @property_id_begin: The property id to assign to the first overridden property.
4052
* Overrides all #GObject properties in the #EDBusSourceRemoteDeletable interface for a concrete class.
4053
* The properties are overridden in the order they are defined.
4055
* Returns: The last property id.
4058
e_dbus_source_remote_deletable_override_properties (GObjectClass *klass, guint property_id_begin)
4060
return property_id_begin - 1;
4066
* EDBusSourceRemoteDeletable:
4068
* Abstract interface type for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-RemoteDeletable.top_of_page">org.gnome.evolution.dataserver.Source.RemoteDeletable</link>.
4072
* EDBusSourceRemoteDeletableIface:
4073
* @parent_iface: The parent interface.
4074
* @handle_delete: Handler for the #EDBusSourceRemoteDeletable::handle-delete signal.
4076
* Virtual table for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-RemoteDeletable.top_of_page">org.gnome.evolution.dataserver.Source.RemoteDeletable</link>.
4080
e_dbus_source_remote_deletable_default_init (EDBusSourceRemoteDeletableIface *iface)
4082
/* GObject signals for incoming D-Bus method calls: */
4084
* EDBusSourceRemoteDeletable::handle-delete:
4085
* @object: A #EDBusSourceRemoteDeletable.
4086
* @invocation: A #GDBusMethodInvocation.
4088
* Signal emitted when a remote caller is invoking the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source-RemoteDeletable.Delete">Delete()</link> D-Bus method.
4090
* 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 e_dbus_source_remote_deletable_complete_delete() 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.
4092
* Returns: %TRUE if the invocation was handled, %FALSE to let other signal handlers run.
4094
g_signal_new ("handle-delete",
4095
G_TYPE_FROM_INTERFACE (iface),
4097
G_STRUCT_OFFSET (EDBusSourceRemoteDeletableIface, handle_delete),
4098
g_signal_accumulator_true_handled,
4100
g_cclosure_marshal_generic,
4103
G_TYPE_DBUS_METHOD_INVOCATION);
4107
typedef EDBusSourceRemoteDeletableIface EDBusSourceRemoteDeletableInterface;
4108
G_DEFINE_INTERFACE (EDBusSourceRemoteDeletable, e_dbus_source_remote_deletable, G_TYPE_OBJECT);
4111
* e_dbus_source_remote_deletable_call_delete:
4112
* @proxy: A #EDBusSourceRemoteDeletableProxy.
4113
* @cancellable: (allow-none): A #GCancellable or %NULL.
4114
* @callback: A #GAsyncReadyCallback to call when the request is satisfied or %NULL.
4115
* @user_data: User data to pass to @callback.
4117
* Asynchronously invokes the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source-RemoteDeletable.Delete">Delete()</link> D-Bus method on @proxy.
4118
* 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.
4119
* You can then call e_dbus_source_remote_deletable_call_delete_finish() to get the result of the operation.
4121
* See e_dbus_source_remote_deletable_call_delete_sync() for the synchronous, blocking version of this method.
4124
e_dbus_source_remote_deletable_call_delete (
4125
EDBusSourceRemoteDeletable *proxy,
4126
GCancellable *cancellable,
4127
GAsyncReadyCallback callback,
4130
g_dbus_proxy_call (G_DBUS_PROXY (proxy),
4132
g_variant_new ("()"),
4133
G_DBUS_CALL_FLAGS_NONE,
4141
* e_dbus_source_remote_deletable_call_delete_finish:
4142
* @proxy: A #EDBusSourceRemoteDeletableProxy.
4143
* @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to e_dbus_source_remote_deletable_call_delete().
4144
* @error: Return location for error or %NULL.
4146
* Finishes an operation started with e_dbus_source_remote_deletable_call_delete().
4148
* Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
4151
e_dbus_source_remote_deletable_call_delete_finish (
4152
EDBusSourceRemoteDeletable *proxy,
4157
_ret = g_dbus_proxy_call_finish (G_DBUS_PROXY (proxy), res, error);
4160
g_variant_get (_ret,
4162
g_variant_unref (_ret);
4164
return _ret != NULL;
4168
* e_dbus_source_remote_deletable_call_delete_sync:
4169
* @proxy: A #EDBusSourceRemoteDeletableProxy.
4170
* @cancellable: (allow-none): A #GCancellable or %NULL.
4171
* @error: Return location for error or %NULL.
4173
* Synchronously invokes the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source-RemoteDeletable.Delete">Delete()</link> D-Bus method on @proxy. The calling thread is blocked until a reply is received.
4175
* See e_dbus_source_remote_deletable_call_delete() for the asynchronous version of this method.
4177
* Returns: (skip): %TRUE if the call succeded, %FALSE if @error is set.
4180
e_dbus_source_remote_deletable_call_delete_sync (
4181
EDBusSourceRemoteDeletable *proxy,
4182
GCancellable *cancellable,
4186
_ret = g_dbus_proxy_call_sync (G_DBUS_PROXY (proxy),
4188
g_variant_new ("()"),
4189
G_DBUS_CALL_FLAGS_NONE,
4195
g_variant_get (_ret,
4197
g_variant_unref (_ret);
4199
return _ret != NULL;
4203
* e_dbus_source_remote_deletable_complete_delete:
4204
* @object: A #EDBusSourceRemoteDeletable.
4205
* @invocation: (transfer full): A #GDBusMethodInvocation.
4207
* Helper function used in service implementations to finish handling invocations of the <link linkend="gdbus-method-org-gnome-evolution-dataserver-Source-RemoteDeletable.Delete">Delete()</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.
4209
* This method will free @invocation, you cannot use it afterwards.
4212
e_dbus_source_remote_deletable_complete_delete (
4213
EDBusSourceRemoteDeletable *object,
4214
GDBusMethodInvocation *invocation)
4216
g_dbus_method_invocation_return_value (invocation,
4217
g_variant_new ("()"));
4220
/* ------------------------------------------------------------------------ */
4223
* EDBusSourceRemoteDeletableProxy:
4225
* The #EDBusSourceRemoteDeletableProxy structure contains only private data and should only be accessed using the provided API.
4229
* EDBusSourceRemoteDeletableProxyClass:
4230
* @parent_class: The parent class.
4232
* Class structure for #EDBusSourceRemoteDeletableProxy.
4235
struct _EDBusSourceRemoteDeletableProxyPrivate
4240
static void e_dbus_source_remote_deletable_proxy_iface_init (EDBusSourceRemoteDeletableIface *iface);
4242
G_DEFINE_TYPE_WITH_CODE (EDBusSourceRemoteDeletableProxy, e_dbus_source_remote_deletable_proxy, G_TYPE_DBUS_PROXY,
4243
G_IMPLEMENT_INTERFACE (E_DBUS_TYPE_SOURCE_REMOTE_DELETABLE, e_dbus_source_remote_deletable_proxy_iface_init));
4246
e_dbus_source_remote_deletable_proxy_finalize (GObject *object)
4248
EDBusSourceRemoteDeletableProxy *proxy = E_DBUS_SOURCE_REMOTE_DELETABLE_PROXY (object);
4249
g_datalist_clear (&proxy->priv->qdata);
4250
G_OBJECT_CLASS (e_dbus_source_remote_deletable_proxy_parent_class)->finalize (object);
4254
e_dbus_source_remote_deletable_proxy_get_property (GObject *object,
4262
e_dbus_source_remote_deletable_proxy_set_property (GObject *object,
4264
const GValue *value,
4270
e_dbus_source_remote_deletable_proxy_g_signal (GDBusProxy *proxy,
4271
const gchar *sender_name,
4272
const gchar *signal_name,
4273
GVariant *parameters)
4275
_ExtendedGDBusSignalInfo *info;
4282
info = (_ExtendedGDBusSignalInfo *) g_dbus_interface_info_lookup_signal ((GDBusInterfaceInfo *) &_e_dbus_source_remote_deletable_interface_info.parent_struct, signal_name);
4285
num_params = g_variant_n_children (parameters);
4286
paramv = g_new0 (GValue, num_params + 1);
4287
g_value_init (¶mv[0], E_DBUS_TYPE_SOURCE_REMOTE_DELETABLE);
4288
g_value_set_object (¶mv[0], proxy);
4289
g_variant_iter_init (&iter, parameters);
4291
while ((child = g_variant_iter_next_value (&iter)) != NULL)
4293
_ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.args[n - 1];
4294
if (arg_info->use_gvariant)
4296
g_value_init (¶mv[n], G_TYPE_VARIANT);
4297
g_value_set_variant (¶mv[n], child);
4301
g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
4302
g_variant_unref (child);
4304
signal_id = g_signal_lookup (info->signal_name, E_DBUS_TYPE_SOURCE_REMOTE_DELETABLE);
4305
g_signal_emitv (paramv, signal_id, 0, NULL);
4306
for (n = 0; n < num_params + 1; n++)
4307
g_value_unset (¶mv[n]);
4312
e_dbus_source_remote_deletable_proxy_g_properties_changed (GDBusProxy *_proxy,
4313
GVariant *changed_properties,
4314
const gchar *const *invalidated_properties)
4316
EDBusSourceRemoteDeletableProxy *proxy = E_DBUS_SOURCE_REMOTE_DELETABLE_PROXY (_proxy);
4320
_ExtendedGDBusPropertyInfo *info;
4321
g_variant_get (changed_properties, "a{sv}", &iter);
4322
while (g_variant_iter_next (iter, "{&sv}", &key, NULL))
4324
info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_e_dbus_source_remote_deletable_interface_info.parent_struct, key);
4325
g_datalist_remove_data (&proxy->priv->qdata, key);
4327
g_object_notify (G_OBJECT (proxy), info->hyphen_name);
4329
g_variant_iter_free (iter);
4330
for (n = 0; invalidated_properties[n] != NULL; n++)
4332
info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_e_dbus_source_remote_deletable_interface_info.parent_struct, invalidated_properties[n]);
4333
g_datalist_remove_data (&proxy->priv->qdata, invalidated_properties[n]);
4335
g_object_notify (G_OBJECT (proxy), info->hyphen_name);
4340
e_dbus_source_remote_deletable_proxy_init (EDBusSourceRemoteDeletableProxy *proxy)
4342
proxy->priv = G_TYPE_INSTANCE_GET_PRIVATE (proxy, E_DBUS_TYPE_SOURCE_REMOTE_DELETABLE_PROXY, EDBusSourceRemoteDeletableProxyPrivate);
4343
g_dbus_proxy_set_interface_info (G_DBUS_PROXY (proxy), e_dbus_source_remote_deletable_interface_info ());
4347
e_dbus_source_remote_deletable_proxy_class_init (EDBusSourceRemoteDeletableProxyClass *klass)
4349
GObjectClass *gobject_class;
4350
GDBusProxyClass *proxy_class;
4352
g_type_class_add_private (klass, sizeof (EDBusSourceRemoteDeletableProxyPrivate));
4354
gobject_class = G_OBJECT_CLASS (klass);
4355
gobject_class->finalize = e_dbus_source_remote_deletable_proxy_finalize;
4356
gobject_class->get_property = e_dbus_source_remote_deletable_proxy_get_property;
4357
gobject_class->set_property = e_dbus_source_remote_deletable_proxy_set_property;
4359
proxy_class = G_DBUS_PROXY_CLASS (klass);
4360
proxy_class->g_signal = e_dbus_source_remote_deletable_proxy_g_signal;
4361
proxy_class->g_properties_changed = e_dbus_source_remote_deletable_proxy_g_properties_changed;
4366
e_dbus_source_remote_deletable_proxy_iface_init (EDBusSourceRemoteDeletableIface *iface)
4371
* e_dbus_source_remote_deletable_proxy_new:
4372
* @connection: A #GDBusConnection.
4373
* @flags: Flags from the #GDBusProxyFlags enumeration.
4374
* @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
4375
* @object_path: An object path.
4376
* @cancellable: (allow-none): A #GCancellable or %NULL.
4377
* @callback: A #GAsyncReadyCallback to call when the request is satisfied.
4378
* @user_data: User data to pass to @callback.
4380
* Asynchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-RemoteDeletable.top_of_page">org.gnome.evolution.dataserver.Source.RemoteDeletable</link>. See g_dbus_proxy_new() for more details.
4382
* 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.
4383
* You can then call e_dbus_source_remote_deletable_proxy_new_finish() to get the result of the operation.
4385
* See e_dbus_source_remote_deletable_proxy_new_sync() for the synchronous, blocking version of this constructor.
4388
e_dbus_source_remote_deletable_proxy_new (
4389
GDBusConnection *connection,
4390
GDBusProxyFlags flags,
4392
const gchar *object_path,
4393
GCancellable *cancellable,
4394
GAsyncReadyCallback callback,
4397
g_async_initable_new_async (E_DBUS_TYPE_SOURCE_REMOTE_DELETABLE_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", "org.gnome.evolution.dataserver.Source.RemoteDeletable", NULL);
4401
* e_dbus_source_remote_deletable_proxy_new_finish:
4402
* @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to e_dbus_source_remote_deletable_proxy_new().
4403
* @error: Return location for error or %NULL
4405
* Finishes an operation started with e_dbus_source_remote_deletable_proxy_new().
4407
* Returns: (transfer full) (type EDBusSourceRemoteDeletableProxy): The constructed proxy object or %NULL if @error is set.
4409
EDBusSourceRemoteDeletable *
4410
e_dbus_source_remote_deletable_proxy_new_finish (
4415
GObject *source_object;
4416
source_object = g_async_result_get_source_object (res);
4417
ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
4418
g_object_unref (source_object);
4420
return E_DBUS_SOURCE_REMOTE_DELETABLE (ret);
4426
* e_dbus_source_remote_deletable_proxy_new_sync:
4427
* @connection: A #GDBusConnection.
4428
* @flags: Flags from the #GDBusProxyFlags enumeration.
4429
* @name: (allow-none): A bus name (well-known or unique) or %NULL if @connection is not a message bus connection.
4430
* @object_path: An object path.
4431
* @cancellable: (allow-none): A #GCancellable or %NULL.
4432
* @error: Return location for error or %NULL
4434
* Synchronously creates a proxy for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-RemoteDeletable.top_of_page">org.gnome.evolution.dataserver.Source.RemoteDeletable</link>. See g_dbus_proxy_new_sync() for more details.
4436
* The calling thread is blocked until a reply is received.
4438
* See e_dbus_source_remote_deletable_proxy_new() for the asynchronous version of this constructor.
4440
* Returns: (transfer full) (type EDBusSourceRemoteDeletableProxy): The constructed proxy object or %NULL if @error is set.
4442
EDBusSourceRemoteDeletable *
4443
e_dbus_source_remote_deletable_proxy_new_sync (
4444
GDBusConnection *connection,
4445
GDBusProxyFlags flags,
4447
const gchar *object_path,
4448
GCancellable *cancellable,
4452
ret = g_initable_new (E_DBUS_TYPE_SOURCE_REMOTE_DELETABLE_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-connection", connection, "g-object-path", object_path, "g-interface-name", "org.gnome.evolution.dataserver.Source.RemoteDeletable", NULL);
4454
return E_DBUS_SOURCE_REMOTE_DELETABLE (ret);
4461
* e_dbus_source_remote_deletable_proxy_new_for_bus:
4462
* @bus_type: A #GBusType.
4463
* @flags: Flags from the #GDBusProxyFlags enumeration.
4464
* @name: A bus name (well-known or unique).
4465
* @object_path: An object path.
4466
* @cancellable: (allow-none): A #GCancellable or %NULL.
4467
* @callback: A #GAsyncReadyCallback to call when the request is satisfied.
4468
* @user_data: User data to pass to @callback.
4470
* Like e_dbus_source_remote_deletable_proxy_new() but takes a #GBusType instead of a #GDBusConnection.
4472
* 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.
4473
* You can then call e_dbus_source_remote_deletable_proxy_new_for_bus_finish() to get the result of the operation.
4475
* See e_dbus_source_remote_deletable_proxy_new_for_bus_sync() for the synchronous, blocking version of this constructor.
4478
e_dbus_source_remote_deletable_proxy_new_for_bus (
4480
GDBusProxyFlags flags,
4482
const gchar *object_path,
4483
GCancellable *cancellable,
4484
GAsyncReadyCallback callback,
4487
g_async_initable_new_async (E_DBUS_TYPE_SOURCE_REMOTE_DELETABLE_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", "org.gnome.evolution.dataserver.Source.RemoteDeletable", NULL);
4491
* e_dbus_source_remote_deletable_proxy_new_for_bus_finish:
4492
* @res: The #GAsyncResult obtained from the #GAsyncReadyCallback passed to e_dbus_source_remote_deletable_proxy_new_for_bus().
4493
* @error: Return location for error or %NULL
4495
* Finishes an operation started with e_dbus_source_remote_deletable_proxy_new_for_bus().
4497
* Returns: (transfer full) (type EDBusSourceRemoteDeletableProxy): The constructed proxy object or %NULL if @error is set.
4499
EDBusSourceRemoteDeletable *
4500
e_dbus_source_remote_deletable_proxy_new_for_bus_finish (
4505
GObject *source_object;
4506
source_object = g_async_result_get_source_object (res);
4507
ret = g_async_initable_new_finish (G_ASYNC_INITABLE (source_object), res, error);
4508
g_object_unref (source_object);
4510
return E_DBUS_SOURCE_REMOTE_DELETABLE (ret);
4516
* e_dbus_source_remote_deletable_proxy_new_for_bus_sync:
4517
* @bus_type: A #GBusType.
4518
* @flags: Flags from the #GDBusProxyFlags enumeration.
4519
* @name: A bus name (well-known or unique).
4520
* @object_path: An object path.
4521
* @cancellable: (allow-none): A #GCancellable or %NULL.
4522
* @error: Return location for error or %NULL
4524
* Like e_dbus_source_remote_deletable_proxy_new_sync() but takes a #GBusType instead of a #GDBusConnection.
4526
* The calling thread is blocked until a reply is received.
4528
* See e_dbus_source_remote_deletable_proxy_new_for_bus() for the asynchronous version of this constructor.
4530
* Returns: (transfer full) (type EDBusSourceRemoteDeletableProxy): The constructed proxy object or %NULL if @error is set.
4532
EDBusSourceRemoteDeletable *
4533
e_dbus_source_remote_deletable_proxy_new_for_bus_sync (
4535
GDBusProxyFlags flags,
4537
const gchar *object_path,
4538
GCancellable *cancellable,
4542
ret = g_initable_new (E_DBUS_TYPE_SOURCE_REMOTE_DELETABLE_PROXY, cancellable, error, "g-flags", flags, "g-name", name, "g-bus-type", bus_type, "g-object-path", object_path, "g-interface-name", "org.gnome.evolution.dataserver.Source.RemoteDeletable", NULL);
4544
return E_DBUS_SOURCE_REMOTE_DELETABLE (ret);
4550
/* ------------------------------------------------------------------------ */
4553
* EDBusSourceRemoteDeletableSkeleton:
4555
* The #EDBusSourceRemoteDeletableSkeleton structure contains only private data and should only be accessed using the provided API.
4559
* EDBusSourceRemoteDeletableSkeletonClass:
4560
* @parent_class: The parent class.
4562
* Class structure for #EDBusSourceRemoteDeletableSkeleton.
4565
struct _EDBusSourceRemoteDeletableSkeletonPrivate
4568
GList *changed_properties;
4569
GSource *changed_properties_idle_source;
4570
GMainContext *context;
4575
_e_dbus_source_remote_deletable_skeleton_handle_method_call (
4576
GDBusConnection *connection,
4577
const gchar *sender,
4578
const gchar *object_path,
4579
const gchar *interface_name,
4580
const gchar *method_name,
4581
GVariant *parameters,
4582
GDBusMethodInvocation *invocation,
4585
EDBusSourceRemoteDeletableSkeleton *skeleton = E_DBUS_SOURCE_REMOTE_DELETABLE_SKELETON (user_data);
4586
_ExtendedGDBusMethodInfo *info;
4594
GValue return_value = G_VALUE_INIT;
4595
info = (_ExtendedGDBusMethodInfo *) g_dbus_method_invocation_get_method_info (invocation);
4596
g_assert (info != NULL);
4597
num_params = g_variant_n_children (parameters);
4598
num_extra = info->pass_fdlist ? 3 : 2; paramv = g_new0 (GValue, num_params + num_extra);
4600
g_value_init (¶mv[n], E_DBUS_TYPE_SOURCE_REMOTE_DELETABLE);
4601
g_value_set_object (¶mv[n++], skeleton);
4602
g_value_init (¶mv[n], G_TYPE_DBUS_METHOD_INVOCATION);
4603
g_value_set_object (¶mv[n++], invocation);
4604
if (info->pass_fdlist)
4607
g_value_init (¶mv[n], G_TYPE_UNIX_FD_LIST);
4608
g_value_set_object (¶mv[n++], g_dbus_message_get_unix_fd_list (g_dbus_method_invocation_get_message (invocation)));
4610
g_assert_not_reached ();
4613
g_variant_iter_init (&iter, parameters);
4614
while ((child = g_variant_iter_next_value (&iter)) != NULL)
4616
_ExtendedGDBusArgInfo *arg_info = (_ExtendedGDBusArgInfo *) info->parent_struct.in_args[n - num_extra];
4617
if (arg_info->use_gvariant)
4619
g_value_init (¶mv[n], G_TYPE_VARIANT);
4620
g_value_set_variant (¶mv[n], child);
4624
g_dbus_gvariant_to_gvalue (child, ¶mv[n++]);
4625
g_variant_unref (child);
4627
signal_id = g_signal_lookup (info->signal_name, E_DBUS_TYPE_SOURCE_REMOTE_DELETABLE);
4628
g_value_init (&return_value, G_TYPE_BOOLEAN);
4629
g_signal_emitv (paramv, signal_id, 0, &return_value);
4630
if (!g_value_get_boolean (&return_value))
4631
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);
4632
g_value_unset (&return_value);
4633
for (n = 0; n < num_params + num_extra; n++)
4634
g_value_unset (¶mv[n]);
4639
_e_dbus_source_remote_deletable_skeleton_handle_get_property (
4640
GDBusConnection *connection,
4641
const gchar *sender,
4642
const gchar *object_path,
4643
const gchar *interface_name,
4644
const gchar *property_name,
4648
EDBusSourceRemoteDeletableSkeleton *skeleton = E_DBUS_SOURCE_REMOTE_DELETABLE_SKELETON (user_data);
4649
GValue value = G_VALUE_INIT;
4651
_ExtendedGDBusPropertyInfo *info;
4654
info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_e_dbus_source_remote_deletable_interface_info.parent_struct, property_name);
4655
g_assert (info != NULL);
4656
pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
4659
g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
4663
g_value_init (&value, pspec->value_type);
4664
g_object_get_property (G_OBJECT (skeleton), info->hyphen_name, &value);
4665
ret = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE (info->parent_struct.signature));
4666
g_value_unset (&value);
4672
_e_dbus_source_remote_deletable_skeleton_handle_set_property (
4673
GDBusConnection *connection,
4674
const gchar *sender,
4675
const gchar *object_path,
4676
const gchar *interface_name,
4677
const gchar *property_name,
4682
EDBusSourceRemoteDeletableSkeleton *skeleton = E_DBUS_SOURCE_REMOTE_DELETABLE_SKELETON (user_data);
4683
GValue value = G_VALUE_INIT;
4685
_ExtendedGDBusPropertyInfo *info;
4688
info = (_ExtendedGDBusPropertyInfo *) g_dbus_interface_info_lookup_property ((GDBusInterfaceInfo *) &_e_dbus_source_remote_deletable_interface_info.parent_struct, property_name);
4689
g_assert (info != NULL);
4690
pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (skeleton), info->hyphen_name);
4693
g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_INVALID_ARGS, "No property with name %s", property_name);
4697
if (info->use_gvariant)
4698
g_value_set_variant (&value, variant);
4700
g_dbus_gvariant_to_gvalue (variant, &value);
4701
g_object_set_property (G_OBJECT (skeleton), info->hyphen_name, &value);
4702
g_value_unset (&value);
4708
static const GDBusInterfaceVTable _e_dbus_source_remote_deletable_skeleton_vtable =
4710
_e_dbus_source_remote_deletable_skeleton_handle_method_call,
4711
_e_dbus_source_remote_deletable_skeleton_handle_get_property,
4712
_e_dbus_source_remote_deletable_skeleton_handle_set_property
4715
static GDBusInterfaceInfo *
4716
e_dbus_source_remote_deletable_skeleton_dbus_interface_get_info (GDBusInterfaceSkeleton *skeleton)
4718
return e_dbus_source_remote_deletable_interface_info ();
4721
static GDBusInterfaceVTable *
4722
e_dbus_source_remote_deletable_skeleton_dbus_interface_get_vtable (GDBusInterfaceSkeleton *skeleton)
4724
return (GDBusInterfaceVTable *) &_e_dbus_source_remote_deletable_skeleton_vtable;
4728
e_dbus_source_remote_deletable_skeleton_dbus_interface_get_properties (GDBusInterfaceSkeleton *_skeleton)
4730
EDBusSourceRemoteDeletableSkeleton *skeleton = E_DBUS_SOURCE_REMOTE_DELETABLE_SKELETON (_skeleton);
4732
GVariantBuilder builder;
4734
g_variant_builder_init (&builder, G_VARIANT_TYPE ("a{sv}"));
4735
if (_e_dbus_source_remote_deletable_interface_info.parent_struct.properties == NULL)
4737
for (n = 0; _e_dbus_source_remote_deletable_interface_info.parent_struct.properties[n] != NULL; n++)
4739
GDBusPropertyInfo *info = _e_dbus_source_remote_deletable_interface_info.parent_struct.properties[n];
4740
if (info->flags & G_DBUS_PROPERTY_INFO_FLAGS_READABLE)
4743
value = _e_dbus_source_remote_deletable_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)), "org.gnome.evolution.dataserver.Source.RemoteDeletable", info->name, NULL, skeleton);
4746
g_variant_take_ref (value);
4747
g_variant_builder_add (&builder, "{sv}", info->name, value);
4748
g_variant_unref (value);
4753
return g_variant_builder_end (&builder);
4757
e_dbus_source_remote_deletable_skeleton_dbus_interface_flush (GDBusInterfaceSkeleton *_skeleton)
4761
static void e_dbus_source_remote_deletable_skeleton_iface_init (EDBusSourceRemoteDeletableIface *iface);
4762
G_DEFINE_TYPE_WITH_CODE (EDBusSourceRemoteDeletableSkeleton, e_dbus_source_remote_deletable_skeleton, G_TYPE_DBUS_INTERFACE_SKELETON,
4763
G_IMPLEMENT_INTERFACE (E_DBUS_TYPE_SOURCE_REMOTE_DELETABLE, e_dbus_source_remote_deletable_skeleton_iface_init));
4766
e_dbus_source_remote_deletable_skeleton_finalize (GObject *object)
4768
EDBusSourceRemoteDeletableSkeleton *skeleton = E_DBUS_SOURCE_REMOTE_DELETABLE_SKELETON (object);
4769
g_list_free_full (skeleton->priv->changed_properties, (GDestroyNotify) _changed_property_free);
4770
if (skeleton->priv->changed_properties_idle_source != NULL)
4771
g_source_destroy (skeleton->priv->changed_properties_idle_source);
4772
g_main_context_unref (skeleton->priv->context);
4773
g_mutex_clear (&skeleton->priv->lock);
4774
G_OBJECT_CLASS (e_dbus_source_remote_deletable_skeleton_parent_class)->finalize (object);
4778
e_dbus_source_remote_deletable_skeleton_init (EDBusSourceRemoteDeletableSkeleton *skeleton)
4780
skeleton->priv = G_TYPE_INSTANCE_GET_PRIVATE (skeleton, E_DBUS_TYPE_SOURCE_REMOTE_DELETABLE_SKELETON, EDBusSourceRemoteDeletableSkeletonPrivate);
4781
g_mutex_init (&skeleton->priv->lock);
4782
skeleton->priv->context = g_main_context_ref_thread_default ();
4786
e_dbus_source_remote_deletable_skeleton_class_init (EDBusSourceRemoteDeletableSkeletonClass *klass)
4788
GObjectClass *gobject_class;
4789
GDBusInterfaceSkeletonClass *skeleton_class;
4791
g_type_class_add_private (klass, sizeof (EDBusSourceRemoteDeletableSkeletonPrivate));
4793
gobject_class = G_OBJECT_CLASS (klass);
4794
gobject_class->finalize = e_dbus_source_remote_deletable_skeleton_finalize;
4796
skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS (klass);
4797
skeleton_class->get_info = e_dbus_source_remote_deletable_skeleton_dbus_interface_get_info;
4798
skeleton_class->get_properties = e_dbus_source_remote_deletable_skeleton_dbus_interface_get_properties;
4799
skeleton_class->flush = e_dbus_source_remote_deletable_skeleton_dbus_interface_flush;
4800
skeleton_class->get_vtable = e_dbus_source_remote_deletable_skeleton_dbus_interface_get_vtable;
4804
e_dbus_source_remote_deletable_skeleton_iface_init (EDBusSourceRemoteDeletableIface *iface)
4809
* e_dbus_source_remote_deletable_skeleton_new:
4811
* Creates a skeleton object for the D-Bus interface <link linkend="gdbus-interface-org-gnome-evolution-dataserver-Source-RemoteDeletable.top_of_page">org.gnome.evolution.dataserver.Source.RemoteDeletable</link>.
4813
* Returns: (transfer full) (type EDBusSourceRemoteDeletableSkeleton): The skeleton object.
4815
EDBusSourceRemoteDeletable *
4816
e_dbus_source_remote_deletable_skeleton_new (void)
4818
return E_DBUS_SOURCE_REMOTE_DELETABLE (g_object_new (E_DBUS_TYPE_SOURCE_REMOTE_DELETABLE_SKELETON, NULL));
4821
/* ------------------------------------------------------------------------
3109
4822
* Code for Object, ObjectProxy and ObjectSkeleton
3110
4823
* ------------------------------------------------------------------------