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 calendar proxy gone");
-}
-
static volatile gint active_cal_clients = 0;
static guint cal_factory_watcher_id = 0;
static EDBusCalendarFactory *cal_factory = NULL;
cal_client = E_CAL_CLIENT (client);
- if (cal_client->priv->dbus_proxy == NULL) {
- set_proxy_gone_error (error);
- return FALSE;
- }
-
return e_dbus_calendar_call_open_sync (
cal_client->priv->dbus_proxy, cancellable, error);
}
cal_client = E_CAL_CLIENT (client);
- if (cal_client->priv->dbus_proxy == NULL) {
- set_proxy_gone_error (error);
- return FALSE;
- }
-
return e_dbus_calendar_call_refresh_sync (
cal_client->priv->dbus_proxy, cancellable, error);
}
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
g_return_val_if_fail (out_icalcomp != NULL, FALSE);
- if (client->priv->dbus_proxy == NULL) {
- set_proxy_gone_error (error);
- return FALSE;
- }
-
string = e_dbus_calendar_dup_default_object (client->priv->dbus_proxy);
if (string != NULL) {
icalcomp = icalparser_parse_string (string);
if (rid == NULL)
rid = "";
- if (client->priv->dbus_proxy == NULL) {
- set_proxy_gone_error (error);
- return FALSE;
- }
-
utf8_uid = e_util_utf8_make_valid (uid);
utf8_rid = e_util_utf8_make_valid (rid);
g_return_val_if_fail (uid != NULL, FALSE);
g_return_val_if_fail (out_ecalcomps != 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_calendar_call_get_object_sync (
g_return_val_if_fail (sexp != NULL, FALSE);
g_return_val_if_fail (out_icalcomps != 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_calendar_call_get_object_list_sync (
g_return_val_if_fail (start > 0, FALSE);
g_return_val_if_fail (end > 0, FALSE);
- if (client->priv->dbus_proxy == NULL) {
- set_proxy_gone_error (error);
- return FALSE;
- }
-
strv = g_new0 (gchar *, g_slist_length ((GSList *) users) + 1);
while (users != NULL) {
strv[ii++] = e_util_utf8_make_valid (users->data);
g_return_val_if_fail (icalcomps != NULL, FALSE);
g_return_val_if_fail (out_uids != NULL, FALSE);
- if (client->priv->dbus_proxy == NULL) {
- set_proxy_gone_error (error);
- return FALSE;
- }
-
strv = g_new0 (gchar *, g_slist_length (icalcomps) + 1);
while (icalcomps != NULL) {
gchar *ical_string;
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
g_return_val_if_fail (comps != NULL, FALSE);
- if (client->priv->dbus_proxy == NULL) {
- set_proxy_gone_error (error);
- return FALSE;
- }
-
enum_class = g_type_class_ref (E_TYPE_CAL_OBJ_MOD_TYPE);
enum_value = g_enum_get_value (enum_class, mod);
g_return_val_if_fail (enum_value != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
g_return_val_if_fail (uid != NULL, FALSE);
- if (client->priv->dbus_proxy == NULL) {
- set_proxy_gone_error (error);
- return FALSE;
- }
-
return e_cal_client_remove_objects_sync (
client, &link, mod, cancellable, error);
}
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
g_return_val_if_fail (ids != NULL, FALSE);
- if (client->priv->dbus_proxy == NULL) {
- set_proxy_gone_error (error);
- return FALSE;
- }
-
enum_class = g_type_class_ref (E_TYPE_CAL_OBJ_MOD_TYPE);
enum_value = g_enum_get_value (enum_class, mod);
g_return_val_if_fail (enum_value != NULL, FALSE);
g_return_val_if_fail (E_IS_CAL_CLIENT (client), FALSE);
- if (client->priv->dbus_proxy == NULL) {
- set_proxy_gone_error (error);
- return FALSE;
- }
-
ical_string = icalcomponent_as_ical_string_r (icalcomp);
utf8_ical_string = e_util_utf8_make_valid (ical_string);
g_return_val_if_fail (out_users != NULL, FALSE);
g_return_val_if_fail (out_modified_icalcomp != NULL, FALSE);
- if (client->priv->dbus_proxy == NULL) {
- set_proxy_gone_error (error);
- return FALSE;
- }
-
ical_string = icalcomponent_as_ical_string_r (icalcomp);
utf8_ical_string = e_util_utf8_make_valid (ical_string);
if (rid == NULL)
rid = "";
- if (client->priv->dbus_proxy == NULL) {
- set_proxy_gone_error (error);
- return FALSE;
- }
-
utf8_uid = e_util_utf8_make_valid (uid);
utf8_rid = e_util_utf8_make_valid (rid);
if (rid == NULL)
rid = "";
- if (client->priv->dbus_proxy == NULL) {
- set_proxy_gone_error (error);
- return FALSE;
- }
-
utf8_uid = e_util_utf8_make_valid (uid);
utf8_rid = e_util_utf8_make_valid (rid);
utf8_auid = e_util_utf8_make_valid (auid);
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_calendar_call_get_view_sync (
g_return_val_if_fail (tzid != NULL, FALSE);
g_return_val_if_fail (out_zone != NULL, FALSE);
- if (client->priv->dbus_proxy == NULL) {
- set_proxy_gone_error (error);
- return FALSE;
- }
-
zone = e_timezone_cache_get_timezone (
E_TIMEZONE_CACHE (client), tzid);
if (zone != NULL) {
return FALSE;
}
- if (client->priv->dbus_proxy == NULL) {
- set_proxy_gone_error (error);
- return FALSE;
- }
-
zone_str = icalcomponent_as_ical_string_r (icalcomp);
utf8_zone_str = e_util_utf8_make_valid (zone_str);