return FALSE;
}
-static void
-set_proxy_gone_error (GError **error)
-{
- /* do not translate this string, it should ideally never happen */
- g_set_error_literal (error, E_CLIENT_ERROR, E_CLIENT_ERROR_DBUS_ERROR, "D-Bus book proxy gone");
-}
-
static volatile gint active_book_clients = 0;
static guint book_factory_watcher_id = 0;
static EDBusAddressBookFactory *book_factory = NULL;
book_client = E_BOOK_CLIENT (client);
- if (book_client->priv->dbus_proxy == NULL) {
- set_proxy_gone_error (error);
- return FALSE;
- }
-
return e_dbus_address_book_call_open_sync (
book_client->priv->dbus_proxy, cancellable, error);
}
book_client = E_BOOK_CLIENT (client);
- if (book_client->priv->dbus_proxy == NULL) {
- set_proxy_gone_error (error);
- return FALSE;
- }
-
return e_dbus_address_book_call_refresh_sync (
book_client->priv->dbus_proxy, cancellable, error);
}
g_return_val_if_fail (E_IS_BOOK_CLIENT (client), FALSE);
g_return_val_if_fail (E_IS_CONTACT (contact), FALSE);
- if (client->priv->dbus_proxy == NULL) {
- set_proxy_gone_error (error);
- return FALSE;
- }
-
success = e_book_client_add_contacts_sync (
client, &link, &uids, cancellable, error);
g_return_val_if_fail (E_IS_BOOK_CLIENT (client), FALSE);
g_return_val_if_fail (contacts != NULL, FALSE);
- if (client->priv->dbus_proxy == NULL) {
- set_proxy_gone_error (error);
- return FALSE;
- }
-
/* Build a string array, ensuring each element is valid UTF-8. */
strv = g_new0 (gchar *, g_slist_length (contacts) + 1);
for (link = contacts; link != NULL; link = g_slist_next (link)) {
g_return_val_if_fail (E_IS_BOOK_CLIENT (client), FALSE);
g_return_val_if_fail (contacts != NULL, FALSE);
- if (client->priv->dbus_proxy == NULL) {
- set_proxy_gone_error (error);
- return FALSE;
- }
-
/* Build a string array, ensuring each element is valid UTF-8. */
strv = g_new0 (gchar *, g_slist_length (contacts) + 1);
for (link = contacts; link != NULL; link = g_slist_next (link)) {
g_return_val_if_fail (E_IS_BOOK_CLIENT (client), FALSE);
g_return_val_if_fail (uids != NULL, FALSE);
- if (client->priv->dbus_proxy == NULL) {
- set_proxy_gone_error (error);
- return FALSE;
- }
-
strv = g_new0 (gchar *, g_slist_length ((GSList *) uids) + 1);
while (uids != NULL) {
strv[ii++] = e_util_utf8_make_valid (uids->data);
g_return_val_if_fail (uid != NULL, FALSE);
g_return_val_if_fail (out_contact != NULL, FALSE);
- if (client->priv->dbus_proxy == NULL) {
- set_proxy_gone_error (error);
- return FALSE;
- }
-
utf8_uid = e_util_utf8_make_valid (uid);
success = e_dbus_address_book_call_get_contact_sync (
g_return_val_if_fail (sexp != NULL, FALSE);
g_return_val_if_fail (out_contacts != NULL, FALSE);
- if (client->priv->dbus_proxy == NULL) {
- set_proxy_gone_error (error);
- return FALSE;
- }
-
utf8_sexp = e_util_utf8_make_valid (sexp);
success = e_dbus_address_book_call_get_contact_list_sync (
g_return_val_if_fail (sexp != NULL, FALSE);
g_return_val_if_fail (out_contact_uids != NULL, FALSE);
- if (client->priv->dbus_proxy == NULL) {
- set_proxy_gone_error (error);
- return FALSE;
- }
-
utf8_sexp = e_util_utf8_make_valid (sexp);
success = e_dbus_address_book_call_get_contact_list_uids_sync (
g_return_val_if_fail (sexp != NULL, FALSE);
g_return_val_if_fail (out_view != NULL, FALSE);
- if (client->priv->dbus_proxy == NULL) {
- set_proxy_gone_error (error);
- return FALSE;
- }
-
utf8_sexp = e_util_utf8_make_valid (sexp);
success = e_dbus_address_book_call_get_view_sync (