[evolution-data-server] Merge cleanups from 'gdbus-codegen' branch.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Merge cleanups from 'gdbus-codegen' branch.
- Date: Fri, 19 Oct 2012 13:58:21 +0000 (UTC)
commit 2a8a2b23bf0f1caadb4eafcbf5afa2ebd41549aa
Author: Matthew Barnes <mbarnes redhat com>
Date: Thu Oct 18 14:56:15 2012 -0400
Merge cleanups from 'gdbus-codegen' branch.
Merge cosmetic cleanups from my 'gdbus-codegen' branch so I can more
easily review the important changes.
addressbook/libebook/e-book-client.c | 395 +++++++++++++++++++++----------
addressbook/libebook/e-book.c | 4 +-
addressbook/libedata-book/e-data-book.c | 142 ++++++------
calendar/libecal/e-cal-client.c | 85 ++++----
calendar/libecal/e-cal.c | 122 +++++-----
calendar/libedata-cal/e-data-cal.c | 184 +++++++-------
6 files changed, 541 insertions(+), 391 deletions(-)
---
diff --git a/addressbook/libebook/e-book-client.c b/addressbook/libebook/e-book-client.c
index 352e03f..1b855ae 100644
--- a/addressbook/libebook/e-book-client.c
+++ b/addressbook/libebook/e-book-client.c
@@ -43,8 +43,7 @@
((obj), E_TYPE_BOOK_CLIENT, EBookClientPrivate))
struct _EBookClientPrivate {
- /* GDBus data */
- GDBusProxy *gdbus_book;
+ GDBusProxy *dbus_proxy;
guint gone_signal_id;
};
@@ -349,23 +348,24 @@ gdbus_book_client_disconnect (EBookClient *client)
/* Ensure that everything relevant is NULL */
LOCK_FACTORY ();
- if (client->priv->gdbus_book) {
- GDBusConnection *connection = g_dbus_proxy_get_connection (G_DBUS_PROXY (client->priv->gdbus_book));
+ if (client->priv->dbus_proxy != NULL) {
+ GDBusConnection *connection = g_dbus_proxy_get_connection (G_DBUS_PROXY (client->priv->dbus_proxy));
g_signal_handlers_disconnect_by_func (connection, gdbus_book_client_closed_cb, client);
g_dbus_connection_signal_unsubscribe (connection, client->priv->gone_signal_id);
client->priv->gone_signal_id = 0;
- e_gdbus_book_call_close_sync (client->priv->gdbus_book, NULL, NULL);
- g_object_unref (client->priv->gdbus_book);
- client->priv->gdbus_book = NULL;
+ e_gdbus_book_call_close_sync (
+ client->priv->dbus_proxy, NULL, NULL);
+ g_object_unref (client->priv->dbus_proxy);
+ client->priv->dbus_proxy = NULL;
}
UNLOCK_FACTORY ();
}
static void
-backend_error_cb (EGdbusBook *object,
+backend_error_cb (EGdbusBook *dbus_proxy,
const gchar *message,
EBookClient *client)
{
@@ -376,7 +376,7 @@ backend_error_cb (EGdbusBook *object,
}
static void
-readonly_cb (EGdbusBook *object,
+readonly_cb (EGdbusBook *dbus_proxy,
gboolean readonly,
EBookClient *client)
{
@@ -386,7 +386,7 @@ readonly_cb (EGdbusBook *object,
}
static void
-online_cb (EGdbusBook *object,
+online_cb (EGdbusBook *dbus_proxy,
gboolean is_online,
EBookClient *client)
{
@@ -396,7 +396,7 @@ online_cb (EGdbusBook *object,
}
static void
-opened_cb (EGdbusBook *object,
+opened_cb (EGdbusBook *dbus_proxy,
const gchar * const *error_strv,
EBookClient *client)
{
@@ -413,7 +413,7 @@ opened_cb (EGdbusBook *object,
}
static void
-backend_property_changed_cb (EGdbusBook *object,
+backend_property_changed_cb (EGdbusBook *dbus_proxy,
const gchar * const *name_value_strv,
EBookClient *client)
{
@@ -510,13 +510,11 @@ book_client_finalize (GObject *object)
static GDBusProxy *
book_client_get_dbus_proxy (EClient *client)
{
- EBookClient *book_client;
-
- g_return_val_if_fail (E_IS_CLIENT (client), NULL);
+ EBookClientPrivate *priv;
- book_client = E_BOOK_CLIENT (client);
+ priv = E_BOOK_CLIENT_GET_PRIVATE (client);
- return book_client->priv->gdbus_book;
+ return G_DBUS_PROXY (priv->dbus_proxy);
}
static void
@@ -571,11 +569,19 @@ book_client_get_backend_property (EClient *client,
prop_value = e_client_get_backend_property_from_cache (client, prop_name);
if (prop_value) {
- e_client_finish_async_without_dbus (client, cancellable, callback, user_data, book_client_get_backend_property_from_cache_finish, prop_value, g_free);
+ e_client_finish_async_without_dbus (
+ client, cancellable, callback, user_data,
+ book_client_get_backend_property_from_cache_finish,
+ prop_value, g_free);
} else {
- e_client_proxy_call_string_with_res_op_data (client, prop_name, cancellable, callback, user_data, book_client_get_backend_property, prop_name,
+ e_client_proxy_call_string_with_res_op_data (
+ client, prop_name,
+ cancellable, callback, user_data,
+ book_client_get_backend_property, prop_name,
e_gdbus_book_call_get_backend_property,
- NULL, NULL, e_gdbus_book_call_get_backend_property_finish, NULL, NULL);
+ NULL, NULL,
+ e_gdbus_book_call_get_backend_property_finish,
+ NULL, NULL);
}
}
@@ -593,7 +599,9 @@ book_client_get_backend_property_finish (EClient *client,
if (g_simple_async_result_get_source_tag (G_SIMPLE_ASYNC_RESULT (result)) == book_client_get_backend_property_from_cache_finish) {
res = book_client_get_backend_property_from_cache_finish (client, result, &str, error);
} else {
- res = e_client_proxy_call_finish_string (client, result, &str, error, book_client_get_backend_property);
+ res = e_client_proxy_call_finish_string (
+ client, result, &str, error,
+ book_client_get_backend_property);
if (res && str) {
const gchar *prop_name = g_object_get_data (G_OBJECT (result), "res-op-data");
@@ -622,7 +630,7 @@ book_client_get_backend_property_sync (EClient *client,
book_client = E_BOOK_CLIENT (client);
- if (!book_client->priv->gdbus_book) {
+ if (book_client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
@@ -636,10 +644,13 @@ book_client_get_backend_property_sync (EClient *client,
return TRUE;
}
- res = e_client_proxy_call_sync_string__string (client, prop_name, prop_value, cancellable, error, e_gdbus_book_call_get_backend_property_sync);
+ res = e_client_proxy_call_sync_string__string (
+ client, prop_name, prop_value, cancellable, error,
+ e_gdbus_book_call_get_backend_property_sync);
if (res && prop_value)
- e_client_update_backend_property_cache (client, prop_name, *prop_value);
+ e_client_update_backend_property_cache (
+ client, prop_name, *prop_value);
return res;
}
@@ -656,9 +667,13 @@ book_client_set_backend_property (EClient *client,
prop_name_value = e_gdbus_book_encode_set_backend_property (prop_name, prop_value);
- e_client_proxy_call_strv (client, (const gchar * const *) prop_name_value, cancellable, callback, user_data, book_client_set_backend_property,
- e_gdbus_book_call_set_backend_property,
- e_gdbus_book_call_set_backend_property_finish, NULL, NULL, NULL, NULL);
+ e_client_proxy_call_strv (
+ client, (const gchar * const *) prop_name_value,
+ cancellable, callback, user_data,
+ book_client_set_backend_property,
+ e_gdbus_book_call_set_backend_property,
+ e_gdbus_book_call_set_backend_property_finish,
+ NULL, NULL, NULL, NULL);
g_strfreev (prop_name_value);
}
@@ -668,7 +683,9 @@ book_client_set_backend_property_finish (EClient *client,
GAsyncResult *result,
GError **error)
{
- return e_client_proxy_call_finish_void (client, result, error, book_client_set_backend_property);
+ return e_client_proxy_call_finish_void (
+ client, result, error,
+ book_client_set_backend_property);
}
static gboolean
@@ -686,13 +703,16 @@ book_client_set_backend_property_sync (EClient *client,
book_client = E_BOOK_CLIENT (client);
- if (!book_client->priv->gdbus_book) {
+ if (book_client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
prop_name_value = e_gdbus_book_encode_set_backend_property (prop_name, prop_value);
- res = e_client_proxy_call_sync_strv__void (client, (const gchar * const *) prop_name_value, cancellable, error, e_gdbus_book_call_set_backend_property_sync);
+ res = e_client_proxy_call_sync_strv__void (
+ client, (const gchar * const *) prop_name_value,
+ cancellable, error,
+ e_gdbus_book_call_set_backend_property_sync);
g_strfreev (prop_name_value);
return res;
@@ -705,9 +725,13 @@ book_client_open (EClient *client,
GAsyncReadyCallback callback,
gpointer user_data)
{
- e_client_proxy_call_boolean (client, only_if_exists, cancellable, callback, user_data, book_client_open,
- e_gdbus_book_call_open,
- e_gdbus_book_call_open_finish, NULL, NULL, NULL, NULL);
+ e_client_proxy_call_boolean (
+ client, only_if_exists,
+ cancellable, callback, user_data,
+ book_client_open,
+ e_gdbus_book_call_open,
+ e_gdbus_book_call_open_finish,
+ NULL, NULL, NULL, NULL);
}
static gboolean
@@ -715,7 +739,8 @@ book_client_open_finish (EClient *client,
GAsyncResult *result,
GError **error)
{
- return e_client_proxy_call_finish_void (client, result, error, book_client_open);
+ return e_client_proxy_call_finish_void (
+ client, result, error, book_client_open);
}
static gboolean
@@ -730,12 +755,14 @@ book_client_open_sync (EClient *client,
book_client = E_BOOK_CLIENT (client);
- if (!book_client->priv->gdbus_book) {
+ if (book_client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
- return e_client_proxy_call_sync_boolean__void (client, only_if_exists, cancellable, error, e_gdbus_book_call_open_sync);
+ return e_client_proxy_call_sync_boolean__void (
+ client, only_if_exists, cancellable, error,
+ e_gdbus_book_call_open_sync);
}
static void
@@ -744,9 +771,12 @@ book_client_refresh (EClient *client,
GAsyncReadyCallback callback,
gpointer user_data)
{
- e_client_proxy_call_void (client, cancellable, callback, user_data, book_client_refresh,
- e_gdbus_book_call_refresh,
- e_gdbus_book_call_refresh_finish, NULL, NULL, NULL, NULL);
+ e_client_proxy_call_void (
+ client, cancellable, callback, user_data,
+ book_client_refresh,
+ e_gdbus_book_call_refresh,
+ e_gdbus_book_call_refresh_finish,
+ NULL, NULL, NULL, NULL);
}
static gboolean
@@ -754,7 +784,8 @@ book_client_refresh_finish (EClient *client,
GAsyncResult *result,
GError **error)
{
- return e_client_proxy_call_finish_void (client, result, error, book_client_refresh);
+ return e_client_proxy_call_finish_void (
+ client, result, error, book_client_refresh);
}
static gboolean
@@ -768,12 +799,14 @@ book_client_refresh_sync (EClient *client,
book_client = E_BOOK_CLIENT (client);
- if (!book_client->priv->gdbus_book) {
+ if (book_client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
- return e_client_proxy_call_sync_void__void (client, cancellable, error, e_gdbus_book_call_refresh_sync);
+ return e_client_proxy_call_sync_void__void (
+ client, cancellable, error,
+ e_gdbus_book_call_refresh_sync);
}
static void
@@ -882,7 +915,7 @@ e_book_client_new (ESource *source,
connection = g_dbus_proxy_get_connection (G_DBUS_PROXY (book_factory));
- client->priv->gdbus_book = G_DBUS_PROXY (e_gdbus_book_proxy_new_sync (
+ client->priv->dbus_proxy = G_DBUS_PROXY (e_gdbus_book_proxy_new_sync (
connection,
G_DBUS_PROXY_FLAGS_NONE,
ADDRESS_BOOK_DBUS_SERVICE_NAME,
@@ -893,8 +926,8 @@ e_book_client_new (ESource *source,
/* Sanity check. */
g_return_val_if_fail (
- ((client->priv->gdbus_book != NULL) && (err == NULL)) ||
- ((client->priv->gdbus_book == NULL) && (err != NULL)), NULL);
+ ((client->priv->dbus_proxy != NULL) && (err == NULL)) ||
+ ((client->priv->dbus_proxy == NULL) && (err != NULL)), NULL);
if (err != NULL) {
unwrap_dbus_error (err, &err);
@@ -918,19 +951,19 @@ e_book_client_new (ESource *source,
G_CALLBACK (gdbus_book_client_closed_cb), client);
g_signal_connect (
- client->priv->gdbus_book, "backend_error",
+ client->priv->dbus_proxy, "backend_error",
G_CALLBACK (backend_error_cb), client);
g_signal_connect (
- client->priv->gdbus_book, "readonly",
+ client->priv->dbus_proxy, "readonly",
G_CALLBACK (readonly_cb), client);
g_signal_connect (
- client->priv->gdbus_book, "online",
+ client->priv->dbus_proxy, "online",
G_CALLBACK (online_cb), client);
g_signal_connect (
- client->priv->gdbus_book, "opened",
+ client->priv->dbus_proxy, "opened",
G_CALLBACK (opened_cb), client);
g_signal_connect (
- client->priv->gdbus_book, "backend-property-changed",
+ client->priv->dbus_proxy, "backend-property-changed",
G_CALLBACK (backend_property_changed_cb), client);
return client;
@@ -1151,9 +1184,14 @@ e_book_client_add_contact (EBookClient *client,
g_return_if_fail (strv[0] != NULL);
- e_client_proxy_call_strv (E_CLIENT (client), strv, cancellable, callback, user_data, e_book_client_add_contact,
- e_gdbus_book_call_add_contacts,
- NULL, NULL, NULL, e_gdbus_book_call_add_contacts_finish, NULL);
+ e_client_proxy_call_strv (
+ E_CLIENT (client),
+ strv, cancellable, callback, user_data,
+ e_book_client_add_contact,
+ e_gdbus_book_call_add_contacts,
+ NULL, NULL, NULL,
+ e_gdbus_book_call_add_contacts_finish,
+ NULL);
g_free (vcard);
g_free (gdbus_vcard);
@@ -1185,7 +1223,9 @@ e_book_client_add_contact_finish (EBookClient *client,
gboolean res;
gchar **out_uids = NULL;
- res = e_client_proxy_call_finish_strv (E_CLIENT (client), result, &out_uids, error, e_book_client_add_contact);
+ res = e_client_proxy_call_finish_strv (
+ E_CLIENT (client), result, &out_uids, error,
+ e_book_client_add_contact);
if (res && out_uids && added_uid) {
*added_uid = g_strdup (out_uids[0]);
@@ -1230,7 +1270,7 @@ e_book_client_add_contact_sync (EBookClient *client,
g_return_val_if_fail (E_IS_BOOK_CLIENT (client), FALSE);
- if (!client->priv->gdbus_book) {
+ if (client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
@@ -1241,7 +1281,9 @@ e_book_client_add_contact_sync (EBookClient *client,
g_return_val_if_fail (strv[0] != NULL, FALSE);
- res = e_client_proxy_call_sync_strv__strv (E_CLIENT (client), strv, &out_uids, cancellable, error, e_gdbus_book_call_add_contacts_sync);
+ res = e_client_proxy_call_sync_strv__strv (
+ E_CLIENT (client), strv, &out_uids, cancellable, error,
+ e_gdbus_book_call_add_contacts_sync);
if (res && out_uids && added_uid) {
*added_uid = g_strdup (out_uids[0]);
@@ -1284,9 +1326,15 @@ e_book_client_add_contacts (EBookClient *client,
array = contact_slist_to_utf8_vcard_array (contacts);
- e_client_proxy_call_strv (E_CLIENT (client), (const gchar * const *) array, cancellable, callback, user_data, e_book_client_add_contacts,
- e_gdbus_book_call_add_contacts,
- NULL, NULL, NULL, e_gdbus_book_call_add_contacts_finish, NULL);
+ e_client_proxy_call_strv (
+ E_CLIENT (client),
+ (const gchar * const *) array,
+ cancellable, callback, user_data,
+ e_book_client_add_contacts,
+ e_gdbus_book_call_add_contacts,
+ NULL, NULL, NULL,
+ e_gdbus_book_call_add_contacts_finish,
+ NULL);
g_strfreev (array);
}
@@ -1321,7 +1369,9 @@ e_book_client_add_contacts_finish (EBookClient *client,
gboolean res;
gchar **out_uids = NULL;
- res = e_client_proxy_call_finish_strv (E_CLIENT (client), result, &out_uids, error, e_book_client_add_contacts);
+ res = e_client_proxy_call_finish_strv (
+ E_CLIENT (client), result, &out_uids, error,
+ e_book_client_add_contacts);
if (res && out_uids && added_uids) {
*added_uids = e_client_util_strv_to_slist ((const gchar * const*) out_uids);
@@ -1370,14 +1420,18 @@ e_book_client_add_contacts_sync (EBookClient *client,
g_return_val_if_fail (E_IS_BOOK_CLIENT (client), FALSE);
- if (!client->priv->gdbus_book) {
+ if (client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
array = contact_slist_to_utf8_vcard_array (contacts);
- res = e_client_proxy_call_sync_strv__strv (E_CLIENT (client), (const gchar * const *) array, &out_uids, cancellable, error, e_gdbus_book_call_add_contacts_sync);
+ res = e_client_proxy_call_sync_strv__strv (
+ E_CLIENT (client),
+ (const gchar * const *) array,
+ &out_uids, cancellable, error,
+ e_gdbus_book_call_add_contacts_sync);
if (res && out_uids && added_uids) {
*added_uids = e_client_util_strv_to_slist ((const gchar * const*) out_uids);
@@ -1425,9 +1479,13 @@ e_book_client_modify_contact (EBookClient *client,
g_return_if_fail (strv[0] != NULL);
- e_client_proxy_call_strv (E_CLIENT (client), strv, cancellable, callback, user_data, e_book_client_modify_contact,
- e_gdbus_book_call_modify_contacts,
- e_gdbus_book_call_modify_contacts_finish, NULL, NULL, NULL, NULL);
+ e_client_proxy_call_strv (
+ E_CLIENT (client),
+ strv, cancellable, callback, user_data,
+ e_book_client_modify_contact,
+ e_gdbus_book_call_modify_contacts,
+ e_gdbus_book_call_modify_contacts_finish,
+ NULL, NULL, NULL, NULL);
g_free (vcard);
g_free (gdbus_vcard);
@@ -1450,7 +1508,9 @@ e_book_client_modify_contact_finish (EBookClient *client,
GAsyncResult *result,
GError **error)
{
- return e_client_proxy_call_finish_void (E_CLIENT (client), result, error, e_book_client_modify_contact);
+ return e_client_proxy_call_finish_void (
+ E_CLIENT (client), result, error,
+ e_book_client_modify_contact);
}
/**
@@ -1478,7 +1538,7 @@ e_book_client_modify_contact_sync (EBookClient *client,
g_return_val_if_fail (E_IS_BOOK_CLIENT (client), FALSE);
- if (!client->priv->gdbus_book) {
+ if (client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
@@ -1489,7 +1549,10 @@ e_book_client_modify_contact_sync (EBookClient *client,
g_return_val_if_fail (strv[0] != NULL, FALSE);
- res = e_client_proxy_call_sync_strv__void (E_CLIENT (client), strv, cancellable, error, e_gdbus_book_call_modify_contacts_sync);
+ res = e_client_proxy_call_sync_strv__void (
+ E_CLIENT (client),
+ strv, cancellable, error,
+ e_gdbus_book_call_modify_contacts_sync);
g_free (vcard);
g_free (gdbus_vcard);
@@ -1524,9 +1587,14 @@ e_book_client_modify_contacts (EBookClient *client,
array = contact_slist_to_utf8_vcard_array (contacts);
- e_client_proxy_call_strv (E_CLIENT (client), (const gchar * const *) array, cancellable, callback, user_data, e_book_client_modify_contacts,
- e_gdbus_book_call_modify_contacts,
- e_gdbus_book_call_modify_contacts_finish, NULL, NULL, NULL, NULL);
+ e_client_proxy_call_strv (
+ E_CLIENT (client),
+ (const gchar * const *) array,
+ cancellable, callback, user_data,
+ e_book_client_modify_contacts,
+ e_gdbus_book_call_modify_contacts,
+ e_gdbus_book_call_modify_contacts_finish,
+ NULL, NULL, NULL, NULL);
g_strfreev (array);
}
@@ -1548,7 +1616,9 @@ e_book_client_modify_contacts_finish (EBookClient *client,
GAsyncResult *result,
GError **error)
{
- return e_client_proxy_call_finish_void (E_CLIENT (client), result, error, e_book_client_modify_contacts);
+ return e_client_proxy_call_finish_void (
+ E_CLIENT (client), result, error,
+ e_book_client_modify_contacts);
}
/**
@@ -1576,14 +1646,18 @@ e_book_client_modify_contacts_sync (EBookClient *client,
g_return_val_if_fail (E_IS_BOOK_CLIENT (client), FALSE);
g_return_val_if_fail (contacts != NULL, FALSE);
- if (!client->priv->gdbus_book) {
+ if (client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
array = contact_slist_to_utf8_vcard_array (contacts);
- res = e_client_proxy_call_sync_strv__void (E_CLIENT (client), (const gchar * const *) array, cancellable, error, e_gdbus_book_call_modify_contacts_sync);
+ res = e_client_proxy_call_sync_strv__void (
+ E_CLIENT (client),
+ (const gchar * const *) array,
+ cancellable, error,
+ e_gdbus_book_call_modify_contacts_sync);
g_strfreev (array);
@@ -1627,9 +1701,13 @@ e_book_client_remove_contact (EBookClient *client,
strv[0] = safe_uid;
strv[1] = NULL;
- e_client_proxy_call_strv (E_CLIENT (client), strv, cancellable, callback, user_data, e_book_client_remove_contact,
- e_gdbus_book_call_remove_contacts,
- e_gdbus_book_call_remove_contacts_finish, NULL, NULL, NULL, NULL);
+ e_client_proxy_call_strv (
+ E_CLIENT (client),
+ strv, cancellable, callback, user_data,
+ e_book_client_remove_contact,
+ e_gdbus_book_call_remove_contacts,
+ e_gdbus_book_call_remove_contacts_finish,
+ NULL, NULL, NULL, NULL);
g_free (gdbus_uid);
}
@@ -1651,7 +1729,9 @@ e_book_client_remove_contact_finish (EBookClient *client,
GAsyncResult *result,
GError **error)
{
- return e_client_proxy_call_finish_void (E_CLIENT (client), result, error, e_book_client_remove_contact);
+ return e_client_proxy_call_finish_void (
+ E_CLIENT (client), result, error,
+ e_book_client_remove_contact);
}
/**
@@ -1681,7 +1761,7 @@ e_book_client_remove_contact_sync (EBookClient *client,
g_return_val_if_fail (E_IS_BOOK_CLIENT (client), FALSE);
g_return_val_if_fail (E_IS_CONTACT (contact), FALSE);
- if (!client->priv->gdbus_book) {
+ if (client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
@@ -1695,7 +1775,10 @@ e_book_client_remove_contact_sync (EBookClient *client,
strv[0] = safe_uid;
strv[1] = NULL;
- res = e_client_proxy_call_sync_strv__void (E_CLIENT (client), strv, cancellable, error, e_gdbus_book_call_remove_contacts_sync);
+ res = e_client_proxy_call_sync_strv__void (
+ E_CLIENT (client),
+ strv, cancellable, error,
+ e_gdbus_book_call_remove_contacts_sync);
g_free (gdbus_uid);
@@ -1735,9 +1818,13 @@ e_book_client_remove_contact_by_uid (EBookClient *client,
strv[0] = safe_uid;
strv[1] = NULL;
- e_client_proxy_call_strv (E_CLIENT (client), strv, cancellable, callback, user_data, e_book_client_remove_contact_by_uid,
- e_gdbus_book_call_remove_contacts,
- e_gdbus_book_call_remove_contacts_finish, NULL, NULL, NULL, NULL);
+ e_client_proxy_call_strv (
+ E_CLIENT (client),
+ strv, cancellable, callback, user_data,
+ e_book_client_remove_contact_by_uid,
+ e_gdbus_book_call_remove_contacts,
+ e_gdbus_book_call_remove_contacts_finish,
+ NULL, NULL, NULL, NULL);
g_free (gdbus_uid);
}
@@ -1759,7 +1846,9 @@ e_book_client_remove_contact_by_uid_finish (EBookClient *client,
GAsyncResult *result,
GError **error)
{
- return e_client_proxy_call_finish_void (E_CLIENT (client), result, error, e_book_client_remove_contact_by_uid);
+ return e_client_proxy_call_finish_void (
+ E_CLIENT (client), result, error,
+ e_book_client_remove_contact_by_uid);
}
/**
@@ -1789,7 +1878,7 @@ e_book_client_remove_contact_by_uid_sync (EBookClient *client,
g_return_val_if_fail (E_IS_BOOK_CLIENT (client), FALSE);
g_return_val_if_fail (uid != NULL, FALSE);
- if (!client->priv->gdbus_book) {
+ if (client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
@@ -1800,7 +1889,9 @@ e_book_client_remove_contact_by_uid_sync (EBookClient *client,
strv[0] = safe_uid;
strv[1] = NULL;
- res = e_client_proxy_call_sync_strv__void (E_CLIENT (client), strv, cancellable, error, e_gdbus_book_call_remove_contacts_sync);
+ res = e_client_proxy_call_sync_strv__void (
+ E_CLIENT (client), strv, cancellable, error,
+ e_gdbus_book_call_remove_contacts_sync);
g_free (gdbus_uid);
@@ -1838,9 +1929,14 @@ e_book_client_remove_contacts (EBookClient *client,
strv = e_client_util_slist_to_strv (uids);
g_return_if_fail (strv != NULL);
- e_client_proxy_call_strv (E_CLIENT (client), (const gchar * const *) strv, cancellable, callback, user_data, e_book_client_remove_contacts,
- e_gdbus_book_call_remove_contacts,
- e_gdbus_book_call_remove_contacts_finish, NULL, NULL, NULL, NULL);
+ e_client_proxy_call_strv (
+ E_CLIENT (client),
+ (const gchar * const *) strv,
+ cancellable, callback, user_data,
+ e_book_client_remove_contacts,
+ e_gdbus_book_call_remove_contacts,
+ e_gdbus_book_call_remove_contacts_finish,
+ NULL, NULL, NULL, NULL);
g_strfreev (strv);
}
@@ -1862,7 +1958,9 @@ e_book_client_remove_contacts_finish (EBookClient *client,
GAsyncResult *result,
GError **error)
{
- return e_client_proxy_call_finish_void (E_CLIENT (client), result, error, e_book_client_remove_contacts);
+ return e_client_proxy_call_finish_void (
+ E_CLIENT (client), result, error,
+ e_book_client_remove_contacts);
}
/**
@@ -1893,7 +1991,7 @@ e_book_client_remove_contacts_sync (EBookClient *client,
g_return_val_if_fail (E_IS_BOOK_CLIENT (client), FALSE);
g_return_val_if_fail (uids != NULL, FALSE);
- if (!client->priv->gdbus_book) {
+ if (client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
@@ -1901,7 +1999,10 @@ e_book_client_remove_contacts_sync (EBookClient *client,
strv = e_client_util_slist_to_strv (uids);
g_return_val_if_fail (strv != NULL, FALSE);
- res = e_client_proxy_call_sync_strv__void (E_CLIENT (client), (const gchar * const *) strv, cancellable, error, e_gdbus_book_call_remove_contacts_sync);
+ res = e_client_proxy_call_sync_strv__void (
+ E_CLIENT (client), (const gchar * const *) strv,
+ cancellable, error,
+ e_gdbus_book_call_remove_contacts_sync);
g_strfreev (strv);
@@ -1937,9 +2038,14 @@ e_book_client_get_contact (EBookClient *client,
safe_uid = e_util_ensure_gdbus_string (uid, &gdbus_uid);
g_return_if_fail (safe_uid != NULL);
- e_client_proxy_call_string (E_CLIENT (client), safe_uid, cancellable, callback, user_data, e_book_client_get_contact,
- e_gdbus_book_call_get_contact,
- NULL, NULL, e_gdbus_book_call_get_contact_finish, NULL, NULL);
+ e_client_proxy_call_string (
+ E_CLIENT (client),
+ safe_uid, cancellable, callback, user_data,
+ e_book_client_get_contact,
+ e_gdbus_book_call_get_contact,
+ NULL, NULL,
+ e_gdbus_book_call_get_contact_finish,
+ NULL, NULL);
g_free (gdbus_uid);
}
@@ -1970,7 +2076,10 @@ e_book_client_get_contact_finish (EBookClient *client,
g_return_val_if_fail (contact != NULL, FALSE);
- res = e_client_proxy_call_finish_string (E_CLIENT (client), result, &vcard, error, e_book_client_get_contact);
+ res = e_client_proxy_call_finish_string (
+ E_CLIENT (client),
+ result, &vcard, error,
+ e_book_client_get_contact);
if (vcard && res)
*contact = e_contact_new_from_vcard (vcard);
@@ -2013,7 +2122,7 @@ e_book_client_get_contact_sync (EBookClient *client,
g_return_val_if_fail (uid != NULL, FALSE);
g_return_val_if_fail (contact != NULL, FALSE);
- if (!client->priv->gdbus_book) {
+ if (client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
@@ -2021,7 +2130,10 @@ e_book_client_get_contact_sync (EBookClient *client,
safe_uid = e_util_ensure_gdbus_string (uid, &gdbus_uid);
g_return_val_if_fail (safe_uid != NULL, FALSE);
- res = e_client_proxy_call_sync_string__string (E_CLIENT (client), safe_uid, &vcard, cancellable, error, e_gdbus_book_call_get_contact_sync);
+ res = e_client_proxy_call_sync_string__string (
+ E_CLIENT (client),
+ safe_uid, &vcard, cancellable, error,
+ e_gdbus_book_call_get_contact_sync);
if (vcard && res)
*contact = e_contact_new_from_vcard_with_uid (vcard, safe_uid);
@@ -2062,9 +2174,15 @@ e_book_client_get_contacts (EBookClient *client,
g_return_if_fail (sexp != NULL);
- e_client_proxy_call_string (E_CLIENT (client), e_util_ensure_gdbus_string (sexp, &gdbus_sexp), cancellable, callback, user_data, e_book_client_get_contacts,
- e_gdbus_book_call_get_contact_list,
- NULL, NULL, NULL, e_gdbus_book_call_get_contact_list_finish, NULL);
+ e_client_proxy_call_string (
+ E_CLIENT (client),
+ e_util_ensure_gdbus_string (sexp, &gdbus_sexp),
+ cancellable, callback, user_data,
+ e_book_client_get_contacts,
+ e_gdbus_book_call_get_contact_list,
+ NULL, NULL, NULL,
+ e_gdbus_book_call_get_contact_list_finish,
+ NULL);
g_free (gdbus_sexp);
}
@@ -2095,7 +2213,10 @@ e_book_client_get_contacts_finish (EBookClient *client,
g_return_val_if_fail (contacts != NULL, FALSE);
- res = e_client_proxy_call_finish_strv (E_CLIENT (client), result, &vcards, error, e_book_client_get_contacts);
+ res = e_client_proxy_call_finish_strv (
+ E_CLIENT (client),
+ result, &vcards, error,
+ e_book_client_get_contacts);
if (vcards && res) {
gint ii;
@@ -2149,12 +2270,16 @@ e_book_client_get_contacts_sync (EBookClient *client,
g_return_val_if_fail (sexp != NULL, FALSE);
g_return_val_if_fail (contacts != NULL, FALSE);
- if (!client->priv->gdbus_book) {
+ if (client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
- res = e_client_proxy_call_sync_string__strv (E_CLIENT (client), e_util_ensure_gdbus_string (sexp, &gdbus_sexp), &vcards, cancellable, error, e_gdbus_book_call_get_contact_list_sync);
+ res = e_client_proxy_call_sync_string__strv (
+ E_CLIENT (client),
+ e_util_ensure_gdbus_string (sexp, &gdbus_sexp),
+ &vcards, cancellable, error,
+ e_gdbus_book_call_get_contact_list_sync);
if (vcards && res) {
gint ii;
@@ -2203,9 +2328,15 @@ e_book_client_get_contacts_uids (EBookClient *client,
g_return_if_fail (sexp != NULL);
- e_client_proxy_call_string (E_CLIENT (client), e_util_ensure_gdbus_string (sexp, &gdbus_sexp), cancellable, callback, user_data, e_book_client_get_contacts_uids,
- e_gdbus_book_call_get_contact_list_uids,
- NULL, NULL, NULL, e_gdbus_book_call_get_contact_list_uids_finish, NULL);
+ e_client_proxy_call_string (
+ E_CLIENT (client),
+ e_util_ensure_gdbus_string (sexp, &gdbus_sexp),
+ cancellable, callback, user_data,
+ e_book_client_get_contacts_uids,
+ e_gdbus_book_call_get_contact_list_uids,
+ NULL, NULL, NULL,
+ e_gdbus_book_call_get_contact_list_uids_finish,
+ NULL);
g_free (gdbus_sexp);
}
@@ -2236,7 +2367,10 @@ e_book_client_get_contacts_uids_finish (EBookClient *client,
g_return_val_if_fail (contacts_uids != NULL, FALSE);
- res = e_client_proxy_call_finish_strv (E_CLIENT (client), result, &uids, error, e_book_client_get_contacts_uids);
+ res = e_client_proxy_call_finish_strv (
+ E_CLIENT (client),
+ result, &uids, error,
+ e_book_client_get_contacts_uids);
if (uids && res) {
gint ii;
@@ -2290,12 +2424,16 @@ e_book_client_get_contacts_uids_sync (EBookClient *client,
g_return_val_if_fail (sexp != NULL, FALSE);
g_return_val_if_fail (contacts_uids != NULL, FALSE);
- if (!client->priv->gdbus_book) {
+ if (client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
- res = e_client_proxy_call_sync_string__strv (E_CLIENT (client), e_util_ensure_gdbus_string (sexp, &gdbus_sexp), &uids, cancellable, error, e_gdbus_book_call_get_contact_list_uids_sync);
+ res = e_client_proxy_call_sync_string__strv (
+ E_CLIENT (client),
+ e_util_ensure_gdbus_string (sexp, &gdbus_sexp),
+ &uids, cancellable, error,
+ e_gdbus_book_call_get_contact_list_uids_sync);
if (uids && res) {
gint ii;
@@ -2344,9 +2482,14 @@ e_book_client_get_view (EBookClient *client,
g_return_if_fail (sexp != NULL);
- e_client_proxy_call_string (E_CLIENT (client), e_util_ensure_gdbus_string (sexp, &gdbus_sexp), cancellable, callback, user_data, e_book_client_get_view,
- e_gdbus_book_call_get_view,
- NULL, NULL, e_gdbus_book_call_get_view_finish, NULL, NULL);
+ e_client_proxy_call_string (
+ E_CLIENT (client),
+ e_util_ensure_gdbus_string (sexp, &gdbus_sexp),
+ cancellable, callback, user_data,
+ e_book_client_get_view,
+ e_gdbus_book_call_get_view,
+ NULL, NULL,
+ e_gdbus_book_call_get_view_finish, NULL, NULL);
g_free (gdbus_sexp);
}
@@ -2364,12 +2507,13 @@ complete_get_view (EBookClient *client,
GError *local_error = NULL;
EGdbusBookView *gdbus_bookview;
- gdbus_bookview = e_gdbus_book_view_proxy_new_sync (g_dbus_proxy_get_connection (G_DBUS_PROXY (book_factory)),
- G_DBUS_PROXY_FLAGS_NONE,
- ADDRESS_BOOK_DBUS_SERVICE_NAME,
- view_path,
- NULL,
- &local_error);
+ gdbus_bookview = e_gdbus_book_view_proxy_new_sync (
+ g_dbus_proxy_get_connection (G_DBUS_PROXY (book_factory)),
+ G_DBUS_PROXY_FLAGS_NONE,
+ ADDRESS_BOOK_DBUS_SERVICE_NAME,
+ view_path,
+ NULL,
+ &local_error);
if (gdbus_bookview) {
*view = _e_book_client_view_new (client, gdbus_bookview);
@@ -2420,7 +2564,10 @@ e_book_client_get_view_finish (EBookClient *client,
g_return_val_if_fail (view != NULL, FALSE);
- res = e_client_proxy_call_finish_string (E_CLIENT (client), result, &view_path, error, e_book_client_get_view);
+ res = e_client_proxy_call_finish_string (
+ E_CLIENT (client),
+ result, &view_path, error,
+ e_book_client_get_view);
return complete_get_view (client, res, view_path, view, error);
}
@@ -2459,12 +2606,16 @@ e_book_client_get_view_sync (EBookClient *client,
g_return_val_if_fail (sexp != NULL, FALSE);
g_return_val_if_fail (view != NULL, FALSE);
- if (!client->priv->gdbus_book) {
+ if (client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
- res = e_client_proxy_call_sync_string__string (E_CLIENT (client), e_util_ensure_gdbus_string (sexp, &gdbus_sexp), &view_path, cancellable, error, e_gdbus_book_call_get_view_sync);
+ res = e_client_proxy_call_sync_string__string (
+ E_CLIENT (client),
+ e_util_ensure_gdbus_string (sexp, &gdbus_sexp),
+ &view_path, cancellable, error,
+ e_gdbus_book_call_get_view_sync);
g_free (gdbus_sexp);
diff --git a/addressbook/libebook/e-book.c b/addressbook/libebook/e-book.c
index dec6181..7d7d401 100644
--- a/addressbook/libebook/e-book.c
+++ b/addressbook/libebook/e-book.c
@@ -366,7 +366,7 @@ e_book_activate (GCancellable *cancellable,
}
static void
-readonly_cb (EGdbusBook *object,
+readonly_cb (EGdbusBook *dbus_proxy,
gboolean readonly,
EBook *book)
{
@@ -381,7 +381,7 @@ readonly_cb (EGdbusBook *object,
}
static void
-online_cb (EGdbusBook *object,
+online_cb (EGdbusBook *dbus_proxy,
gboolean is_online,
EBook *book)
{
diff --git a/addressbook/libedata-book/e-data-book.c b/addressbook/libedata-book/e-data-book.c
index 704fdef..ca7fe18 100644
--- a/addressbook/libedata-book/e-data-book.c
+++ b/addressbook/libedata-book/e-data-book.c
@@ -41,7 +41,7 @@
struct _EDataBookPrivate {
GDBusConnection *connection;
- EGdbusBook *gdbus_object;
+ EGdbusBook *dbus_interface;
EBookBackend *backend;
gchar *object_path;
@@ -206,14 +206,14 @@ operation_thread (gpointer data,
error = e_data_book_create_error (E_DATA_BOOK_STATUS_INVALID_QUERY, NULL);
/* Translators: This is prefix to a detailed error message */
g_prefix_error (&error, "%s", _("Invalid query: "));
- e_gdbus_book_emit_get_view_done (op->book->priv->gdbus_object, op->id, error, NULL);
+ e_gdbus_book_emit_get_view_done (op->book->priv->dbus_interface, op->id, error, NULL);
g_error_free (error);
break;
}
object_path = construct_bookview_path ();
connection = e_gdbus_book_stub_get_connection (
- op->book->priv->gdbus_object);
+ op->book->priv->dbus_interface);
view = e_data_book_view_new (
op->book, card_sexp,
@@ -229,7 +229,7 @@ operation_thread (gpointer data,
if (error != NULL) {
/* Translators: This is prefix to a detailed error message */
g_prefix_error (&error, "%s", _("Invalid query: "));
- e_gdbus_book_emit_get_view_done (op->book->priv->gdbus_object, op->id, error, NULL);
+ e_gdbus_book_emit_get_view_done (op->book->priv->dbus_interface, op->id, error, NULL);
g_error_free (error);
g_free (object_path);
break;
@@ -237,7 +237,7 @@ operation_thread (gpointer data,
e_book_backend_add_view (backend, view);
- e_gdbus_book_emit_get_view_done (op->book->priv->gdbus_object, op->id, NULL, object_path);
+ e_gdbus_book_emit_get_view_done (op->book->priv->dbus_interface, op->id, NULL, object_path);
g_free (object_path);
}
@@ -495,7 +495,7 @@ e_data_book_string_slist_to_comma_string (const GSList *strings)
}
static gboolean
-impl_Book_open (EGdbusBook *object,
+impl_Book_open (EGdbusBook *interface,
GDBusMethodInvocation *invocation,
gboolean only_if_exists,
EDataBook *book)
@@ -505,14 +505,14 @@ impl_Book_open (EGdbusBook *object,
op = op_new (OP_OPEN, book);
op->d.only_if_exists = only_if_exists;
- e_gdbus_book_complete_open (book->priv->gdbus_object, invocation, op->id);
+ e_gdbus_book_complete_open (book->priv->dbus_interface, invocation, op->id);
e_operation_pool_push (ops_pool, op);
return TRUE;
}
static gboolean
-impl_Book_refresh (EGdbusBook *object,
+impl_Book_refresh (EGdbusBook *interface,
GDBusMethodInvocation *invocation,
EDataBook *book)
{
@@ -520,14 +520,14 @@ impl_Book_refresh (EGdbusBook *object,
op = op_new (OP_REFRESH, book);
- e_gdbus_book_complete_refresh (book->priv->gdbus_object, invocation, op->id);
+ e_gdbus_book_complete_refresh (book->priv->dbus_interface, invocation, op->id);
e_operation_pool_push (ops_pool, op);
return TRUE;
}
static gboolean
-impl_Book_get_contact (EGdbusBook *object,
+impl_Book_get_contact (EGdbusBook *interface,
GDBusMethodInvocation *invocation,
const gchar *in_uid,
EDataBook *book)
@@ -547,14 +547,14 @@ impl_Book_get_contact (EGdbusBook *object,
op = op_new (OP_GET_CONTACT, book);
op->d.uid = g_strdup (in_uid);
- e_gdbus_book_complete_get_contact (book->priv->gdbus_object, invocation, op->id);
+ e_gdbus_book_complete_get_contact (book->priv->dbus_interface, invocation, op->id);
e_operation_pool_push (ops_pool, op);
return TRUE;
}
static gboolean
-impl_Book_get_contact_list (EGdbusBook *object,
+impl_Book_get_contact_list (EGdbusBook *interface,
GDBusMethodInvocation *invocation,
const gchar *in_query,
EDataBook *book)
@@ -572,14 +572,14 @@ impl_Book_get_contact_list (EGdbusBook *object,
op = op_new (OP_GET_CONTACTS, book);
op->d.query = g_strdup (in_query);
- e_gdbus_book_complete_get_contact_list (book->priv->gdbus_object, invocation, op->id);
+ e_gdbus_book_complete_get_contact_list (book->priv->dbus_interface, invocation, op->id);
e_operation_pool_push (ops_pool, op);
return TRUE;
}
static gboolean
-impl_Book_get_contact_list_uids (EGdbusBook *object,
+impl_Book_get_contact_list_uids (EGdbusBook *interface,
GDBusMethodInvocation *invocation,
const gchar *in_query,
EDataBook *book)
@@ -597,14 +597,14 @@ impl_Book_get_contact_list_uids (EGdbusBook *object,
op = op_new (OP_GET_CONTACTS_UIDS, book);
op->d.query = g_strdup (in_query);
- e_gdbus_book_complete_get_contact_list_uids (book->priv->gdbus_object, invocation, op->id);
+ e_gdbus_book_complete_get_contact_list_uids (book->priv->dbus_interface, invocation, op->id);
e_operation_pool_push (ops_pool, op);
return TRUE;
}
static gboolean
-impl_Book_add_contacts (EGdbusBook *object,
+impl_Book_add_contacts (EGdbusBook *interface,
GDBusMethodInvocation *invocation,
const gchar * const *in_vcards,
EDataBook *book)
@@ -622,14 +622,14 @@ impl_Book_add_contacts (EGdbusBook *object,
op = op_new (OP_ADD_CONTACTS, book);
op->d.vcards = e_util_strv_to_slist (in_vcards);
- e_gdbus_book_complete_add_contacts (book->priv->gdbus_object, invocation, op->id);
+ e_gdbus_book_complete_add_contacts (book->priv->dbus_interface, invocation, op->id);
e_operation_pool_push (ops_pool, op);
return TRUE;
}
static gboolean
-impl_Book_modify_contacts (EGdbusBook *object,
+impl_Book_modify_contacts (EGdbusBook *interface,
GDBusMethodInvocation *invocation,
const gchar * const *in_vcards,
EDataBook *book)
@@ -647,14 +647,14 @@ impl_Book_modify_contacts (EGdbusBook *object,
op = op_new (OP_MODIFY_CONTACTS, book);
op->d.vcards = e_util_strv_to_slist (in_vcards);
- e_gdbus_book_complete_modify_contacts (book->priv->gdbus_object, invocation, op->id);
+ e_gdbus_book_complete_modify_contacts (book->priv->dbus_interface, invocation, op->id);
e_operation_pool_push (ops_pool, op);
return TRUE;
}
static gboolean
-impl_Book_remove_contacts (EGdbusBook *object,
+impl_Book_remove_contacts (EGdbusBook *interface,
GDBusMethodInvocation *invocation,
const gchar * const *in_uids,
EDataBook *book)
@@ -668,14 +668,14 @@ impl_Book_remove_contacts (EGdbusBook *object,
op->d.ids = g_slist_prepend (op->d.ids, g_strdup (*in_uids));
}
- e_gdbus_book_complete_remove_contacts (book->priv->gdbus_object, invocation, op->id);
+ e_gdbus_book_complete_remove_contacts (book->priv->dbus_interface, invocation, op->id);
e_operation_pool_push (ops_pool, op);
return TRUE;
}
static gboolean
-impl_Book_get_backend_property (EGdbusBook *object,
+impl_Book_get_backend_property (EGdbusBook *interface,
GDBusMethodInvocation *invocation,
const gchar *in_prop_name,
EDataBook *book)
@@ -685,14 +685,14 @@ impl_Book_get_backend_property (EGdbusBook *object,
op = op_new (OP_GET_BACKEND_PROPERTY, book);
op->d.prop_name = g_strdup (in_prop_name);
- e_gdbus_book_complete_get_backend_property (book->priv->gdbus_object, invocation, op->id);
+ e_gdbus_book_complete_get_backend_property (book->priv->dbus_interface, invocation, op->id);
e_operation_pool_push (ops_pool, op);
return TRUE;
}
static gboolean
-impl_Book_set_backend_property (EGdbusBook *object,
+impl_Book_set_backend_property (EGdbusBook *interface,
GDBusMethodInvocation *invocation,
const gchar * const *in_prop_name_value,
EDataBook *book)
@@ -702,14 +702,14 @@ impl_Book_set_backend_property (EGdbusBook *object,
op = op_new (OP_SET_BACKEND_PROPERTY, book);
g_return_val_if_fail (e_gdbus_book_decode_set_backend_property (in_prop_name_value, &op->d.sbp.prop_name, &op->d.sbp.prop_value), FALSE);
- e_gdbus_book_complete_set_backend_property (book->priv->gdbus_object, invocation, op->id);
+ e_gdbus_book_complete_set_backend_property (book->priv->dbus_interface, invocation, op->id);
e_operation_pool_push (ops_pool, op);
return TRUE;
}
static gboolean
-impl_Book_get_view (EGdbusBook *object,
+impl_Book_get_view (EGdbusBook *interface,
GDBusMethodInvocation *invocation,
const gchar *in_query,
EDataBook *book)
@@ -730,14 +730,14 @@ impl_Book_get_view (EGdbusBook *object,
op = op_new (OP_GET_VIEW, book);
op->d.query = g_strdup (in_query);
- e_gdbus_book_complete_get_view (book->priv->gdbus_object, invocation, op->id);
+ e_gdbus_book_complete_get_view (book->priv->dbus_interface, invocation, op->id);
e_operation_pool_push (ops_pool, op);
return TRUE;
}
static gboolean
-impl_Book_cancel_operation (EGdbusBook *object,
+impl_Book_cancel_operation (EGdbusBook *interface,
GDBusMethodInvocation *invocation,
guint in_opid,
EDataBook *book)
@@ -747,14 +747,14 @@ impl_Book_cancel_operation (EGdbusBook *object,
op = op_new (OP_CANCEL_OPERATION, book);
op->d.opid = in_opid;
- e_gdbus_book_complete_cancel_operation (book->priv->gdbus_object, invocation, NULL);
+ e_gdbus_book_complete_cancel_operation (book->priv->dbus_interface, invocation, NULL);
e_operation_pool_push (ops_pool, op);
return TRUE;
}
static gboolean
-impl_Book_cancel_all (EGdbusBook *object,
+impl_Book_cancel_all (EGdbusBook *interface,
GDBusMethodInvocation *invocation,
EDataBook *book)
{
@@ -762,14 +762,14 @@ impl_Book_cancel_all (EGdbusBook *object,
op = op_new (OP_CANCEL_ALL, book);
- e_gdbus_book_complete_cancel_all (book->priv->gdbus_object, invocation, NULL);
+ e_gdbus_book_complete_cancel_all (book->priv->dbus_interface, invocation, NULL);
e_operation_pool_push (ops_pool, op);
return TRUE;
}
static gboolean
-impl_Book_close (EGdbusBook *object,
+impl_Book_close (EGdbusBook *interface,
GDBusMethodInvocation *invocation,
EDataBook *book)
{
@@ -779,7 +779,7 @@ impl_Book_close (EGdbusBook *object,
/* unref here makes sure the book is freed in a separate thread */
g_object_unref (book);
- e_gdbus_book_complete_close (book->priv->gdbus_object, invocation, NULL);
+ e_gdbus_book_complete_close (book->priv->dbus_interface, invocation, NULL);
e_operation_pool_push (ops_pool, op);
return TRUE;
@@ -795,7 +795,7 @@ e_data_book_respond_open (EDataBook *book,
/* Translators: This is prefix to a detailed error message */
g_prefix_error (&error, "%s", _("Cannot open book: "));
- e_gdbus_book_emit_open_done (book->priv->gdbus_object, opid, error);
+ e_gdbus_book_emit_open_done (book->priv->dbus_interface, opid, error);
if (error)
g_error_free (error);
@@ -820,7 +820,7 @@ e_data_book_respond_refresh (EDataBook *book,
/* Translators: This is prefix to a detailed error message */
g_prefix_error (&error, "%s", _("Cannot refresh address book: "));
- e_gdbus_book_emit_refresh_done (book->priv->gdbus_object, opid, error);
+ e_gdbus_book_emit_refresh_done (book->priv->dbus_interface, opid, error);
if (error)
g_error_free (error);
@@ -846,7 +846,7 @@ e_data_book_respond_get_backend_property (EDataBook *book,
/* Translators: This is prefix to a detailed error message */
g_prefix_error (&error, "%s", _("Cannot get backend property: "));
- e_gdbus_book_emit_get_backend_property_done (book->priv->gdbus_object, opid, error, e_util_ensure_gdbus_string (prop_value, &gdbus_prop_value));
+ e_gdbus_book_emit_get_backend_property_done (book->priv->dbus_interface, opid, error, e_util_ensure_gdbus_string (prop_value, &gdbus_prop_value));
if (error)
g_error_free (error);
@@ -871,7 +871,7 @@ e_data_book_respond_set_backend_property (EDataBook *book,
/* Translators: This is prefix to a detailed error message */
g_prefix_error (&error, "%s", _("Cannot set backend property: "));
- e_gdbus_book_emit_set_backend_property_done (book->priv->gdbus_object, opid, error);
+ e_gdbus_book_emit_set_backend_property_done (book->priv->dbus_interface, opid, error);
if (error)
g_error_free (error);
@@ -890,7 +890,7 @@ e_data_book_respond_get_contact (EDataBook *book,
/* Translators: This is prefix to a detailed error message */
g_prefix_error (&error, "%s", _("Cannot get contact: "));
- e_gdbus_book_emit_get_contact_done (book->priv->gdbus_object, opid, error, e_util_ensure_gdbus_string (vcard, &gdbus_vcard));
+ e_gdbus_book_emit_get_contact_done (book->priv->dbus_interface, opid, error, e_util_ensure_gdbus_string (vcard, &gdbus_vcard));
if (error)
g_error_free (error);
@@ -907,7 +907,7 @@ e_data_book_respond_get_contact_list (EDataBook *book,
if (error) {
/* Translators: This is prefix to a detailed error message */
g_prefix_error (&error, "%s", _("Cannot get contact list: "));
- e_gdbus_book_emit_get_contact_list_done (book->priv->gdbus_object, opid, error, NULL);
+ e_gdbus_book_emit_get_contact_list_done (book->priv->dbus_interface, opid, error, NULL);
g_error_free (error);
} else {
gchar **array;
@@ -919,7 +919,7 @@ e_data_book_respond_get_contact_list (EDataBook *book,
array[i++] = e_util_utf8_make_valid (l->data);
}
- e_gdbus_book_emit_get_contact_list_done (book->priv->gdbus_object, opid, NULL, (const gchar * const *) array);
+ e_gdbus_book_emit_get_contact_list_done (book->priv->dbus_interface, opid, NULL, (const gchar * const *) array);
g_strfreev (array);
}
@@ -941,7 +941,7 @@ e_data_book_respond_get_contact_list_uids (EDataBook *book,
if (error) {
/* Translators: This is prefix to a detailed error message */
g_prefix_error (&error, "%s", _("Cannot get contact list uids: "));
- e_gdbus_book_emit_get_contact_list_uids_done (book->priv->gdbus_object, opid, error, NULL);
+ e_gdbus_book_emit_get_contact_list_uids_done (book->priv->dbus_interface, opid, error, NULL);
g_error_free (error);
} else {
gchar **array;
@@ -953,7 +953,7 @@ e_data_book_respond_get_contact_list_uids (EDataBook *book,
array[i++] = e_util_utf8_make_valid (l->data);
}
- e_gdbus_book_emit_get_contact_list_uids_done (book->priv->gdbus_object, opid, NULL, (const gchar * const *) array);
+ e_gdbus_book_emit_get_contact_list_uids_done (book->priv->dbus_interface, opid, NULL, (const gchar * const *) array);
g_strfreev (array);
}
@@ -988,7 +988,7 @@ e_data_book_respond_create_contacts (EDataBook *book,
/* Translators: This is prefix to a detailed error message */
g_prefix_error (&error, "%s", _("Cannot add contact: "));
- e_gdbus_book_emit_add_contacts_done (book->priv->gdbus_object, opid, error, (const gchar * const *) array);
+ e_gdbus_book_emit_add_contacts_done (book->priv->dbus_interface, opid, error, (const gchar * const *) array);
g_strfreev (array);
if (error) {
@@ -1022,7 +1022,7 @@ e_data_book_respond_modify_contacts (EDataBook *book,
/* Translators: This is prefix to a detailed error message */
g_prefix_error (&error, "%s", _("Cannot modify contacts: "));
- e_gdbus_book_emit_modify_contacts_done (book->priv->gdbus_object, opid, error);
+ e_gdbus_book_emit_modify_contacts_done (book->priv->dbus_interface, opid, error);
if (error) {
g_error_free (error);
@@ -1047,7 +1047,7 @@ e_data_book_respond_remove_contacts (EDataBook *book,
/* Translators: This is prefix to a detailed error message */
g_prefix_error (&error, "%s", _("Cannot remove contacts: "));
- e_gdbus_book_emit_remove_contacts_done (book->priv->gdbus_object, opid, error);
+ e_gdbus_book_emit_remove_contacts_done (book->priv->dbus_interface, opid, error);
if (error) {
g_error_free (error);
@@ -1076,7 +1076,7 @@ e_data_book_report_error (EDataBook *book,
g_return_if_fail (book != NULL);
g_return_if_fail (message != NULL);
- e_gdbus_book_emit_backend_error (book->priv->gdbus_object, message);
+ e_gdbus_book_emit_backend_error (book->priv->dbus_interface, message);
}
/**
@@ -1092,7 +1092,7 @@ e_data_book_report_readonly (EDataBook *book,
{
g_return_if_fail (book != NULL);
- e_gdbus_book_emit_readonly (book->priv->gdbus_object, readonly);
+ e_gdbus_book_emit_readonly (book->priv->dbus_interface, readonly);
}
/**
@@ -1108,7 +1108,7 @@ e_data_book_report_online (EDataBook *book,
{
g_return_if_fail (book != NULL);
- e_gdbus_book_emit_online (book->priv->gdbus_object, is_online);
+ e_gdbus_book_emit_online (book->priv->dbus_interface, is_online);
}
/**
@@ -1129,7 +1129,7 @@ e_data_book_report_opened (EDataBook *book,
strv_error = e_gdbus_templates_encode_error (error);
- e_gdbus_book_emit_opened (book->priv->gdbus_object, (const gchar * const *) strv_error);
+ e_gdbus_book_emit_opened (book->priv->dbus_interface, (const gchar * const *) strv_error);
g_strfreev (strv_error);
}
@@ -1158,7 +1158,7 @@ e_data_book_report_backend_property_changed (EDataBook *book,
strv = e_gdbus_templates_encode_two_strings (prop_name, prop_value);
g_return_if_fail (strv != NULL);
- e_gdbus_book_emit_backend_property_changed (book->priv->gdbus_object, (const gchar * const *) strv);
+ e_gdbus_book_emit_backend_property_changed (book->priv->dbus_interface, (const gchar * const *) strv);
g_strfreev (strv);
}
@@ -1291,9 +1291,9 @@ data_book_finalize (GObject *object)
g_static_rec_mutex_free (&priv->pending_ops_lock);
- if (priv->gdbus_object) {
- g_object_unref (priv->gdbus_object);
- priv->gdbus_object = NULL;
+ if (priv->dbus_interface) {
+ g_object_unref (priv->dbus_interface);
+ priv->dbus_interface = NULL;
}
/* Chain up to parent's finalize() method. */
@@ -1310,7 +1310,7 @@ data_book_initable_init (GInitable *initable,
book = E_DATA_BOOK (initable);
return e_gdbus_book_register_object (
- book->priv->gdbus_object,
+ book->priv->dbus_interface,
book->priv->connection,
book->priv->object_path,
error);
@@ -1380,57 +1380,57 @@ e_data_book_initable_init (GInitableIface *interface)
static void
e_data_book_init (EDataBook *ebook)
{
- EGdbusBook *gdbus_object;
+ EGdbusBook *dbus_interface;
ebook->priv = E_DATA_BOOK_GET_PRIVATE (ebook);
- ebook->priv->gdbus_object = e_gdbus_book_stub_new ();
+ ebook->priv->dbus_interface = e_gdbus_book_stub_new ();
ebook->priv->pending_ops = g_hash_table_new_full (
g_direct_hash, g_direct_equal, NULL, g_object_unref);
g_static_rec_mutex_init (&ebook->priv->pending_ops_lock);
- gdbus_object = ebook->priv->gdbus_object;
+ dbus_interface = ebook->priv->dbus_interface;
g_signal_connect (
- gdbus_object, "handle-open",
+ dbus_interface, "handle-open",
G_CALLBACK (impl_Book_open), ebook);
g_signal_connect (
- gdbus_object, "handle-refresh",
+ dbus_interface, "handle-refresh",
G_CALLBACK (impl_Book_refresh), ebook);
g_signal_connect (
- gdbus_object, "handle-get-contact",
+ dbus_interface, "handle-get-contact",
G_CALLBACK (impl_Book_get_contact), ebook);
g_signal_connect (
- gdbus_object, "handle-get-contact-list",
+ dbus_interface, "handle-get-contact-list",
G_CALLBACK (impl_Book_get_contact_list), ebook);
g_signal_connect (
- gdbus_object, "handle-get-contact-list-uids",
+ dbus_interface, "handle-get-contact-list-uids",
G_CALLBACK (impl_Book_get_contact_list_uids), ebook);
g_signal_connect (
- gdbus_object, "handle-add-contacts",
+ dbus_interface, "handle-add-contacts",
G_CALLBACK (impl_Book_add_contacts), ebook);
g_signal_connect (
- gdbus_object, "handle-remove-contacts",
+ dbus_interface, "handle-remove-contacts",
G_CALLBACK (impl_Book_remove_contacts), ebook);
g_signal_connect (
- gdbus_object, "handle-modify-contacts",
+ dbus_interface, "handle-modify-contacts",
G_CALLBACK (impl_Book_modify_contacts), ebook);
g_signal_connect (
- gdbus_object, "handle-get-backend-property",
+ dbus_interface, "handle-get-backend-property",
G_CALLBACK (impl_Book_get_backend_property), ebook);
g_signal_connect (
- gdbus_object, "handle-set-backend-property",
+ dbus_interface, "handle-set-backend-property",
G_CALLBACK (impl_Book_set_backend_property), ebook);
g_signal_connect (
- gdbus_object, "handle-get-view",
+ dbus_interface, "handle-get-view",
G_CALLBACK (impl_Book_get_view), ebook);
g_signal_connect (
- gdbus_object, "handle-cancel-operation",
+ dbus_interface, "handle-cancel-operation",
G_CALLBACK (impl_Book_cancel_operation), ebook);
g_signal_connect (
- gdbus_object, "handle-cancel-all",
+ dbus_interface, "handle-cancel-all",
G_CALLBACK (impl_Book_cancel_all), ebook);
g_signal_connect (
- gdbus_object, "handle-close",
+ dbus_interface, "handle-close",
G_CALLBACK (impl_Book_close), ebook);
}
diff --git a/calendar/libecal/e-cal-client.c b/calendar/libecal/e-cal-client.c
index e0c2d27..5292974 100644
--- a/calendar/libecal/e-cal-client.c
+++ b/calendar/libecal/e-cal-client.c
@@ -44,8 +44,7 @@
((obj), E_TYPE_CAL_CLIENT, ECalClientPrivate))
struct _ECalClientPrivate {
- /* GDBus data */
- GDBusProxy *gdbus_cal;
+ GDBusProxy *dbus_proxy;
guint gone_signal_id;
ECalClientSourceType source_type;
@@ -370,16 +369,16 @@ gdbus_cal_client_disconnect (ECalClient *client)
/* Ensure that everything relevant is NULL */
LOCK_FACTORY ();
- if (client->priv->gdbus_cal) {
- GDBusConnection *connection = g_dbus_proxy_get_connection (G_DBUS_PROXY (client->priv->gdbus_cal));
+ if (client->priv->dbus_proxy != NULL) {
+ GDBusConnection *connection = g_dbus_proxy_get_connection (G_DBUS_PROXY (client->priv->dbus_proxy));
g_signal_handlers_disconnect_by_func (connection, gdbus_cal_client_closed_cb, client);
g_dbus_connection_signal_unsubscribe (connection, client->priv->gone_signal_id);
client->priv->gone_signal_id = 0;
- e_gdbus_cal_call_close_sync (client->priv->gdbus_cal, NULL, NULL);
- g_object_unref (client->priv->gdbus_cal);
- client->priv->gdbus_cal = NULL;
+ e_gdbus_cal_call_close_sync (client->priv->dbus_proxy, NULL, NULL);
+ g_object_unref (client->priv->dbus_proxy);
+ client->priv->dbus_proxy = NULL;
}
UNLOCK_FACTORY ();
@@ -627,13 +626,11 @@ cal_client_finalize (GObject *object)
static GDBusProxy *
cal_client_get_dbus_proxy (EClient *client)
{
- ECalClient *cal_client;
-
- g_return_val_if_fail (E_IS_CAL_CLIENT (client), NULL);
+ ECalClientPrivate *priv;
- cal_client = E_CAL_CLIENT (client);
+ priv = E_CAL_CLIENT_GET_PRIVATE (client);
- return cal_client->priv->gdbus_cal;
+ return priv->dbus_proxy;
}
static void
@@ -739,7 +736,7 @@ cal_client_get_backend_property_sync (EClient *client,
cal_client = E_CAL_CLIENT (client);
- if (!cal_client->priv->gdbus_cal) {
+ if (cal_client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
@@ -803,7 +800,7 @@ cal_client_set_backend_property_sync (EClient *client,
cal_client = E_CAL_CLIENT (client);
- if (!cal_client->priv->gdbus_cal) {
+ if (cal_client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
@@ -847,7 +844,7 @@ cal_client_open_sync (EClient *client,
cal_client = E_CAL_CLIENT (client);
- if (!cal_client->priv->gdbus_cal) {
+ if (cal_client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
@@ -885,7 +882,7 @@ cal_client_refresh_sync (EClient *client,
cal_client = E_CAL_CLIENT (client);
- if (!cal_client->priv->gdbus_cal) {
+ if (cal_client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
@@ -1031,7 +1028,7 @@ e_cal_client_new (ESource *source,
connection = g_dbus_proxy_get_connection (G_DBUS_PROXY (cal_factory));
- client->priv->gdbus_cal = G_DBUS_PROXY (e_gdbus_cal_proxy_new_sync (
+ client->priv->dbus_proxy = G_DBUS_PROXY (e_gdbus_cal_proxy_new_sync (
connection,
G_DBUS_PROXY_FLAGS_NONE,
CALENDAR_DBUS_SERVICE_NAME,
@@ -1067,27 +1064,27 @@ e_cal_client_new (ESource *source,
G_CALLBACK (gdbus_cal_client_closed_cb), client);
g_signal_connect (
- client->priv->gdbus_cal, "backend_error",
+ client->priv->dbus_proxy, "backend_error",
G_CALLBACK (backend_error_cb), client);
g_signal_connect (
- client->priv->gdbus_cal, "readonly",
+ client->priv->dbus_proxy, "readonly",
G_CALLBACK (readonly_cb), client);
g_signal_connect (
- client->priv->gdbus_cal, "online",
+ client->priv->dbus_proxy, "online",
G_CALLBACK (online_cb), client);
g_signal_connect (
- client->priv->gdbus_cal, "opened",
+ client->priv->dbus_proxy, "opened",
G_CALLBACK (opened_cb), client);
g_signal_connect (
- client->priv->gdbus_cal, "free-busy-data",
+ client->priv->dbus_proxy, "free-busy-data",
G_CALLBACK (free_busy_data_cb), client);
g_signal_connect (
- client->priv->gdbus_cal, "backend-property-changed",
+ client->priv->dbus_proxy, "backend-property-changed",
G_CALLBACK (backend_property_changed_cb), client);
return client;
@@ -1135,12 +1132,12 @@ e_cal_client_get_local_attachment_store (ECalClient *client)
g_return_val_if_fail (E_IS_CAL_CLIENT (client), NULL);
- if (client->priv->cache_dir || !client->priv->gdbus_cal)
+ if (client->priv->cache_dir || !client->priv->dbus_proxy)
return client->priv->cache_dir;
cache_dir = e_client_get_backend_property_from_cache (E_CLIENT (client), CLIENT_BACKEND_PROPERTY_CACHE_DIR);
if (!cache_dir)
- e_gdbus_cal_call_get_backend_property_sync (client->priv->gdbus_cal, CLIENT_BACKEND_PROPERTY_CACHE_DIR, &cache_dir, NULL, &error);
+ e_gdbus_cal_call_get_backend_property_sync (client->priv->dbus_proxy, CLIENT_BACKEND_PROPERTY_CACHE_DIR, &cache_dir, NULL, &error);
if (error == NULL) {
client->priv->cache_dir = cache_dir;
@@ -2721,7 +2718,7 @@ e_cal_client_get_default_object_sync (ECalClient *client,
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
g_return_val_if_fail (icalcomp != NULL, FALSE);
- if (!client->priv->gdbus_cal) {
+ if (client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
@@ -2919,7 +2916,7 @@ e_cal_client_get_object_sync (ECalClient *client,
g_return_val_if_fail (uid != NULL, FALSE);
g_return_val_if_fail (icalcomp != NULL, FALSE);
- if (!client->priv->gdbus_cal) {
+ if (client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
@@ -3088,7 +3085,7 @@ e_cal_client_get_objects_for_uid_sync (ECalClient *client,
g_return_val_if_fail (uid != NULL, FALSE);
g_return_val_if_fail (ecalcomps != NULL, FALSE);
- if (!client->priv->gdbus_cal) {
+ if (client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
@@ -3230,7 +3227,7 @@ e_cal_client_get_object_list_sync (ECalClient *client,
g_return_val_if_fail (sexp != NULL, FALSE);
g_return_val_if_fail (icalcomps != NULL, FALSE);
- if (!client->priv->gdbus_cal) {
+ if (client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
@@ -3376,7 +3373,7 @@ e_cal_client_get_object_list_as_comps_sync (ECalClient *client,
g_return_val_if_fail (sexp != NULL, FALSE);
g_return_val_if_fail (ecalcomps != NULL, FALSE);
- if (!client->priv->gdbus_cal) {
+ if (client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
@@ -3478,7 +3475,7 @@ e_cal_client_get_free_busy_sync (ECalClient *client,
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
- if (!client->priv->gdbus_cal) {
+ if (client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
@@ -3604,7 +3601,7 @@ e_cal_client_create_object_sync (ECalClient *client,
g_return_val_if_fail (icalcomp != NULL, FALSE);
g_return_val_if_fail (uid != NULL, FALSE);
- if (!client->priv->gdbus_cal) {
+ if (client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
@@ -3731,7 +3728,7 @@ e_cal_client_create_objects_sync (ECalClient *client,
g_return_val_if_fail (icalcomps != NULL, FALSE);
g_return_val_if_fail (uids != NULL, FALSE);
- if (!client->priv->gdbus_cal) {
+ if (client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
@@ -3844,7 +3841,7 @@ e_cal_client_modify_object_sync (ECalClient *client,
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
g_return_val_if_fail (icalcomp != NULL, FALSE);
- if (!client->priv->gdbus_cal) {
+ if (client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
@@ -3964,7 +3961,7 @@ e_cal_client_modify_objects_sync (ECalClient *client,
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
g_return_val_if_fail (comps != NULL, FALSE);
- if (!client->priv->gdbus_cal) {
+ if (client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
@@ -4083,7 +4080,7 @@ e_cal_client_remove_object_sync (ECalClient *client,
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
g_return_val_if_fail (uid != NULL, FALSE);
- if (!client->priv->gdbus_cal) {
+ if (client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
@@ -4192,7 +4189,7 @@ e_cal_client_remove_objects_sync (ECalClient *client,
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
g_return_val_if_fail (ids != NULL, FALSE);
- if (!client->priv->gdbus_cal) {
+ if (client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
@@ -4290,7 +4287,7 @@ e_cal_client_receive_objects_sync (ECalClient *client,
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
- if (!client->priv->gdbus_cal) {
+ if (client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
@@ -4453,7 +4450,7 @@ e_cal_client_send_objects_sync (ECalClient *client,
g_return_val_if_fail (users != NULL, FALSE);
g_return_val_if_fail (modified_icalcomp != NULL, FALSE);
- if (!client->priv->gdbus_cal) {
+ if (client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
@@ -4576,7 +4573,7 @@ e_cal_client_get_attachment_uris_sync (ECalClient *client,
g_return_val_if_fail (uid != NULL, FALSE);
g_return_val_if_fail (attachment_uris != NULL, FALSE);
- if (!client->priv->gdbus_cal) {
+ if (client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
@@ -4687,7 +4684,7 @@ e_cal_client_discard_alarm_sync (ECalClient *client,
g_return_val_if_fail (uid != NULL, FALSE);
g_return_val_if_fail (auid != NULL, FALSE);
- if (!client->priv->gdbus_cal) {
+ if (client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
@@ -4838,7 +4835,7 @@ e_cal_client_get_view_sync (ECalClient *client,
g_return_val_if_fail (sexp != NULL, FALSE);
g_return_val_if_fail (view != NULL, FALSE);
- if (!client->priv->gdbus_cal) {
+ if (client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
@@ -5095,7 +5092,7 @@ e_cal_client_get_timezone_sync (ECalClient *client,
g_return_val_if_fail (tzid != NULL, FALSE);
g_return_val_if_fail (zone != NULL, FALSE);
- if (!client->priv->gdbus_cal) {
+ if (client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
@@ -5208,7 +5205,7 @@ e_cal_client_add_timezone_sync (ECalClient *client,
return FALSE;
}
- if (!client->priv->gdbus_cal) {
+ if (client->priv->dbus_proxy == NULL) {
set_proxy_gone_error (error);
return FALSE;
}
diff --git a/calendar/libecal/e-cal.c b/calendar/libecal/e-cal.c
index 221d9ce..73be7f4 100644
--- a/calendar/libecal/e-cal.c
+++ b/calendar/libecal/e-cal.c
@@ -81,7 +81,7 @@ static void e_cal_finalize (GObject *object);
/* Private part of the ECal structure */
struct _ECalPrivate {
- GDBusProxy *gdbus_cal;
+ GDBusProxy *dbus_proxy;
guint gone_signal_id;
/* Load state to avoid multiple loads */
@@ -420,7 +420,7 @@ e_cal_init (ECal *ecal)
ecal->priv->alarm_email_address = NULL;
ecal->priv->ldap_attribute = NULL;
ecal->priv->capabilities = NULL;
- ecal->priv->gdbus_cal = NULL;
+ ecal->priv->dbus_proxy = NULL;
ecal->priv->timezones = g_hash_table_new (g_str_hash, g_str_equal);
ecal->priv->default_zone = icaltimezone_get_utc_timezone ();
ecal->priv->free_busy_data_lock = g_mutex_new ();
@@ -480,17 +480,17 @@ gdbus_cal_disconnect (ECal *ecal)
/* Ensure that everything relevant is NULL */
LOCK_FACTORY ();
- if (ecal->priv->gdbus_cal) {
+ if (ecal->priv->dbus_proxy != NULL) {
+ GDBusConnection *connection = g_dbus_proxy_get_connection (G_DBUS_PROXY (ecal->priv->dbus_proxy));
GError *error = NULL;
- GDBusConnection *connection = g_dbus_proxy_get_connection (G_DBUS_PROXY (ecal->priv->gdbus_cal));
g_signal_handlers_disconnect_by_func (connection, gdbus_cal_closed_cb, ecal);
g_dbus_connection_signal_unsubscribe (connection, ecal->priv->gone_signal_id);
ecal->priv->gone_signal_id = 0;
- e_gdbus_cal_call_close_sync (ecal->priv->gdbus_cal, NULL, &error);
- g_object_unref (ecal->priv->gdbus_cal);
- ecal->priv->gdbus_cal = NULL;
+ e_gdbus_cal_call_close_sync (ecal->priv->dbus_proxy, NULL, &error);
+ g_object_unref (ecal->priv->dbus_proxy);
+ ecal->priv->dbus_proxy = NULL;
if (error) {
unwrap_gerror (&error);
@@ -885,7 +885,9 @@ set_local_attachment_store (ECal *ecal)
GError *error = NULL;
e_gdbus_cal_call_get_backend_property_sync (
- ecal->priv->gdbus_cal, CLIENT_BACKEND_PROPERTY_CACHE_DIR, &cache_dir, NULL, &error);
+ ecal->priv->dbus_proxy,
+ CLIENT_BACKEND_PROPERTY_CACHE_DIR,
+ &cache_dir, NULL, &error);
if (error == NULL)
ecal->priv->local_attachment_store = cache_dir;
@@ -962,7 +964,7 @@ e_cal_new (ESource *source,
connection = g_dbus_proxy_get_connection (G_DBUS_PROXY (cal_factory));
- priv->gdbus_cal = G_DBUS_PROXY (e_gdbus_cal_proxy_new_sync (
+ priv->dbus_proxy = G_DBUS_PROXY (e_gdbus_cal_proxy_new_sync (
connection,
G_DBUS_PROXY_FLAGS_NONE,
CALENDAR_DBUS_SERVICE_NAME,
@@ -973,8 +975,8 @@ e_cal_new (ESource *source,
/* Sanity check. */
g_return_val_if_fail (
- ((priv->gdbus_cal != NULL) && (error == NULL)) ||
- ((priv->gdbus_cal == NULL) && (error != NULL)), NULL);
+ ((priv->dbus_proxy != NULL) && (error == NULL)) ||
+ ((priv->dbus_proxy == NULL) && (error != NULL)), NULL);
if (error != NULL) {
unwrap_gerror (&error);
@@ -999,19 +1001,19 @@ e_cal_new (ESource *source,
G_CALLBACK (gdbus_cal_closed_cb), ecal);
g_signal_connect (
- priv->gdbus_cal, "backend-error",
+ priv->dbus_proxy, "backend-error",
G_CALLBACK (backend_error_cb), ecal);
g_signal_connect (
- priv->gdbus_cal, "readonly",
+ priv->dbus_proxy, "readonly",
G_CALLBACK (readonly_cb), ecal);
g_signal_connect (
- priv->gdbus_cal, "online",
+ priv->dbus_proxy, "online",
G_CALLBACK (online_cb), ecal);
g_signal_connect (
- priv->gdbus_cal, "free-busy-data",
+ priv->dbus_proxy, "free-busy-data",
G_CALLBACK (free_busy_data_cb), ecal);
/* Set the local attachment store path for the calendar */
@@ -1074,7 +1076,7 @@ open_calendar (ECal *ecal,
e_return_error_if_fail (ecal != NULL, E_CALENDAR_STATUS_INVALID_ARG);
e_return_error_if_fail (E_IS_CAL (ecal), E_CALENDAR_STATUS_INVALID_ARG);
priv = ecal->priv;
- e_return_error_if_fail (priv->gdbus_cal, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
+ e_return_error_if_fail (priv->dbus_proxy, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
if (priv->load_state == E_CAL_LOAD_LOADED)
return TRUE;
@@ -1083,13 +1085,13 @@ open_calendar (ECal *ecal,
*status = E_CALENDAR_STATUS_OK;
if (!async) {
- if (!e_gdbus_cal_call_open_sync (priv->gdbus_cal, only_if_exists, NULL, error)) {
+ if (!e_gdbus_cal_call_open_sync (priv->dbus_proxy, only_if_exists, NULL, error)) {
*status = E_CALENDAR_STATUS_DBUS_EXCEPTION;
}
if (!*error)
priv->load_state = E_CAL_LOAD_LOADED;
} else {
- e_gdbus_cal_call_open (priv->gdbus_cal, only_if_exists, NULL, (GAsyncReadyCallback) async_open_ready_cb, ecal);
+ e_gdbus_cal_call_open (priv->dbus_proxy, only_if_exists, NULL, (GAsyncReadyCallback) async_open_ready_cb, ecal);
}
if (*error) {
@@ -1246,9 +1248,9 @@ e_cal_refresh (ECal *ecal,
e_return_error_if_fail (E_IS_CAL (ecal), E_CALENDAR_STATUS_INVALID_ARG);
priv = ecal->priv;
- e_return_error_if_fail (priv->gdbus_cal, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
+ e_return_error_if_fail (priv->dbus_proxy, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
- if (!e_gdbus_cal_call_refresh_sync (priv->gdbus_cal, NULL, error)) {
+ if (!e_gdbus_cal_call_refresh_sync (priv->dbus_proxy, NULL, error)) {
E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_DBUS_EXCEPTION, error);
}
@@ -1500,18 +1502,18 @@ e_cal_get_cal_address (ECal *ecal,
e_return_error_if_fail (E_IS_CAL (ecal), E_CALENDAR_STATUS_INVALID_ARG);
e_return_error_if_fail (cal_address != NULL, E_CALENDAR_STATUS_INVALID_ARG);
priv = ecal->priv;
- e_return_error_if_fail (priv->gdbus_cal, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
+ e_return_error_if_fail (priv->dbus_proxy, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
*cal_address = NULL;
LOCK_CACHE ();
if (priv->cal_address == NULL) {
- e_return_error_if_fail (priv->gdbus_cal, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
+ e_return_error_if_fail (priv->dbus_proxy, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
if (priv->load_state != E_CAL_LOAD_LOADED) {
UNLOCK_CACHE ();
E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_URI_NOT_LOADED, error);
}
- if (!e_gdbus_cal_call_get_backend_property_sync (priv->gdbus_cal, CAL_BACKEND_PROPERTY_CAL_EMAIL_ADDRESS, &priv->cal_address, NULL, error)) {
+ if (!e_gdbus_cal_call_get_backend_property_sync (priv->dbus_proxy, CAL_BACKEND_PROPERTY_CAL_EMAIL_ADDRESS, &priv->cal_address, NULL, error)) {
UNLOCK_CACHE ();
E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_DBUS_EXCEPTION, error);
}
@@ -1547,14 +1549,14 @@ e_cal_get_alarm_email_address (ECal *ecal,
e_return_error_if_fail (alarm_address != NULL, E_CALENDAR_STATUS_INVALID_ARG);
e_return_error_if_fail (E_IS_CAL (ecal), E_CALENDAR_STATUS_INVALID_ARG);
priv = ecal->priv;
- e_return_error_if_fail (priv->gdbus_cal, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
+ e_return_error_if_fail (priv->dbus_proxy, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
*alarm_address = NULL;
if (priv->load_state != E_CAL_LOAD_LOADED) {
E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_URI_NOT_LOADED, error);
}
- if (!e_gdbus_cal_call_get_backend_property_sync (priv->gdbus_cal, CAL_BACKEND_PROPERTY_ALARM_EMAIL_ADDRESS, alarm_address, NULL, error)) {
+ if (!e_gdbus_cal_call_get_backend_property_sync (priv->dbus_proxy, CAL_BACKEND_PROPERTY_ALARM_EMAIL_ADDRESS, alarm_address, NULL, error)) {
E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_DBUS_EXCEPTION, error);
}
@@ -1584,7 +1586,7 @@ e_cal_get_ldap_attribute (ECal *ecal,
e_return_error_if_fail (ldap_attribute != NULL, E_CALENDAR_STATUS_INVALID_ARG);
e_return_error_if_fail (E_IS_CAL (ecal), E_CALENDAR_STATUS_INVALID_ARG);
priv = ecal->priv;
- e_return_error_if_fail (priv->gdbus_cal, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
+ e_return_error_if_fail (priv->dbus_proxy, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
*ldap_attribute = NULL;
E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_NOT_SUPPORTED, error);
@@ -1597,7 +1599,7 @@ load_capabilities (ECal *ecal,
ECalPrivate *priv;
priv = ecal->priv;
- e_return_error_if_fail (priv->gdbus_cal, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
+ e_return_error_if_fail (priv->dbus_proxy, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
if (priv->load_state != E_CAL_LOAD_LOADED) {
E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_URI_NOT_LOADED, error);
@@ -1610,7 +1612,7 @@ load_capabilities (ECal *ecal,
E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_OK, error);
}
- if (!e_gdbus_cal_call_get_backend_property_sync (priv->gdbus_cal, CLIENT_BACKEND_PROPERTY_CAPABILITIES, &priv->capabilities, NULL, error)) {
+ if (!e_gdbus_cal_call_get_backend_property_sync (priv->dbus_proxy, CLIENT_BACKEND_PROPERTY_CAPABILITIES, &priv->capabilities, NULL, error)) {
UNLOCK_CACHE ();
E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_DBUS_EXCEPTION, error);
}
@@ -1799,7 +1801,7 @@ e_cal_set_mode (ECal *ecal,
g_return_val_if_fail (mode & CAL_MODE_ANY, FALSE);
priv = ecal->priv;
- g_return_val_if_fail (priv->gdbus_cal, FALSE);
+ g_return_val_if_fail (priv->dbus_proxy, FALSE);
g_return_val_if_fail (priv->load_state == E_CAL_LOAD_LOADED, FALSE);
g_debug ("%s: This function is not supported since 3.2", G_STRFUNC);
@@ -1843,14 +1845,14 @@ e_cal_get_default_object (ECal *ecal,
e_return_error_if_fail (icalcomp != NULL, E_CALENDAR_STATUS_INVALID_ARG);
e_return_error_if_fail (E_IS_CAL (ecal), E_CALENDAR_STATUS_INVALID_ARG);
priv = ecal->priv;
- e_return_error_if_fail (priv->gdbus_cal, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
+ e_return_error_if_fail (priv->dbus_proxy, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
*icalcomp = NULL;
if (priv->load_state != E_CAL_LOAD_LOADED) {
E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_URI_NOT_LOADED, error);
}
- if (!e_gdbus_cal_call_get_backend_property_sync (priv->gdbus_cal, CAL_BACKEND_PROPERTY_DEFAULT_OBJECT, &object, NULL, error)) {
+ if (!e_gdbus_cal_call_get_backend_property_sync (priv->dbus_proxy, CAL_BACKEND_PROPERTY_DEFAULT_OBJECT, &object, NULL, error)) {
E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_DBUS_EXCEPTION, error);
}
@@ -1901,7 +1903,7 @@ e_cal_get_attachments_for_comp (ECal *ecal,
e_return_error_if_fail (list != NULL, E_CALENDAR_STATUS_INVALID_ARG);
e_return_error_if_fail (E_IS_CAL (ecal), E_CALENDAR_STATUS_INVALID_ARG);
priv = ecal->priv;
- e_return_error_if_fail (priv->gdbus_cal, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
+ e_return_error_if_fail (priv->dbus_proxy, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
*list = NULL;
if (priv->load_state != E_CAL_LOAD_LOADED) {
@@ -1909,7 +1911,7 @@ e_cal_get_attachments_for_comp (ECal *ecal,
}
strv = e_gdbus_cal_encode_get_attachment_uris (uid, rid);
- if (!e_gdbus_cal_call_get_attachment_uris_sync (priv->gdbus_cal, (const gchar * const *) strv, &list_array, NULL, error)) {
+ if (!e_gdbus_cal_call_get_attachment_uris_sync (priv->dbus_proxy, (const gchar * const *) strv, &list_array, NULL, error)) {
g_strfreev (strv);
E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_DBUS_EXCEPTION, error);
@@ -1962,7 +1964,7 @@ e_cal_get_object (ECal *ecal,
e_return_error_if_fail (icalcomp != NULL, E_CALENDAR_STATUS_INVALID_ARG);
e_return_error_if_fail (E_IS_CAL (ecal), E_CALENDAR_STATUS_INVALID_ARG);
priv = ecal->priv;
- e_return_error_if_fail (priv->gdbus_cal, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
+ e_return_error_if_fail (priv->dbus_proxy, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
*icalcomp = NULL;
if (priv->load_state != E_CAL_LOAD_LOADED) {
@@ -1970,7 +1972,7 @@ e_cal_get_object (ECal *ecal,
}
strv = e_gdbus_cal_encode_get_object (uid, rid);
- if (!e_gdbus_cal_call_get_object_sync (priv->gdbus_cal, (const gchar * const *) strv, &object, NULL, error)) {
+ if (!e_gdbus_cal_call_get_object_sync (priv->dbus_proxy, (const gchar * const *) strv, &object, NULL, error)) {
g_strfreev (strv);
E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_DBUS_EXCEPTION, error);
@@ -2049,7 +2051,7 @@ e_cal_get_objects_for_uid (ECal *ecal,
e_return_error_if_fail (objects != NULL, E_CALENDAR_STATUS_INVALID_ARG);
e_return_error_if_fail (E_IS_CAL (ecal), E_CALENDAR_STATUS_INVALID_ARG);
priv = ecal->priv;
- e_return_error_if_fail (priv->gdbus_cal, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
+ e_return_error_if_fail (priv->dbus_proxy, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
*objects = NULL;
if (priv->load_state != E_CAL_LOAD_LOADED) {
@@ -2057,7 +2059,7 @@ e_cal_get_objects_for_uid (ECal *ecal,
}
strv = e_gdbus_cal_encode_get_object (uid, "");
- if (!e_gdbus_cal_call_get_object_sync (priv->gdbus_cal, (const gchar * const *) strv, &object, NULL, error)) {
+ if (!e_gdbus_cal_call_get_object_sync (priv->dbus_proxy, (const gchar * const *) strv, &object, NULL, error)) {
g_strfreev (strv);
E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_DBUS_EXCEPTION, error);
@@ -2176,7 +2178,7 @@ e_cal_get_changes (ECal *ecal,
e_return_error_if_fail (change_id != NULL, E_CALENDAR_STATUS_INVALID_ARG);
e_return_error_if_fail (E_IS_CAL (ecal), E_CALENDAR_STATUS_INVALID_ARG);
priv = ecal->priv;
- e_return_error_if_fail (priv->gdbus_cal, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
+ e_return_error_if_fail (priv->dbus_proxy, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
*changes = NULL;
E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_NOT_SUPPORTED, error);
@@ -2238,14 +2240,14 @@ e_cal_get_object_list (ECal *ecal,
e_return_error_if_fail (query, E_CALENDAR_STATUS_INVALID_ARG);
e_return_error_if_fail (E_IS_CAL (ecal), E_CALENDAR_STATUS_INVALID_ARG);
priv = ecal->priv;
- e_return_error_if_fail (priv->gdbus_cal, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
+ e_return_error_if_fail (priv->dbus_proxy, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
*objects = NULL;
if (priv->load_state != E_CAL_LOAD_LOADED) {
E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_URI_NOT_LOADED, error);
}
- if (!e_gdbus_cal_call_get_object_list_sync (priv->gdbus_cal, e_util_ensure_gdbus_string (query, &gdbus_query), &object_array, NULL, error)) {
+ if (!e_gdbus_cal_call_get_object_list_sync (priv->dbus_proxy, e_util_ensure_gdbus_string (query, &gdbus_query), &object_array, NULL, error)) {
g_free (gdbus_query);
E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_DBUS_EXCEPTION, error);
@@ -2367,7 +2369,7 @@ e_cal_get_free_busy (ECal *ecal,
e_return_error_if_fail (freebusy != NULL, E_CALENDAR_STATUS_INVALID_ARG);
e_return_error_if_fail (E_IS_CAL (ecal), E_CALENDAR_STATUS_INVALID_ARG);
priv = ecal->priv;
- e_return_error_if_fail (priv->gdbus_cal, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
+ e_return_error_if_fail (priv->dbus_proxy, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
*freebusy = NULL;
if (priv->load_state != E_CAL_LOAD_LOADED) {
@@ -2386,7 +2388,7 @@ e_cal_get_free_busy (ECal *ecal,
priv->free_busy_data = freebusy;
g_mutex_unlock (priv->free_busy_data_lock);
- if (!e_gdbus_cal_call_get_free_busy_sync (priv->gdbus_cal, (const gchar * const *) strv, NULL, error)) {
+ if (!e_gdbus_cal_call_get_free_busy_sync (priv->dbus_proxy, (const gchar * const *) strv, NULL, error)) {
g_strfreev (strv);
g_mutex_lock (priv->free_busy_data_lock);
priv->free_busy_data = NULL;
@@ -3162,7 +3164,7 @@ e_cal_discard_alarm (ECal *ecal,
e_return_error_if_fail (E_IS_CAL_COMPONENT (comp), E_CALENDAR_STATUS_INVALID_ARG);
e_return_error_if_fail (auid != NULL, E_CALENDAR_STATUS_INVALID_ARG);
priv = ecal->priv;
- e_return_error_if_fail (priv->gdbus_cal, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
+ e_return_error_if_fail (priv->dbus_proxy, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
if (priv->load_state != E_CAL_LOAD_LOADED) {
E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_URI_NOT_LOADED, error);
@@ -3375,7 +3377,7 @@ e_cal_create_object (ECal *ecal,
e_return_error_if_fail (icalcomp != NULL, E_CALENDAR_STATUS_INVALID_ARG);
e_return_error_if_fail (icalcomponent_is_valid (icalcomp), E_CALENDAR_STATUS_INVALID_ARG);
priv = ecal->priv;
- e_return_error_if_fail (priv->gdbus_cal, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
+ e_return_error_if_fail (priv->dbus_proxy, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
if (priv->load_state != E_CAL_LOAD_LOADED) {
E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_URI_NOT_LOADED, error);
@@ -3385,7 +3387,7 @@ e_cal_create_object (ECal *ecal,
strv[0] = e_util_ensure_gdbus_string (obj, &gdbus_obj);
strv[1] = NULL;
- if (!e_gdbus_cal_call_create_objects_sync (priv->gdbus_cal, strv, &muids, NULL, error)) {
+ if (!e_gdbus_cal_call_create_objects_sync (priv->dbus_proxy, strv, &muids, NULL, error)) {
g_free (obj);
g_free (gdbus_obj);
g_strfreev (muids);
@@ -3452,7 +3454,7 @@ e_cal_modify_object (ECal *ecal,
e_return_error_if_fail ("valid CalObjModType" && FALSE, E_CALENDAR_STATUS_INVALID_ARG);
}
priv = ecal->priv;
- e_return_error_if_fail (priv->gdbus_cal, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
+ e_return_error_if_fail (priv->dbus_proxy, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
if (priv->load_state != E_CAL_LOAD_LOADED) {
E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_URI_NOT_LOADED, error);
@@ -3461,7 +3463,7 @@ e_cal_modify_object (ECal *ecal,
obj = icalcomponent_as_ical_string_r (icalcomp);
objs.data = obj;
strv = e_gdbus_cal_encode_modify_objects (&objs, mod);
- if (!e_gdbus_cal_call_modify_objects_sync (priv->gdbus_cal, (const gchar * const *) strv, NULL, error)) {
+ if (!e_gdbus_cal_call_modify_objects_sync (priv->dbus_proxy, (const gchar * const *) strv, NULL, error)) {
g_free (obj);
g_strfreev (strv);
@@ -3546,7 +3548,7 @@ e_cal_remove_object_with_mod (ECal *ecal,
e_return_error_if_fail ("valid CalObjModType" && FALSE, E_CALENDAR_STATUS_INVALID_ARG);
}
priv = ecal->priv;
- e_return_error_if_fail (priv->gdbus_cal, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
+ e_return_error_if_fail (priv->dbus_proxy, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
if (priv->load_state != E_CAL_LOAD_LOADED) {
E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_URI_NOT_LOADED, error);
@@ -3556,7 +3558,7 @@ e_cal_remove_object_with_mod (ECal *ecal,
id.rid = (gchar *) rid;
ids.data = &id;
strv = e_gdbus_cal_encode_remove_objects (&ids, mod);
- if (!e_gdbus_cal_call_remove_objects_sync (priv->gdbus_cal, (const gchar * const *) strv, NULL, error)) {
+ if (!e_gdbus_cal_call_remove_objects_sync (priv->dbus_proxy, (const gchar * const *) strv, NULL, error)) {
g_strfreev (strv);
E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_DBUS_EXCEPTION, error);
@@ -3619,14 +3621,14 @@ e_cal_receive_objects (ECal *ecal,
e_return_error_if_fail (icalcomp, E_CALENDAR_STATUS_INVALID_ARG);
e_return_error_if_fail (icalcomponent_is_valid (icalcomp), E_CALENDAR_STATUS_INVALID_ARG);
priv = ecal->priv;
- e_return_error_if_fail (priv->gdbus_cal, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
+ e_return_error_if_fail (priv->dbus_proxy, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
if (priv->load_state != E_CAL_LOAD_LOADED) {
E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_URI_NOT_LOADED, error);
}
obj = icalcomponent_as_ical_string_r (icalcomp);
- if (!e_gdbus_cal_call_receive_objects_sync (priv->gdbus_cal, e_util_ensure_gdbus_string (obj, &gdbus_obj), NULL, error)) {
+ if (!e_gdbus_cal_call_receive_objects_sync (priv->dbus_proxy, e_util_ensure_gdbus_string (obj, &gdbus_obj), NULL, error)) {
g_free (obj);
g_free (gdbus_obj);
@@ -3673,7 +3675,7 @@ e_cal_send_objects (ECal *ecal,
e_return_error_if_fail (icalcomponent_is_valid (icalcomp), E_CALENDAR_STATUS_INVALID_ARG);
e_return_error_if_fail (E_IS_CAL (ecal), E_CALENDAR_STATUS_INVALID_ARG);
priv = ecal->priv;
- e_return_error_if_fail (priv->gdbus_cal, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
+ e_return_error_if_fail (priv->dbus_proxy, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
*users = NULL;
*modified_icalcomp = NULL;
@@ -3682,7 +3684,7 @@ e_cal_send_objects (ECal *ecal,
}
obj = icalcomponent_as_ical_string_r (icalcomp);
- if (!e_gdbus_cal_call_send_objects_sync (priv->gdbus_cal, e_util_ensure_gdbus_string (obj, &gdbus_obj), &out_array, NULL, error)) {
+ if (!e_gdbus_cal_call_send_objects_sync (priv->dbus_proxy, e_util_ensure_gdbus_string (obj, &gdbus_obj), &out_array, NULL, error)) {
g_free (obj);
g_free (gdbus_obj);
@@ -3745,7 +3747,7 @@ e_cal_get_timezone (ECal *ecal,
e_return_error_if_fail (zone, E_CALENDAR_STATUS_INVALID_ARG);
e_return_error_if_fail (E_IS_CAL (ecal), E_CALENDAR_STATUS_INVALID_ARG);
priv = ecal->priv;
- e_return_error_if_fail (priv->gdbus_cal, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
+ e_return_error_if_fail (priv->dbus_proxy, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
*zone = NULL;
if (priv->load_state != E_CAL_LOAD_LOADED) {
@@ -3782,7 +3784,7 @@ e_cal_get_timezone (ECal *ecal,
systzid = e_cal_match_tzid (tzid);
if (!systzid) {
/* call the backend */
- if (!e_gdbus_cal_call_get_timezone_sync (priv->gdbus_cal, e_util_ensure_gdbus_string (tzid, &gdbus_tzid), &object, NULL, error)) {
+ if (!e_gdbus_cal_call_get_timezone_sync (priv->dbus_proxy, e_util_ensure_gdbus_string (tzid, &gdbus_tzid), &object, NULL, error)) {
g_free (gdbus_tzid);
UNLOCK_CACHE ();
@@ -3868,7 +3870,7 @@ e_cal_add_timezone (ECal *ecal,
e_return_error_if_fail (E_IS_CAL (ecal), E_CALENDAR_STATUS_INVALID_ARG);
e_return_error_if_fail (izone, E_CALENDAR_STATUS_INVALID_ARG);
priv = ecal->priv;
- e_return_error_if_fail (priv->gdbus_cal, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
+ e_return_error_if_fail (priv->dbus_proxy, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
if (priv->load_state != E_CAL_LOAD_LOADED) {
E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_URI_NOT_LOADED, error);
@@ -3889,7 +3891,7 @@ e_cal_add_timezone (ECal *ecal,
tzobj = icalcomponent_as_ical_string_r (icalcomp);
/* call the backend */
- if (!e_gdbus_cal_call_add_timezone_sync (priv->gdbus_cal, e_util_ensure_gdbus_string (tzobj, &gdbus_tzobj), NULL, error)) {
+ if (!e_gdbus_cal_call_add_timezone_sync (priv->dbus_proxy, e_util_ensure_gdbus_string (tzobj, &gdbus_tzobj), NULL, error)) {
g_free (tzobj);
g_free (gdbus_tzobj);
@@ -3931,14 +3933,14 @@ e_cal_get_query (ECal *ecal,
e_return_error_if_fail (query, E_CALENDAR_STATUS_INVALID_ARG);
e_return_error_if_fail (E_IS_CAL (ecal), E_CALENDAR_STATUS_INVALID_ARG);
priv = ecal->priv;
- e_return_error_if_fail (priv->gdbus_cal, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
+ e_return_error_if_fail (priv->dbus_proxy, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
*query = NULL;
if (priv->load_state != E_CAL_LOAD_LOADED) {
E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_URI_NOT_LOADED, error);
}
- if (!e_gdbus_cal_call_get_view_sync (priv->gdbus_cal, e_util_ensure_gdbus_string (sexp, &gdbus_sexp), &query_path, NULL, error)) {
+ if (!e_gdbus_cal_call_get_view_sync (priv->dbus_proxy, e_util_ensure_gdbus_string (sexp, &gdbus_sexp), &query_path, NULL, error)) {
g_free (gdbus_sexp);
E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_DBUS_EXCEPTION, error);
@@ -3991,7 +3993,7 @@ e_cal_set_default_timezone (ECal *ecal,
e_return_error_if_fail (E_IS_CAL (ecal), E_CALENDAR_STATUS_INVALID_ARG);
e_return_error_if_fail (zone, E_CALENDAR_STATUS_INVALID_ARG);
priv = ecal->priv;
- e_return_error_if_fail (priv->gdbus_cal, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
+ e_return_error_if_fail (priv->dbus_proxy, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
/* If the same timezone is already set, we don't have to do anything. */
if (priv->default_zone == zone)
diff --git a/calendar/libedata-cal/e-data-cal.c b/calendar/libedata-cal/e-data-cal.c
index 7a0a6dc..c85c63f 100644
--- a/calendar/libedata-cal/e-data-cal.c
+++ b/calendar/libedata-cal/e-data-cal.c
@@ -46,7 +46,7 @@
struct _EDataCalPrivate {
GDBusConnection *connection;
- EGdbusCal *gdbus_object;
+ EGdbusCal *dbus_interface;
ECalBackend *backend;
gchar *object_path;
@@ -271,7 +271,7 @@ operation_thread (gpointer data,
object_path = construct_calview_path ();
connection = e_gdbus_cal_stub_get_connection (
- op->cal->priv->gdbus_object);
+ op->cal->priv->dbus_interface);
view = e_data_cal_view_new (
backend, obj_sexp,
@@ -516,7 +516,7 @@ e_data_cal_create_error_fmt (EDataCalCallStatus status,
}
static gboolean
-impl_Cal_open (EGdbusCal *object,
+impl_Cal_open (EGdbusCal *interface,
GDBusMethodInvocation *invocation,
gboolean in_only_if_exists,
EDataCal *cal)
@@ -526,14 +526,14 @@ impl_Cal_open (EGdbusCal *object,
op = op_new (OP_OPEN, cal);
op->d.only_if_exists = in_only_if_exists;
- e_gdbus_cal_complete_open (cal->priv->gdbus_object, invocation, op->id);
+ e_gdbus_cal_complete_open (cal->priv->dbus_interface, invocation, op->id);
e_operation_pool_push (ops_pool, op);
return TRUE;
}
static gboolean
-impl_Cal_refresh (EGdbusCal *object,
+impl_Cal_refresh (EGdbusCal *interface,
GDBusMethodInvocation *invocation,
EDataCal *cal)
{
@@ -541,14 +541,14 @@ impl_Cal_refresh (EGdbusCal *object,
op = op_new (OP_REFRESH, cal);
- e_gdbus_cal_complete_refresh (cal->priv->gdbus_object, invocation, op->id);
+ e_gdbus_cal_complete_refresh (cal->priv->dbus_interface, invocation, op->id);
e_operation_pool_push (ops_pool, op);
return TRUE;
}
static gboolean
-impl_Cal_get_backend_property (EGdbusCal *object,
+impl_Cal_get_backend_property (EGdbusCal *interface,
GDBusMethodInvocation *invocation,
const gchar *in_prop_name,
EDataCal *cal)
@@ -558,14 +558,14 @@ impl_Cal_get_backend_property (EGdbusCal *object,
op = op_new (OP_GET_BACKEND_PROPERTY, cal);
op->d.prop_name = g_strdup (in_prop_name);
- e_gdbus_cal_complete_get_backend_property (cal->priv->gdbus_object, invocation, op->id);
+ e_gdbus_cal_complete_get_backend_property (cal->priv->dbus_interface, invocation, op->id);
e_operation_pool_push (ops_pool, op);
return TRUE;
}
static gboolean
-impl_Cal_set_backend_property (EGdbusCal *object,
+impl_Cal_set_backend_property (EGdbusCal *interface,
GDBusMethodInvocation *invocation,
const gchar * const *in_prop_name_value,
EDataCal *cal)
@@ -575,14 +575,14 @@ impl_Cal_set_backend_property (EGdbusCal *object,
op = op_new (OP_SET_BACKEND_PROPERTY, cal);
g_return_val_if_fail (e_gdbus_cal_decode_set_backend_property (in_prop_name_value, &op->d.sbp.prop_name, &op->d.sbp.prop_value), FALSE);
- e_gdbus_cal_complete_set_backend_property (cal->priv->gdbus_object, invocation, op->id);
+ e_gdbus_cal_complete_set_backend_property (cal->priv->dbus_interface, invocation, op->id);
e_operation_pool_push (ops_pool, op);
return TRUE;
}
static gboolean
-impl_Cal_get_object (EGdbusCal *object,
+impl_Cal_get_object (EGdbusCal *interface,
GDBusMethodInvocation *invocation,
const gchar * const *in_uid_rid,
EDataCal *cal)
@@ -592,14 +592,14 @@ impl_Cal_get_object (EGdbusCal *object,
op = op_new (OP_GET_OBJECT, cal);
g_return_val_if_fail (e_gdbus_cal_decode_get_object (in_uid_rid, &op->d.ur.uid, &op->d.ur.rid), FALSE);
- e_gdbus_cal_complete_get_object (cal->priv->gdbus_object, invocation, op->id);
+ e_gdbus_cal_complete_get_object (cal->priv->dbus_interface, invocation, op->id);
e_operation_pool_push (ops_pool, op);
return TRUE;
}
static gboolean
-impl_Cal_get_object_list (EGdbusCal *object,
+impl_Cal_get_object_list (EGdbusCal *interface,
GDBusMethodInvocation *invocation,
const gchar *in_sexp,
EDataCal *cal)
@@ -609,14 +609,14 @@ impl_Cal_get_object_list (EGdbusCal *object,
op = op_new (OP_GET_OBJECT_LIST, cal);
op->d.sexp = g_strdup (in_sexp);
- e_gdbus_cal_complete_get_object_list (cal->priv->gdbus_object, invocation, op->id);
+ e_gdbus_cal_complete_get_object_list (cal->priv->dbus_interface, invocation, op->id);
e_operation_pool_push (ops_pool, op);
return TRUE;
}
static gboolean
-impl_Cal_get_free_busy (EGdbusCal *object,
+impl_Cal_get_free_busy (EGdbusCal *interface,
GDBusMethodInvocation *invocation,
const gchar * const *in_start_end_userlist,
EDataCal *cal)
@@ -630,14 +630,14 @@ impl_Cal_get_free_busy (EGdbusCal *object,
op->d.fb.start = (time_t) start;
op->d.fb.end = (time_t) end;
- e_gdbus_cal_complete_get_free_busy (cal->priv->gdbus_object, invocation, op->id);
+ e_gdbus_cal_complete_get_free_busy (cal->priv->dbus_interface, invocation, op->id);
e_operation_pool_push (ops_pool, op);
return TRUE;
}
static gboolean
-impl_Cal_create_objects (EGdbusCal *object,
+impl_Cal_create_objects (EGdbusCal *interface,
GDBusMethodInvocation *invocation,
const gchar * const *in_calobjs,
EDataCal *cal)
@@ -647,14 +647,14 @@ impl_Cal_create_objects (EGdbusCal *object,
op = op_new (OP_CREATE_OBJECTS, cal);
op->d.calobjs = e_util_strv_to_slist (in_calobjs);
- e_gdbus_cal_complete_create_objects (cal->priv->gdbus_object, invocation, op->id);
+ e_gdbus_cal_complete_create_objects (cal->priv->dbus_interface, invocation, op->id);
e_operation_pool_push (ops_pool, op);
return TRUE;
}
static gboolean
-impl_Cal_modify_objects (EGdbusCal *object,
+impl_Cal_modify_objects (EGdbusCal *interface,
GDBusMethodInvocation *invocation,
const gchar * const *in_mod_calobjs,
EDataCal *cal)
@@ -666,14 +666,14 @@ impl_Cal_modify_objects (EGdbusCal *object,
g_return_val_if_fail (e_gdbus_cal_decode_modify_objects (in_mod_calobjs, &op->d.mo.calobjs, &mod), FALSE);
op->d.mo.mod = mod;
- e_gdbus_cal_complete_modify_objects (cal->priv->gdbus_object, invocation, op->id);
+ e_gdbus_cal_complete_modify_objects (cal->priv->dbus_interface, invocation, op->id);
e_operation_pool_push (ops_pool, op);
return TRUE;
}
static gboolean
-impl_Cal_remove_objects (EGdbusCal *object,
+impl_Cal_remove_objects (EGdbusCal *interface,
GDBusMethodInvocation *invocation,
const gchar * const *in_mod_ids,
EDataCal *cal)
@@ -685,14 +685,14 @@ impl_Cal_remove_objects (EGdbusCal *object,
g_return_val_if_fail (e_gdbus_cal_decode_remove_objects (in_mod_ids, &op->d.ro.ids, &mod), FALSE);
op->d.ro.mod = mod;
- e_gdbus_cal_complete_remove_objects (cal->priv->gdbus_object, invocation, op->id);
+ e_gdbus_cal_complete_remove_objects (cal->priv->dbus_interface, invocation, op->id);
e_operation_pool_push (ops_pool, op);
return TRUE;
}
static gboolean
-impl_Cal_receive_objects (EGdbusCal *object,
+impl_Cal_receive_objects (EGdbusCal *interface,
GDBusMethodInvocation *invocation,
const gchar *in_calobj,
EDataCal *cal)
@@ -702,14 +702,14 @@ impl_Cal_receive_objects (EGdbusCal *object,
op = op_new (OP_RECEIVE_OBJECTS, cal);
op->d.co.calobj = g_strdup (in_calobj);
- e_gdbus_cal_complete_receive_objects (cal->priv->gdbus_object, invocation, op->id);
+ e_gdbus_cal_complete_receive_objects (cal->priv->dbus_interface, invocation, op->id);
e_operation_pool_push (ops_pool, op);
return TRUE;
}
static gboolean
-impl_Cal_send_objects (EGdbusCal *object,
+impl_Cal_send_objects (EGdbusCal *interface,
GDBusMethodInvocation *invocation,
const gchar *in_calobj,
EDataCal *cal)
@@ -719,14 +719,14 @@ impl_Cal_send_objects (EGdbusCal *object,
op = op_new (OP_SEND_OBJECTS, cal);
op->d.co.calobj = g_strdup (in_calobj);
- e_gdbus_cal_complete_send_objects (cal->priv->gdbus_object, invocation, op->id);
+ e_gdbus_cal_complete_send_objects (cal->priv->dbus_interface, invocation, op->id);
e_operation_pool_push (ops_pool, op);
return TRUE;
}
static gboolean
-impl_Cal_get_attachment_uris (EGdbusCal *object,
+impl_Cal_get_attachment_uris (EGdbusCal *interface,
GDBusMethodInvocation *invocation,
const gchar * const *in_uid_rid,
EDataCal *cal)
@@ -736,14 +736,14 @@ impl_Cal_get_attachment_uris (EGdbusCal *object,
op = op_new (OP_GET_ATTACHMENT_URIS, cal);
g_return_val_if_fail (e_gdbus_cal_decode_get_attachment_uris (in_uid_rid, &op->d.ur.uid, &op->d.ur.rid), FALSE);
- e_gdbus_cal_complete_get_attachment_uris (cal->priv->gdbus_object, invocation, op->id);
+ e_gdbus_cal_complete_get_attachment_uris (cal->priv->dbus_interface, invocation, op->id);
e_operation_pool_push (ops_pool, op);
return TRUE;
}
static gboolean
-impl_Cal_discard_alarm (EGdbusCal *object,
+impl_Cal_discard_alarm (EGdbusCal *interface,
GDBusMethodInvocation *invocation,
const gchar * const *in_uid_rid_auid,
EDataCal *cal)
@@ -753,14 +753,14 @@ impl_Cal_discard_alarm (EGdbusCal *object,
op = op_new (OP_DISCARD_ALARM, cal);
g_return_val_if_fail (e_gdbus_cal_decode_discard_alarm (in_uid_rid_auid, &op->d.ura.uid, &op->d.ura.rid, &op->d.ura.auid), FALSE);
- e_gdbus_cal_complete_discard_alarm (cal->priv->gdbus_object, invocation, op->id);
+ e_gdbus_cal_complete_discard_alarm (cal->priv->dbus_interface, invocation, op->id);
e_operation_pool_push (ops_pool, op);
return TRUE;
}
static gboolean
-impl_Cal_get_view (EGdbusCal *object,
+impl_Cal_get_view (EGdbusCal *interface,
GDBusMethodInvocation *invocation,
const gchar *in_sexp,
EDataCal *cal)
@@ -770,14 +770,14 @@ impl_Cal_get_view (EGdbusCal *object,
op = op_new (OP_GET_VIEW, cal);
op->d.sexp = g_strdup (in_sexp);
- e_gdbus_cal_complete_get_view (cal->priv->gdbus_object, invocation, op->id);
+ e_gdbus_cal_complete_get_view (cal->priv->dbus_interface, invocation, op->id);
e_operation_pool_push (ops_pool, op);
return TRUE;
}
static gboolean
-impl_Cal_get_timezone (EGdbusCal *object,
+impl_Cal_get_timezone (EGdbusCal *interface,
GDBusMethodInvocation *invocation,
const gchar *in_tzid,
EDataCal *cal)
@@ -787,14 +787,14 @@ impl_Cal_get_timezone (EGdbusCal *object,
op = op_new (OP_GET_TIMEZONE, cal);
op->d.tzid = g_strdup (in_tzid);
- e_gdbus_cal_complete_get_timezone (cal->priv->gdbus_object, invocation, op->id);
+ e_gdbus_cal_complete_get_timezone (cal->priv->dbus_interface, invocation, op->id);
e_operation_pool_push (ops_pool, op);
return TRUE;
}
static gboolean
-impl_Cal_add_timezone (EGdbusCal *object,
+impl_Cal_add_timezone (EGdbusCal *interface,
GDBusMethodInvocation *invocation,
const gchar *in_tzobject,
EDataCal *cal)
@@ -804,14 +804,14 @@ impl_Cal_add_timezone (EGdbusCal *object,
op = op_new (OP_ADD_TIMEZONE, cal);
op->d.tzobject = g_strdup (in_tzobject);
- e_gdbus_cal_complete_add_timezone (cal->priv->gdbus_object, invocation, op->id);
+ e_gdbus_cal_complete_add_timezone (cal->priv->dbus_interface, invocation, op->id);
e_operation_pool_push (ops_pool, op);
return TRUE;
}
static gboolean
-impl_Cal_cancel_operation (EGdbusCal *object,
+impl_Cal_cancel_operation (EGdbusCal *interface,
GDBusMethodInvocation *invocation,
guint in_opid,
EDataCal *cal)
@@ -821,14 +821,14 @@ impl_Cal_cancel_operation (EGdbusCal *object,
op = op_new (OP_CANCEL_OPERATION, cal);
op->d.opid = in_opid;
- e_gdbus_cal_complete_cancel_operation (cal->priv->gdbus_object, invocation, NULL);
+ e_gdbus_cal_complete_cancel_operation (cal->priv->dbus_interface, invocation, NULL);
e_operation_pool_push (ops_pool, op);
return TRUE;
}
static gboolean
-impl_Cal_cancel_all (EGdbusCal *object,
+impl_Cal_cancel_all (EGdbusCal *interface,
GDBusMethodInvocation *invocation,
EDataCal *cal)
{
@@ -836,14 +836,14 @@ impl_Cal_cancel_all (EGdbusCal *object,
op = op_new (OP_CANCEL_ALL, cal);
- e_gdbus_cal_complete_cancel_all (cal->priv->gdbus_object, invocation, NULL);
+ e_gdbus_cal_complete_cancel_all (cal->priv->dbus_interface, invocation, NULL);
e_operation_pool_push (ops_pool, op);
return TRUE;
}
static gboolean
-impl_Cal_close (EGdbusCal *object,
+impl_Cal_close (EGdbusCal *interface,
GDBusMethodInvocation *invocation,
EDataCal *cal)
{
@@ -853,7 +853,7 @@ impl_Cal_close (EGdbusCal *object,
/* unref here makes sure the cal is freed in a separate thread */
g_object_unref (cal);
- e_gdbus_cal_complete_close (cal->priv->gdbus_object, invocation, NULL);
+ e_gdbus_cal_complete_close (cal->priv->dbus_interface, invocation, NULL);
e_operation_pool_push (ops_pool, op);
return TRUE;
@@ -894,7 +894,7 @@ e_data_cal_respond_open (EDataCal *cal,
/* Translators: This is prefix to a detailed error message */
g_prefix_error (&error, "%s", _("Cannot open calendar: "));
- e_gdbus_cal_emit_open_done (cal->priv->gdbus_object, opid, error);
+ e_gdbus_cal_emit_open_done (cal->priv->dbus_interface, opid, error);
if (error)
g_error_free (error);
@@ -919,7 +919,7 @@ e_data_cal_respond_refresh (EDataCal *cal,
/* Translators: This is prefix to a detailed error message */
g_prefix_error (&error, "%s", _("Cannot refresh calendar: "));
- e_gdbus_cal_emit_refresh_done (cal->priv->gdbus_object, opid, error);
+ e_gdbus_cal_emit_refresh_done (cal->priv->dbus_interface, opid, error);
if (error)
g_error_free (error);
@@ -948,7 +948,7 @@ e_data_cal_respond_get_backend_property (EDataCal *cal,
/* Translators: This is prefix to a detailed error message */
g_prefix_error (&error, "%s", _("Cannot retrieve backend property: "));
- e_gdbus_cal_emit_get_backend_property_done (cal->priv->gdbus_object, opid, error, e_util_ensure_gdbus_string (prop_value, &gdbus_prop_value));
+ e_gdbus_cal_emit_get_backend_property_done (cal->priv->dbus_interface, opid, error, e_util_ensure_gdbus_string (prop_value, &gdbus_prop_value));
g_free (gdbus_prop_value);
if (error)
@@ -974,7 +974,7 @@ e_data_cal_respond_set_backend_property (EDataCal *cal,
/* Translators: This is prefix to a detailed error message */
g_prefix_error (&error, "%s", _("Cannot set backend property: "));
- e_gdbus_cal_emit_set_backend_property_done (cal->priv->gdbus_object, opid, error);
+ e_gdbus_cal_emit_set_backend_property_done (cal->priv->dbus_interface, opid, error);
if (error)
g_error_free (error);
@@ -1003,7 +1003,7 @@ e_data_cal_respond_get_object (EDataCal *cal,
/* Translators: This is prefix to a detailed error message */
g_prefix_error (&error, "%s", _("Cannot retrieve calendar object path: "));
- e_gdbus_cal_emit_get_object_done (cal->priv->gdbus_object, opid, error, e_util_ensure_gdbus_string (object, &gdbus_object));
+ e_gdbus_cal_emit_get_object_done (cal->priv->dbus_interface, opid, error, e_util_ensure_gdbus_string (object, &gdbus_object));
g_free (gdbus_object);
if (error)
@@ -1035,7 +1035,7 @@ e_data_cal_respond_get_object_list (EDataCal *cal,
strv_objects = gslist_to_strv (objects);
- e_gdbus_cal_emit_get_object_list_done (cal->priv->gdbus_object, opid, error, (const gchar * const *) strv_objects);
+ e_gdbus_cal_emit_get_object_list_done (cal->priv->dbus_interface, opid, error, (const gchar * const *) strv_objects);
g_strfreev (strv_objects);
if (error)
@@ -1062,7 +1062,7 @@ e_data_cal_respond_get_free_busy (EDataCal *cal,
/* Translators: This is prefix to a detailed error message */
g_prefix_error (&error, "%s", _("Cannot retrieve calendar free/busy list: "));
- e_gdbus_cal_emit_get_free_busy_done (cal->priv->gdbus_object, opid, error);
+ e_gdbus_cal_emit_get_free_busy_done (cal->priv->dbus_interface, opid, error);
if (error)
g_error_free (error);
@@ -1100,7 +1100,7 @@ e_data_cal_respond_create_objects (EDataCal *cal,
/* Translators: This is prefix to a detailed error message */
g_prefix_error (&error, "%s", _("Cannot create calendar object: "));
- e_gdbus_cal_emit_create_objects_done (cal->priv->gdbus_object, opid, error, (const gchar * const *) array);
+ e_gdbus_cal_emit_create_objects_done (cal->priv->dbus_interface, opid, error, (const gchar * const *) array);
g_strfreev (array);
if (error)
@@ -1135,7 +1135,7 @@ e_data_cal_respond_modify_objects (EDataCal *cal,
/* Translators: This is prefix to a detailed error message */
g_prefix_error (&error, "%s", _("Cannot modify calendar object: "));
- e_gdbus_cal_emit_modify_objects_done (cal->priv->gdbus_object, opid, error);
+ e_gdbus_cal_emit_modify_objects_done (cal->priv->dbus_interface, opid, error);
if (error)
g_error_free (error);
@@ -1175,7 +1175,7 @@ e_data_cal_respond_remove_objects (EDataCal *cal,
/* Translators: This is prefix to a detailed error message */
g_prefix_error (&error, "%s", _("Cannot remove calendar object: "));
- e_gdbus_cal_emit_remove_objects_done (cal->priv->gdbus_object, opid, error);
+ e_gdbus_cal_emit_remove_objects_done (cal->priv->dbus_interface, opid, error);
if (error)
g_error_free (error);
@@ -1212,7 +1212,7 @@ e_data_cal_respond_receive_objects (EDataCal *cal,
/* Translators: This is prefix to a detailed error message */
g_prefix_error (&error, "%s", _("Cannot receive calendar objects: "));
- e_gdbus_cal_emit_receive_objects_done (cal->priv->gdbus_object, opid, error);
+ e_gdbus_cal_emit_receive_objects_done (cal->priv->dbus_interface, opid, error);
if (error)
g_error_free (error);
@@ -1245,7 +1245,7 @@ e_data_cal_respond_send_objects (EDataCal *cal,
strv_users_calobj = e_gdbus_cal_encode_send_objects (calobj, users);
- e_gdbus_cal_emit_send_objects_done (cal->priv->gdbus_object, opid, error, (const gchar * const *) strv_users_calobj);
+ e_gdbus_cal_emit_send_objects_done (cal->priv->dbus_interface, opid, error, (const gchar * const *) strv_users_calobj);
g_strfreev (strv_users_calobj);
if (error)
@@ -1277,7 +1277,7 @@ e_data_cal_respond_get_attachment_uris (EDataCal *cal,
strv_attachment_uris = gslist_to_strv (attachment_uris);
- e_gdbus_cal_emit_get_attachment_uris_done (cal->priv->gdbus_object, opid, error, (const gchar * const *) strv_attachment_uris);
+ e_gdbus_cal_emit_get_attachment_uris_done (cal->priv->dbus_interface, opid, error, (const gchar * const *) strv_attachment_uris);
g_strfreev (strv_attachment_uris);
if (error)
@@ -1303,7 +1303,7 @@ e_data_cal_respond_discard_alarm (EDataCal *cal,
/* Translators: This is prefix to a detailed error message */
g_prefix_error (&error, "%s", _("Could not discard reminder: "));
- e_gdbus_cal_emit_discard_alarm_done (cal->priv->gdbus_object, opid, error);
+ e_gdbus_cal_emit_discard_alarm_done (cal->priv->dbus_interface, opid, error);
if (error)
g_error_free (error);
@@ -1332,7 +1332,7 @@ e_data_cal_respond_get_view (EDataCal *cal,
/* Translators: This is prefix to a detailed error message */
g_prefix_error (&error, "%s", _("Could not get calendar view path: "));
- e_gdbus_cal_emit_get_view_done (cal->priv->gdbus_object, opid, error, e_util_ensure_gdbus_string (view_path, &gdbus_view_path));
+ e_gdbus_cal_emit_get_view_done (cal->priv->dbus_interface, opid, error, e_util_ensure_gdbus_string (view_path, &gdbus_view_path));
g_free (gdbus_view_path);
if (error)
@@ -1362,7 +1362,7 @@ e_data_cal_respond_get_timezone (EDataCal *cal,
/* Translators: This is prefix to a detailed error message */
g_prefix_error (&error, "%s", _("Could not retrieve calendar time zone: "));
- e_gdbus_cal_emit_get_timezone_done (cal->priv->gdbus_object, opid, error, e_util_ensure_gdbus_string (tzobject, &gdbus_tzobject));
+ e_gdbus_cal_emit_get_timezone_done (cal->priv->dbus_interface, opid, error, e_util_ensure_gdbus_string (tzobject, &gdbus_tzobject));
g_free (gdbus_tzobject);
if (error)
@@ -1388,7 +1388,7 @@ e_data_cal_respond_add_timezone (EDataCal *cal,
/* Translators: This is prefix to a detailed error message */
g_prefix_error (&error, "%s", _("Could not add calendar time zone: "));
- e_gdbus_cal_emit_add_timezone_done (cal->priv->gdbus_object, opid, error);
+ e_gdbus_cal_emit_add_timezone_done (cal->priv->dbus_interface, opid, error);
if (error)
g_error_free (error);
@@ -1408,7 +1408,7 @@ e_data_cal_report_error (EDataCal *cal,
g_return_if_fail (cal != NULL);
g_return_if_fail (message != NULL);
- e_gdbus_cal_emit_backend_error (cal->priv->gdbus_object, message);
+ e_gdbus_cal_emit_backend_error (cal->priv->dbus_interface, message);
}
/**
@@ -1424,7 +1424,7 @@ e_data_cal_report_readonly (EDataCal *cal,
{
g_return_if_fail (cal != NULL);
- e_gdbus_cal_emit_readonly (cal->priv->gdbus_object, readonly);
+ e_gdbus_cal_emit_readonly (cal->priv->dbus_interface, readonly);
}
/**
@@ -1440,7 +1440,7 @@ e_data_cal_report_online (EDataCal *cal,
{
g_return_if_fail (cal != NULL);
- e_gdbus_cal_emit_online (cal->priv->gdbus_object, is_online);
+ e_gdbus_cal_emit_online (cal->priv->dbus_interface, is_online);
}
/**
@@ -1461,7 +1461,7 @@ e_data_cal_report_opened (EDataCal *cal,
strv_error = e_gdbus_templates_encode_error (error);
- e_gdbus_cal_emit_opened (cal->priv->gdbus_object, (const gchar * const *) strv_error);
+ e_gdbus_cal_emit_opened (cal->priv->dbus_interface, (const gchar * const *) strv_error);
g_strfreev (strv_error);
}
@@ -1483,7 +1483,7 @@ e_data_cal_report_free_busy_data (EDataCal *cal,
strv_freebusy = gslist_to_strv (freebusy);
- e_gdbus_cal_emit_free_busy_data (cal->priv->gdbus_object, (const gchar * const *) strv_freebusy);
+ e_gdbus_cal_emit_free_busy_data (cal->priv->dbus_interface, (const gchar * const *) strv_freebusy);
g_strfreev (strv_freebusy);
}
@@ -1510,7 +1510,7 @@ e_data_cal_report_backend_property_changed (EDataCal *cal,
strv = e_gdbus_templates_encode_two_strings (prop_name, prop_value);
g_return_if_fail (strv != NULL);
- e_gdbus_cal_emit_backend_property_changed (cal->priv->gdbus_object, (const gchar * const *) strv);
+ e_gdbus_cal_emit_backend_property_changed (cal->priv->dbus_interface, (const gchar * const *) strv);
g_strfreev (strv);
}
@@ -1643,9 +1643,9 @@ data_cal_finalize (GObject *object)
g_static_rec_mutex_free (&priv->pending_ops_lock);
- if (priv->gdbus_object) {
- g_object_unref (priv->gdbus_object);
- priv->gdbus_object = NULL;
+ if (priv->dbus_interface) {
+ g_object_unref (priv->dbus_interface);
+ priv->dbus_interface = NULL;
}
/* Chain up to parent's finalize() method. */
@@ -1662,7 +1662,7 @@ data_cal_initable_init (GInitable *initable,
cal = E_DATA_CAL (initable);
return e_gdbus_cal_register_object (
- cal->priv->gdbus_object,
+ cal->priv->dbus_interface,
cal->priv->connection,
cal->priv->object_path,
error);
@@ -1732,75 +1732,75 @@ e_data_cal_initable_init (GInitableIface *interface)
static void
e_data_cal_init (EDataCal *ecal)
{
- EGdbusCal *gdbus_object;
+ EGdbusCal *dbus_interface;
ecal->priv = E_DATA_CAL_GET_PRIVATE (ecal);
- ecal->priv->gdbus_object = e_gdbus_cal_stub_new ();
+ ecal->priv->dbus_interface = e_gdbus_cal_stub_new ();
ecal->priv->pending_ops = g_hash_table_new_full (
g_direct_hash, g_direct_equal, NULL, g_object_unref);
g_static_rec_mutex_init (&ecal->priv->pending_ops_lock);
- gdbus_object = ecal->priv->gdbus_object;
+ dbus_interface = ecal->priv->dbus_interface;
g_signal_connect (
- gdbus_object, "handle-open",
+ dbus_interface, "handle-open",
G_CALLBACK (impl_Cal_open), ecal);
g_signal_connect (
- gdbus_object, "handle-refresh",
+ dbus_interface, "handle-refresh",
G_CALLBACK (impl_Cal_refresh), ecal);
g_signal_connect (
- gdbus_object, "handle-get-backend-property",
+ dbus_interface, "handle-get-backend-property",
G_CALLBACK (impl_Cal_get_backend_property), ecal);
g_signal_connect (
- gdbus_object, "handle-set-backend-property",
+ dbus_interface, "handle-set-backend-property",
G_CALLBACK (impl_Cal_set_backend_property), ecal);
g_signal_connect (
- gdbus_object, "handle-get-object",
+ dbus_interface, "handle-get-object",
G_CALLBACK (impl_Cal_get_object), ecal);
g_signal_connect (
- gdbus_object, "handle-get-object-list",
+ dbus_interface, "handle-get-object-list",
G_CALLBACK (impl_Cal_get_object_list), ecal);
g_signal_connect (
- gdbus_object, "handle-get-free-busy",
+ dbus_interface, "handle-get-free-busy",
G_CALLBACK (impl_Cal_get_free_busy), ecal);
g_signal_connect (
- gdbus_object, "handle-create-objects",
+ dbus_interface, "handle-create-objects",
G_CALLBACK (impl_Cal_create_objects), ecal);
g_signal_connect (
- gdbus_object, "handle-modify-objects",
+ dbus_interface, "handle-modify-objects",
G_CALLBACK (impl_Cal_modify_objects), ecal);
g_signal_connect (
- gdbus_object, "handle-remove-objects",
+ dbus_interface, "handle-remove-objects",
G_CALLBACK (impl_Cal_remove_objects), ecal);
g_signal_connect (
- gdbus_object, "handle-receive-objects",
+ dbus_interface, "handle-receive-objects",
G_CALLBACK (impl_Cal_receive_objects), ecal);
g_signal_connect (
- gdbus_object, "handle-send-objects",
+ dbus_interface, "handle-send-objects",
G_CALLBACK (impl_Cal_send_objects), ecal);
g_signal_connect (
- gdbus_object, "handle-get-attachment-uris",
+ dbus_interface, "handle-get-attachment-uris",
G_CALLBACK (impl_Cal_get_attachment_uris), ecal);
g_signal_connect (
- gdbus_object, "handle-discard-alarm",
+ dbus_interface, "handle-discard-alarm",
G_CALLBACK (impl_Cal_discard_alarm), ecal);
g_signal_connect (
- gdbus_object, "handle-get-view",
+ dbus_interface, "handle-get-view",
G_CALLBACK (impl_Cal_get_view), ecal);
g_signal_connect (
- gdbus_object, "handle-get-timezone",
+ dbus_interface, "handle-get-timezone",
G_CALLBACK (impl_Cal_get_timezone), ecal);
g_signal_connect (
- gdbus_object, "handle-add-timezone",
+ dbus_interface, "handle-add-timezone",
G_CALLBACK (impl_Cal_add_timezone), ecal);
g_signal_connect (
- gdbus_object, "handle-cancel-operation",
+ dbus_interface, "handle-cancel-operation",
G_CALLBACK (impl_Cal_cancel_operation), ecal);
g_signal_connect (
- gdbus_object, "handle-cancel-all",
+ dbus_interface, "handle-cancel-all",
G_CALLBACK (impl_Cal_cancel_all), ecal);
g_signal_connect (
- gdbus_object, "handle-close",
+ dbus_interface, "handle-close",
G_CALLBACK (impl_Cal_close), ecal);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]