diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
commit | 6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /comm/mailnews/mapi/include/mapihook.h | |
parent | Initial commit. (diff) | |
download | thunderbird-upstream.tar.xz thunderbird-upstream.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'comm/mailnews/mapi/include/mapihook.h')
-rw-r--r-- | comm/mailnews/mapi/include/mapihook.h | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/comm/mailnews/mapi/include/mapihook.h b/comm/mailnews/mapi/include/mapihook.h new file mode 100644 index 0000000000..a547dcfaad --- /dev/null +++ b/comm/mailnews/mapi/include/mapihook.h @@ -0,0 +1,83 @@ +/* + * M A P I H O O K . H + * + * Defines the SpoolerMsgHook provider interface. + * + * Copyright (c) 2009 Microsoft Corporation. All Rights Reserved. + */ + +#ifndef MAPIHOOK_H +#define MAPIHOOK_H + +#ifndef MAPIDEFS_H +#include <mapidefs.h> +#include <mapicode.h> +#include <mapiguid.h> +#include <mapitags.h> +#endif + +#ifndef BEGIN_INTERFACE +#define BEGIN_INTERFACE +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* ISpoolerHook Interface ------------------------------------------------ */ + +/* MsgHooks */ + +#define HOOK_DELETE ((ULONG) 0x00000001) +#define HOOK_CANCEL ((ULONG) 0x00000002) + +#define MAPI_ISPOOLERHOOK_METHODS(IPURE) \ + MAPIMETHOD(InboundMsgHook) \ + (THIS_ LPMESSAGE lpMessage, \ + LPMAPIFOLDER lpFolder, \ + LPMDB lpMDB, \ + ULONG FAR * lpulFlags, \ + ULONG FAR * lpcbEntryID, \ + LPBYTE FAR * lppEntryID) IPURE; \ + MAPIMETHOD(OutboundMsgHook) \ + (THIS_ LPMESSAGE lpMessage, \ + LPMAPIFOLDER lpFolder, \ + LPMDB lpMDB, \ + ULONG FAR * lpulFlags, \ + ULONG FAR * lpcbEntryID, \ + LPBYTE FAR * lppEntryID) IPURE; \ + +#undef INTERFACE +#define INTERFACE ISpoolerHook +DECLARE_MAPI_INTERFACE_(ISpoolerHook, IUnknown) +{ + BEGIN_INTERFACE + MAPI_IUNKNOWN_METHODS(PURE) + MAPI_ISPOOLERHOOK_METHODS(PURE) +}; + +DECLARE_MAPI_INTERFACE_PTR(ISpoolerHook, LPSPOOLERHOOK); + +/* Hook Provider Entry Point */ + +#define HOOK_INBOUND ((ULONG) 0x00000200) +#define HOOK_OUTBOUND ((ULONG) 0x00000400) + +typedef HRESULT (STDMAPIINITCALLTYPE HPPROVIDERINIT)( + LPMAPISESSION lpSession, + HINSTANCE hInstance, + LPALLOCATEBUFFER lpAllocateBuffer, + LPALLOCATEMORE lpAllocateMore, + LPFREEBUFFER lpFreeBuffer, + LPMAPIUID lpSectionUID, + ULONG ulFlags, + LPSPOOLERHOOK FAR * lppSpoolerHook +); + +HPPROVIDERINIT HPProviderInit; + +#ifdef __cplusplus +} /* extern "C" */ +#endif /* __cplusplus */ + +#endif /* MAPIHOOK_H */ |