[evolution-data-server/treitter-client-gdbus] Port remaining EDataCal methods without adding new regression tests (since they seem to not be worth
- From: Travis Reitter <treitter src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [evolution-data-server/treitter-client-gdbus] Port remaining EDataCal methods without adding new regression tests (since they seem to not be worth
- Date: Wed, 23 Dec 2009 20:05:06 +0000 (UTC)
commit 0f05e40b4176e8297202a3090409575159087792
Author: Travis Reitter <treitter gmail com>
Date: Tue Dec 22 23:58:45 2009 -0800
Port remaining EDataCal methods without adding new regression tests (since they seem to not be worth the effort right now).
calendar/libecal/e-cal.c | 12 +++---
calendar/libecal/e-data-cal-gdbus-bindings.h | 52 ++++++++++++++++++++++++++
2 files changed, 58 insertions(+), 6 deletions(-)
---
diff --git a/calendar/libecal/e-cal.c b/calendar/libecal/e-cal.c
index 24266cb..d03dec0 100644
--- a/calendar/libecal/e-cal.c
+++ b/calendar/libecal/e-cal.c
@@ -1966,7 +1966,7 @@ e_cal_get_attachments_for_comp (ECal *ecal, const gchar *uid, const gchar *rid,
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->proxy, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
+ e_return_error_if_fail (priv->gdbus_proxy, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
*list = NULL;
if (priv->load_state != E_CAL_LOAD_LOADED) {
@@ -1974,7 +1974,7 @@ e_cal_get_attachments_for_comp (ECal *ecal, const gchar *uid, const gchar *rid,
}
LOCK_CONN ();
- if (!org_gnome_evolution_dataserver_calendar_Cal_get_attachment_list (priv->proxy, uid, rid ? rid: "", &list_array, error)) {
+ if (!e_data_cal_gdbus_get_attachment_list_sync (priv->gdbus_proxy, uid, rid ? rid: "", &list_array, error)) {
UNLOCK_CONN ();
E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_CORBA_EXCEPTION, error);
}
@@ -2217,7 +2217,7 @@ e_cal_get_changes (ECal *ecal, const gchar *change_id, GList **changes, GError *
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->proxy, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
+ e_return_error_if_fail (priv->gdbus_proxy, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
*changes = NULL;
if (priv->load_state != E_CAL_LOAD_LOADED) {
@@ -2225,7 +2225,7 @@ e_cal_get_changes (ECal *ecal, const gchar *change_id, GList **changes, GError *
}
LOCK_CONN ();
- if (!org_gnome_evolution_dataserver_calendar_Cal_get_changes (priv->proxy, change_id, &additions, &modifications, &removals, error)) {
+ if (!e_data_cal_gdbus_get_changes_sync (priv->gdbus_proxy, change_id, &additions, &modifications, &removals, error)) {
UNLOCK_CONN ();
E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_CORBA_EXCEPTION, error);
}
@@ -3213,7 +3213,7 @@ e_cal_discard_alarm (ECal *ecal, ECalComponent *comp, const gchar *auid, GError
g_return_val_if_fail (E_IS_CAL_COMPONENT (comp), FALSE);
g_return_val_if_fail (auid != NULL, FALSE);
priv = ecal->priv;
- e_return_error_if_fail (priv->proxy, E_CALENDAR_STATUS_REPOSITORY_OFFLINE);
+ e_return_error_if_fail (priv->gdbus_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);
@@ -3222,7 +3222,7 @@ e_cal_discard_alarm (ECal *ecal, ECalComponent *comp, const gchar *auid, GError
e_cal_component_get_uid (comp, &uid);
LOCK_CONN ();
- if (!org_gnome_evolution_dataserver_calendar_Cal_discard_alarm (priv->proxy, uid, auid, error)) {
+ if (!e_data_cal_gdbus_discard_alarm_sync (priv->gdbus_proxy, uid, auid, error)) {
UNLOCK_CONN ();
E_CALENDAR_CHECK_STATUS (E_CALENDAR_STATUS_CORBA_EXCEPTION, error);
}
diff --git a/calendar/libecal/e-data-cal-gdbus-bindings.h b/calendar/libecal/e-data-cal-gdbus-bindings.h
index bd0aef1..d6639c9 100644
--- a/calendar/libecal/e-data-cal-gdbus-bindings.h
+++ b/calendar/libecal/e-data-cal-gdbus-bindings.h
@@ -400,4 +400,56 @@ e_data_cal_gdbus_get_query_sync (GDBusProxy *proxy,
return demarshal_retvals__OBJPATH (retvals, OUT_path);
}
+static gboolean
+e_data_cal_gdbus_discard_alarm_sync (GDBusProxy *proxy,
+ const char *IN_uid,
+ const char *IN_auid,
+ GError **error)
+{
+ GVariant *parameters;
+ GVariant *retvals;
+
+ parameters = g_variant_new ("(ss)", IN_uid, IN_auid);
+
+ retvals = g_dbus_proxy_invoke_method_sync (proxy, "discardAlarm", parameters, -1, NULL, error);
+
+ return demarshal_retvals__VOID (retvals);
+}
+
+static gboolean
+e_data_cal_gdbus_get_changes_sync (GDBusProxy *proxy,
+ const char *IN_change_id,
+ char ***OUT_additions,
+ char ***OUT_modifications,
+ char ***OUT_removals,
+ GError **error)
+{
+ GVariant *parameters;
+ GVariant *retvals;
+
+ parameters = g_variant_new ("(s)", IN_change_id);
+
+ retvals = g_dbus_proxy_invoke_method_sync (proxy, "getChanges", parameters, -1, NULL, error);
+
+ return demarshal_retvals__STRINGVECTOR_STRINGVECTOR_STRINGVECTOR (retvals, OUT_additions, OUT_modifications, OUT_removals);
+}
+
+static gboolean
+e_data_cal_gdbus_get_attachment_list_sync (GDBusProxy *proxy,
+ const char *IN_uid,
+ const char *IN_rid,
+ char ***OUT_attachments,
+ GError **error)
+{
+ GVariant *parameters;
+ GVariant *retvals;
+
+ parameters = g_variant_new ("(ss)", IN_uid, IN_rid);
+
+ retvals = g_dbus_proxy_invoke_method_sync (proxy, "getAttachmentList", parameters, -1, NULL, error);
+
+ return demarshal_retvals__STRINGVECTOR (retvals, OUT_attachments);
+}
+
+
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]