Update of /cvsroot/pywin32/pywin32/com/win32comext/mapi/src
In directory sc8-pr-cvs1:/tmp/cvs-serv8769
Modified Files:
exchange.i exchangeguids.cpp exchdapi.i
Log Message:
Various changes to support the stand-alone Exchange SDK. Some
functions appear to be missing from this version of the SDK compared
to the version included with MSVC6.
Index: exchange.i
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/mapi/src/exchange.i,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** exchange.i 1 Sep 1999 23:17:16 -0000 1.1
--- exchange.i 22 Jan 2004 04:51:57 -0000 1.2
***************
*** 33,39 ****
#include "EDKUTILS.H"
! #include "ADDRLKUP.H"
! #include "MBLOGON.H"
%}
--- 33,49 ----
#include "EDKUTILS.H"
! // What is the correct story here?? The Exchange SDK story sucks - it seems
! // certain functions in the stand-alone version are simply commented out.
! #if defined(EXCHANGE_RE)
! # define DONT_HAVE_MBLOGON
! # define DONT_HAVE_ADDRLKUP
! #endif
+ #if !defined(DONT_HAVE_ADDRLKUP)
+ # include "ADDRLKUP.H"
+ #endif
+ #if !defined(DONT_HAVE_MBLOGON)
+ # include "MBLOGON.H"
+ #endif
%}
***************
*** 354,357 ****
--- 364,370 ----
static PyObject *PyHrFindExchangeGlobalAddressList(PyObject *self, PyObject *args)
{
+ #ifdef DONT_HAVE_ADDRLKUP
+ return PyErr_Format(PyExc_NotImplementedError, "Not available with this version of the Exchange SDK");
+ #else
PyObject *obAddrBook;
// @pyparm <o PyIAddrBook>|addrBook||The interface containing the address book
***************
*** 372,381 ****
MAPIFreeBuffer(peid);
return rc;
}
%}
// @pyswig <o PyIMsgStore>|HrMailboxLogon|Logs on a server and mailbox.
! HRESULT HrMailboxLogon(
IMAPISession *INPUT, // @pyparm <o PyIMAPISession>|session||The session object
IMsgStore *INPUT, // @pyparm <o PyIMsgStore>|msgStore||
--- 385,411 ----
MAPIFreeBuffer(peid);
return rc;
+ #endif
}
%}
+ %{
+ HRESULT MyHrMailboxLogon(
+ IN LPMAPISESSION lplhSession, // ptr to MAPI session handle
+ IN LPMDB lpMDB, // ptr to message store
+ IN LPSTR lpszMsgStoreDN, // ptr to message store DN
+ IN LPSTR lpszMailboxDN, // ptr to mailbox DN
+ OUT LPMDB *lppMailboxMDB) // ptr to mailbox message store ptr
+ {
+ #if defined(DONT_HAVE_MBLOGON)
+ PyErr_Warn(PyExc_RuntimeWarning, "Not available with this version of the Exchange SDK");
+ return E_NOTIMPL;
+ #else
+ return HrMailboxLogon(lplhSession, lpMDB, lpszMsgStoreDN, lpszMailboxDN, lppMailboxMDB);
+ #endif
+ }
+ %}
// @pyswig <o PyIMsgStore>|HrMailboxLogon|Logs on a server and mailbox.
! %name(HrMailboxLogon) HRESULT MyHrMailboxLogon(
IMAPISession *INPUT, // @pyparm <o PyIMAPISession>|session||The session object
IMsgStore *INPUT, // @pyparm <o PyIMsgStore>|msgStore||
***************
*** 385,390 ****
);
// @pyswig |HrMailboxLogoff|Logs off a server and mailbox.
! HRESULT HrMailboxLogoff(
IMsgStore **INPUT // @pyparm <o PyIMsgStore>|inbox||The open inbox.
);
--- 415,432 ----
);
+ %{
+ HRESULT MyHrMailboxLogoff(IMsgStore **pp)
+ {
+ #if defined(DONT_HAVE_MBLOGON)
+ PyErr_Warn(PyExc_RuntimeWarning, "Not available with this version of the Exchange SDK");
+ return E_NOTIMPL;
+ #else
+ return HrMailboxLogoff(pp);
+ #endif
+ }
+ %}
+
// @pyswig |HrMailboxLogoff|Logs off a server and mailbox.
! %name(HrMailboxLogoff) HRESULT MyHrMailboxLogoff(
IMsgStore **INPUT // @pyparm <o PyIMsgStore>|inbox||The open inbox.
);
Index: exchangeguids.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/mapi/src/exchangeguids.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** exchangeguids.cpp 1 Sep 1999 23:17:16 -0000 1.1
--- exchangeguids.cpp 22 Jan 2004 04:51:57 -0000 1.2
***************
*** 19,22 ****
#include "windows.h"
#include "mapiguid.h"
- #include "ACLSID.H"
#include "edkguid.h"
--- 19,21 ----
Index: exchdapi.i
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/mapi/src/exchdapi.i,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** exchdapi.i 1 Sep 1999 23:17:16 -0000 1.1
--- exchdapi.i 22 Jan 2004 04:51:57 -0000 1.2
***************
*** 23,35 ****
#include "EDKCFG.H"
#include "EXCHINST.H"
%}
%{
!
%}
!
! // @pyswig |HrInstallService|
! HRESULT HrInstallService(
TCHAR *INPUT, // lpszServer
TCHAR *INPUT, // lpszSiteDN
--- 23,64 ----
#include "EDKCFG.H"
#include "EXCHINST.H"
+ #include "EDKUTILS.H"
+ // see exchange.i - the stand-alone exchange SDK seems to be
+ // missing lots of functions
+ #if defined(EXCHANGE_RE)
+ # define DAPI_FUNCTIONS_MISSING
+ #endif
+
%}
+ // @pyswig |HrInstallService|
%{
! HRESULT MyHrInstallService(
! TCHAR *lpszServer,
! TCHAR *lpszSiteDN,
! TCHAR *pszServiceDisplayName,
! TCHAR *lpszServiceName,
! TCHAR *lpszCommonName,
! TCHAR *lpszObjectGuid,
! TCHAR *lpszProductGuid,
! TCHAR *lpszExeName,
! TCHAR *lpszDependencies,
! TCHAR *lpszAccount,
! TCHAR *lpszPassword
! )
! {
! #if defined(DAPI_FUNCTIONS_MISSING)
! PyErr_Warn(PyExc_RuntimeWarning, "Not available with this version of the Exchange SDK");
! return E_NOTIMPL;
! #else
! return HrInstallService(lpszServer, lpszSiteDN, pszServiceDisplayName,
! lpszServiceName, lpszCommonName, lpszObjectGuid,
! lpszProductGuid, lpszExeName, lpszDependencies,
! lpszAccount, lpszPassword);
! #endif
! }
%}
! %name(HrInstallService) HRESULT MyHrInstallService(
TCHAR *INPUT, // lpszServer
TCHAR *INPUT, // lpszSiteDN
***************
*** 45,50 ****
);
// @pyswig |HrInstallMailboxAgent|
! HRESULT HrInstallMailboxAgent(
TCHAR *INPUT, // Server
TCHAR *INPUT, // SiteDN
--- 74,100 ----
);
+
// @pyswig |HrInstallMailboxAgent|
! %{
! HRESULT MyHrInstallMailboxAgent(
! TCHAR *Server,
! TCHAR *SiteDN,
! TCHAR *DisplayName,
! TCHAR *RDN,
! TCHAR *lpszExtensionName,
! TCHAR *lpszExtensionData,
! TCHAR *lpszAccountName)
! {
! #if defined(DAPI_FUNCTIONS_MISSING)
! PyErr_Warn(PyExc_RuntimeWarning, "Not available with this version of the Exchange SDK");
! return E_NOTIMPL;
! #else
! return HrInstallMailboxAgent(Server, SiteDN, DisplayName, RDN,
! lpszExtensionName, lpszExtensionData,
! lpszAccountName);
! #endif
! }
! %}
! %name(HrInstallMailboxAgent) HRESULT MyHrInstallMailboxAgent(
TCHAR *INPUT, // Server
TCHAR *INPUT, // SiteDN
***************
*** 68,73 ****
);
// @pyswig |HrMailboxAgentExists|
! HRESULT HrMailboxAgentExists(
TCHAR *INPUT, // @pyparm string|server||The name of the server
TCHAR *INPUT, // @pyparm string|siteDN||Contains the distinguished name (DN) of the site.
--- 118,139 ----
);
+
// @pyswig |HrMailboxAgentExists|
! %{
! HRESULT MyHrMailboxAgentExists(
! TCHAR *server,
! TCHAR *siteDN,
! TCHAR *rdn)
! {
! #if defined(DAPI_FUNCTIONS_MISSING)
! PyErr_Warn(PyExc_RuntimeWarning, "Not available with this version of the Exchange SDK");
! return E_NOTIMPL;
! #else
! return HrMailboxAgentExists(server, siteDN, rdn);
! #endif
! }
! %}
!
! %name(HrMailboxAgentExists) HRESULT MyHrMailboxAgentExists(
TCHAR *INPUT, // @pyparm string|server||The name of the server
TCHAR *INPUT, // @pyparm string|siteDN||Contains the distinguished name (DN) of the site.
***************
*** 75,83 ****
);
// @pyswig |HrAdminProgramExists|
HRESULT HrAdminProgramExists();
// @pyswig |HrRemoveMailboxAgent|Removes a Mailbox Agent
! HRESULT HrRemoveMailboxAgent(
TCHAR *INPUT, // @pyparm string|server||The name of the server
TCHAR *INPUT, // @pyparm string|siteDN||Contains the distinguished name (DN) of the site.
--- 141,165 ----
);
+
// @pyswig |HrAdminProgramExists|
HRESULT HrAdminProgramExists();
// @pyswig |HrRemoveMailboxAgent|Removes a Mailbox Agent
! %{
! HRESULT MyHrRemoveMailboxAgent(
! TCHAR *server,
! TCHAR *siteDN,
! TCHAR *rdn)
! {
! #if defined(DAPI_FUNCTIONS_MISSING)
! PyErr_Warn(PyExc_RuntimeWarning, "Not available with this version of the Exchange SDK");
! return E_NOTIMPL;
! #else
! return HrRemoveMailboxAgent(server, siteDN, rdn);
! #endif
! }
! %}
!
! %name(HrRemoveMailboxAgent) HRESULT MyHrRemoveMailboxAgent(
TCHAR *INPUT, // @pyparm string|server||The name of the server
TCHAR *INPUT, // @pyparm string|siteDN||Contains the distinguished name (DN) of the site.
***************
*** 91,95 ****
// @pyswig [string, ...]|HrEnumOrganizations|Lists the names of the organizations on the server.
! HRESULT HrEnumOrganizations(
TCHAR *INPUT_NULLOK, // @pyparm string|rootDN||Contains the distinguished name (DN) of the directory information tree (DIT) root.
TCHAR *INPUT_NULLOK, // @pyparm string|server||The name of the server
--- 173,191 ----
// @pyswig [string, ...]|HrEnumOrganizations|Lists the names of the organizations on the server.
! %{
! HRESULT MyHrEnumOrganizations(
! TCHAR *p1,
! TCHAR *p2,
! TCHAR **out)
! {
! #if defined(DAPI_FUNCTIONS_MISSING)
! PyErr_Warn(PyExc_RuntimeWarning, "Not available with this version of the Exchange SDK");
! return E_NOTIMPL;
! #else
! return HrEnumOrganizations(p1, p2, out);
! #endif
! }
! %}
! %name(HrEnumOrganizations) HRESULT MyHrEnumOrganizations(
TCHAR *INPUT_NULLOK, // @pyparm string|rootDN||Contains the distinguished name (DN) of the directory information tree (DIT) root.
TCHAR *INPUT_NULLOK, // @pyparm string|server||The name of the server
***************
*** 98,102 ****
// @pyswig [string, ...]|HrEnumSites|Lists the names of the sites in an organization.
! HRESULT HrEnumSites(
TCHAR *INPUT_NULLOK, // @pyparm string|server||The name of the server
TCHAR *INPUT_NULLOK, // @pyparm string|organizationDN||Contains the distinguished name (DN) of the organization.
--- 194,212 ----
// @pyswig [string, ...]|HrEnumSites|Lists the names of the sites in an organization.
! %{
! HRESULT MyHrEnumSites(
! TCHAR *p1,
! TCHAR *p2,
! TCHAR **out)
! {
! #if defined(DAPI_FUNCTIONS_MISSING)
! PyErr_Warn(PyExc_RuntimeWarning, "Not available with this version of the Exchange SDK");
! return E_NOTIMPL;
! #else
! return HrEnumSites(p1, p2, out);
! #endif
! }
! %}
! %name(HrEnumSites) HRESULT MyHrEnumSites(
TCHAR *INPUT_NULLOK, // @pyparm string|server||The name of the server
TCHAR *INPUT_NULLOK, // @pyparm string|organizationDN||Contains the distinguished name (DN) of the organization.
***************
*** 105,109 ****
// @pyswig [string, ...]|HrEnumContainers|Lists the names of the containers on the server
! HRESULT HrEnumContainers(
TCHAR *INPUT_NULLOK, // @pyparm string|server||The name of the server
TCHAR *INPUT, // @pyparm string|siteDN||Distinguished name (DN) of the site.
--- 215,234 ----
// @pyswig [string, ...]|HrEnumContainers|Lists the names of the containers on the server
! %{
! HRESULT MyHrEnumContainers(
! TCHAR *p1,
! TCHAR *p2,
! BOOL b,
! TCHAR **out)
! {
! #if defined(DAPI_FUNCTIONS_MISSING)
! PyErr_Warn(PyExc_RuntimeWarning, "Not available with this version of the Exchange SDK");
! return E_NOTIMPL;
! #else
! return HrEnumContainers(p1, p2, b, out);
! #endif
! }
! %}
! %name(HrEnumContainers) HRESULT MyHrEnumContainers(
TCHAR *INPUT_NULLOK, // @pyparm string|server||The name of the server
TCHAR *INPUT, // @pyparm string|siteDN||Distinguished name (DN) of the site.
***************
*** 113,117 ****
// @pyswig [string, ...]|HrEnumSiteAdmins|Lists the administrators for a site.
! HRESULT HrEnumSiteAdmins(
TCHAR *INPUT, // @pyparm string|server||The name of the server
TCHAR *INPUT, // @pyparm string|siteDN||Distinguished name (DN) of the site.
--- 238,256 ----
// @pyswig [string, ...]|HrEnumSiteAdmins|Lists the administrators for a site.
! %{
! HRESULT MyHrEnumSiteAdmins(
! TCHAR *p1,
! TCHAR *p2,
! TCHAR **out)
! {
! #if defined(DAPI_FUNCTIONS_MISSING)
! PyErr_Warn(PyExc_RuntimeWarning, "Not available with this version of the Exchange SDK");
! return E_NOTIMPL;
! #else
! return HrEnumSiteAdmins(p1, p2, out);
! #endif
! }
! %}
! %name(HrEnumSiteAdmins) HRESULT MyHrEnumSiteAdmins(
TCHAR *INPUT, // @pyparm string|server||The name of the server
TCHAR *INPUT, // @pyparm string|siteDN||Distinguished name (DN) of the site.
|