[evolution-mapi] Check for RegisterNotification function with two params
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-mapi] Check for RegisterNotification function with two params
- Date: Tue, 20 Apr 2010 18:04:00 +0000 (UTC)
commit 4b2eedcfbcad0dd7321fea411d86a1873da5e06d
Author: Milan Crha <mcrha redhat com>
Date: Tue Apr 20 20:03:30 2010 +0200
Check for RegisterNotification function with two params
configure.ac | 14 ++++++++++++++
po/Makefile.in.in | 4 ++--
src/libexchangemapi/exchange-mapi-connection.c | 9 ++++++---
3 files changed, 22 insertions(+), 5 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a3f8082..dbdc0a2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -140,6 +140,20 @@ LIBS=$save_libs
AC_MSG_RESULT([$ac_cv_have_wtu])
dnl ****************************
+dnl Check for RegisterNotification function with two params
+dnl ****************************
+AC_MSG_CHECKING([libmapi RegisterNotification function with two params])
+save_cflags=$CFLAGS; CFLAGS=$LIBMAPI_CFLAGS
+save_libs=$LIBS; LIBS="$LIBMAPI_LIBS"
+AC_LINK_IFELSE([AC_LANG_PROGRAM(
+ [[#include <libmapi/libmapi.h>]],
+ [[RegisterNotification (NULL, 0)]])],
+ [AC_DEFINE(HAVE_CORRECT_REGISTERNOTIFICATION, 1, [libmapi provides correct RegisterNotification function]) ac_cv_have_wtu=yes],[ac_cv_have_wtu=no])
+CFLAGS=$save_cflags
+LIBS=$save_libs
+AC_MSG_RESULT([$ac_cv_have_wtu])
+
+dnl ****************************
dnl Expose version information
dnl ****************************
API_VERSION=$EDS_PACKAGE
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
index c7e8302..cc8a222 100644
--- a/po/Makefile.in.in
+++ b/po/Makefile.in.in
@@ -56,7 +56,7 @@ ALL_LINGUAS = @ALL_LINGUAS@
PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi)
-USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep '^$$lang$$' $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep '^$$lang$$'`"; then printf "$$lang "; fi; done; fi)
+USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep \^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep \^$$lang$$`"; then printf "$$lang "; fi; done; fi)
USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
@@ -129,7 +129,7 @@ install-data-yes: all
done
# Empty stubs to satisfy archaic automake needs
-dvi info tags TAGS ID:
+dvi info ctags tags CTAGS TAGS ID:
# Define this as empty until I found a useful application.
install-exec installcheck:
diff --git a/src/libexchangemapi/exchange-mapi-connection.c b/src/libexchangemapi/exchange-mapi-connection.c
index 2d35adc..4da2198 100644
--- a/src/libexchangemapi/exchange-mapi-connection.c
+++ b/src/libexchangemapi/exchange-mapi-connection.c
@@ -1613,7 +1613,7 @@ exchange_mapi_connection_fetch_item (ExchangeMapiConnection *conn, mapi_id_t fid
}
GetPropsTagArray->cValues = (uint32_t) (cn_props + NamedPropsTagArray->cValues);
- GetPropsTagArray->aulPropTag = talloc_zero_array (mem_ctx, uint32_t, GetPropsTagArray->cValues + 1);
+ GetPropsTagArray->aulPropTag = (enum MAPITAGS *) talloc_zero_array (mem_ctx, uint32_t, GetPropsTagArray->cValues + 1);
for (m = 0; m < NamedPropsTagArray->cValues; m++, n++)
GetPropsTagArray->aulPropTag[n] = NamedPropsTagArray->aulPropTag[m];
@@ -3192,8 +3192,11 @@ exchange_mapi_connection_events_init (ExchangeMapiConnection *conn)
g_return_val_if_fail (priv->session != NULL, FALSE);
LOCK ();
- /* TODO: This requires a context, like session, from OpenChange, thus disabling until added */
- retval = FALSE /*RegisterNotification(0) == MAPI_E_SUCCESS */;
+ #ifdef HAVE_CORRECT_REGISTERNOTIFICATION
+ retval = RegisterNotification (priv->session, 0) == MAPI_E_SUCCESS;
+ #else
+ retval = FALSE;
+ #endif
UNLOCK ();
return retval;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]