[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/pim/akonadi/exchange/connector
From: Shaheed Haque <srhaque () theiet ! org>
Date: 2012-02-05 15:30:54
Message-ID: 20120205153054.65CD0AC893 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1278201 by shaheed:
Disable Public Folder stuff again - there is some interaction between
them and the existing logic that needs fixing.
M +17 -2 mapiconnector2.cpp
M +1 -0 mapiconnector2.h
--- trunk/playground/pim/akonadi/exchange/connector/mapiconnector2.cpp #1278200:1278201
@@ -29,6 +29,8 @@
#include <kpimutils/email.h>
+#define PUBLIC_FOLDERS 0
+
/**
* Display ids in the same format we use when stored in Akonadi.
*/
@@ -244,13 +246,22 @@
m_session(0)
{
mapi_object_init(&m_store);
+#if PUBLIC_FOLDERS
+ mapi_object_init(&m_publicFolderStore);
+#endif
}
MapiConnector2::~MapiConnector2()
{
if (m_session) {
Logoff(&m_store);
+#if PUBLIC_FOLDERS
+ Logoff(&m_publicFolderStore);
+#endif
}
+#if PUBLIC_FOLDERS
+ mapi_object_release(&m_publicFolderStore);
+#endif
mapi_object_release(&m_store);
}
@@ -262,13 +273,15 @@
bool MapiConnector2::defaultFolder(MapiDefaultFolder folderType, mapi_id_t *id)
{
+#if PUBLIC_FOLDERS
if ((PublicRoot <= folderType) && (folderType <= PublicNNTPArticle)) {
- if (MAPI_E_SUCCESS != GetDefaultPublicFolder(&m_store, id, folderType)) {
+ if (MAPI_E_SUCCESS != GetDefaultPublicFolder(&m_publicFolderStore, id, folderType)) {
error() << "cannot get default public folder: %1" << folderType << mapiError();
return false;
}
return true;
}
+#endif
if (MAPI_E_SUCCESS != GetDefaultFolder(&m_store, id, folderType)) {
error() << "cannot get default folder: %1" << folderType << mapiError();
return false;
@@ -368,10 +381,12 @@
error() << "cannot open message store" << mapiError();
return false;
}
- if (MAPI_E_SUCCESS != OpenPublicFolder(m_session, &m_store)) {
+#if PUBLIC_FOLDERS
+ if (MAPI_E_SUCCESS != OpenPublicFolder(m_session, &m_publicFolderStore)) {
error() << "cannot open public folder" << mapiError();
return false;
}
+#endif
return true;
}
--- trunk/playground/pim/akonadi/exchange/connector/mapiconnector2.h #1278200:1278201
@@ -433,6 +433,7 @@
mapi_session *m_session;
mapi_object_t m_store;
+ mapi_object_t m_publicFolderStore;
virtual QDebug debug() const;
virtual QDebug error() const;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic