[evolution-ews] Add utils file to hold all relevant itmes parsing methods and more
- From: Pavel Ocheretny <pocheretny src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Add utils file to hold all relevant itmes parsing methods and more
- Date: Wed, 4 May 2011 19:06:55 +0000 (UTC)
commit 7b4e5d4af44687f1fd50d4da289836ef6a2d92fc
Author: Pavel Ocheretny <pocheretny git gnome org>
Date: Wed May 4 21:35:16 2011 +0300
Add utils file to hold all relevant itmes parsing methods and more
src/server/Makefile.am | 6 +++-
src/server/e-ews-item.h | 6 +----
src/server/e-ews-utils.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++
src/server/e-ews-utils.h | 47 +++++++++++++++++++++++++++++++++++++++++
4 files changed, 104 insertions(+), 7 deletions(-)
---
diff --git a/src/server/Makefile.am b/src/server/Makefile.am
index 8ef89c7..73bda2c 100644
--- a/src/server/Makefile.am
+++ b/src/server/Makefile.am
@@ -36,9 +36,11 @@ libeews_1_2_la_SOURCES = \
e-ews-connection.c \
e-ews-connection.h \
e-ews-operation.c \
- e-ews-opration.h \
+ e-ews-utils.c \
e-ews-create-folder-operation.c \
- e-ews-create-folder-operation.h \
+ e-ews-delete-folder-operation.c \
+ e-ews-move-folder-operation.c \
+ e-ews-move-items-operation.c \
e-ews-folder.c \
e-ews-item.c \
e-ews-item-change.c \
diff --git a/src/server/e-ews-item.h b/src/server/e-ews-item.h
index 7b45e4f..067fc71 100644
--- a/src/server/e-ews-item.h
+++ b/src/server/e-ews-item.h
@@ -24,6 +24,7 @@
#include "e-soap-message.h"
#include "e-soap-response.h"
+#include <e-ews-utils.h>
G_BEGIN_DECLS
@@ -67,11 +68,6 @@ struct _EEwsItemClass {
};
typedef struct {
- gchar *id;
- gchar *change_key;
-} EwsId;
-
-typedef struct {
gchar *name;
gchar *email;
} EwsMailbox;
diff --git a/src/server/e-ews-utils.c b/src/server/e-ews-utils.c
new file mode 100644
index 0000000..2c45c36
--- /dev/null
+++ b/src/server/e-ews-utils.c
@@ -0,0 +1,52 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Authors : Or Goshen, Pavel Ocheretny
+ *
+ * Copyright (C) 1999-2011 Intel, Inc. (www.intel.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU Lesser General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include "e-ews-utils.h"
+
+void
+e_ews_free_id (EwsId *id)
+{
+ if (id) {
+ g_free (id->id);
+ g_free (id->change_key);
+ g_free (id);
+ }
+}
+
+EwsId *
+e_ews_parse_item_id (ESoapParameter *item_node, GError **error)
+{
+ ESoapParameter *subparam, *node;
+ EwsId *item_id;
+
+ node = e_soap_parameter_get_first_child (item_node);
+
+ subparam = e_soap_parameter_get_first_child (node);
+
+ item_id= g_new0 (EwsId, 1);
+ item_id->id = e_soap_parameter_get_property (subparam, "Id");
+ item_id->change_key = e_soap_parameter_get_property (subparam, "ChangeKey");
+
+ return item_id;
+}
diff --git a/src/server/e-ews-utils.h b/src/server/e-ews-utils.h
new file mode 100644
index 0000000..81c6692
--- /dev/null
+++ b/src/server/e-ews-utils.h
@@ -0,0 +1,47 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+/*
+ * Authors : Or Goshen, Pavel Ocheretny
+ *
+ * Copyright (C) 1999-2011 Intel, Inc. (www.intel.com)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of version 2 of the GNU Lesser General Public
+ * License as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA
+ */
+
+#ifndef E_EWS_PARSER_H
+#define E_EWS_PARSER_H
+
+#include <glib-object.h>
+#include "e-ews-message.h"
+
+G_BEGIN_DECLS
+
+typedef struct {
+ gchar *id;
+ gchar *change_key;
+} EwsId;
+
+void e_ews_free_id (EwsId *id);
+
+EwsId *e_ews_parse_item_id (ESoapParameter *item_node, GError **error);
+
+//GObject *e_ews_parse_calendar_item (ESoapParameter *item_node);
+
+//GObject *e_ews_parse_camel_item (ESoapParameter *item_node);
+
+
+
+G_END_DECLS
+
+#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]