[evolution-couchdb] Added some more missing API for compiling with evolution < 2.27
- From: Rodrigo Moya <rodrigo src gnome org>
- To: svn-commits-list gnome org
- Subject: [evolution-couchdb] Added some more missing API for compiling with evolution < 2.27
- Date: Tue, 7 Jul 2009 14:51:45 +0000 (UTC)
commit 2bddd67fed7ef7d92d1513879c73b22e154aeda5
Author: Rodrigo Moya <rodrigo gnome-db org>
Date: Tue Jul 7 16:51:03 2009 +0200
Added some more missing API for compiling with evolution < 2.27
plugins/couchdb-contacts-source.c | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/plugins/couchdb-contacts-source.c b/plugins/couchdb-contacts-source.c
index 7afdb8a..79a6afc 100644
--- a/plugins/couchdb-contacts-source.c
+++ b/plugins/couchdb-contacts-source.c
@@ -30,6 +30,7 @@
#include <e-util/e-config.h>
#include <e-util/e-plugin.h>
#include <addressbook/gui/widgets/eab-config.h>
+#include <libedataserver/eds-version.h>
#include <libedataserver/e-source.h>
#include <libedataserver/e-source-list.h>
#include <libedataserver/e-url.h>
@@ -41,6 +42,28 @@
/* Copied from e-d-s 2.27.x branch, since it doesn't exist in 2.26.x */
ESourceGroup *
+e_source_list_peek_group_by_base_uri (ESourceList *list, const gchar *base_uri)
+{
+ GSList *p;
+ gint len;
+
+ g_return_val_if_fail (E_IS_SOURCE_LIST (list), NULL);
+ g_return_val_if_fail (base_uri != NULL, NULL);
+
+ len = strlen (base_uri);
+
+ for (p = e_source_list_peek_groups (list); p != NULL; p = p->next) {
+ ESourceGroup *group = E_SOURCE_GROUP (p->data);
+ const gchar *buri = e_source_group_peek_base_uri (group);
+
+ if (buri && g_ascii_strncasecmp (buri, base_uri, len) == 0)
+ return group;
+ }
+
+ return NULL;
+}
+
+ESourceGroup *
e_source_list_ensure_group (ESourceList *list, const gchar *name, const gchar *base_uri, gboolean ret_it)
{
ESourceGroup *group;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]