aboutsummaryrefslogtreecommitdiffstats
path: root/src/native/addrbook
diff options
context:
space:
mode:
authorVincent Lucas <chenzo@jitsi.org>2013-07-10 00:52:34 +0200
committerVincent Lucas <chenzo@jitsi.org>2013-07-10 00:52:34 +0200
commitc995a7aa4026fc44606e72eef2461cce5563f8c4 (patch)
tree181c7199a312e4e4d31b50501bee1622fadbd3c1 /src/native/addrbook
parent7b6b24ac11f6a3875d56064736cbcd1b6bc082ee (diff)
downloadjitsi-c995a7aa4026fc44606e72eef2461cce5563f8c4.zip
jitsi-c995a7aa4026fc44606e72eef2461cce5563f8c4.tar.gz
jitsi-c995a7aa4026fc44606e72eef2461cce5563f8c4.tar.bz2
Removes extra debug for Outlook address book plugin. Adds a thread collector for Outlook notifications.
Diffstat (limited to 'src/native/addrbook')
-rw-r--r--src/native/addrbook/msoutlook/MAPINotification.cxx22
-rw-r--r--src/native/addrbook/msoutlook/MsOutlookAddrBookContactQuery.cxx75
-rw-r--r--src/native/addrbook/msoutlook/com/MsOutlookAddrBookClient.cxx3
-rw-r--r--src/native/addrbook/msoutlook/com/server/Server.cxx3
4 files changed, 5 insertions, 98 deletions
diff --git a/src/native/addrbook/msoutlook/MAPINotification.cxx b/src/native/addrbook/msoutlook/MAPINotification.cxx
index a06455d..bdbfccf 100644
--- a/src/native/addrbook/msoutlook/MAPINotification.cxx
+++ b/src/native/addrbook/msoutlook/MAPINotification.cxx
@@ -126,9 +126,6 @@ void MAPINotification_jniCallDeletedMethod(LPSTR iUnknown)
if(MAPINotification_VM
->AttachCurrentThreadAsDaemon((void**) &tmpJniEnv, NULL) == 0)
{
- fprintf(stdout, "MAPINotification_jniCallDeletedMethod: id: %s\n",
- iUnknown);
- fflush(stdout);
jstring value = tmpJniEnv->NewStringUTF(iUnknown);
tmpJniEnv->CallVoidMethod(
@@ -262,10 +259,6 @@ STDAPICALLTYPE MAPINotification_onNotify
(LPBYTE) lpNotifications[i].info.obj.lpOldID,
lpNotifications[i].info.obj.cbOldID,
oldEntryIdStr);
- fprintf(stdout,
- "MAPINotification_onNotify: evModified oldID: %s\n",
- oldEntryIdStr);
- fflush(stdout);
if(lpNotifications[i].info.obj.ulObjType == MAPI_MESSAGE
&& MAPINotification_callDeletedMethod != NULL)
{
@@ -289,10 +282,6 @@ STDAPICALLTYPE MAPINotification_onNotify
lpNotifications[i].info.obj.cbEntryID,
entryIdStr);
- fprintf(stdout, "MAPINotification_onNotify: evDeleted: %s\n",
- entryIdStr);
- fflush(stdout);
-
if(lpNotifications[i].info.obj.ulObjType == MAPI_MESSAGE
&& MAPINotification_callDeletedMethod != NULL)
{
@@ -335,13 +324,6 @@ STDAPICALLTYPE MAPINotification_onNotify
wasteBasketProps[0].Value.bin.cb,
wasteBasketEntryIdStr);
- fprintf(stdout,
- "MAPINotification_onNotify: evMoved: bin %s / %s / %s\n",
- entryIdStr,
- parentEntryIdStr,
- wasteBasketEntryIdStr);
- fflush(stdout);
-
if(lpNotifications[i].info.obj.ulObjType == MAPI_MESSAGE
&& strcmp(parentEntryIdStr, wasteBasketEntryIdStr) == 0
&& MAPINotification_callDeletedMethod != NULL)
@@ -368,10 +350,6 @@ STDAPICALLTYPE MAPINotification_onNotify
(LPBYTE) lpNotifications[i].info.obj.lpOldID,
lpNotifications[i].info.obj.cbOldID,
oldEntryIdStr);
- fprintf(stdout,
- "MAPINotification_onNotify: evMoved oldID: %s\n",
- oldEntryIdStr);
- fflush(stdout);
if(lpNotifications[i].info.obj.ulObjType == MAPI_MESSAGE
&& MAPINotification_callDeletedMethod != NULL)
{
diff --git a/src/native/addrbook/msoutlook/MsOutlookAddrBookContactQuery.cxx b/src/native/addrbook/msoutlook/MsOutlookAddrBookContactQuery.cxx
index 378ee0e..b3e4b27 100644
--- a/src/native/addrbook/msoutlook/MsOutlookAddrBookContactQuery.cxx
+++ b/src/native/addrbook/msoutlook/MsOutlookAddrBookContactQuery.cxx
@@ -67,9 +67,6 @@ static jboolean MsOutlookAddrBookContactQuery_foreachContactInMsgStoresTable
static jboolean MsOutlookAddrBookContactQuery_foreachMailUser
(ULONG objType, LPUNKNOWN iUnknown,
const char * query, void * callback, void * callbackObject);
-static jboolean MsOutlookAddrBookContactQuery_foreachMailUserInAddressBook
- (LPMAPISESSION mapiSession, const char * query,
- void * callback, void * callbackObject);
static jboolean MsOutlookAddrBookContactQuery_foreachMailUserInContainerTable
(LPMAPICONTAINER mapiContainer, LPMAPITABLE mapiTable,
const char * query, void * callback, void * callbackObject);
@@ -397,21 +394,11 @@ void MsOutlookAddrBookContactQuery_foreachMailUser(
return;
}
- jboolean proceed
- = MsOutlookAddrBookContactQuery_foreachContactInMsgStoresTable(
- mapiSession,
- query,
- callback,
- callbackObject);
-
- if(proceed)
- {
- MsOutlookAddrBookContactQuery_foreachMailUserInAddressBook(
- mapiSession,
- query,
- callback,
- callbackObject);
- }
+ MsOutlookAddrBookContactQuery_foreachContactInMsgStoresTable(
+ mapiSession,
+ query,
+ callback,
+ callbackObject);
MAPISession_unlock();
}
@@ -509,45 +496,6 @@ MsOutlookAddrBookContactQuery_foreachMailUser
}
static jboolean
-MsOutlookAddrBookContactQuery_foreachMailUserInAddressBook
- (LPMAPISESSION mapiSession, const char * query,
- void * callback, void * callbackObject)
-{
- HRESULT hResult;
- LPADRBOOK adrBook;
- jboolean proceed = JNI_FALSE;
-
- hResult = mapiSession->OpenAddressBook(0, NULL, AB_NO_DIALOG, &adrBook);
- if (HR_SUCCEEDED(hResult))
- {
- ULONG objType;
- LPUNKNOWN iUnknown;
-
- hResult = adrBook->OpenEntry(
- 0,
- NULL,
- NULL,
- MsOutlookAddrBookContactQuery_openEntryUlFlags,
- &objType,
- &iUnknown);
-
- if (HR_SUCCEEDED(hResult))
- {
- proceed
- = MsOutlookAddrBookContactQuery_foreachMailUser(
- objType, iUnknown,
- query, callback, callbackObject);
-
- iUnknown->Release();
- }
-
- adrBook->Release();
- }
-
- return proceed;
-}
-
-static jboolean
MsOutlookAddrBookContactQuery_foreachMailUserInContainerTable
(LPMAPICONTAINER mapiContainer, LPMAPITABLE mapiTable,
const char * query, void * callback, void * callbackObject)
@@ -1937,19 +1885,6 @@ int MsOutlookAddrBookContactQuery_compareEntryIds(
}
result = res;
}
-
- if(strcmp(id1, id2) == 0)
- {
- fprintf(stderr,
- "CHENZO compareEntryIds: \
- \n\tid1: %s\
- \n\tid2: %s\
- \n\tresult: %d\n",
- id1,
- id2,
- result);
- fflush(stderr);
- }
mapiId1->Release();
MAPIFreeBuffer(contactId1.lpb);
mapiId2->Release();
diff --git a/src/native/addrbook/msoutlook/com/MsOutlookAddrBookClient.cxx b/src/native/addrbook/msoutlook/com/MsOutlookAddrBookClient.cxx
index 03f0b49..8ae23fb 100644
--- a/src/native/addrbook/msoutlook/com/MsOutlookAddrBookClient.cxx
+++ b/src/native/addrbook/msoutlook/com/MsOutlookAddrBookClient.cxx
@@ -124,9 +124,6 @@ HRESULT STDMETHODCALLTYPE MsOutlookAddrBookClient::foreachMailUserCallback(
HRESULT STDMETHODCALLTYPE MsOutlookAddrBookClient::deleted(BSTR id)
{
char * charId = StringUtils::WideCharToMultiByte(id);
- fprintf(stdout, "MsOutlookAddrBookClient_deleted: id: %s\n",
- charId);
- fflush(stdout);
MAPINotification_jniCallDeletedMethod(charId);
free(charId);
diff --git a/src/native/addrbook/msoutlook/com/server/Server.cxx b/src/native/addrbook/msoutlook/com/server/Server.cxx
index 6ffb503..841c96e 100644
--- a/src/native/addrbook/msoutlook/com/server/Server.cxx
+++ b/src/native/addrbook/msoutlook/com/server/Server.cxx
@@ -130,9 +130,6 @@ void waitParentProcessStop()
static void Server_deleted(LPSTR id)
{
HRESULT hr = E_FAIL;
- fprintf(stdout, "Server_deleted: id: %s\n",
- id);
- fflush(stdout);
IMsOutlookAddrBookClient * msOutlookAddrBookClient = NULL;
if((hr = CoCreateInstance(