[evolution-mapi/foldersize: 2/2] libexchangemapi : Fetch folder size from server.
- From: Johnny Jacob <jjohnny src gnome org>
- To: svn-commits-list gnome org
- Subject: [evolution-mapi/foldersize: 2/2] libexchangemapi : Fetch folder size from server.
- Date: Mon, 13 Jul 2009 11:14:56 +0000 (UTC)
commit 358ea721b339153d83bbc9dac952c8dcd30606a1
Author: Johnny Jacob <jjohnny novell com>
Date: Thu Jul 9 21:15:37 2009 +0530
libexchangemapi : Fetch folder size from server.
src/libexchangemapi/ChangeLog | 7 +++++++
src/libexchangemapi/exchange-mapi-connection.c | 10 +++++++---
src/libexchangemapi/exchange-mapi-folder.h | 2 +-
3 files changed, 15 insertions(+), 4 deletions(-)
---
diff --git a/src/libexchangemapi/ChangeLog b/src/libexchangemapi/ChangeLog
index afa11c2..d412d62 100644
--- a/src/libexchangemapi/ChangeLog
+++ b/src/libexchangemapi/ChangeLog
@@ -1,3 +1,10 @@
+2009-07-13 Johnny Jacob <jjohnny novell com>
+
+ * exchange-mapi-connection.c (get_child_folders): Fetch PR_MESSAGE_SIZE
+ from folders.
+
+ * exchange-mapi-folder.h (_ExchangeMAPIFolder): Added folder size field.
+
2009-06-22 Johnny Jacob <jjohnny novell com>
** Fixes Bug 585641 â?? evolution-mapi stores cleartext passwords in a world readable file
diff --git a/src/libexchangemapi/exchange-mapi-connection.c b/src/libexchangemapi/exchange-mapi-connection.c
index f75b878..20663d6 100644
--- a/src/libexchangemapi/exchange-mapi-connection.c
+++ b/src/libexchangemapi/exchange-mapi-connection.c
@@ -2459,12 +2459,13 @@ get_child_folders(TALLOC_CTX *mem_ctx, ExchangeMAPIFolderCategory folder_hier, m
goto cleanup;
}
- SPropTagArray = set_SPropTagArray(mem_ctx, 0x6,
+ SPropTagArray = set_SPropTagArray(mem_ctx, 0x7,
PR_FID,
PR_CONTAINER_CLASS,
PR_DISPLAY_NAME,
PR_CONTENT_UNREAD,
PR_CONTENT_COUNT,
+ PR_MESSAGE_SIZE,
PR_FOLDER_CHILD_COUNT);
retval = SetColumns(&obj_table, SPropTagArray);
@@ -2492,17 +2493,20 @@ get_child_folders(TALLOC_CTX *mem_ctx, ExchangeMAPIFolderCategory folder_hier, m
const uint32_t *unread = (const uint32_t *)find_SPropValue_data(&rowset.aRow[i], PR_CONTENT_UNREAD);
const uint32_t *total = (const uint32_t *)find_SPropValue_data(&rowset.aRow[i], PR_CONTENT_COUNT);
const uint32_t *child = (const uint32_t *)find_SPropValue_data(&rowset.aRow[i], PR_FOLDER_CHILD_COUNT);
+ const uint32_t *folder_size = (const uint32_t *)find_SPropValue_data(&rowset.aRow[i], PR_MESSAGE_SIZE);
if (!class)
class = IPF_NOTE;
newname = utf8tolinux (name);
- g_print("\n|---+ %-15s : (Container class: %s %016" G_GINT64_MODIFIER "X) UnRead : %d Total : %d ",
- newname, class, *fid, unread ? *unread : 0, total ? *total : 0);
+ g_print("\n|---+ %-15s : (Container class: %s %016" G_GINT64_MODIFIER "X) UnRead : %d Total : %d size : %d",
+ newname, class, *fid, unread ? *unread : 0, total ? *total : 0, folder_size ? *folder_size : 0);
folder = exchange_mapi_folder_new (newname, class, folder_hier, *fid, folder_id,
child ? *child : 0, unread ? *unread : 0, total ? *total : 0);
+ folder->size = folder_size ? *folder_size : 0;
+
*mapi_folders = g_slist_prepend (*mapi_folders, folder);
if (child && *child && (depth != 0))
diff --git a/src/libexchangemapi/exchange-mapi-folder.h b/src/libexchangemapi/exchange-mapi-folder.h
index 97aab01..c695e82 100644
--- a/src/libexchangemapi/exchange-mapi-folder.h
+++ b/src/libexchangemapi/exchange-mapi-folder.h
@@ -1,5 +1,4 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -65,6 +64,7 @@ typedef struct _ExchangeMAPIFolder {
guint32 child_count;
guint32 unread_count;
guint32 total;
+ guint32 size;
/* reserved */
gpointer reserved1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]