diff --git a/reactos/include/psdk/activaut.idl b/reactos/include/psdk/activaut.idl index 56900a7bc6c..890e785b9e6 100644 --- a/reactos/include/psdk/activaut.idl +++ b/reactos/include/psdk/activaut.idl @@ -1,29 +1,29 @@ -/* - * Copyright 2008 Jacek Caban for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef DO_NO_IMPORTS -import "ocidl.idl"; -import "oleidl.idl"; -import "oaidl.idl"; -#endif - -cpp_quote("#ifndef _NO_AUTHOR_GUIDS") - -cpp_quote("DEFINE_GUID(CATID_ActiveScriptAuthor, 0xaee2a92,0xbcbb,0x11d0,0x8c,0x72,0x0,0xc0,0x4f,0xc2,0xb0,0x85);") - -cpp_quote("#endif") +/* + * Copyright 2008 Jacek Caban for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef DO_NO_IMPORTS +import "ocidl.idl"; +import "oleidl.idl"; +import "oaidl.idl"; +#endif + +cpp_quote("#ifndef _NO_AUTHOR_GUIDS") + +cpp_quote("DEFINE_GUID(CATID_ActiveScriptAuthor, 0xaee2a92,0xbcbb,0x11d0,0x8c,0x72,0x0,0xc0,0x4f,0xc2,0xb0,0x85);") + +cpp_quote("#endif") diff --git a/reactos/include/psdk/activdbg.idl b/reactos/include/psdk/activdbg.idl index a572a51c4ab..b41ae0906b7 100644 --- a/reactos/include/psdk/activdbg.idl +++ b/reactos/include/psdk/activdbg.idl @@ -1,383 +1,383 @@ -/* - * Copyright 2008 Jacek Caban for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -import "ocidl.idl"; -import "activscp.idl"; -/* import "dbgprop.idl"; */ - -interface IDebugDocumentContext; -interface IRemoteDebugApplication; - -/* FIXME: */ -interface IEnumDebugStackFrames; -interface IDebugStackFrame; -interface IApplicationDebugger; -interface IEnumRemoteDebugApplicationThreads; -interface IDebugApplicationNode; -interface IEnumDebugExpressionContexts; -interface IDebugApplicationThread; -interface IDebugSyncOperation; -interface IDebugAsyncOperation; -interface IDebugStackFrameSniffer; -interface IDebugThreadCall32; -interface IActiveScriptErrorDebug; -interface IProvideExpressionContexts; - -typedef enum tagBREAKPOINT_STATE { - BREAKPOINT_DELETED, - BREAKPOINT_DISABLED, - BREAKPOINT_ENABLED -} BREAKPOINT_STATE; - -typedef DWORD APPBREAKFLAGS; - -typedef enum tagBREAKREASON { - BREAKREASON_STEP, - BREAKREASON_BREAKPOINT, - BREAKREASON_DEBUGGER_BLOCK, - BREAKREASON_HOST_INITIATED, - BREAKREASON_LANGUAGE_INITIATED, - BREAKREASON_DEBUGGER_HALT, - BREAKREASON_ERROR, - BREAKREASON_JIT -} BREAKREASON; - -typedef enum tagBREAKRESUME_ACTION { - BREAKRESUMEACTION_ABORT, - BREAKRESUMEACTION_CONTINUE, - BREAKRESUMEACTION_STEP_INTO, - BREAKRESUMEACTION_STEP_OVER, - BREAKRESUMEACTION_STEP_OUT, - BREAKRESUMEACTION_IGNORE -} BREAKRESUMEACTION; - -typedef enum tagDOCUMENTNAMETYPE { - DOCUMENTNAMETYPE_APPNODE, - DOCUMENTNAMETYPE_TITLE, - DOCUMENTNAMETYPE_FILE_TAIL, - DOCUMENTNAMETYPE_URL -} DOCUMENTNAMETYPE; - -typedef enum tagERRORRESUMEACTION { - ERRORRESUMEACTION_ReexecuteErrorStatement, - ERRORRESUMEACTION_AbortCallAndReturnErrorToCaller, - ERRORRESUMEACTION_SkipErrorStatement, -} ERRORRESUMEACTION; - -/************************************************************ - * interface IDebugDocumentInfo - */ -[ - object, - uuid(51973c1f-cb0c-11d0-b5c9-00a0244a0e7a), - pointer_default(unique) -] -interface IDebugDocumentInfo : IUnknown -{ - HRESULT GetName( - [in] DOCUMENTNAMETYPE dnt, - [out] BSTR *pbstrName); - - HRESULT GetDocumentClassId( - [out] CLSID *pclsidDocument); -} - -/************************************************************ - * interface IDebugDocument - */ -[ - object, - uuid(51973c21-cb0c-11d0-b5c9-00a0244a0e7a), - pointer_default(unique) -] -interface IDebugDocument : IDebugDocumentInfo -{ -} - -/************************************************************ - * interface IDebugCodeContext - */ -[ - object, - uuid(51973c13-cb0c-11d0-b5c9-00a0244a0e7a), - pointer_default(unique) -] -interface IDebugCodeContext : IUnknown -{ - HRESULT GetDocumentContext( - [out] IDebugDocumentContext **ppsc); - - HRESULT SetBreakPoint( - [in] BREAKPOINT_STATE bps); -} - -/************************************************************ - * interface IEnumDebugCodeContexts - */ -[ - object, - uuid(51973c1d-cb0c-11d0-b5c9-00a0244a0e7a), - pointer_default(unique) -] -interface IEnumDebugCodeContexts : IUnknown -{ - HRESULT Next( - [in] ULONG celt, - [out] IDebugCodeContext **pscc, - [out] ULONG *pceltFetched); - - HRESULT Skip( - [in] ULONG celt); - - HRESULT Reset(); - - HRESULT Clone( - [out] IEnumDebugCodeContexts **ppescc); -} - -/************************************************************ - * interface IDebugDocumentContext - */ -[ - object, - uuid(51973c28-cb0c-11d0-b5c9-00a0244a0e7a), - pointer_default(unique) -] -interface IDebugDocumentContext : IUnknown -{ - HRESULT GetDocument( - [out] IDebugDocument **ppsd); - - HRESULT EnumCodeContexts( - [out] IEnumDebugCodeContexts **ppescc); -} - -/************************************************************ - * interface IRemoteDebugApplicationThread - */ -[ - object, - uuid(51973c37-cb0c-11d0-b5c9-00a0244a0e7a), - pointer_default(unique) -] -interface IRemoteDebugApplicationThread : IUnknown -{ - HRESULT GetSystemThreadId( - [out] DWORD *dwThreadId); - - HRESULT GetApplication( - [out] IRemoteDebugApplication **pprda); - - HRESULT EnumStackFrames( - [out] IEnumDebugStackFrames **ppedsf); - - HRESULT GetDescription( - [out] BSTR *pbstrDescription, - [out] BSTR *pbstrState); - - HRESULT SetNextStatement( - [in] IDebugStackFrame *pStackFrame, - [in] IDebugCodeContext *pCodeContext); - - HRESULT GetState( - [out] DWORD *pState); - - HRESULT Suspend( - [out] DWORD *pdwCount); - - HRESULT Resume( - [out] DWORD *pdwCount); - - HRESULT GetSuspendCount( - [out] DWORD *pdwCount); -} - -/************************************************************ - * interface IRemoteDebugApplication - */ -[ - object, - uuid(51973c30-cb0c-11d0-b5c9-00a0244Aae7a), - pointer_default(unique) -] -interface IRemoteDebugApplication : IUnknown -{ - HRESULT ResumeFromBreakPoint( - [in] IRemoteDebugApplicationThread *prptFocus, - [in] BREAKRESUMEACTION bra, - [in] ERRORRESUMEACTION era); - - HRESULT CauseBreak(); - - HRESULT ConnectDebugger( - [in] IApplicationDebugger *pad); - - HRESULT DisconnectDebugger(); - - HRESULT GetDebugger( - [out] IApplicationDebugger **pad); - - HRESULT CreateInstanceAtApplication( - [in] REFCLSID rclsid, - [in] IUnknown *pUnkOuter, - [in] DWORD dwClsContext, - [in] REFIID riid, - [out, iid_is(riid)] IUnknown **ppvObject); - - HRESULT QueryAlive(); - - HRESULT EnumThreads( - [out] IEnumRemoteDebugApplicationThreads **pperdat); - - HRESULT GetName( - [out] BSTR *pbstrName); - - HRESULT GetRootNode( - [out] IDebugApplicationNode **ppdanRoot); - - HRESULT EnumGlobalExpressionContexts( - [out] IEnumDebugExpressionContexts **ppedec); -} - -/************************************************************ - * interface IDebugApplication32 - */ -[ - object, - uuid(51973c32-cb0c-11d0-b5c9-00a0244a0e7a), - pointer_default(unique), - local -] -interface IDebugApplication32 : IRemoteDebugApplication -{ - HRESULT SetName( - [in] LPCOLESTR pstrName); - - HRESULT StepOutComplete(); - - HRESULT DebugOutput( - [in] LPCOLESTR pstr); - - HRESULT StartDebugSession(); - - HRESULT HandleBreakPoint( - [in] BREAKREASON br, - [out] BREAKRESUMEACTION *pbra); - - HRESULT Close(); - - HRESULT GetBreakFlags( - [out] APPBREAKFLAGS *pabf, - [out] IRemoteDebugApplicationThread **pprdatSteppingThread); - - HRESULT GetCurrentThread( - [out] IDebugApplicationThread **pat); - - HRESULT CreateAsyncDebugOperation( - [in] IDebugSyncOperation *psdo, - [out] IDebugAsyncOperation **ppado); - - HRESULT AddStackFrameSniffer( - [in] IDebugStackFrameSniffer *pdsfs, - [out] DWORD *pdwCookie); - - HRESULT RemoveStackFrameSniffer( - [in] DWORD dwCookie); - - HRESULT QueryCurrentThreadIsDebuggerThread(); - - HRESULT SynchronousCallInDebuggerThread( - [in] IDebugThreadCall32 *pptc, - [in] DWORD dwParam1, - [in] DWORD dwParam2, - [in] DWORD dwParam3); - - HRESULT CreateApplicationNode( - [out] IDebugApplicationNode **ppdanNew); - - HRESULT FireDebuggerEvent( - [in] REFGUID riid, - [in] IUnknown *punk); - - HRESULT HandleRuntimeError( - [in] IActiveScriptErrorDebug *pErrorDebug, - [in] IActiveScriptSite *pScriptSite, - [out] BREAKRESUMEACTION *pbra, - [out] ERRORRESUMEACTION *perra, - [out] BOOL *pfCallOnScriptError); - - BOOL FCanJitDebug(); - - BOOL FIsAutoJitDebugEnabled(); - - HRESULT AddGlobalExpressionContextProvider( - [in] IProvideExpressionContexts *pdsfs, - [out] DWORD *pdwCookie); - - HRESULT RemoveGlobalExpressionContextProvider( - [in] DWORD dwCookie); -} - -/************************************************************ - * interface IActiveScriptSiteDebug32 - */ -[ - object, - uuid(51973c11-cb0c-11d0-b5c9-00a0244a0e7a), - pointer_default(unique), - local -] -interface IActiveScriptSiteDebug32 : IUnknown -{ - HRESULT GetDocumentContextFromPosition( - [in] DWORD dwSourceContext, - [in] ULONG uCharacterOffset, - [in] ULONG uNumChars, - [out] IDebugDocumentContext **ppsc); - - HRESULT GetApplication( - [out] IDebugApplication32 **ppda); - - HRESULT GetRootApplicationNode( - [out] IDebugApplicationNode **ppdanRoot); - - HRESULT OnScriptErrorDebug( - [in] IActiveScriptErrorDebug *pErrorDebug, - [out] BOOL *pfEnterDebugger, - [out] BOOL *pfCallOnScriptErrorWhenContinuing); -} - -cpp_quote("#ifndef DISABLE_ACTIVDBG_INTERFACE_WRAPPERS") -cpp_quote("#ifdef _WIN64") - -cpp_quote("#define IActiveScriptSiteDebug IActiveScriptSiteDebug64") -cpp_quote("#define IID_IActiveScriptSiteDebug IID_IActiveScriptSiteDebug64") - -cpp_quote("#define IDebugApplication IDebugApplication64") -cpp_quote("#define IID_IDebugApplication IID_IDebugApplication64") - -cpp_quote("#else") - -cpp_quote("#define IActiveScriptSiteDebug IActiveScriptSiteDebug32") -cpp_quote("#define IID_IActiveScriptSiteDebug IID_IActiveScriptSiteDebug32") - -cpp_quote("#define IDebugApplication IDebugApplication32") -cpp_quote("#define IID_IDebugApplication IID_IDebugApplication32") - -cpp_quote("#endif") -cpp_quote("#endif") +/* + * Copyright 2008 Jacek Caban for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "ocidl.idl"; +import "activscp.idl"; +/* import "dbgprop.idl"; */ + +interface IDebugDocumentContext; +interface IRemoteDebugApplication; + +/* FIXME: */ +interface IEnumDebugStackFrames; +interface IDebugStackFrame; +interface IApplicationDebugger; +interface IEnumRemoteDebugApplicationThreads; +interface IDebugApplicationNode; +interface IEnumDebugExpressionContexts; +interface IDebugApplicationThread; +interface IDebugSyncOperation; +interface IDebugAsyncOperation; +interface IDebugStackFrameSniffer; +interface IDebugThreadCall32; +interface IActiveScriptErrorDebug; +interface IProvideExpressionContexts; + +typedef enum tagBREAKPOINT_STATE { + BREAKPOINT_DELETED, + BREAKPOINT_DISABLED, + BREAKPOINT_ENABLED +} BREAKPOINT_STATE; + +typedef DWORD APPBREAKFLAGS; + +typedef enum tagBREAKREASON { + BREAKREASON_STEP, + BREAKREASON_BREAKPOINT, + BREAKREASON_DEBUGGER_BLOCK, + BREAKREASON_HOST_INITIATED, + BREAKREASON_LANGUAGE_INITIATED, + BREAKREASON_DEBUGGER_HALT, + BREAKREASON_ERROR, + BREAKREASON_JIT +} BREAKREASON; + +typedef enum tagBREAKRESUME_ACTION { + BREAKRESUMEACTION_ABORT, + BREAKRESUMEACTION_CONTINUE, + BREAKRESUMEACTION_STEP_INTO, + BREAKRESUMEACTION_STEP_OVER, + BREAKRESUMEACTION_STEP_OUT, + BREAKRESUMEACTION_IGNORE +} BREAKRESUMEACTION; + +typedef enum tagDOCUMENTNAMETYPE { + DOCUMENTNAMETYPE_APPNODE, + DOCUMENTNAMETYPE_TITLE, + DOCUMENTNAMETYPE_FILE_TAIL, + DOCUMENTNAMETYPE_URL +} DOCUMENTNAMETYPE; + +typedef enum tagERRORRESUMEACTION { + ERRORRESUMEACTION_ReexecuteErrorStatement, + ERRORRESUMEACTION_AbortCallAndReturnErrorToCaller, + ERRORRESUMEACTION_SkipErrorStatement, +} ERRORRESUMEACTION; + +/************************************************************ + * interface IDebugDocumentInfo + */ +[ + object, + uuid(51973c1f-cb0c-11d0-b5c9-00a0244a0e7a), + pointer_default(unique) +] +interface IDebugDocumentInfo : IUnknown +{ + HRESULT GetName( + [in] DOCUMENTNAMETYPE dnt, + [out] BSTR *pbstrName); + + HRESULT GetDocumentClassId( + [out] CLSID *pclsidDocument); +} + +/************************************************************ + * interface IDebugDocument + */ +[ + object, + uuid(51973c21-cb0c-11d0-b5c9-00a0244a0e7a), + pointer_default(unique) +] +interface IDebugDocument : IDebugDocumentInfo +{ +} + +/************************************************************ + * interface IDebugCodeContext + */ +[ + object, + uuid(51973c13-cb0c-11d0-b5c9-00a0244a0e7a), + pointer_default(unique) +] +interface IDebugCodeContext : IUnknown +{ + HRESULT GetDocumentContext( + [out] IDebugDocumentContext **ppsc); + + HRESULT SetBreakPoint( + [in] BREAKPOINT_STATE bps); +} + +/************************************************************ + * interface IEnumDebugCodeContexts + */ +[ + object, + uuid(51973c1d-cb0c-11d0-b5c9-00a0244a0e7a), + pointer_default(unique) +] +interface IEnumDebugCodeContexts : IUnknown +{ + HRESULT Next( + [in] ULONG celt, + [out] IDebugCodeContext **pscc, + [out] ULONG *pceltFetched); + + HRESULT Skip( + [in] ULONG celt); + + HRESULT Reset(); + + HRESULT Clone( + [out] IEnumDebugCodeContexts **ppescc); +} + +/************************************************************ + * interface IDebugDocumentContext + */ +[ + object, + uuid(51973c28-cb0c-11d0-b5c9-00a0244a0e7a), + pointer_default(unique) +] +interface IDebugDocumentContext : IUnknown +{ + HRESULT GetDocument( + [out] IDebugDocument **ppsd); + + HRESULT EnumCodeContexts( + [out] IEnumDebugCodeContexts **ppescc); +} + +/************************************************************ + * interface IRemoteDebugApplicationThread + */ +[ + object, + uuid(51973c37-cb0c-11d0-b5c9-00a0244a0e7a), + pointer_default(unique) +] +interface IRemoteDebugApplicationThread : IUnknown +{ + HRESULT GetSystemThreadId( + [out] DWORD *dwThreadId); + + HRESULT GetApplication( + [out] IRemoteDebugApplication **pprda); + + HRESULT EnumStackFrames( + [out] IEnumDebugStackFrames **ppedsf); + + HRESULT GetDescription( + [out] BSTR *pbstrDescription, + [out] BSTR *pbstrState); + + HRESULT SetNextStatement( + [in] IDebugStackFrame *pStackFrame, + [in] IDebugCodeContext *pCodeContext); + + HRESULT GetState( + [out] DWORD *pState); + + HRESULT Suspend( + [out] DWORD *pdwCount); + + HRESULT Resume( + [out] DWORD *pdwCount); + + HRESULT GetSuspendCount( + [out] DWORD *pdwCount); +} + +/************************************************************ + * interface IRemoteDebugApplication + */ +[ + object, + uuid(51973c30-cb0c-11d0-b5c9-00a0244Aae7a), + pointer_default(unique) +] +interface IRemoteDebugApplication : IUnknown +{ + HRESULT ResumeFromBreakPoint( + [in] IRemoteDebugApplicationThread *prptFocus, + [in] BREAKRESUMEACTION bra, + [in] ERRORRESUMEACTION era); + + HRESULT CauseBreak(); + + HRESULT ConnectDebugger( + [in] IApplicationDebugger *pad); + + HRESULT DisconnectDebugger(); + + HRESULT GetDebugger( + [out] IApplicationDebugger **pad); + + HRESULT CreateInstanceAtApplication( + [in] REFCLSID rclsid, + [in] IUnknown *pUnkOuter, + [in] DWORD dwClsContext, + [in] REFIID riid, + [out, iid_is(riid)] IUnknown **ppvObject); + + HRESULT QueryAlive(); + + HRESULT EnumThreads( + [out] IEnumRemoteDebugApplicationThreads **pperdat); + + HRESULT GetName( + [out] BSTR *pbstrName); + + HRESULT GetRootNode( + [out] IDebugApplicationNode **ppdanRoot); + + HRESULT EnumGlobalExpressionContexts( + [out] IEnumDebugExpressionContexts **ppedec); +} + +/************************************************************ + * interface IDebugApplication32 + */ +[ + object, + uuid(51973c32-cb0c-11d0-b5c9-00a0244a0e7a), + pointer_default(unique), + local +] +interface IDebugApplication32 : IRemoteDebugApplication +{ + HRESULT SetName( + [in] LPCOLESTR pstrName); + + HRESULT StepOutComplete(); + + HRESULT DebugOutput( + [in] LPCOLESTR pstr); + + HRESULT StartDebugSession(); + + HRESULT HandleBreakPoint( + [in] BREAKREASON br, + [out] BREAKRESUMEACTION *pbra); + + HRESULT Close(); + + HRESULT GetBreakFlags( + [out] APPBREAKFLAGS *pabf, + [out] IRemoteDebugApplicationThread **pprdatSteppingThread); + + HRESULT GetCurrentThread( + [out] IDebugApplicationThread **pat); + + HRESULT CreateAsyncDebugOperation( + [in] IDebugSyncOperation *psdo, + [out] IDebugAsyncOperation **ppado); + + HRESULT AddStackFrameSniffer( + [in] IDebugStackFrameSniffer *pdsfs, + [out] DWORD *pdwCookie); + + HRESULT RemoveStackFrameSniffer( + [in] DWORD dwCookie); + + HRESULT QueryCurrentThreadIsDebuggerThread(); + + HRESULT SynchronousCallInDebuggerThread( + [in] IDebugThreadCall32 *pptc, + [in] DWORD dwParam1, + [in] DWORD dwParam2, + [in] DWORD dwParam3); + + HRESULT CreateApplicationNode( + [out] IDebugApplicationNode **ppdanNew); + + HRESULT FireDebuggerEvent( + [in] REFGUID riid, + [in] IUnknown *punk); + + HRESULT HandleRuntimeError( + [in] IActiveScriptErrorDebug *pErrorDebug, + [in] IActiveScriptSite *pScriptSite, + [out] BREAKRESUMEACTION *pbra, + [out] ERRORRESUMEACTION *perra, + [out] BOOL *pfCallOnScriptError); + + BOOL FCanJitDebug(); + + BOOL FIsAutoJitDebugEnabled(); + + HRESULT AddGlobalExpressionContextProvider( + [in] IProvideExpressionContexts *pdsfs, + [out] DWORD *pdwCookie); + + HRESULT RemoveGlobalExpressionContextProvider( + [in] DWORD dwCookie); +} + +/************************************************************ + * interface IActiveScriptSiteDebug32 + */ +[ + object, + uuid(51973c11-cb0c-11d0-b5c9-00a0244a0e7a), + pointer_default(unique), + local +] +interface IActiveScriptSiteDebug32 : IUnknown +{ + HRESULT GetDocumentContextFromPosition( + [in] DWORD dwSourceContext, + [in] ULONG uCharacterOffset, + [in] ULONG uNumChars, + [out] IDebugDocumentContext **ppsc); + + HRESULT GetApplication( + [out] IDebugApplication32 **ppda); + + HRESULT GetRootApplicationNode( + [out] IDebugApplicationNode **ppdanRoot); + + HRESULT OnScriptErrorDebug( + [in] IActiveScriptErrorDebug *pErrorDebug, + [out] BOOL *pfEnterDebugger, + [out] BOOL *pfCallOnScriptErrorWhenContinuing); +} + +cpp_quote("#ifndef DISABLE_ACTIVDBG_INTERFACE_WRAPPERS") +cpp_quote("#ifdef _WIN64") + +cpp_quote("#define IActiveScriptSiteDebug IActiveScriptSiteDebug64") +cpp_quote("#define IID_IActiveScriptSiteDebug IID_IActiveScriptSiteDebug64") + +cpp_quote("#define IDebugApplication IDebugApplication64") +cpp_quote("#define IID_IDebugApplication IID_IDebugApplication64") + +cpp_quote("#else") + +cpp_quote("#define IActiveScriptSiteDebug IActiveScriptSiteDebug32") +cpp_quote("#define IID_IActiveScriptSiteDebug IID_IActiveScriptSiteDebug32") + +cpp_quote("#define IDebugApplication IDebugApplication32") +cpp_quote("#define IID_IDebugApplication IID_IDebugApplication32") + +cpp_quote("#endif") +cpp_quote("#endif") diff --git a/reactos/include/psdk/imnact.idl b/reactos/include/psdk/imnact.idl index 6c675d2840a..ee2460acd64 100644 --- a/reactos/include/psdk/imnact.idl +++ b/reactos/include/psdk/imnact.idl @@ -1,299 +1,299 @@ -/* - * Copyright 2006 Robert Shearman for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -import "objidl.idl"; - -interface IImnAccount; - -cpp_quote("#ifndef HR_E") -cpp_quote("#define HR_E(n) MAKE_SCODE(SEVERITY_ERROR, FACILITY_INTERNET, n)") -cpp_quote("#endif") -cpp_quote("#ifndef HR_S") -cpp_quote("#define HR_S(n) MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_INTERNET, n)") -cpp_quote("#endif") - -typedef enum tagSMTPAUTHTYPE -{ - SMTP_AUTH_NONE, - SMTP_AUTH_SICILY, - SMTP_AUTH_USE_POP3ORIMAP_SETTINGS, - SMTP_AUTH_USE_SMTP_SETTINGS, -} SMTPAUTHTYPE; - -const SHORT CCHMAX_ORG_NAME = 256; -const SHORT CCHMAX_DISPLAY_NAME = 256; -const SHORT CCHMAX_ACCOUNT_NAME = 256; -const SHORT CCHMAX_SERVER_NAME = 256; -const SHORT CCHMAX_PASSWORD = 256; -const SHORT CCHMAX_USERNAME = 256; -const SHORT CCHMAX_EMAIL_ADDRESS = 256; -const SHORT CCHMAX_CONNECTOID = 256; -const SHORT CCHMAX_SEARCH_BASE = 256; -const SHORT CCHMAX_ROOT_FOLDER = 256; -const SHORT CCHMAX_SIGNATURE = 16; -const SHORT CCHMAX_SERVICE = 256; - -[ - object, - uuid(0A06BD31-166F-11D0-81B9-00C04FD85AB4), - pointer_default(unique) -] -interface IImnAdviseAccount : IUnknown -{ - typedef enum - { - ACCT_NEWS, - ACCT_MAIL, - ACCT_DIR_SERV, - ACCT_LAST - } ACCTTYPE; - - typedef struct tagAccountContext - { - ACCTTYPE AcctType; - LPSTR pszAccountID; - LPSTR pszOldName; - DWORD dwServerType; - } ACTX; - - HRESULT AdviseAccount( - [in] DWORD dwAdviseType, - [in] ACTX *pAcctCtx); -} - -[ - object, - uuid(8D0AED11-1638-11D0-81B9-00C04FD85AB4), - pointer_default(unique) -] -interface IImnAdviseMigrateServer : IUnknown -{ - HRESULT MigrateServer( - [in] DWORD dwSrvType, - [in] IImnAccount *pAccount); -} - -[ - object, - uuid(FD465483-1384-11D0-ABBD-0020AFDFD10A), - pointer_default(unique) -] -interface IImnEnumAccounts : IUnknown -{ - HRESULT GetCount( - [out] ULONG *pcItems); - - HRESULT SortByAccountName(); - - HRESULT GetNext( - [out] IImnAccount **ppAccount); - - HRESULT Reset(); -} - -[ - object, - uuid(FD465481-1384-11D0-ABBD-0020AFDFD10A), - pointer_default(unique) -] -interface IImnAccountManager : IUnknown -{ - typedef struct tagACCTLISTINFO - { - DWORD cbSize; - ACCTTYPE AcctTypeInit; - DWORD dwAcctFlags; - DWORD dwFlags; - } ACCTLISTINFO; - - HRESULT Init( - [in] IImnAdviseMigrateServer *pAdviseMigrateServer); - - HRESULT CreateAccountObject( - [in] ACCTTYPE AcctType, - [out] IImnAccount **ppAccount); - - HRESULT Enumerate( - [in] DWORD dwSrvTypes, - [out] IImnEnumAccounts **ppEnumAccounts); - - HRESULT GetAccountCount( - [in] ACCTTYPE AcctType, - [out] ULONG *pcServers); - - HRESULT FindAccount( - [in] DWORD dwPropTag, - [in] LPCSTR pszSearchData, - [out] IImnAccount **ppAccount); - - HRESULT GetDefaultAccountName( - [in] ACCTTYPE AcctType, - [in,ref] LPSTR pszAccount, - [in] ULONG cchMax); - - HRESULT ProcessNotification( - [in] UINT uMsg, - [in] WPARAM wParam, - [in] LPARAM lParam); - - HRESULT ValidateDefaultSendAccount(); - - HRESULT AccountListDialog( - [in] HWND hwnd, - [in] ACCTLISTINFO *pinfo); - - HRESULT Advise( - [in] IImnAdviseAccount *pAdviseAccount, - [out] DWORD *pdwConnection); - - HRESULT Unadvise( - [in] DWORD dwConnection); - - HRESULT GetUniqueAccountName( - [in] LPSTR szName, - [in] UINT cch); - - HRESULT InitEx( - [in] IImnAdviseMigrateServer *pAdviseMigrateServer, - [in] DWORD dwFlags); -} - -[ - object, - uuid(C43DFC6F-62BB-11D2-A727-00C04F79E7C8), - pointer_default(unique) -] -interface IImnAccountManager2 : IImnAccountManager -{ - HRESULT InitUser( - [in] IImnAdviseMigrateServer *pAdviseMigrateServer, - [in] REFGUID rguidID, - [in] DWORD dwFlags); - - HRESULT GetIncompleteAccount( - [in] ACCTTYPE AcctType, - [in,ref] LPSTR pszAccountId, - [in] ULONG cchMax); - - HRESULT SetIncompleteAccount( - [in] ACCTTYPE AcctType, - [in] LPCSTR pszAccountId); -} - -[ - object, - uuid(FD465484-1384-11D0-ABBD-0020AFDFD10A), - pointer_default(unique) -] -interface IPropertyContainer : IUnknown -{ - typedef enum - { - TYPE_ERROR = 1000, - TYPE_DWORD, - TYPE_LONG, - TYPE_WORD, - TYPE_SHORT, - TYPE_BYTE, - TYPE_CHAR, - TYPE_FILETIME, - TYPE_STRING, - TYPE_BINARY, - TYPE_FLAGS, - TYPE_STREAM, - TYPE_WSTRING, - TYPE_BOOL, - TYPE_PASS, - TYPE_LAST - } PROPTYPE; - -cpp_quote("#ifdef WINE_NO_UNICODE_MACROS") -cpp_quote("#undef GetProp") -cpp_quote("#undef SetProp") -cpp_quote("#endif") - - HRESULT GetProp( - [in] DWORD dwPropTag, - [in,size_is(*pcb),ref] BYTE *pb, - [in] ULONG *pcb); - - HRESULT GetPropDw( - [in] DWORD dwPropTag, - [out] DWORD *pdw); - - HRESULT GetPropSz( - [in] DWORD dwPropTag, - [in,ref] LPSTR psz, - [in] ULONG cchMax); - - HRESULT SetProp( - [in] DWORD dwPropTag, - [in,size_is(cb)] BYTE *pb, - [in] ULONG cb); - - HRESULT SetPropDw( - [in] DWORD dwPropTag, - [in] DWORD dw); - - HRESULT SetPropSz( - [in] DWORD dwPropTag, - [in] LPSTR psz); -} - -[ - object, - uuid(FD465482-1384-11D0-ABBD-0020AFDFD10A), - pointer_default(unique) -] -interface IImnAccount : IPropertyContainer -{ - HRESULT Exist(); - - HRESULT SetAsDefault(); - - HRESULT Delete(); - - HRESULT SaveChanges(); - - HRESULT GetAccountType( - [out] ACCTTYPE *pAcctType); - - HRESULT GetServerTypes( - [out] DWORD *pdwSrvTypes); - - HRESULT ShowProperties( - [in] HWND hwnd, - [in] DWORD dwFlags); - - HRESULT ValidateProperty( - [in] DWORD dwPropTag, - [in,size_is(cb)] BYTE *pb, - [in] ULONG cb); - - HRESULT DoWizard( - [in] HWND hwnd, - [in] DWORD dwFlags); - - HRESULT DoImportWizard( - [in] HWND hwnd, - [in] CLSID clsid, - [in] DWORD dwFlags); -} - -cpp_quote("HRESULT WINAPI HrCreateAccountManager(IImnAccountManager **ppAccountManager);") -cpp_quote("HRESULT WINAPI ValidEmailAddress(LPSTR lpAddress);") +/* + * Copyright 2006 Robert Shearman for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "objidl.idl"; + +interface IImnAccount; + +cpp_quote("#ifndef HR_E") +cpp_quote("#define HR_E(n) MAKE_SCODE(SEVERITY_ERROR, FACILITY_INTERNET, n)") +cpp_quote("#endif") +cpp_quote("#ifndef HR_S") +cpp_quote("#define HR_S(n) MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_INTERNET, n)") +cpp_quote("#endif") + +typedef enum tagSMTPAUTHTYPE +{ + SMTP_AUTH_NONE, + SMTP_AUTH_SICILY, + SMTP_AUTH_USE_POP3ORIMAP_SETTINGS, + SMTP_AUTH_USE_SMTP_SETTINGS, +} SMTPAUTHTYPE; + +const SHORT CCHMAX_ORG_NAME = 256; +const SHORT CCHMAX_DISPLAY_NAME = 256; +const SHORT CCHMAX_ACCOUNT_NAME = 256; +const SHORT CCHMAX_SERVER_NAME = 256; +const SHORT CCHMAX_PASSWORD = 256; +const SHORT CCHMAX_USERNAME = 256; +const SHORT CCHMAX_EMAIL_ADDRESS = 256; +const SHORT CCHMAX_CONNECTOID = 256; +const SHORT CCHMAX_SEARCH_BASE = 256; +const SHORT CCHMAX_ROOT_FOLDER = 256; +const SHORT CCHMAX_SIGNATURE = 16; +const SHORT CCHMAX_SERVICE = 256; + +[ + object, + uuid(0A06BD31-166F-11D0-81B9-00C04FD85AB4), + pointer_default(unique) +] +interface IImnAdviseAccount : IUnknown +{ + typedef enum + { + ACCT_NEWS, + ACCT_MAIL, + ACCT_DIR_SERV, + ACCT_LAST + } ACCTTYPE; + + typedef struct tagAccountContext + { + ACCTTYPE AcctType; + LPSTR pszAccountID; + LPSTR pszOldName; + DWORD dwServerType; + } ACTX; + + HRESULT AdviseAccount( + [in] DWORD dwAdviseType, + [in] ACTX *pAcctCtx); +} + +[ + object, + uuid(8D0AED11-1638-11D0-81B9-00C04FD85AB4), + pointer_default(unique) +] +interface IImnAdviseMigrateServer : IUnknown +{ + HRESULT MigrateServer( + [in] DWORD dwSrvType, + [in] IImnAccount *pAccount); +} + +[ + object, + uuid(FD465483-1384-11D0-ABBD-0020AFDFD10A), + pointer_default(unique) +] +interface IImnEnumAccounts : IUnknown +{ + HRESULT GetCount( + [out] ULONG *pcItems); + + HRESULT SortByAccountName(); + + HRESULT GetNext( + [out] IImnAccount **ppAccount); + + HRESULT Reset(); +} + +[ + object, + uuid(FD465481-1384-11D0-ABBD-0020AFDFD10A), + pointer_default(unique) +] +interface IImnAccountManager : IUnknown +{ + typedef struct tagACCTLISTINFO + { + DWORD cbSize; + ACCTTYPE AcctTypeInit; + DWORD dwAcctFlags; + DWORD dwFlags; + } ACCTLISTINFO; + + HRESULT Init( + [in] IImnAdviseMigrateServer *pAdviseMigrateServer); + + HRESULT CreateAccountObject( + [in] ACCTTYPE AcctType, + [out] IImnAccount **ppAccount); + + HRESULT Enumerate( + [in] DWORD dwSrvTypes, + [out] IImnEnumAccounts **ppEnumAccounts); + + HRESULT GetAccountCount( + [in] ACCTTYPE AcctType, + [out] ULONG *pcServers); + + HRESULT FindAccount( + [in] DWORD dwPropTag, + [in] LPCSTR pszSearchData, + [out] IImnAccount **ppAccount); + + HRESULT GetDefaultAccountName( + [in] ACCTTYPE AcctType, + [in,ref] LPSTR pszAccount, + [in] ULONG cchMax); + + HRESULT ProcessNotification( + [in] UINT uMsg, + [in] WPARAM wParam, + [in] LPARAM lParam); + + HRESULT ValidateDefaultSendAccount(); + + HRESULT AccountListDialog( + [in] HWND hwnd, + [in] ACCTLISTINFO *pinfo); + + HRESULT Advise( + [in] IImnAdviseAccount *pAdviseAccount, + [out] DWORD *pdwConnection); + + HRESULT Unadvise( + [in] DWORD dwConnection); + + HRESULT GetUniqueAccountName( + [in] LPSTR szName, + [in] UINT cch); + + HRESULT InitEx( + [in] IImnAdviseMigrateServer *pAdviseMigrateServer, + [in] DWORD dwFlags); +} + +[ + object, + uuid(C43DFC6F-62BB-11D2-A727-00C04F79E7C8), + pointer_default(unique) +] +interface IImnAccountManager2 : IImnAccountManager +{ + HRESULT InitUser( + [in] IImnAdviseMigrateServer *pAdviseMigrateServer, + [in] REFGUID rguidID, + [in] DWORD dwFlags); + + HRESULT GetIncompleteAccount( + [in] ACCTTYPE AcctType, + [in,ref] LPSTR pszAccountId, + [in] ULONG cchMax); + + HRESULT SetIncompleteAccount( + [in] ACCTTYPE AcctType, + [in] LPCSTR pszAccountId); +} + +[ + object, + uuid(FD465484-1384-11D0-ABBD-0020AFDFD10A), + pointer_default(unique) +] +interface IPropertyContainer : IUnknown +{ + typedef enum + { + TYPE_ERROR = 1000, + TYPE_DWORD, + TYPE_LONG, + TYPE_WORD, + TYPE_SHORT, + TYPE_BYTE, + TYPE_CHAR, + TYPE_FILETIME, + TYPE_STRING, + TYPE_BINARY, + TYPE_FLAGS, + TYPE_STREAM, + TYPE_WSTRING, + TYPE_BOOL, + TYPE_PASS, + TYPE_LAST + } PROPTYPE; + +cpp_quote("#ifdef WINE_NO_UNICODE_MACROS") +cpp_quote("#undef GetProp") +cpp_quote("#undef SetProp") +cpp_quote("#endif") + + HRESULT GetProp( + [in] DWORD dwPropTag, + [in,size_is(*pcb),ref] BYTE *pb, + [in] ULONG *pcb); + + HRESULT GetPropDw( + [in] DWORD dwPropTag, + [out] DWORD *pdw); + + HRESULT GetPropSz( + [in] DWORD dwPropTag, + [in,ref] LPSTR psz, + [in] ULONG cchMax); + + HRESULT SetProp( + [in] DWORD dwPropTag, + [in,size_is(cb)] BYTE *pb, + [in] ULONG cb); + + HRESULT SetPropDw( + [in] DWORD dwPropTag, + [in] DWORD dw); + + HRESULT SetPropSz( + [in] DWORD dwPropTag, + [in] LPSTR psz); +} + +[ + object, + uuid(FD465482-1384-11D0-ABBD-0020AFDFD10A), + pointer_default(unique) +] +interface IImnAccount : IPropertyContainer +{ + HRESULT Exist(); + + HRESULT SetAsDefault(); + + HRESULT Delete(); + + HRESULT SaveChanges(); + + HRESULT GetAccountType( + [out] ACCTTYPE *pAcctType); + + HRESULT GetServerTypes( + [out] DWORD *pdwSrvTypes); + + HRESULT ShowProperties( + [in] HWND hwnd, + [in] DWORD dwFlags); + + HRESULT ValidateProperty( + [in] DWORD dwPropTag, + [in,size_is(cb)] BYTE *pb, + [in] ULONG cb); + + HRESULT DoWizard( + [in] HWND hwnd, + [in] DWORD dwFlags); + + HRESULT DoImportWizard( + [in] HWND hwnd, + [in] CLSID clsid, + [in] DWORD dwFlags); +} + +cpp_quote("HRESULT WINAPI HrCreateAccountManager(IImnAccountManager **ppAccountManager);") +cpp_quote("HRESULT WINAPI ValidEmailAddress(LPSTR lpAddress);") diff --git a/reactos/include/psdk/imnxport.idl b/reactos/include/psdk/imnxport.idl index 8e0f465c589..50f3e4e08ce 100644 --- a/reactos/include/psdk/imnxport.idl +++ b/reactos/include/psdk/imnxport.idl @@ -1,699 +1,699 @@ -/* - * Copyright 2006 Robert Shearman for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -import "imnact.idl"; - -interface IInternetTransport; -interface ISMTPTransport; -interface IPOP3Transport; - -/* CLSIDs */ - -cpp_quote("DEFINE_GUID(CLSID_IInternetMessageUrl, 0xca30cc91, 0xb1b3, 0x11d0, 0x85, 0xd0, 0x00, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);") -cpp_quote("DEFINE_GUID(CLSID_ISMTPTransport, 0xfd853ce6, 0x7f86, 0x11d0, 0x82, 0x52, 0x00, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);") -cpp_quote("DEFINE_GUID(CLSID_IPOP3Transport, 0xfd853ce7, 0x7f86, 0x11d0, 0x82, 0x52, 0x00, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);") -cpp_quote("DEFINE_GUID(CLSID_INNTPTransport, 0xfd853ce8, 0x7f86, 0x11d0, 0x82, 0x52, 0x00, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);") -cpp_quote("DEFINE_GUID(CLSID_IRASTransport, 0xfd853ce9, 0x7f86, 0x11d0, 0x82, 0x52, 0x00, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);") -cpp_quote("DEFINE_GUID(CLSID_IRangeList, 0xfd853cea, 0x7f86, 0x11d0, 0x82, 0x52, 0x00, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);") -cpp_quote("DEFINE_GUID(CLSID_IIMAPTransport, 0xfd853ceb, 0x7f86, 0x11d0, 0x82, 0x52, 0x00, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);") -cpp_quote("DEFINE_GUID(CLSID_IHTTPMailTransport, 0x5a580c11, 0xe5eb, 0x11d1, 0xa8, 0x6e, 0x00, 0x00, 0xf8, 0x08, 0x4f, 0x96);") -cpp_quote("DEFINE_GUID(CLSID_IPropFindRequest, 0xbb847b8a, 0x054a, 0x11d2, 0xa8, 0x94, 0x00, 0x00, 0xf8, 0x08, 0x4f, 0x96);") -cpp_quote("DEFINE_GUID(CLSID_IPropPatchRequest, 0xea678830, 0x235d, 0x11d2, 0xa8, 0xb6, 0x00, 0x00, 0xf8, 0x08, 0x4f, 0x96);") - -/* Error Codes */ - -cpp_quote("#ifndef HR_E") -cpp_quote("#define HR_E(n) MAKE_SCODE(SEVERITY_ERROR, FACILITY_INTERNET, n)") -cpp_quote("#endif") -cpp_quote("#ifndef HR_S") -cpp_quote("#define HR_S(n) MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_INTERNET, n)") -cpp_quote("#endif") - -/* General Error Codes */ -cpp_quote("#define IXP_E_LOAD_SICILY_FAILED HR_E(0xCC00)") -cpp_quote("#define IXP_E_INVALID_CERT_CN HR_E(0xCC01)") -cpp_quote("#define IXP_E_INVALID_CERT_DATE HR_E(0xCC02)") -cpp_quote("#define IXP_E_ALREADY_CONNECTED HR_E(0xCC03)") -cpp_quote("#define IXP_E_CONN HR_E(0xCC04)") -cpp_quote("#define IXP_E_NOT_CONNECTED HR_E(0xCC05)") -cpp_quote("#define IXP_E_CONN_SEND HR_E(0xCC06)") -cpp_quote("#define IXP_E_WOULD_BLOCK HR_E(0xCC07)") -cpp_quote("#define IXP_E_INVALID_STATE HR_E(0xCC08)") -cpp_quote("#define IXP_E_CONN_RECV HR_E(0xCC09)") -cpp_quote("#define IXP_E_INCOMPLETE HR_E(0xCC0A)") -cpp_quote("#define IXP_E_BUSY HR_E(0xCC0B)") -cpp_quote("#define IXP_E_NOT_INIT HR_E(0xCC0C)") -cpp_quote("#define IXP_E_CANT_FIND_HOST HR_E(0xCC0D)") -cpp_quote("#define IXP_E_FAILED_TO_CONNECT HR_E(0xCC0E)") -cpp_quote("#define IXP_E_CONNECTION_DROPPED HR_E(0xCC0F)") -cpp_quote("#define IXP_E_INVALID_ADDRESS HR_E(0xCC10)") -cpp_quote("#define IXP_E_INVALID_ADDRESS_LIST HR_E(0xCC11)") -cpp_quote("#define IXP_E_SOCKET_READ_ERROR HR_E(0xCC12)") -cpp_quote("#define IXP_E_SOCKET_WRITE_ERROR HR_E(0xCC13)") -cpp_quote("#define IXP_E_SCOKET_INIT_ERROR HR_E(0xCC14)") -cpp_quote("#define IXP_E_SOCKET_CONNECT_ERROR HR_E(0xCC15)") -cpp_quote("#define IXP_E_INVALID_ACCOUNT HR_E(0xCC16)") -cpp_quote("#define IXP_E_USER_CANCEL HR_E(0xCC17)") -cpp_quote("#define IXP_E_SICILY_LOGON_FAILED HR_E(0xCC18)") -cpp_quote("#define IXP_E_TIMEOUT HR_E(0xCC19)") -cpp_quote("#define IXP_E_SECURE_CONNECT_FAILED HR_E(0xCC1A)") - -/* SMTP Failure Statuses */ -cpp_quote("#define IXP_E_SMTP_RESPONSE_ERROR HR_E(0xCC60)") -cpp_quote("#define IXP_E_SMTP_UNKNOWN_RESPONSE_CODE HR_E(0xCC61)") -cpp_quote("#define IXP_E_SMTP_500_SYNTAX_ERROR HR_E(0xCC62)") -cpp_quote("#define IXP_E_SMTP_501_PARAM_SYNTAX HR_E(0xCC63)") -cpp_quote("#define IXP_E_SMTP_502_COMMAND_NOTIMPL HR_E(0xCC64)") -cpp_quote("#define IXP_E_SMTP_503_COMMAND_SEQ HR_E(0xCC65)") -cpp_quote("#define IXP_E_SMTP_504_COMMAND_PARAM_NOTIMPL HR_E(0xCC66)") -cpp_quote("#define IXP_E_SMTP_421_NOT_AVAILABLE HR_E(0xCC67)") -cpp_quote("#define IXP_E_SMTP_450_MAILBOX_BUSY HR_E(0xCC68)") -cpp_quote("#define IXP_E_SMTP_550_MAILBOX_NOT_FOUND HR_E(0xCC69)") -cpp_quote("#define IXP_E_SMTP_451_ERROR_PROCESSING HR_E(0xCC6A)") -cpp_quote("#define IXP_E_SMTP_551_USER_NOT_LOCAL HR_E(0xCC6B)") -cpp_quote("#define IXP_E_SMTP_452_NO_SYSTEM_STORAGE HR_E(0xCC6C)") -cpp_quote("#define IXP_E_SMTP_552_STORAGE_OVERFLOW HR_E(0xCC6D)") -cpp_quote("#define IXP_E_SMTP_553_MAILBOX_NAME_SYNTAX HR_E(0xCC6E)") -cpp_quote("#define IXP_E_SMTP_554_TRANSACT_FAILED HR_E(0xCC6F)") - -/* SMTP Success Statuses */ -cpp_quote("#define IXP_E_SMTP_211_SYSTEM_STATUS HR_S(0xCC70)") -cpp_quote("#define IXP_E_SMTP_214_HELP_MESSAGE HR_S(0xCC71)") -cpp_quote("#define IXP_E_SMTP_220_READY HR_S(0xCC72)") -cpp_quote("#define IXP_E_SMTP_221_CLOSING HR_S(0xCC73)") -cpp_quote("#define IXP_E_SMTP_250_MAIL_ACTION_OKAY HR_S(0xCC74)") -cpp_quote("#define IXP_E_SMTP_251_FORWARDING_MAIL HR_S(0xCC75)") -cpp_quote("#define IXP_E_SMTP_354_START_MAIL_INPUT HR_S(0xCC76)") -cpp_quote("#define IXP_E_SMTP_CONTINUE HR_S(0xCC77)") -cpp_quote("#define IXP_E_SMTP_334_AUTH_READY_RESPONSE HR_S(0xCC78)") -cpp_quote("#define IXP_E_SMTP_245_AUTH_SUCCESS HR_S(0xCC79)") - -/* More SMTP Failure Statuses */ -cpp_quote("#define IXP_E_SMTP_REJECTED_SENDER HR_E(0xCC78)") -cpp_quote("#define IXP_E_SMTP_REJECTED_RECIPIENTS HR_E(0xCC79)") -cpp_quote("#define IXP_E_SMTP_NO_SENDER HR_E(0xCC7A)") -cpp_quote("#define IXP_E_SMTP_NO_RECIPIENTS HR_E(0xCC7B)") -cpp_quote("#define IXP_E_SMTP_530_STARTTLS_REQUIRED HR_E(0xCC7C)") -cpp_quote("#define IXP_E_SMTP_NO_STARTTLS_SUPPORT HR_E(0xCC7D)") -cpp_quote("#define IXP_E_SMTP_NO_DSN_SUPPORT HR_E(0xCC7E)") -cpp_quote("#define IXP_E_SMTP_454_STARTTLS_FAILED HR_E(0xCC7F)") - -const SHORT CCHMAX_DOMAIN = 256; -const SHORT CCHMAX_PHONE_NUMBER = 128; - -const DWORD DEFAULT_IMAP_PORT = 143; -const DWORD DEFAULT_POP3_PORT = 110; -const DWORD DEFAULT_SMTP_PORT = 25; -const DWORD DEFAULT_NNTP_PORT = 119; - -typedef enum tagINETADDRTYPE -{ - ADDR_TO, - ADDR_FROM, - ADDR_DSN_NEVER = 16, - ADDR_DSN_SUCCESS = 32, - ADDR_DSN_FAILURE = 64, - ADDR_DSN_DELAY = 128 -} INETADDRTYPE; - -const DWORD ADDR_TOFROM_MASK = 0x1; -const DWORD ADDR_DSN_MASK = 0xf0; - -typedef enum tagDSNRET -{ - DSNRET_DEFAULT, - DSNRET_HDRS, - DSNRET_FULL, -} DSNRET; - -typedef struct tagINETADDR -{ - INETADDRTYPE addrtype; - CHAR szEmail[CCHMAX_EMAIL_ADDRESS]; -} INETADDR, *LPINETADDR; - -typedef struct tagINETADDRLIST -{ - ULONG cAddress; - LPINETADDR prgAddress; -} INETADDRLIST, *LPINETADDRLIST; - -typedef enum tagRASCONNTYPE -{ - RAS_CONNECT_LAN, - RAS_CONNECT_MANUAL, - RAS_CONNECT_RAS -} RASCONNTYPE; - -typedef enum tagHTTPMAILPROPTYPE -{ - HTTPMAIL_PROP_INVALID, - HTTPMAIL_PROP_ADBAR, - HTTPMAIL_PROP_CONTACTS, - HTTPMAIL_PROP_INBOX, - HTTPMAIL_PROP_OUTBOX, - HTTPMAIL_PROP_SENDMSG, - HTTPMAIL_PROP_SENTITEMS, - HTTPMAIL_PROP_DELETEDITEMS, - HTTPMAIL_PROP_DRAFTS, - HTTPMAIL_PROP_MSGFOLDERROOT, - HTTPMAIL_PROP_SIG, - HTTPMAIL_PROP_LAST -} HTTPMAILPROPTYPE; - -typedef enum tagHTTPMAILSPECIALFOLDER -{ - HTTPMAIL_SF_NONE, - HTTPMAIL_SF_UNRECOGNIZED, - HTTPMAIL_SF_INBOX, - HTTPMAIL_SF_DELETEDITEMS, - HTTPMAIL_SF_DRAFTS, - HTTPMAIL_SF_OUTBOX, - HTTPMAIL_SF_SENTITEMS, - HTTPMAIL_SF_CONTACTS, - HTTPMAIL_SF_CALENDAR, - HTTPMAIL_SF_MSNPROMO, - HTTPMAIL_SF_LAST -} HTTPMAILSPECIALFOLDER; - -typedef enum tagHTTPMAILCONTACTTYPE -{ - HTTPMAIL_CT_CONTACT, - HTTPMAIL_CT_GROUP, - HTTPMAIL_CT_LAST -} HTTPMAILCONTACTTYPE; - -const DWORD DAVNAMESPACE_UNKNOWN = 0xFFFFFFFF; -const DWORD DAVNAMESPACE_DAV = 0; -const DWORD DAVNAMESPACE_HOTMAIL = 1; -const DWORD DAVNAMESPACE_HTTPMAIL = 2; -const DWORD DAVNAMESPACE_MAIL = 3; -const DWORD DAVNAMESPACE_CONTACTS = 4; - -cpp_quote("#define ISF_SMTP_USEIPFORHELO 0x01") -cpp_quote("#define ISF_ALWAYSPROMPTFORPASSWORD 0x02") -/* for SMTP - send EHLO and use STARTTLS if available: */ -cpp_quote("#define ISF_SSLONSAMEPORT 0x04") -cpp_quote("#define ISF_QUERYDSNSUPPORT 0x08") -/* for SMTP - send EHLO and use AUTH if available: */ -cpp_quote("#define ISF_QUERYAUTHSUPPORT 0x10") - -typedef struct INETSERVER -{ - CHAR szAccount[CCHMAX_ACCOUNT_NAME]; - CHAR szUserName[CCHMAX_USERNAME]; - CHAR szPassword[CCHMAX_PASSWORD]; - CHAR szServerName[CCHMAX_SERVER_NAME]; - CHAR szConnectoid[CCHMAX_CONNECTOID]; - RASCONNTYPE rasconntype; - DWORD dwPort; - BOOL fSSL; - BOOL fTrySicily; - DWORD dwTimeout; - DWORD dwFlags; -} INETSERVER, *LPINETSERVER; - -typedef enum tagIXPTYPE -{ - IXP_NNTP, - IXP_SMTP, - IXP_POP3, - IXP_IMAP, - IXP_RAS, - IXP_HTTPMail -} IXPTYPE; - -typedef enum tagIXPSTATUS -{ - IXP_FINDINGHOST, - IXP_CONNECTING, - IXP_SECURING, - IXP_CONNECTED, - IXP_AUTHORIZING, - IXP_AUTHRETRY, - IXP_AUTHORIZED, - IXP_DISCONNECTING, - IXP_DISCONNECTED, - IXP_LAST -} IXPSTATUS; - -const DWORD DEPTH_INFINITY = 0xFFFFFFFE; - -typedef DWORD MEMBERINFOFLAGS; - -const MEMBERINFOFLAGS HTTP_MEMBERINFO_COMMONPROPS = 0x0; -const MEMBERINFOFLAGS HTTP_MEMBERINFO_FOLDERPROPS = 0x1; -const MEMBERINFOFLAGS HTTP_MEMBERINFO_MESSAGEPROPS = 0x2; -const MEMBERINFOFLAGS HTTP_MEMBERINFO_ALLPROPS = HTTP_MEMBERINFO_FOLDERPROPS | HTTP_MEMBERINFO_MESSAGEPROPS; - -typedef DWORD IMAP_MSGFLAGS; - -const IMAP_MSGFLAGS IMAP_MSG_NOFLAGS = 0x00; -const IMAP_MSGFLAGS IMAP_MSG_ANSWERED = 0x01; -const IMAP_MSGFLAGS IMAP_MSG_FLAGGED = 0x02; -const IMAP_MSGFLAGS IMAP_MSG_DELETED = 0x04; -const IMAP_MSGFLAGS IMAP_MSG_SEEN = 0x08; -const IMAP_MSGFLAGS IMAP_MSG_DRAFT = 0x10; -const IMAP_MSGFLAGS IMAP_MSG_ALLFLAGS = 0x1f; - -[ - object, - uuid(CA30F3FF-C9AC-11D1-9A3A-00C04FA309D4), - local -] -interface ITransportCallbackService : IUnknown -{ - HRESULT GetParentWindow( - [in] DWORD dwReserved, - [out] HWND *phwndParent); - - HRESULT GetAccount( - [out] LPDWORD pdwServerType, - [out] IImnAccount **ppAccount); -} - -[ - object, - uuid(0DF2C7E1-3435-11D0-81D0-00C04FD85AB4), - local -] -interface ITransportCallback : IUnknown -{ - typedef struct tagIXPRESULT - { - HRESULT hrResult; - LPSTR pszResponse; - UINT uiServerError; - HRESULT hrServerError; - DWORD dwSocketError; - LPSTR pszProblem; - } IXPRESULT, *LPIXPRESULT; - - typedef enum tagCMDTYPE - { - CMD_SEND, - CMD_RESP - } CMDTYPE; - - HRESULT OnTimeout( - [in,out] DWORD *pdwTimeout, - [in] IInternetTransport *pTransport); - - HRESULT OnLogonPrompt( - [in,out] LPINETSERVER pInetServer, - [in] IInternetTransport *pTransport); - - INT OnPrompt( - [in] HRESULT hrError, - [in] LPCSTR pszText, - [in] LPCSTR pszCaption, - [in] UINT uType, - [in] IInternetTransport *pTransport); - - HRESULT OnStatus( - [in] IXPSTATUS ixpstatus, - [in] IInternetTransport *pTransport); - - HRESULT OnError( - [in] IXPSTATUS ixpstatus, - [in] LPIXPRESULT pResult, - [in] IInternetTransport *pTransport); - - HRESULT OnCommand( - [in] CMDTYPE cmdtype, - [in] LPSTR pszLine, - [in] HRESULT hrResponse, - [in] IInternetTransport *pTransport); -} - -[ - object, - uuid(1F636C01-364E-11D0-81D3-00C04FD85AB4), - local -] -interface IInternetTransport : IUnknown -{ - const boolean iitAUTHENTICATE = TRUE; - const boolean iitDONT_AUTHENTICATe = FALSE; - const boolean iitENABLE_ONCOMMAND = TRUE; - const boolean iitDISABLE_ONCOMMAND = FALSE; - - typedef enum tagIXPISSTATE - { - IXP_IS_CONNECTED, - IXP_IS_BUSY, - IXP_IS_READY, - IXP_IS_AUTHENTICATED - } IXPISSTATE; - - HRESULT GetServerInfo( - [in,out] LPINETSERVER pInetServer); - - IXPTYPE GetIXPType(); - - HRESULT IsState( - [in] IXPISSTATE isstate); - - HRESULT InetServerFromAccount( - [in] IImnAccount *pAccount, - [in,out] LPINETSERVER pInetServer); - - HRESULT Connect( - [in] LPINETSERVER pInetServer, - [in] boolean fAuthenticate, - [in] boolean fCommandLogging); - - HRESULT HandsOffCallback(); - - HRESULT Disconnect(); - - HRESULT DropConnection(); - - HRESULT GetStatus( - [out] IXPSTATUS *pCurrentStatus); -} - -[ - object, - uuid(1F636C02-364E-11D0-81D3-00C04FD85AB4), - local -] -interface ISMTPCallback : ITransportCallback -{ - typedef enum tagSMTPCOMMAND - { - SMTP_NONE, - SMTP_BANNER, - SMTP_CONNECTED, - SMTP_SEND_MESSAGE, - SMTP_AUTH, - SMTP_EHLO, - SMTP_HELO, - SMTP_MAIL, - SMTP_RCPT, - SMTP_RSET, - SMTP_QUIT, - SMTP_DATA, - SMTP_DOT, - SMTP_SEND_STREAM, - SMTP_CUSTOM - } SMTPCOMMAND; - - typedef struct tagSMTPSTREAM - { - DWORD cbIncrement; - DWORD cbCurrent; - DWORD cbTotal; - } SMTPSTREAM, *LPSMTPSTREAM; - - typedef struct tagSMTPRESPONSE - { - SMTPCOMMAND command; - BOOL fDone; - IXPRESULT rIxpResult; - ISMTPTransport *pTransport; - - [switch_type(SMTPCOMMAND), switch_is(command)] - union - { - [case(SMTP_SEND_STREAM)] SMTPSTREAM rStreamInfo; - [default]; - }; - } SMTPRESPONSE, *LPSMTPRESPONSE; - - HRESULT OnResponse( - [in] LPSMTPRESPONSE pResponse); -} - -[ - object, - uuid(0DF2C7E2-3435-11D0-81D0-00C04FD85AB4), - local -] -interface ISMTPTransport : IInternetTransport -{ - typedef struct tagSMTPMESSAGE - { - ULONG cbSize; - LPSTREAM pstmMsg; - INETADDRLIST rAddressList; - } SMTPMESSAGE, *LPSMTPMESSAGE; - - HRESULT InitNew( - [in] LPSTR pszLogFilePath, - [in] ISMTPCallback *pCallback); - -cpp_quote("#ifdef WINE_NO_UNICODE_MACROS") -cpp_quote("#undef SendMessage") -cpp_quote("#endif") - - HRESULT SendMessage( - [in] LPSMTPMESSAGE pMessage); - - HRESULT CommandMAIL( - [in] LPSTR pszEmailFrom); - - HRESULT CommandRCPT( - [in] LPSTR pszEmailTo); - - HRESULT CommandEHLO(); - - HRESULT CommandHELO(); - - HRESULT CommandAUTH( - [in] LPSTR pszAuthType); - - HRESULT CommandQUIT(); - - HRESULT CommandRSET(); - - HRESULT CommandDATA(); - - HRESULT CommandDOT(); - - HRESULT SendDataStream( - [in] IStream *pStream, - [in] ULONG cbSize); -} - -[ - object, - uuid(0DF2C7EC-3435-11D0-81D0-00C04FD85AB4), - local -] -interface ISMTPTransport2 : ISMTPTransport -{ - typedef struct tagSMTPMESSAGE2 - { - SMTPMESSAGE smtpMsg; - LPSTR pszDSNENVID; - DSNRET dsnRet; - DWORD dwReserved; - DWORD dwReserved2; - } SMTPMESSAGE2, *LPSMTPMESSAGE2; - - HRESULT SetWindow(); - - HRESULT ResetWindow(); - - HRESULT SendMessage2( - [in] LPSMTPMESSAGE2 pMessage); - - HRESULT CommandRCPT2( - [in] LPSTR pszEmailTo, - [in] INETADDRTYPE atDSN); -} - -/* FIXME: IDAVNamespaceArbiter, IPropPatchRequest, IPropFindRequest, IPropFindMultiResponse, IPropFindResponse, IHTTPMailCallback, IHTTPMailTransport */ - -[ - object, - uuid(0DF2C7E3-3435-11D0-81D0-00C04FD85AB4), - local -] -interface IPOP3Callback : ITransportCallback -{ - typedef enum tagPOP3COMMAND - { - POP3_NONE, - POP3_BANNER, - POP3_CONNECTED, - POP3_USER, - POP3_PASS, - POP3_AUTH, - POP3_UIDL, - POP3_STAT, - POP3_LIST, - POP3_DELE, - POP3_RETR, - POP3_TOP, - POP3_NOOP, - POP3_QUIT, - POP3_RSET, - POP3_CUSTOM - } POP3COMMAND; - - typedef struct tagPOP3RETR - { - BOOL fHeader; - BOOL fBody; - DWORD dwPopId; - DWORD cbSoFar; - LPSTR pszLines; - ULONG cbLines; - } POP3RETR, *LPPOP3RETR; - - typedef struct tagPOP3TOP - { - BOOL fHeader; - BOOL fBody; - DWORD dwPopId; - DWORD cPreviewLines; - DWORD cbSoFar; - LPSTR pszLines; - ULONG cbLines; - } POP3TOP, *LPPOP3TOP; - - typedef struct tagPOP3LIST - { - DWORD dwPopId; - DWORD cbSize; - } POP3LIST, *LPPOP3LIST; - - typedef struct tagPOP3UIDL - { - DWORD dwPopId; - LPSTR pszUidl; - } POP3UIDL, *LPPOP3UIDL; - - typedef struct tagPOP3STAT - { - DWORD cMessages; - DWORD cbMessages; - } POP3STAT, *LPPOP3STAT; - - typedef struct tagPOP3RESPONSE - { - POP3COMMAND command; - BOOL fDone; - IXPRESULT rIxpResult; - IPOP3Transport *pTransport; - BOOL fValidInfo; - [switch_type(POP3COMMAND), switch_is(command)] - union - { - [case(POP3_UIDL)] POP3UIDL rUidlInfo; - [case(POP3_STAT)] POP3STAT rStatInfo; - [case(POP3_LIST)] POP3LIST rListInfo; - [case(POP3_DELE)] DWORD dwPopId; - [case(POP3_RETR)] POP3RETR rRetrInfo; - [case(POP3_TOP)] POP3TOP rTopInfo; - [default]; - }; - } POP3RESPONSE, *LPPOP3RESPONSE; - - HRESULT OnResponse( - [in] LPPOP3RESPONSE pResponse); -} - -[ - object, - uuid(0DF2C7E4-3435-11D0-81D0-00C04FD85AB4), - local -] -interface IPOP3Transport : IInternetTransport -{ - typedef enum tagPOP3CMDTYPE - { - POP3CMD_GET_POPID, - POP3CMD_GET_MARKED, - POP3CMD_GET_ALL - } POP3CMDTYPE; - - typedef enum tagPOP3MARKTYPE - { - POP3_MARK_FOR_TOP = 0x01, - POP3_MARK_FOR_RETR = 0x02, - POP3_MARK_FOR_DELE = 0x04, - POP3_MARK_FOR_UIDL = 0x08, - POP3_MARK_FOR_LIST = 0x10 - } POP3MARKTYPE; - - HRESULT InitNew( - [in] LPSTR pszLogFilePath, - [in] IPOP3Callback *pCallback); - - HRESULT MarkItem( - [in] POP3MARKTYPE marktype, - [in] DWORD dwPopId, - [in] boolean fMarked); - - HRESULT CommandAUTH( - [in] LPSTR pszAuthType); - - HRESULT CommandUSER( - [in] LPSTR pszUserName); - - HRESULT CommandPASS( - [in] LPSTR pszPassword); - - HRESULT CommandLIST( - [in] POP3CMDTYPE cmdtype, - [in] DWORD dwPopId); - - HRESULT CommandTOP( - [in] POP3CMDTYPE cmdtype, - [in] DWORD dwPopId, - [in] DWORD cPreviewLines); - - HRESULT CommandQUIT(); - - HRESULT CommandSTAT(); - - HRESULT CommandNOOP(); - - HRESULT CommandRSET(); - - HRESULT CommandUIDL( - [in] POP3CMDTYPE cmdtype, - [in] DWORD dwPopId); - - HRESULT CommandDELE( - [in] POP3CMDTYPE cmdtype, - [in] DWORD dwPopId); - - HRESULT CommandRETR( - [in] POP3CMDTYPE cmdtype, - [in] DWORD dwPopId); -} - -/* FIXME: INNTPCallback, INNTPTransport */ - -/* FIXME: IRangeList */ - -/* FIXME: IIMAPCallback, IIMAPTransport */ - -#if 0 -cpp_quote("HRESULT WINAPI CreateRASTransport(IRASTransport **ppTransport);") -cpp_quote("HRESULT WINAPI CreateNNTPTransport(INNTPTransport **ppTransport);") -cpp_quote("HRESULT WINAPI CreateIMAPTransport(IIMAPTransport **ppTransport);") -cpp_quote("HRESULT WINAPI CreateIMAPTransport2(IIMAPTransport2 **ppTransport);") -cpp_quote("HRESULT WINAPI CreateRangeList(IRangeList **ppRangeList);") -#endif -cpp_quote("HRESULT WINAPI CreateSMTPTransport(ISMTPTransport **ppTransport);") -cpp_quote("HRESULT WINAPI CreatePOP3Transport(IPOP3Transport **ppTransport);") +/* + * Copyright 2006 Robert Shearman for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "imnact.idl"; + +interface IInternetTransport; +interface ISMTPTransport; +interface IPOP3Transport; + +/* CLSIDs */ + +cpp_quote("DEFINE_GUID(CLSID_IInternetMessageUrl, 0xca30cc91, 0xb1b3, 0x11d0, 0x85, 0xd0, 0x00, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);") +cpp_quote("DEFINE_GUID(CLSID_ISMTPTransport, 0xfd853ce6, 0x7f86, 0x11d0, 0x82, 0x52, 0x00, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);") +cpp_quote("DEFINE_GUID(CLSID_IPOP3Transport, 0xfd853ce7, 0x7f86, 0x11d0, 0x82, 0x52, 0x00, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);") +cpp_quote("DEFINE_GUID(CLSID_INNTPTransport, 0xfd853ce8, 0x7f86, 0x11d0, 0x82, 0x52, 0x00, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);") +cpp_quote("DEFINE_GUID(CLSID_IRASTransport, 0xfd853ce9, 0x7f86, 0x11d0, 0x82, 0x52, 0x00, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);") +cpp_quote("DEFINE_GUID(CLSID_IRangeList, 0xfd853cea, 0x7f86, 0x11d0, 0x82, 0x52, 0x00, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);") +cpp_quote("DEFINE_GUID(CLSID_IIMAPTransport, 0xfd853ceb, 0x7f86, 0x11d0, 0x82, 0x52, 0x00, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);") +cpp_quote("DEFINE_GUID(CLSID_IHTTPMailTransport, 0x5a580c11, 0xe5eb, 0x11d1, 0xa8, 0x6e, 0x00, 0x00, 0xf8, 0x08, 0x4f, 0x96);") +cpp_quote("DEFINE_GUID(CLSID_IPropFindRequest, 0xbb847b8a, 0x054a, 0x11d2, 0xa8, 0x94, 0x00, 0x00, 0xf8, 0x08, 0x4f, 0x96);") +cpp_quote("DEFINE_GUID(CLSID_IPropPatchRequest, 0xea678830, 0x235d, 0x11d2, 0xa8, 0xb6, 0x00, 0x00, 0xf8, 0x08, 0x4f, 0x96);") + +/* Error Codes */ + +cpp_quote("#ifndef HR_E") +cpp_quote("#define HR_E(n) MAKE_SCODE(SEVERITY_ERROR, FACILITY_INTERNET, n)") +cpp_quote("#endif") +cpp_quote("#ifndef HR_S") +cpp_quote("#define HR_S(n) MAKE_SCODE(SEVERITY_SUCCESS, FACILITY_INTERNET, n)") +cpp_quote("#endif") + +/* General Error Codes */ +cpp_quote("#define IXP_E_LOAD_SICILY_FAILED HR_E(0xCC00)") +cpp_quote("#define IXP_E_INVALID_CERT_CN HR_E(0xCC01)") +cpp_quote("#define IXP_E_INVALID_CERT_DATE HR_E(0xCC02)") +cpp_quote("#define IXP_E_ALREADY_CONNECTED HR_E(0xCC03)") +cpp_quote("#define IXP_E_CONN HR_E(0xCC04)") +cpp_quote("#define IXP_E_NOT_CONNECTED HR_E(0xCC05)") +cpp_quote("#define IXP_E_CONN_SEND HR_E(0xCC06)") +cpp_quote("#define IXP_E_WOULD_BLOCK HR_E(0xCC07)") +cpp_quote("#define IXP_E_INVALID_STATE HR_E(0xCC08)") +cpp_quote("#define IXP_E_CONN_RECV HR_E(0xCC09)") +cpp_quote("#define IXP_E_INCOMPLETE HR_E(0xCC0A)") +cpp_quote("#define IXP_E_BUSY HR_E(0xCC0B)") +cpp_quote("#define IXP_E_NOT_INIT HR_E(0xCC0C)") +cpp_quote("#define IXP_E_CANT_FIND_HOST HR_E(0xCC0D)") +cpp_quote("#define IXP_E_FAILED_TO_CONNECT HR_E(0xCC0E)") +cpp_quote("#define IXP_E_CONNECTION_DROPPED HR_E(0xCC0F)") +cpp_quote("#define IXP_E_INVALID_ADDRESS HR_E(0xCC10)") +cpp_quote("#define IXP_E_INVALID_ADDRESS_LIST HR_E(0xCC11)") +cpp_quote("#define IXP_E_SOCKET_READ_ERROR HR_E(0xCC12)") +cpp_quote("#define IXP_E_SOCKET_WRITE_ERROR HR_E(0xCC13)") +cpp_quote("#define IXP_E_SCOKET_INIT_ERROR HR_E(0xCC14)") +cpp_quote("#define IXP_E_SOCKET_CONNECT_ERROR HR_E(0xCC15)") +cpp_quote("#define IXP_E_INVALID_ACCOUNT HR_E(0xCC16)") +cpp_quote("#define IXP_E_USER_CANCEL HR_E(0xCC17)") +cpp_quote("#define IXP_E_SICILY_LOGON_FAILED HR_E(0xCC18)") +cpp_quote("#define IXP_E_TIMEOUT HR_E(0xCC19)") +cpp_quote("#define IXP_E_SECURE_CONNECT_FAILED HR_E(0xCC1A)") + +/* SMTP Failure Statuses */ +cpp_quote("#define IXP_E_SMTP_RESPONSE_ERROR HR_E(0xCC60)") +cpp_quote("#define IXP_E_SMTP_UNKNOWN_RESPONSE_CODE HR_E(0xCC61)") +cpp_quote("#define IXP_E_SMTP_500_SYNTAX_ERROR HR_E(0xCC62)") +cpp_quote("#define IXP_E_SMTP_501_PARAM_SYNTAX HR_E(0xCC63)") +cpp_quote("#define IXP_E_SMTP_502_COMMAND_NOTIMPL HR_E(0xCC64)") +cpp_quote("#define IXP_E_SMTP_503_COMMAND_SEQ HR_E(0xCC65)") +cpp_quote("#define IXP_E_SMTP_504_COMMAND_PARAM_NOTIMPL HR_E(0xCC66)") +cpp_quote("#define IXP_E_SMTP_421_NOT_AVAILABLE HR_E(0xCC67)") +cpp_quote("#define IXP_E_SMTP_450_MAILBOX_BUSY HR_E(0xCC68)") +cpp_quote("#define IXP_E_SMTP_550_MAILBOX_NOT_FOUND HR_E(0xCC69)") +cpp_quote("#define IXP_E_SMTP_451_ERROR_PROCESSING HR_E(0xCC6A)") +cpp_quote("#define IXP_E_SMTP_551_USER_NOT_LOCAL HR_E(0xCC6B)") +cpp_quote("#define IXP_E_SMTP_452_NO_SYSTEM_STORAGE HR_E(0xCC6C)") +cpp_quote("#define IXP_E_SMTP_552_STORAGE_OVERFLOW HR_E(0xCC6D)") +cpp_quote("#define IXP_E_SMTP_553_MAILBOX_NAME_SYNTAX HR_E(0xCC6E)") +cpp_quote("#define IXP_E_SMTP_554_TRANSACT_FAILED HR_E(0xCC6F)") + +/* SMTP Success Statuses */ +cpp_quote("#define IXP_E_SMTP_211_SYSTEM_STATUS HR_S(0xCC70)") +cpp_quote("#define IXP_E_SMTP_214_HELP_MESSAGE HR_S(0xCC71)") +cpp_quote("#define IXP_E_SMTP_220_READY HR_S(0xCC72)") +cpp_quote("#define IXP_E_SMTP_221_CLOSING HR_S(0xCC73)") +cpp_quote("#define IXP_E_SMTP_250_MAIL_ACTION_OKAY HR_S(0xCC74)") +cpp_quote("#define IXP_E_SMTP_251_FORWARDING_MAIL HR_S(0xCC75)") +cpp_quote("#define IXP_E_SMTP_354_START_MAIL_INPUT HR_S(0xCC76)") +cpp_quote("#define IXP_E_SMTP_CONTINUE HR_S(0xCC77)") +cpp_quote("#define IXP_E_SMTP_334_AUTH_READY_RESPONSE HR_S(0xCC78)") +cpp_quote("#define IXP_E_SMTP_245_AUTH_SUCCESS HR_S(0xCC79)") + +/* More SMTP Failure Statuses */ +cpp_quote("#define IXP_E_SMTP_REJECTED_SENDER HR_E(0xCC78)") +cpp_quote("#define IXP_E_SMTP_REJECTED_RECIPIENTS HR_E(0xCC79)") +cpp_quote("#define IXP_E_SMTP_NO_SENDER HR_E(0xCC7A)") +cpp_quote("#define IXP_E_SMTP_NO_RECIPIENTS HR_E(0xCC7B)") +cpp_quote("#define IXP_E_SMTP_530_STARTTLS_REQUIRED HR_E(0xCC7C)") +cpp_quote("#define IXP_E_SMTP_NO_STARTTLS_SUPPORT HR_E(0xCC7D)") +cpp_quote("#define IXP_E_SMTP_NO_DSN_SUPPORT HR_E(0xCC7E)") +cpp_quote("#define IXP_E_SMTP_454_STARTTLS_FAILED HR_E(0xCC7F)") + +const SHORT CCHMAX_DOMAIN = 256; +const SHORT CCHMAX_PHONE_NUMBER = 128; + +const DWORD DEFAULT_IMAP_PORT = 143; +const DWORD DEFAULT_POP3_PORT = 110; +const DWORD DEFAULT_SMTP_PORT = 25; +const DWORD DEFAULT_NNTP_PORT = 119; + +typedef enum tagINETADDRTYPE +{ + ADDR_TO, + ADDR_FROM, + ADDR_DSN_NEVER = 16, + ADDR_DSN_SUCCESS = 32, + ADDR_DSN_FAILURE = 64, + ADDR_DSN_DELAY = 128 +} INETADDRTYPE; + +const DWORD ADDR_TOFROM_MASK = 0x1; +const DWORD ADDR_DSN_MASK = 0xf0; + +typedef enum tagDSNRET +{ + DSNRET_DEFAULT, + DSNRET_HDRS, + DSNRET_FULL, +} DSNRET; + +typedef struct tagINETADDR +{ + INETADDRTYPE addrtype; + CHAR szEmail[CCHMAX_EMAIL_ADDRESS]; +} INETADDR, *LPINETADDR; + +typedef struct tagINETADDRLIST +{ + ULONG cAddress; + LPINETADDR prgAddress; +} INETADDRLIST, *LPINETADDRLIST; + +typedef enum tagRASCONNTYPE +{ + RAS_CONNECT_LAN, + RAS_CONNECT_MANUAL, + RAS_CONNECT_RAS +} RASCONNTYPE; + +typedef enum tagHTTPMAILPROPTYPE +{ + HTTPMAIL_PROP_INVALID, + HTTPMAIL_PROP_ADBAR, + HTTPMAIL_PROP_CONTACTS, + HTTPMAIL_PROP_INBOX, + HTTPMAIL_PROP_OUTBOX, + HTTPMAIL_PROP_SENDMSG, + HTTPMAIL_PROP_SENTITEMS, + HTTPMAIL_PROP_DELETEDITEMS, + HTTPMAIL_PROP_DRAFTS, + HTTPMAIL_PROP_MSGFOLDERROOT, + HTTPMAIL_PROP_SIG, + HTTPMAIL_PROP_LAST +} HTTPMAILPROPTYPE; + +typedef enum tagHTTPMAILSPECIALFOLDER +{ + HTTPMAIL_SF_NONE, + HTTPMAIL_SF_UNRECOGNIZED, + HTTPMAIL_SF_INBOX, + HTTPMAIL_SF_DELETEDITEMS, + HTTPMAIL_SF_DRAFTS, + HTTPMAIL_SF_OUTBOX, + HTTPMAIL_SF_SENTITEMS, + HTTPMAIL_SF_CONTACTS, + HTTPMAIL_SF_CALENDAR, + HTTPMAIL_SF_MSNPROMO, + HTTPMAIL_SF_LAST +} HTTPMAILSPECIALFOLDER; + +typedef enum tagHTTPMAILCONTACTTYPE +{ + HTTPMAIL_CT_CONTACT, + HTTPMAIL_CT_GROUP, + HTTPMAIL_CT_LAST +} HTTPMAILCONTACTTYPE; + +const DWORD DAVNAMESPACE_UNKNOWN = 0xFFFFFFFF; +const DWORD DAVNAMESPACE_DAV = 0; +const DWORD DAVNAMESPACE_HOTMAIL = 1; +const DWORD DAVNAMESPACE_HTTPMAIL = 2; +const DWORD DAVNAMESPACE_MAIL = 3; +const DWORD DAVNAMESPACE_CONTACTS = 4; + +cpp_quote("#define ISF_SMTP_USEIPFORHELO 0x01") +cpp_quote("#define ISF_ALWAYSPROMPTFORPASSWORD 0x02") +/* for SMTP - send EHLO and use STARTTLS if available: */ +cpp_quote("#define ISF_SSLONSAMEPORT 0x04") +cpp_quote("#define ISF_QUERYDSNSUPPORT 0x08") +/* for SMTP - send EHLO and use AUTH if available: */ +cpp_quote("#define ISF_QUERYAUTHSUPPORT 0x10") + +typedef struct INETSERVER +{ + CHAR szAccount[CCHMAX_ACCOUNT_NAME]; + CHAR szUserName[CCHMAX_USERNAME]; + CHAR szPassword[CCHMAX_PASSWORD]; + CHAR szServerName[CCHMAX_SERVER_NAME]; + CHAR szConnectoid[CCHMAX_CONNECTOID]; + RASCONNTYPE rasconntype; + DWORD dwPort; + BOOL fSSL; + BOOL fTrySicily; + DWORD dwTimeout; + DWORD dwFlags; +} INETSERVER, *LPINETSERVER; + +typedef enum tagIXPTYPE +{ + IXP_NNTP, + IXP_SMTP, + IXP_POP3, + IXP_IMAP, + IXP_RAS, + IXP_HTTPMail +} IXPTYPE; + +typedef enum tagIXPSTATUS +{ + IXP_FINDINGHOST, + IXP_CONNECTING, + IXP_SECURING, + IXP_CONNECTED, + IXP_AUTHORIZING, + IXP_AUTHRETRY, + IXP_AUTHORIZED, + IXP_DISCONNECTING, + IXP_DISCONNECTED, + IXP_LAST +} IXPSTATUS; + +const DWORD DEPTH_INFINITY = 0xFFFFFFFE; + +typedef DWORD MEMBERINFOFLAGS; + +const MEMBERINFOFLAGS HTTP_MEMBERINFO_COMMONPROPS = 0x0; +const MEMBERINFOFLAGS HTTP_MEMBERINFO_FOLDERPROPS = 0x1; +const MEMBERINFOFLAGS HTTP_MEMBERINFO_MESSAGEPROPS = 0x2; +const MEMBERINFOFLAGS HTTP_MEMBERINFO_ALLPROPS = HTTP_MEMBERINFO_FOLDERPROPS | HTTP_MEMBERINFO_MESSAGEPROPS; + +typedef DWORD IMAP_MSGFLAGS; + +const IMAP_MSGFLAGS IMAP_MSG_NOFLAGS = 0x00; +const IMAP_MSGFLAGS IMAP_MSG_ANSWERED = 0x01; +const IMAP_MSGFLAGS IMAP_MSG_FLAGGED = 0x02; +const IMAP_MSGFLAGS IMAP_MSG_DELETED = 0x04; +const IMAP_MSGFLAGS IMAP_MSG_SEEN = 0x08; +const IMAP_MSGFLAGS IMAP_MSG_DRAFT = 0x10; +const IMAP_MSGFLAGS IMAP_MSG_ALLFLAGS = 0x1f; + +[ + object, + uuid(CA30F3FF-C9AC-11D1-9A3A-00C04FA309D4), + local +] +interface ITransportCallbackService : IUnknown +{ + HRESULT GetParentWindow( + [in] DWORD dwReserved, + [out] HWND *phwndParent); + + HRESULT GetAccount( + [out] LPDWORD pdwServerType, + [out] IImnAccount **ppAccount); +} + +[ + object, + uuid(0DF2C7E1-3435-11D0-81D0-00C04FD85AB4), + local +] +interface ITransportCallback : IUnknown +{ + typedef struct tagIXPRESULT + { + HRESULT hrResult; + LPSTR pszResponse; + UINT uiServerError; + HRESULT hrServerError; + DWORD dwSocketError; + LPSTR pszProblem; + } IXPRESULT, *LPIXPRESULT; + + typedef enum tagCMDTYPE + { + CMD_SEND, + CMD_RESP + } CMDTYPE; + + HRESULT OnTimeout( + [in,out] DWORD *pdwTimeout, + [in] IInternetTransport *pTransport); + + HRESULT OnLogonPrompt( + [in,out] LPINETSERVER pInetServer, + [in] IInternetTransport *pTransport); + + INT OnPrompt( + [in] HRESULT hrError, + [in] LPCSTR pszText, + [in] LPCSTR pszCaption, + [in] UINT uType, + [in] IInternetTransport *pTransport); + + HRESULT OnStatus( + [in] IXPSTATUS ixpstatus, + [in] IInternetTransport *pTransport); + + HRESULT OnError( + [in] IXPSTATUS ixpstatus, + [in] LPIXPRESULT pResult, + [in] IInternetTransport *pTransport); + + HRESULT OnCommand( + [in] CMDTYPE cmdtype, + [in] LPSTR pszLine, + [in] HRESULT hrResponse, + [in] IInternetTransport *pTransport); +} + +[ + object, + uuid(1F636C01-364E-11D0-81D3-00C04FD85AB4), + local +] +interface IInternetTransport : IUnknown +{ + const boolean iitAUTHENTICATE = TRUE; + const boolean iitDONT_AUTHENTICATe = FALSE; + const boolean iitENABLE_ONCOMMAND = TRUE; + const boolean iitDISABLE_ONCOMMAND = FALSE; + + typedef enum tagIXPISSTATE + { + IXP_IS_CONNECTED, + IXP_IS_BUSY, + IXP_IS_READY, + IXP_IS_AUTHENTICATED + } IXPISSTATE; + + HRESULT GetServerInfo( + [in,out] LPINETSERVER pInetServer); + + IXPTYPE GetIXPType(); + + HRESULT IsState( + [in] IXPISSTATE isstate); + + HRESULT InetServerFromAccount( + [in] IImnAccount *pAccount, + [in,out] LPINETSERVER pInetServer); + + HRESULT Connect( + [in] LPINETSERVER pInetServer, + [in] boolean fAuthenticate, + [in] boolean fCommandLogging); + + HRESULT HandsOffCallback(); + + HRESULT Disconnect(); + + HRESULT DropConnection(); + + HRESULT GetStatus( + [out] IXPSTATUS *pCurrentStatus); +} + +[ + object, + uuid(1F636C02-364E-11D0-81D3-00C04FD85AB4), + local +] +interface ISMTPCallback : ITransportCallback +{ + typedef enum tagSMTPCOMMAND + { + SMTP_NONE, + SMTP_BANNER, + SMTP_CONNECTED, + SMTP_SEND_MESSAGE, + SMTP_AUTH, + SMTP_EHLO, + SMTP_HELO, + SMTP_MAIL, + SMTP_RCPT, + SMTP_RSET, + SMTP_QUIT, + SMTP_DATA, + SMTP_DOT, + SMTP_SEND_STREAM, + SMTP_CUSTOM + } SMTPCOMMAND; + + typedef struct tagSMTPSTREAM + { + DWORD cbIncrement; + DWORD cbCurrent; + DWORD cbTotal; + } SMTPSTREAM, *LPSMTPSTREAM; + + typedef struct tagSMTPRESPONSE + { + SMTPCOMMAND command; + BOOL fDone; + IXPRESULT rIxpResult; + ISMTPTransport *pTransport; + + [switch_type(SMTPCOMMAND), switch_is(command)] + union + { + [case(SMTP_SEND_STREAM)] SMTPSTREAM rStreamInfo; + [default]; + }; + } SMTPRESPONSE, *LPSMTPRESPONSE; + + HRESULT OnResponse( + [in] LPSMTPRESPONSE pResponse); +} + +[ + object, + uuid(0DF2C7E2-3435-11D0-81D0-00C04FD85AB4), + local +] +interface ISMTPTransport : IInternetTransport +{ + typedef struct tagSMTPMESSAGE + { + ULONG cbSize; + LPSTREAM pstmMsg; + INETADDRLIST rAddressList; + } SMTPMESSAGE, *LPSMTPMESSAGE; + + HRESULT InitNew( + [in] LPSTR pszLogFilePath, + [in] ISMTPCallback *pCallback); + +cpp_quote("#ifdef WINE_NO_UNICODE_MACROS") +cpp_quote("#undef SendMessage") +cpp_quote("#endif") + + HRESULT SendMessage( + [in] LPSMTPMESSAGE pMessage); + + HRESULT CommandMAIL( + [in] LPSTR pszEmailFrom); + + HRESULT CommandRCPT( + [in] LPSTR pszEmailTo); + + HRESULT CommandEHLO(); + + HRESULT CommandHELO(); + + HRESULT CommandAUTH( + [in] LPSTR pszAuthType); + + HRESULT CommandQUIT(); + + HRESULT CommandRSET(); + + HRESULT CommandDATA(); + + HRESULT CommandDOT(); + + HRESULT SendDataStream( + [in] IStream *pStream, + [in] ULONG cbSize); +} + +[ + object, + uuid(0DF2C7EC-3435-11D0-81D0-00C04FD85AB4), + local +] +interface ISMTPTransport2 : ISMTPTransport +{ + typedef struct tagSMTPMESSAGE2 + { + SMTPMESSAGE smtpMsg; + LPSTR pszDSNENVID; + DSNRET dsnRet; + DWORD dwReserved; + DWORD dwReserved2; + } SMTPMESSAGE2, *LPSMTPMESSAGE2; + + HRESULT SetWindow(); + + HRESULT ResetWindow(); + + HRESULT SendMessage2( + [in] LPSMTPMESSAGE2 pMessage); + + HRESULT CommandRCPT2( + [in] LPSTR pszEmailTo, + [in] INETADDRTYPE atDSN); +} + +/* FIXME: IDAVNamespaceArbiter, IPropPatchRequest, IPropFindRequest, IPropFindMultiResponse, IPropFindResponse, IHTTPMailCallback, IHTTPMailTransport */ + +[ + object, + uuid(0DF2C7E3-3435-11D0-81D0-00C04FD85AB4), + local +] +interface IPOP3Callback : ITransportCallback +{ + typedef enum tagPOP3COMMAND + { + POP3_NONE, + POP3_BANNER, + POP3_CONNECTED, + POP3_USER, + POP3_PASS, + POP3_AUTH, + POP3_UIDL, + POP3_STAT, + POP3_LIST, + POP3_DELE, + POP3_RETR, + POP3_TOP, + POP3_NOOP, + POP3_QUIT, + POP3_RSET, + POP3_CUSTOM + } POP3COMMAND; + + typedef struct tagPOP3RETR + { + BOOL fHeader; + BOOL fBody; + DWORD dwPopId; + DWORD cbSoFar; + LPSTR pszLines; + ULONG cbLines; + } POP3RETR, *LPPOP3RETR; + + typedef struct tagPOP3TOP + { + BOOL fHeader; + BOOL fBody; + DWORD dwPopId; + DWORD cPreviewLines; + DWORD cbSoFar; + LPSTR pszLines; + ULONG cbLines; + } POP3TOP, *LPPOP3TOP; + + typedef struct tagPOP3LIST + { + DWORD dwPopId; + DWORD cbSize; + } POP3LIST, *LPPOP3LIST; + + typedef struct tagPOP3UIDL + { + DWORD dwPopId; + LPSTR pszUidl; + } POP3UIDL, *LPPOP3UIDL; + + typedef struct tagPOP3STAT + { + DWORD cMessages; + DWORD cbMessages; + } POP3STAT, *LPPOP3STAT; + + typedef struct tagPOP3RESPONSE + { + POP3COMMAND command; + BOOL fDone; + IXPRESULT rIxpResult; + IPOP3Transport *pTransport; + BOOL fValidInfo; + [switch_type(POP3COMMAND), switch_is(command)] + union + { + [case(POP3_UIDL)] POP3UIDL rUidlInfo; + [case(POP3_STAT)] POP3STAT rStatInfo; + [case(POP3_LIST)] POP3LIST rListInfo; + [case(POP3_DELE)] DWORD dwPopId; + [case(POP3_RETR)] POP3RETR rRetrInfo; + [case(POP3_TOP)] POP3TOP rTopInfo; + [default]; + }; + } POP3RESPONSE, *LPPOP3RESPONSE; + + HRESULT OnResponse( + [in] LPPOP3RESPONSE pResponse); +} + +[ + object, + uuid(0DF2C7E4-3435-11D0-81D0-00C04FD85AB4), + local +] +interface IPOP3Transport : IInternetTransport +{ + typedef enum tagPOP3CMDTYPE + { + POP3CMD_GET_POPID, + POP3CMD_GET_MARKED, + POP3CMD_GET_ALL + } POP3CMDTYPE; + + typedef enum tagPOP3MARKTYPE + { + POP3_MARK_FOR_TOP = 0x01, + POP3_MARK_FOR_RETR = 0x02, + POP3_MARK_FOR_DELE = 0x04, + POP3_MARK_FOR_UIDL = 0x08, + POP3_MARK_FOR_LIST = 0x10 + } POP3MARKTYPE; + + HRESULT InitNew( + [in] LPSTR pszLogFilePath, + [in] IPOP3Callback *pCallback); + + HRESULT MarkItem( + [in] POP3MARKTYPE marktype, + [in] DWORD dwPopId, + [in] boolean fMarked); + + HRESULT CommandAUTH( + [in] LPSTR pszAuthType); + + HRESULT CommandUSER( + [in] LPSTR pszUserName); + + HRESULT CommandPASS( + [in] LPSTR pszPassword); + + HRESULT CommandLIST( + [in] POP3CMDTYPE cmdtype, + [in] DWORD dwPopId); + + HRESULT CommandTOP( + [in] POP3CMDTYPE cmdtype, + [in] DWORD dwPopId, + [in] DWORD cPreviewLines); + + HRESULT CommandQUIT(); + + HRESULT CommandSTAT(); + + HRESULT CommandNOOP(); + + HRESULT CommandRSET(); + + HRESULT CommandUIDL( + [in] POP3CMDTYPE cmdtype, + [in] DWORD dwPopId); + + HRESULT CommandDELE( + [in] POP3CMDTYPE cmdtype, + [in] DWORD dwPopId); + + HRESULT CommandRETR( + [in] POP3CMDTYPE cmdtype, + [in] DWORD dwPopId); +} + +/* FIXME: INNTPCallback, INNTPTransport */ + +/* FIXME: IRangeList */ + +/* FIXME: IIMAPCallback, IIMAPTransport */ + +#if 0 +cpp_quote("HRESULT WINAPI CreateRASTransport(IRASTransport **ppTransport);") +cpp_quote("HRESULT WINAPI CreateNNTPTransport(INNTPTransport **ppTransport);") +cpp_quote("HRESULT WINAPI CreateIMAPTransport(IIMAPTransport **ppTransport);") +cpp_quote("HRESULT WINAPI CreateIMAPTransport2(IIMAPTransport2 **ppTransport);") +cpp_quote("HRESULT WINAPI CreateRangeList(IRangeList **ppRangeList);") +#endif +cpp_quote("HRESULT WINAPI CreateSMTPTransport(ISMTPTransport **ppTransport);") +cpp_quote("HRESULT WINAPI CreatePOP3Transport(IPOP3Transport **ppTransport);") diff --git a/reactos/include/psdk/mimeole.idl b/reactos/include/psdk/mimeole.idl index 4807cd49155..9d4f45bc0cd 100644 --- a/reactos/include/psdk/mimeole.idl +++ b/reactos/include/psdk/mimeole.idl @@ -1,1260 +1,1260 @@ -/* - * Copyright 2007 Robert Shearman for CodeWeavers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -import "ocidl.idl"; -import "objidl.idl"; -import "propidl.idl"; - -#define DECLARE_HANDLE(name) typedef void *name - -interface IMimeMessageCallback; -interface IMimeEnumAddressTypes; -interface IMimeMessageParts; -interface IMimeMessageTree; -interface IMimeBody; -interface IMimeEnumProperties; - -cpp_quote("DEFINE_GUID(CLSID_IMimeBody, 0xfd853cdb, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);") -cpp_quote("DEFINE_GUID(CLSID_IMimeAllocator, 0xfd853cdd, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);") -cpp_quote("DEFINE_GUID(CLSID_IMimeMessage, 0xfd853ce3, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);") - -cpp_quote("#define MIME_E_REG_CREATE_KEY 0x800cce01") -cpp_quote("#define MIME_E_REG_QUERY_INFO 0x800cce02") -cpp_quote("#define MIME_E_INVALID_ENCTYPE 0x800cce03") -cpp_quote("#define MIME_E_BOUNDARY_MISMATCH 0x800cce04") -cpp_quote("#define MIME_E_NOT_FOUND 0x800cce05") -cpp_quote("#define MIME_E_NO_DATA 0x800cce05") -cpp_quote("#define MIME_E_BUFFER_TOO_SMALL 0x800cce06") - -cpp_quote("#define MIME_E_INVALID_TEXT_TYPE 0x800cce38") - -cpp_quote("typedef enum tagMIMEPROPID {") -cpp_quote(" PID_HDR_NEWSGROUP = 2,") -cpp_quote(" PID_HDR_NEWSGROUPS = 3,") -cpp_quote(" PID_HDR_REFS = 4,") -cpp_quote(" PID_HDR_SUBJECT = 5,") -cpp_quote(" PID_HDR_FROM = 6,") -cpp_quote(" PID_HDR_MESSAGEID = 7,") -cpp_quote(" PID_HDR_RETURNPATH = 8,") -cpp_quote(" PID_HDR_RR = 9,") -cpp_quote(" PID_HDR_RETRCPTO = 10,") -cpp_quote(" PID_HDR_APPARTO = 11,") -cpp_quote(" PID_HDR_DATE = 12,") -cpp_quote(" PID_HDR_RECEIVED = 13,") -cpp_quote(" PID_HDR_REPLYTO = 14,") -cpp_quote(" PID_HDR_XMAILER = 15,") -cpp_quote(" PID_HDR_BCC = 16,") -cpp_quote(" PID_HDR_MIMEVER = 17,") -cpp_quote(" PID_HDR_CNTTYPE = 18,") -cpp_quote(" PID_HDR_CNTXFER = 19,") -cpp_quote(" PID_HDR_CNTID = 20,") -cpp_quote(" PID_HDR_CNTDESC = 21,") -cpp_quote(" PID_HDR_CNTDISP = 22,") -cpp_quote(" PID_HDR_CNTBASE = 23,") -cpp_quote(" PID_HDR_CNTLOC = 24,") -cpp_quote(" PID_HDR_TO = 25,") -cpp_quote(" PID_HDR_PATH = 26,") -cpp_quote(" PID_HDR_FOLLOWUPTO = 27,") -cpp_quote(" PID_HDR_EXPIRES = 28,") -cpp_quote(" PID_HDR_CC = 29,") - -cpp_quote(" PID_HDR_SENDER = 61,") - -cpp_quote(" PID_HDR_INREPLYTO = 77,") -cpp_quote("} MIMEPROPID;") - -cpp_quote("#define OID_HEADER_RELOAD_TYPE (0x00370000 | VT_UI4)") - - -[ - uuid(e4b28371-83b0-11d0-8259-00c04fd85ab4), - version(1.0) -] -library MIMEOLE -{ - importlib("stdole2.tlb"); - - DECLARE_HANDLE(HCHARSET); - DECLARE_HANDLE(HBODY); - DECLARE_HANDLE(HHEADERROW); - - typedef HCHARSET *LPHCHARSET; - typedef HBODY *LPHBODY; - typedef HHEADERROW *LPHHEADERROW; - typedef DWORD TYPEDID; - typedef const PROPVARIANT *LPCPROPVARIANT; - typedef const BLOB *LPCBLOB; - - typedef enum tagRELOADTYPE - { - RELOAD_HEADER_NONE, - RELOAD_HEADER_RESET, - RELOAD_HEADER_APPEND, - RELOAD_HEADER_REPLACE, - } RELOADTYPE; - - typedef enum tagMIMESAVETYPE - { - SAVE_RFC822, - SAVE_RFC1521, - } MIMESAVETYPE; - - typedef enum tagCSETAPPLYTYPE - { - CSET_APPLY_UNTAGGED, - CSET_APPLY_ALL, - CSET_APPLY_TAG_ALL, - } CSETAPPLYTYPE; - - typedef enum tagENCODINGTYPE - { - IET_BINARY, - IET_BASE64, - IET_UUENCODE, - IET_QP, - IET_7BIT, - IET_8BIT, - IET_INETCSET, - IET_UNICODE, - IET_RFC1522, - IET_ENCODED, - IET_CURRENT, - IET_UNKNOWN, - IET_BINHEX40, - IET_LAST - } ENCODINGTYPE; - - const SHORT IET_DECODED = IET_BINARY; - - const SHORT CCHMAX_HEADER_LINE = 1000; - - [ - uuid(c5588349-7f86-11d0-8252-00c04fd85ab4), - object - ] - interface IMimeInternational : IUnknown - { - typedef [unique] IMimeInternational *LPMIMEINTERNATIONAL; - typedef DWORD CODEPAGEID; - - const CODEPAGEID CP_USASCII = 1252; - const CODEPAGEID CP_UNICODE = 1200; - const CODEPAGEID CP_JAUTODETECT = 50932; - const CODEPAGEID CP_KAUTODETECT = 50949; - const CODEPAGEID CP_ISO2022JPESC = 50221; - const CODEPAGEID CP_ISO2022JPSIO = 50222; - - const SHORT CCHMAX_CSET_NAME = 128; - const SHORT CCHMAX_LANG_NAME = 128; - const SHORT CCHMAX_FACE_NAME = 128; - - typedef struct tagINETCSETINFO - { - CHAR szName[CCHMAX_CSET_NAME]; - HCHARSET hCharset; - CODEPAGEID cpiWindows; - CODEPAGEID cpiInternet; - DWORD dwReserved1; - } INETCSETINFO, *LPINETCSETINFO; - - typedef enum tagINETLANGMASK - { - ILM_FAMILY = 0x01, - ILM_NAME = 0x02, - ILM_BODYCSET = 0x04, - ILM_HEADERCSET = 0x08, - ILM_WEBCSET = 0x10, - ILM_FIXEDFONT = 0x20, - ILM_VARIABLEFONT = 0x40, - } INETLANGMASK; - - typedef struct tagCODEPAGEINFO - { - DWORD dwMask; - CODEPAGEID cpiCodePage; - BOOL fIsValidCodePage; - ULONG ulMaxCharSize; - BOOL fInternetCP; - CODEPAGEID cpiFamily; - CHAR szName[CCHMAX_LANG_NAME]; - CHAR szBodyCset[CCHMAX_CSET_NAME]; - CHAR szHeaderCset[CCHMAX_CSET_NAME]; - CHAR szWebCset[CCHMAX_CSET_NAME]; - CHAR szFixedFont[CCHMAX_FACE_NAME]; - CHAR szVariableFont[CCHMAX_FACE_NAME]; - ENCODINGTYPE ietNewsDefault; - ENCODINGTYPE ietMailDefault; - DWORD dwReserved1; - } CODEPAGEINFO, *LPCODEPAGEINFO; - - typedef struct tagRFC1522INFO - { - BOOL fRfc1522Allowed; - BOOL fRfc1522Used; - BOOL fAllow8bit; - HCHARSET hRfc1522Cset; - } RFC1522INFO, *LPRFC1522INFO; - - typedef enum tagCHARSETTYPE - { - CHARSET_BODY, - CHARSET_HEADER, - CHARSET_WEB, - } CHARSETTYPE; - - - HRESULT SetDefaultCharset( - [in] HCHARSET hCharset); - HRESULT GetDefaultCharset( - [out] LPHCHARSET phCharset); - HRESULT GetCodePageCharset( - [in] CODEPAGEID cpiCodePage, - [in] CHARSETTYPE ctCsetType, - [out] LPHCHARSET phCharset); - HRESULT FindCharset( - [in] LPCSTR pszCharset, - [out] LPHCHARSET phCharset); - HRESULT GetCharsetInfo( - [in] HCHARSET hCharset, - [in, out] LPINETCSETINFO pCsetInfo); - HRESULT GetCodePageInfo( - [in] CODEPAGEID cpiCodePage, - [in, out] LPCODEPAGEINFO pCodePageInfo); - HRESULT DecodeHeader( - [in] HCHARSET hCharset, - [in] LPCSTR pszData, - [in, out] LPPROPVARIANT pDecoded, - [in, out] LPRFC1522INFO pRfc1522Info); - HRESULT EncodeHeader( - [in] HCHARSET hCharset, - [in] LPPROPVARIANT pData, - [out] LPSTR *ppszEncoded, - [in, out] LPRFC1522INFO pRfc1522Info); - HRESULT ConvertBuffer( - [in] CODEPAGEID cpiSource, - [in] CODEPAGEID cpiDest, - [in] LPBLOB pIn, - [in, out] LPBLOB pOut, - [out] ULONG *pcbRead); - HRESULT ConvertString( - [in] CODEPAGEID cpiSource, - [in] CODEPAGEID cpiDest, - [in] LPPROPVARIANT pIn, - [in, out] LPPROPVARIANT pOut); - HRESULT MLANG_ConvertInetReset(); - HRESULT MLANG_ConvertInetString( - [in] CODEPAGEID cpiSource, - [in] CODEPAGEID cpiDest, - [in] LPCSTR pSource, - [in] int *pnSizeOfSource, - [out] LPSTR pDestination, - [in] int *pnDstSize); - HRESULT Rfc1522Decode( - [in] LPCSTR pszValue, - [in] LPCSTR pszCharset, - [in] ULONG cchmax, - [out] LPSTR *ppszDecoded); - HRESULT Rfc1522Encode( - [in] LPCSTR pszValue, - [in] HCHARSET hCharset, - [out] LPSTR *ppszEncoded); - } - - [ - uuid(c5588353-7f86-11d0-8252-00c04fd85ab4), - object - ] - interface IMimeSecurity : IUnknown - { - typedef [unique] IMimeSecurity *LPMIMESECURITY; - - cpp_quote("#ifdef __WINE_WINCRYPT_H") - cpp_quote("typedef PCCERT_CONTEXT PCX509CERT;") - cpp_quote("#else") - typedef const void *PCX509CERT; - typedef void *HCERTSTORE; - cpp_quote("#endif") - - typedef BLOB THUMBBLOB; - typedef void *HCAPICERTSTORE; - - typedef enum tagCERTSTATE - { - CERTIFICATE_OK, - CERTIFICATE_NOT_PRESENT, - CERTIFICATE_EXPIRED, - CERTIFICATE_CHAIN_TOO_LONG, - CERTIFICATE_MISSING_ISSUER, - CERTIFICATE_CRL_LISTED, - CERTIFICATE_NOT_TRUSTED, - CERTIFICATE_INVALID, - CERTIFICATE_ERROR, - CERTIFICATE_NOPRINT, - CERTIFICATE_UNKNOWN - } CERTSTATE; - - typedef enum tagCERTNAMETYPE - { - SIMPLE, - OID, - X500, - } CERTNAMETYPE; - - typedef enum tagCERTDATAID - { - CDID_EMAIL, - CDID_MAX - } CERTDATAID; - - typedef struct tagX509CERTRESULT - { - DWORD cEntries; - CERTSTATE *rgcs; - PCX509CERT *rgpCert; - } X509CERTRESULT, *PX509CERTRESULT; - typedef const X509CERTRESULT *PCX509CERTRESULT; - - HRESULT InitNew(void); - - HRESULT CheckInit(void); - - HRESULT EncodeMessage( - [in] IMimeMessageTree */*const*/ pTree, - [in] DWORD dwFlags); - - HRESULT EncodeBody( - [in] IMimeMessageTree */*const*/ pTree, - [in] HBODY hEncodeRoot, - [in] DWORD dwFlags); - - HRESULT DecodeMessage( - [in] IMimeMessageTree */*const*/ pTree, - [in] DWORD dwFlags); - - HRESULT DecodeBody( - [in] IMimeMessageTree */*const*/ pTree, - [in] HBODY hDecodeRoot, - [in] DWORD dwFlags); - - HRESULT EnumCertificates( - [in] HCAPICERTSTORE hc, - [in] DWORD dwUsage, - [in] PCX509CERT pPrev, - [out] PCX509CERT *ppCert); - - HRESULT GetCertificateName( - [in] const PCX509CERT pX509Cert, - [in] const CERTNAMETYPE cn, - [out] LPSTR *ppszName); - - HRESULT GetMessageType( - [in] const HWND hwndParent, - [in] IMimeBody */*const*/ pBody, - [out] DWORD */*const*/ pdwSecType); - - HRESULT GetCertData( - [in] const PCX509CERT pX509Cert, - [in] const CERTDATAID dataid, - [out, ref] LPPROPVARIANT pValue); - } - - [ - uuid(fd853cd1-7f86-11d0-8252-00c04fd85ab4), - object - ] - interface IMimeHeaderTable : IPersistStream - { - /* FIXME: fill this in */ - } - - [ - uuid(fd853cec-7f86-11d0-8252-00c04fd85ab4), - object - ] - interface IMimePropertySchema : IUnknown - { - typedef enum tagMIMEPROPFLAGS - { - MPF_INETCSET = 0x01, - MPF_RFC1522 = 0x02, - MPF_ADDRESS = 0x04, - MPF_HASPARAMS = 0x08, - MPF_MIME = 0x10, - MPF_READONLY = 0x20 - } MIMEPROPFLAGS; - - /* FIXME: fill this in */ - } - - [ - uuid(fd853cd3-7f86-11d0-8252-00c04fd85ab4), - object - ] - interface IMimePropertySet : IPersistStreamInit - { - typedef [unique] IMimePropertySet *LPMIMEPROPERTYSET; - - cpp_quote("#define PDF_ENCODED 0x00000001") - cpp_quote("#define PDF_NAMEINDATA 0x00000002") - cpp_quote("#define PDF_HEADERFORMAT (0x00000004 | PDF_ENCODED)") - cpp_quote("#define PDF_NOCOMMENTS 0x00000008") - cpp_quote("#define PDF_SAVENOENCODE 0x00000010") - cpp_quote("#define PDF_VECTOR 0x00000020") - - typedef struct tagMIMEPARAMINFO - { - LPSTR pszName; - LPSTR pszData; - } MIMEPARAMINFO, *LPMIMEPARAMINFO; - - typedef enum tagPROPINFOMASK - { - PIM_CHARSET = 0x01, - PIM_ENCODINGTYPE = 0x02, - PIM_ROWNUMBER = 0x04, - PIM_FLAGS = 0x08, - PIM_PROPID = 0x10, - PIM_VALUES = 0x20, - PIM_VTDEFAULT = 0x40, - PIM_VTCURRENT = 0x80 - } PROPINFOMASK; - - typedef struct tagMIMEPROPINFO - { - DWORD dwMask; - HCHARSET hCharset; - ENCODINGTYPE ietEncoding; - DWORD dwRowNumber; - DWORD dwFlags; - DWORD dwPropId; - DWORD cValues; - VARTYPE vtDefault; - VARTYPE vtCurrent; - } MIMEPROPINFO, *LPMIMEPROPINFO; - typedef const MIMEPROPINFO *LPCMIMEPROPINFO; - - HRESULT GetPropInfo( - [in] LPCSTR pszName, - [in,out] LPMIMEPROPINFO pInfo); - - HRESULT SetPropInfo( - [in] LPCSTR pszName, - [in] LPCMIMEPROPINFO pInfo); - -cpp_quote("#ifdef WINE_NO_UNICODE_MACROS") -cpp_quote("#undef GetProp") -cpp_quote("#undef SetProp") -cpp_quote("#undef EnumProps") -cpp_quote("#endif") - HRESULT GetProp( - [in] LPCSTR pszName, - [in] DWORD dwFlags, - [in,out] LPPROPVARIANT pValue); - - HRESULT SetProp( - [in] LPCSTR pszName, - [in] DWORD dwFlags, - [in] LPCPROPVARIANT pValue); - - HRESULT AppendProp( - [in] LPCSTR pszName, - [in] DWORD dwFlags, - [in] LPPROPVARIANT pValue); - - HRESULT DeleteProp( - [in] LPCSTR pszName); - - HRESULT CopyProps( - [in] ULONG cNames, - [in,unique] LPCSTR *prgszName, - [in] IMimePropertySet *pPropertySet); - - HRESULT MoveProps( - [in] ULONG cNames, - [in] LPCSTR *prgszName, - [in] IMimePropertySet *pPropertySet); - - HRESULT DeleteExcept( - [in] ULONG cNames, - [in] LPCSTR *prgszName); - - HRESULT QueryProp( - [in] LPCSTR pszName, - [in] LPCSTR pszCriteria, - [in] boolean fSubString, - [in] boolean fCaseSensitive); - - HRESULT GetCharset( - [out] LPHCHARSET phCharset); - - HRESULT SetCharset( - [in] HCHARSET hCharset, - [in] CSETAPPLYTYPE applytype); - - HRESULT GetParameters( - [in] LPCSTR pszName, - [out] ULONG *pcParams, - [out] LPMIMEPARAMINFO *pprgParam); - - HRESULT IsContentType( - [in] LPCSTR pszPriType, - [in,unique] LPCSTR pszSubType); - - HRESULT BindToObject( - [in] REFIID riid, - [out,iid_is(riid)] void **ppvObject); - - HRESULT Clone( - [out] IMimePropertySet **ppPropertySet); - - HRESULT SetOption( - [in] const TYPEDID oid, - [in] LPCPROPVARIANT pValue); - - HRESULT GetOption( - [in] const TYPEDID oid, - [in,out] LPPROPVARIANT pValue); - - cpp_quote("#define EPF_NONAME 0x00000001") - - HRESULT EnumProps( - [in] DWORD dwFlags, - [out] IMimeEnumProperties **ppEnum); - - } - - [ - uuid(c558834a-7f86-11d0-8252-00c04fd85ab4), - object - ] - interface IMimeAddressTable : IUnknown - { - typedef [unique] IMimeAddressTable *LPMIMEADDRESSTABLE; - - DECLARE_HANDLE(HADDRESS); - typedef HADDRESS *LPHADDRESS; - typedef DWORD IADDRESSTYPE; - - typedef enum tagADDRESSFORMAT - { - AFT_DISPLAY_FRIENDLY, - AFT_DISPLAY_EMAIL, - AFT_DISPLAY_BOTH, - AFT_RFC822_DECODED, - AFT_RFC822_ENCODED, - AFT_RFC822_TRANSMIT, - } ADDRESSFORMAT; - - typedef struct tagADDRESSPROPS - { - DWORD dwProps; - HADDRESS hAddress; - ENCODINGTYPE ietFriendly; - HCHARSET hCharset; - DWORD dwAdrType; - LPSTR pszFriendly; - LPWSTR pwszReserved; - LPSTR pszEmail; - CERTSTATE certstate; - THUMBBLOB tbSigning; - THUMBBLOB tbEncryption; - DWORD dwCookie; - DWORD dwReserved1; - DWORD dwReserved2; - } ADRESSPROPS, *LPADDRESSPROPS; - - typedef struct tagADDRESSLIST - { - ULONG cAdrs; - LPADDRESSPROPS prgAdr; - } ADDRESSLIST, *LPADDRESSLIST; - - /* FIXME: fill this in */ - } - - [ - uuid(ee519f11-851a-11d0-8252-00c04fd85ab4), - object - ] - interface IMimeWebDocument : IUnknown - { - /* FIXME: fill this in */ - } - - [ - uuid(c558834c-7f86-11d0-8252-00c04fd85ab4), - object - ] - interface IMimeBody : IMimePropertySet - { - typedef [unique] IMimeBody *LPMIMEBODY; - - typedef enum tagIMSGBODYTYPE - { - IBT_SECURE, - IBT_ATTACHMENT, - IBT_EMPTY, - IBT_CSETTAGGED, - IBT_AUTOATTACH, - } IMSGBODYTYPE; - - typedef struct tagBODYOFFSETS - { - DWORD cbBoundaryStart; - DWORD cbHeaderStart; - DWORD cbBodyStart; - DWORD cbBodyEnd; - } BODYOFFSETS, *LPBODYOFFSETS; - - typedef struct tagTRANSMITINFO - { - ENCODINGTYPE ietCurrent; - ENCODINGTYPE ietXmitMime; - ENCODINGTYPE ietXmit822; - ULONG cbLongestLine; - ULONG cExtended; - ULONG ulPercentExt; - ULONG cbSize; - ULONG cLines; - } TRANSMITINFO, *LPTRANSMITINFO; - - HRESULT IsType( - [in] IMSGBODYTYPE bodytype); - - HRESULT SetDisplayName( - [in] LPCSTR pszDisplay); - - HRESULT GetDisplayName( - [out] LPSTR *ppszDisplay); - - HRESULT GetOffsets( - [out] LPBODYOFFSETS pOffsets); - - HRESULT GetCurrentEncoding( - [out] ENCODINGTYPE *pietEncoding); - - HRESULT SetCurrentEncoding( - [in] ENCODINGTYPE ietEncoding); - - HRESULT GetEstimatedSize( - [in] ENCODINGTYPE ietEncoding, - [out] ULONG *pcbSize); - - HRESULT GetDataHere( - [in] ENCODINGTYPE ietEncoding, - [in] IStream *pStream); - - HRESULT GetData( - [in] ENCODINGTYPE ietEncoding, - [out] IStream **ppStream); - - HRESULT SetData( - [in] ENCODINGTYPE ietEncoding, - [in,unique] LPCSTR pszPriType, - [in,unique] LPCSTR pszSubType, - [in] REFIID riid, - [in,iid_is(riid)] LPVOID pvObject); - - HRESULT EmptyData(void); - - HRESULT CopyTo( - [in] IMimeBody *pBody); - - HRESULT GetTransmitInfo( - [in,out] LPTRANSMITINFO pTransmitInfo); - - HRESULT SaveToFile( - [in] ENCODINGTYPE ietEncoding, - [in] LPCSTR pszFilePath); - - HRESULT GetHandle( - [out] LPHBODY phBody); - - } - - [ - uuid(fd853cd4-7f86-11d0-8252-00c04fd85ab4), - object - ] - interface IMimeMessageTree : IPersistStreamInit - { - typedef [unique] IMimeMessageTree *LPMIMEMESSAGETREE; - - const HBODY HBODY_ROOT = (HBODY)-1; - - typedef enum tagBODYLOCATION - { - IBL_ROOT, - IBL_PARENT, - IBL_FIRST, - IBL_LAST, - IBL_NEXT, - IBL_PREVIOUS, - } BODYLOCATION; - - typedef struct tagFINDBODY - { - LPSTR pszPriType; - LPSTR pszSubType; - DWORD dwReserved; - } FINDBODY, *LPFINDBODY; - - HRESULT GetMessageSource( - [out] IStream **ppStream, - [in] DWORD dwFlags); - - HRESULT GetMessageSize( - [out] ULONG *pcbSize, - [in] DWORD dwFlags); - - HRESULT LoadOffsetTable( - [in] IStream *pStream); - - HRESULT SaveOffsetTable( - [in] IStream *pStream, - [in] DWORD dwFlags); - - HRESULT GetFlags( - [out] DWORD *pdwFlags); - - HRESULT Commit( - [in] DWORD dwFlags); - - HRESULT HandsOffStorage(); - - HRESULT BindToObject( - [in] const HBODY hBody, - [in] REFIID riid, - [out, iid_is(riid)] void **ppvObject); - - HRESULT SaveBody( - [in] HBODY hBody, - [in] DWORD dwFlags, - [in] IStream *pStream); - - HRESULT InsertBody( - [in] BODYLOCATION location, - [in] HBODY hPivot, - [out] LPHBODY phBody); - - HRESULT GetBody( - [in] BODYLOCATION location, - [in] HBODY hPivot, - [out] LPHBODY phBody); - - HRESULT DeleteBody( - [in] HBODY hBody, - [in] DWORD dwFlags); - - HRESULT MoveBody( - [in] HBODY hBody, - [in] BODYLOCATION location); - - HRESULT CountBodies( - [in] HBODY hParent, - [in] boolean fRecurse, - [out] ULONG *pcBodies); - - HRESULT FindFirst( - [in, out] LPFINDBODY pFindBody, - [out] LPHBODY phBody); - - HRESULT FindNext( - [in, out] LPFINDBODY pFindBody, - [out] LPHBODY phBody); - - HRESULT ResolveURL( - [in] HBODY hRelated, - [in] LPCSTR pszBase, - [in] LPCSTR pszURL, - [in] DWORD dwFlags, - [out] LPHBODY phBody); - - HRESULT ToMultipart( - [in] HBODY hBody, - [in] LPCSTR pszSubType, - [out] LPHBODY phMultipart); - - HRESULT GetBodyOffsets( - [in] HBODY hBody, - [in, out] LPBODYOFFSETS pOffsets); - - HRESULT GetCharset( - [out] LPHCHARSET phCharset); - - HRESULT SetCharset( - [in] HCHARSET hCharset, - [in] CSETAPPLYTYPE applytype); - - HRESULT IsBodyType( - [in] HBODY hBody, - [in] IMSGBODYTYPE bodytype); - - HRESULT IsContentType( - [in] HBODY hBody, - [in] LPCSTR pszPriType, - [in] LPCSTR pszSubType); - - HRESULT QueryBodyProp( - [in] HBODY hBody, - [in] LPCSTR pszName, - [in] LPCSTR pszCriteria, - [in] boolean fSubString, - [in] boolean fCaseSensitive); - - HRESULT GetBodyProp( - [in] HBODY hBody, - [in] LPCSTR pszName, - [in] DWORD dwFlags, - [in, out] LPPROPVARIANT pValue); - - HRESULT SetBodyProp( - [in] HBODY hBody, - [in] LPCSTR pszName, - [in] DWORD dwFlags, - [in] LPCPROPVARIANT pValue); - - HRESULT DeleteBodyProp( - [in] HBODY hBody, - [in] LPCSTR pszName); - - HRESULT SetOption( - [in] const TYPEDID oid, - [in] LPCPROPVARIANT pValue); - - HRESULT GetOption( - [in] const TYPEDID oid, - [in, out] LPPROPVARIANT pValue); - } - - [ - uuid(fd853cd5-7f86-11d0-8252-00c04fd85ab4), - object - ] - interface IMimeMessage : IMimeMessageTree - { - typedef [unique] IMimeMessage *LPMIMEMESSAGE; - - typedef DWORD TEXTTYPE; - - typedef enum tagIMSGFLAGS - { - IMF_ATTACHMENTS = 0x00000001, - IMF_MULTIPART = 0x00000002, - IMF_SUBMULTIPART = 0x00000004, - IMF_MIME = 0x00000008, - IMF_HTML = 0x00000010, - IMF_PLAIN = 0x00000020, - IMF_PARTIAL = 0x00000040, - IMF_SIGNED = 0x00000080, - IMF_ENCRYPTED = 0x00000100, - IMF_TNEF = 0x00000200, - IMF_MHTML = 0x00000400, - IMF_SECURE = 0x00000800, - IMF_TEXT = 0x00001000, - IMF_CSETTAGGED = 0x00002000, - IMF_NEWS = 0x00004000, - IMF_VOICEMAIL = 0x00008000, - IMF_HASVCARD = 0x00010000, - IMF_RFC1154 = 0x00020000, - } IMSGFLAGS; - - typedef enum tagIMSGPRIORITY - { - IMSG_PRI_LOW = 5, - IMSG_PRI_NORMAL = 3, - IMSG_PRI_HIGH = 1, - } IMSGPRIORITY; - - cpp_quote("#define WPF_HTML 0x00000001") - cpp_quote("#define WPF_AUTOINLINE 0x00000002") - cpp_quote("#define WPF_SLIDESHOW 0x00000004") - cpp_quote("#define WPF_ATTACHLINKS 0x00000008") - cpp_quote("#define WPF_IMAGESONLY 0x00000010") - cpp_quote("#define WPF_NOMETACHARSET 0x00000020") - - typedef struct tagWEPAGEOPTIONS - { - DWORD cbSize; - DWORD dwFlags; - DWORD dwDelay; - WCHAR wchQuote; - } WEBPAGEOPTIONS, *LPWEBPAGEOPTIONS; - - cpp_quote("#define TXT_PLAIN 1") - cpp_quote("#define TXT_HTML 2") - - HRESULT CreateWebPage( - [in] IStream *pRootStm, - [in] LPWEBPAGEOPTIONS pOptions, - [in] IMimeMessageCallback *pCallback, - [out] IMoniker **ppMoniker); - - HRESULT GetProp( - [in] LPCSTR pszName, - [in] DWORD dwFlags, - [in,out] LPPROPVARIANT pValue); - - HRESULT SetProp( - [in] LPCSTR pszName, - [in] DWORD dwFlags, - [in] LPCPROPVARIANT pValue); - - HRESULT DeleteProp( - [in] LPCSTR pszName); - - HRESULT QueryProp( - [in] LPCSTR pszName, - [in] LPCSTR pszCriteria, - [in] boolean fSubString, - [in] boolean fCaseSensitive); - - HRESULT GetTextBody( - [in] DWORD dwTxtType, - [in] ENCODINGTYPE ietEncoding, - [out] IStream **pStream, - [out] LPHBODY phBody); - - HRESULT SetTextBody( - [in] DWORD dwTxtType, - [in] ENCODINGTYPE ietEncoding, - [in] HBODY hAlternative, - [in] IStream *pStream, - [out] LPHBODY phBody); - - HRESULT AttachObject( - [in] REFIID riid, - [in, iid_is(riid)] void *pvObject, - [out] LPHBODY phBody); - - HRESULT AttachFile( - [in] LPCSTR pszFilePath, - [in] IStream *pstmFile, - [out] LPHBODY phBody); - - HRESULT AttachURL( - [in] LPCSTR pszBase, - [in] LPCSTR pszURL, - [in] DWORD dwFlags, - [in] IStream *pstmURL, - [out] LPSTR *ppszCIDURL, - [out] LPHBODY phBody); - - HRESULT GetAttachments( - [out] ULONG *pcAttach, - [out] LPHBODY *pprghAttach); - - HRESULT GetAddressTable( - [out] IMimeAddressTable **ppTable); - - HRESULT GetSender( - [in, out] LPADDRESSPROPS pAddress); - - HRESULT GetAddressTypes( - [in] DWORD dwAdrTypes, - [in] DWORD dwProps, - [in, out] LPADDRESSLIST pList); - - HRESULT GetAddressFormat( - [in] DWORD dwAdrTypes, - [in] ADDRESSFORMAT format, - [out] LPSTR *ppszFormat); - - HRESULT EnumAddressTypes( - [in] DWORD dwAdrTypes, - [in] DWORD dwProps, - [out] IMimeEnumAddressTypes **ppEnum); - - HRESULT SplitMessage( - [in] ULONG cbMaxPart, - [out] IMimeMessageParts **ppParts); - - HRESULT GetRootMoniker( - [out] IMoniker **ppMoniker); - } - - [ - uuid(761aa741-7bda-11d1-8aa9-00c04fb951f3), - object - ] - interface IMimeMessageCallback : IUnknown - { - HRESULT OnWebPageSplitter( - [in] DWORD cInlined, - [in] IStream *ppStream); - } - - [ - uuid(de4ad8da-555f-11d1-8dd0-00c04fb951f9), - object - ] - interface IPersistMime : IPersist - { - /* FIXME: fill this in */ - } - - [ - uuid(c558834f-7f86-11d0-8252-00c04fd85ab4), - object - ] - interface IMimeMessageParts : IUnknown - { - /* FIXME: fill this in */ - } - - [ - uuid(c558834d-7f86-11d0-8252-00c04fd85ab4), - object - ] - interface IMimeEnumHeaderRows : IUnknown - { - typedef struct tagENUMHEADERROW - { - HHEADERROW hRow; - LPSTR pszHeader; - LPSTR pszData; - ULONG cchData; - DWORD_PTR dwReserved; - } ENUMHEADERROW, *LPENUMHEADERROW; - - /* FIXME: fill this in */ - } - - [ - uuid(fd853cee-7f86-11d0-8252-00c04fd85ab4), - object - ] - interface IMimeEnumProperties : IUnknown - { - typedef struct tagENUMPROPERTY - { - LPSTR pszName; - HHEADERROW hRow; - DWORD dwPropId; - } ENUMPROPERTY, *LPENUMPROPERTY; - - /* FIXME: fill this in */ - } - - [ - uuid(c5588354-7f86-11d0-8252-00c04fd85ab4), - object - ] - interface IMimeEnumAddressTypes : IUnknown - { - /* FIXME: fill this in */ - } - - [ - uuid(c5588350-7f86-11d0-8252-00c04fd85ab4), - object - ] - interface IMimeEnumMessageParts : IUnknown - { - /* FIXME: fill this in */ - } - - [ - uuid(64577981-86d7-11d1-bdfc-00c04fa31009), - object - ] - interface IHashTable : IUnknown - { - /* FIXME: fill this in */ - } - - [ - uuid(c5588351-7f86-11d0-8252-00c04fd85ab4), - object - ] - interface IMimeAllocator : IMalloc - { - typedef [unique] IMimeAllocator *LPMIMEALLOCATOR; - - HRESULT FreeParamInfoArray( - [in] ULONG cParams, - [in] LPMIMEPARAMINFO prgParam, - [in] boolean fFreeArray); - - HRESULT FreeAddressList( - [in,out] LPADDRESSLIST pList); - - HRESULT FreeAddressProps( - [in,out] LPADDRESSPROPS pAddress); - - HRESULT ReleaseObjects( - [in] ULONG cObjects, - [in] IUnknown **prgpUnknown, - [in] boolean fFreeArray); - - HRESULT FreeEnumHeaderRowArray( - [in] ULONG cRows, - [in] LPENUMHEADERROW prgRow, - [in] boolean fFreeArray); - - HRESULT FreeEnumPropertyArray( - [in] ULONG cProps, - [in] LPENUMPROPERTY prgProp, - [in] boolean fFreeArray); - - HRESULT FreeThumbprint( - [in] THUMBBLOB *pthumbprint); - - HRESULT PropVariantClear( - [in] LPPROPVARIANT pProp); - - } - - [ - uuid(feceaffd-c441-11d1-960e-00c04fbd7c09), - object - ] - interface IMimeObjResolver : IUnknown - { - /* FIXME: fill this in */ - } - - [ - uuid(b0d17fc2-7bc4-11d1-bdfa-00c04fa31009), - object - ] - interface IFontCache : IUnknown - { - /* FIXME: fill this in */ - } - - [ - uuid(b0d17fc5-7bc4-11d1-bdfa-00c04fa31009), - object - ] - interface IFontCacheNotify : IUnknown - { - /* FIXME: fill this in */ - } - - [ - uuid(70183210-7b36-11d2-8c12-00c04fa31009), - object - ] - interface IMimeEditTag : IUnknown - { - /* FIXME: fill this in */ - } - - [ - uuid(d09ee528-7b38-11d2-8c12-00c04fa31009), - object - ] - interface IMimeEditTagCollection : IUnknown - { - /* FIXME: fill this in */ - } -} - -cpp_quote("#ifdef __cplusplus") -cpp_quote(" extern \"C\" {") -cpp_quote("#endif") - -cpp_quote("") -cpp_quote("HRESULT WINAPI MimeOleSetCompatMode(DWORD);") -cpp_quote("HRESULT WINAPI MimeOleContentTypeFromUrl(LPCSTR,LPCSTR,LPSTR*);") -cpp_quote("HRESULT WINAPI MimeOleParseMhtmlUrl(LPSTR,LPSTR*,LPSTR*);") -cpp_quote("HRESULT WINAPI MimeOleObjectFromUrl(LPCSTR,BOOL,REFIID,LPVOID*,IUnknown**);") -cpp_quote("HRESULT WINAPI MimeOleObjectFromMoniker(BINDF,IMoniker*,IBindCtx*,REFIID,LPVOID*,IMoniker**);") -cpp_quote("HRESULT WINAPI MimeOleCombineURL(LPCSTR,ULONG,LPCSTR,ULONG,BOOL,LPSTR*);") -cpp_quote("HRESULT WINAPI MimeOleGetSubjectFileName(IMimePropertySet*,ULONG*,ULONG*,LPSTR,ULONG);") -cpp_quote("HRESULT WINAPI MimeOleCreateWebDocument(LPCSTR,LPCSTR,IMimeWebDocument**);") -cpp_quote("HRESULT WINAPI MimeOleGetRelatedSection(IMimeMessageTree*,boolean,LPHBODY,boolean*);") -cpp_quote("HRESULT WINAPI MimeOleGetMixedSection(IMimeMessageTree*,boolean,LPHBODY,boolean*);") -cpp_quote("HRESULT WINAPI MimeOleGetAlternativeSection(IMimeMessageTree*,LPHBODY,boolean*);") -cpp_quote("HRESULT WINAPI MimeOleGenerateCID(LPSTR,ULONG,boolean);") -cpp_quote("HRESULT WINAPI MimeOleGenerateMID(LPSTR,ULONG,boolean);") -cpp_quote("HRESULT WINAPI MimeOleCreateByteStream(IStream**);") -cpp_quote("HRESULT WINAPI MimeOlGetPropertySchema(IMimePropertySchema**);") -cpp_quote("HRESULT WINAPI MimeOleQueryString(LPCSTR,LPCSTR,boolean,boolean);") -cpp_quote("HRESULT WINAPI MimeOleGetPropA(IMimePropertySet*,LPCSTR,DWORD,LPSTR*);") -cpp_quote("HRESULT WINAPI MimeOleSetPropA(IMimePropertySet*,LPCSTR,DWORD,LPCSTR);") -cpp_quote("HRESULT WINAPI MimeOleGetPropW(IMimePropertySet*,LPCSTR,DWORD,LPWSTR*);") -cpp_quote("HRESULT WINAPI MimeOleSetPropW(IMimePropertySet*,LPCSTR,DWORD,LPCWSTR);") -cpp_quote("HRESULT WINAPI MimeOleGetBodyPropA(IMimeMessageTree*,HBODY,LPCSTR,DWORD,LPSTR*);") -cpp_quote("HRESULT WINAPI MimeOleSetBodyPropA(IMimeMessageTree*,HBODY,LPCSTR,DWORD,LPCSTR);") -cpp_quote("HRESULT WINAPI MimeOleGetBodyPropW(IMimeMessageTree*,HBODY,LPCSTR,DWORD,LPWSTR*);") -cpp_quote("HRESULT WINAPI MimeOleSetBodyPropW(IMimeMessageTree*,HBODY,LPCSTR,DWORD,LPCWSTR);") -cpp_quote("HRESULT WINAPI MimeOleCreateHeaderTable(IMimeHeaderTable**);") -cpp_quote("HRESULT WINAPI MimeOleVariantFree(LPPROPVARIANT);") -cpp_quote("HRESULT WINAPI MimeOleVariantCopy(LPPROPVARIANT,LPPROPVARIANT);") -cpp_quote("HRESULT WINAPI MimeOleGetExtClassId(LPCSTR,LPCLSID);") -cpp_quote("HRESULT WINAPI MimeOleEncodeHeader(HCHARSET,LPPROPVARIANT,LPSTR*,LPRFC1522INFO);") -cpp_quote("HRESULT WINAPI MimeOleDecodeHeader(HCHARSET,LPCSTR,LPPROPVARIANT,LPRFC1522INFO);") -cpp_quote("HRESULT WINAPI MimeOleRfc1522Decode(LPCSTR,LPSTR,ULONG,LPSTR*);") -cpp_quote("HRESULT WINAPI MimeOleRfc1522Encode(LPCSTR,HCHARSET,LPSTR*);") -cpp_quote("HRESULT WINAPI MimeOleGetInternat(IMimeInternational**);") -cpp_quote("HRESULT WINAPI MimeOleFindCharset(LPCSTR,LPHCHARSET);") -cpp_quote("HRESULT WINAPI MimeOleGetCharsetInfo(HCHARSET,LPINETCSETINFO);") -cpp_quote("HRESULT WINAPI MimeOleGetCodePageInfo(HCHARSET,LPCODEPAGEINFO);") -cpp_quote("HRESULT WINAPI MimeOleGetDefaultCharset(LPHCHARSET);") -cpp_quote("HRESULT WINAPI MimeOleSetDefaultCharset(HCHARSET);") -cpp_quote("HRESULT WINAPI MimeOleGetCodePageCharset(CODEPAGEID,CHARSETTYPE,LPHCHARSET);") -cpp_quote("HRESULT WINAPI MimeOleCreateVirtualStream(IStream**);") -cpp_quote("HRESULT WINAPI MimeOleOpenFileStream(LPCSTR,DWORD,DWORD,IStream**);") -cpp_quote("HRESULT WINAPI MimeOleIsTnefStream(IStream*);") -cpp_quote("HRESULT WINAPI MimeOleGenerateFileName(LPCSTR,LPCSTR,LPCSTR,LPSTR*);") -cpp_quote("HRESULT WINAPI MimeOleGetFileExtension(LPCSTR,LPSTR,ULONG);") -cpp_quote("HRESULT WINAPI MimeOleCreateSecurity(IMimeSecurity**);") -cpp_quote("HRESULT WINAPI MimeOleInetDateToFileTime(LPCSTR,LPFILETIME);") -cpp_quote("HRESULT WINAPI MimeOleFileTimeToInetDate(LPFILETIME,LPSTR,ULONG);") -cpp_quote("HRESULT WINAPI MimeOleCreateMessageParts(IMimeMessageParts**);") -cpp_quote("HRESULT WINAPI MimeOleGetAllocator(IMimeAllocator**);") -cpp_quote("HRESULT WINAPI MimeOleParseRfc822Address(DWORD,ENCODINGTYPE,LPCSTR,LPADDRESSLIST);") -cpp_quote("HRESULT WINAPI MimeOleCreateMessage(IUnknown*,IMimeMessage**);") -cpp_quote("HRESULT WINAPI MimeOleMergePartialHeaders(IStream*,IStream*);") -cpp_quote("HRESULT WINAPI MimeOleEscapeString(CODEPAGEID,LPCSTR,LPSTR*);") -cpp_quote("HRESULT WINAPI MimeOleGetExtContentType(LPCSTR,LPSTR*);") -cpp_quote("HRESULT WINAPI MimeOleGetContentTypeExt(LPCSTR,LPSTR*);") -cpp_quote("HRESULT WINAPI MimeOleGetFileInfo(LPSTR,LPSTR*,LPSTR*,LPSTR*,LPSTR*,LPSTR*);") -cpp_quote("HRESULT WINAPI MimeOleCreateBody(IMimeBody**);") -cpp_quote("HRESULT WINAPI MimeOleCreatePropertySet(IUnknown*,IMimePropertySet**);") -cpp_quote("HRESULT WINAPI MimeOleCreateMessageTree(IUnknown*,IMimeMessageTree**);") -cpp_quote("HRESULT WINAPI MimeOleGetCertsFromThumbprints(THUMBBLOB*,X509CERTRESULT*,const HCERTSTORE*,DWORD);") -cpp_quote("HRESULT WINAPI MimeOleSplitMessage(IMimeMessage*,ULONG,IMimeMessageParts**);") -cpp_quote("HRESULT WINAPI MimeOleClearDirtyTree(IMimeMessageTree*);") -cpp_quote("HRESULT WINAPI MimeOleConvertEnrichedToHTML(CODEPAGEID,IStream*,IStream*);") -cpp_quote("HRESULT WINAPI MimeOleSMimeCapsToDlg(LPBYTE,DWORD,DWORD,PCX509CERT*,HWND,DWORD,DWORD,DWORD);") -cpp_quote("HRESULT WINAPI MimeOleSMimeCapsFromDlg(HWND,DWORD,DWORD,DWORD,LPBYTE,DWORD*);") -cpp_quote("HRESULT WINAPI MimeOleSMimeCapInit(LPBYTE,DWORD,LPVOID*);") -cpp_quote("HRESULT WINAPI MimeOleSMimeCapAddSMimeCap(LPBYTE,DWORD,LPVOID);") -cpp_quote("HRESULT WINAPI MimeOleSMimeCapAddCert(LPBYTE,DWORD,BOOL,LPVOID);") -cpp_quote("HRESULT WINAPI MimeOleSMimeCapGetEncAlg(LPVOID,LPBYTE,DWORD*,DWORD*);") -cpp_quote("HRESULT WINAPI MimeOleSMimeCapGetHashAlg(LPVOID,LPBYTE,DWORD*,DWORD*);") -cpp_quote("HRESULT WINAPI MimeOleSMimeCapRelease(LPVOID);") -cpp_quote("HRESULT WINAPI MimeOleAlgNameFromSMimeap(LPBYTE,DWORD,LPCSTR*);") -cpp_quote("HRESULT WINAPI MimeOleAlgStrengthFromSMimeCap(LPBYTE,DWORD,BOOL,DWORD*);") -cpp_quote("HRESULT WINAPI MimeOleSMimeCapsFull(LPVOID,BOOL,BOOL,LPBYTE,DWORD*);") -cpp_quote("HRESULT WINAPI MimeOleCreateHashTable(DWORD,BOOL,IHashTable**);") -cpp_quote("HRESULT WINAPI MimeOleStripHeaders(IMimeMessage*,HBODY,LPCSTR,LPCSTR,IStream**);") - -cpp_quote("HRESULT WINAPI MimeEditViewSource(HWND,IMimeMessage*);") -cpp_quote("HRESULT WINAPI MimeEditIsSafeToRun(HWND,LPCSTR);") -cpp_quote("HRESULT WINAPI MimeEditVerifyTrust(HWND,LPCSTR,LPCSTR);") -cpp_quote("HRESULT WINAPI MimeEditCreateMimeDocument(IUnknown*,IMimeMessage*,DWORD,IMimeMessage**);") -cpp_quote("HRESULT WINAPI MimeEditGetBackgroundImageUrl(IUnknown*,BSTR*);") -cpp_quote("HRESULT WINAPI MimeEditDocumentFromStream(IStream*,REFIID,void**);") - -cpp_quote("#ifdef __cplusplus") -cpp_quote("}") -cpp_quote("#endif") +/* + * Copyright 2007 Robert Shearman for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "ocidl.idl"; +import "objidl.idl"; +import "propidl.idl"; + +#define DECLARE_HANDLE(name) typedef void *name + +interface IMimeMessageCallback; +interface IMimeEnumAddressTypes; +interface IMimeMessageParts; +interface IMimeMessageTree; +interface IMimeBody; +interface IMimeEnumProperties; + +cpp_quote("DEFINE_GUID(CLSID_IMimeBody, 0xfd853cdb, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);") +cpp_quote("DEFINE_GUID(CLSID_IMimeAllocator, 0xfd853cdd, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);") +cpp_quote("DEFINE_GUID(CLSID_IMimeMessage, 0xfd853ce3, 0x7f86, 0x11d0, 0x82, 0x52, 0x0, 0xc0, 0x4f, 0xd8, 0x5a, 0xb4);") + +cpp_quote("#define MIME_E_REG_CREATE_KEY 0x800cce01") +cpp_quote("#define MIME_E_REG_QUERY_INFO 0x800cce02") +cpp_quote("#define MIME_E_INVALID_ENCTYPE 0x800cce03") +cpp_quote("#define MIME_E_BOUNDARY_MISMATCH 0x800cce04") +cpp_quote("#define MIME_E_NOT_FOUND 0x800cce05") +cpp_quote("#define MIME_E_NO_DATA 0x800cce05") +cpp_quote("#define MIME_E_BUFFER_TOO_SMALL 0x800cce06") + +cpp_quote("#define MIME_E_INVALID_TEXT_TYPE 0x800cce38") + +cpp_quote("typedef enum tagMIMEPROPID {") +cpp_quote(" PID_HDR_NEWSGROUP = 2,") +cpp_quote(" PID_HDR_NEWSGROUPS = 3,") +cpp_quote(" PID_HDR_REFS = 4,") +cpp_quote(" PID_HDR_SUBJECT = 5,") +cpp_quote(" PID_HDR_FROM = 6,") +cpp_quote(" PID_HDR_MESSAGEID = 7,") +cpp_quote(" PID_HDR_RETURNPATH = 8,") +cpp_quote(" PID_HDR_RR = 9,") +cpp_quote(" PID_HDR_RETRCPTO = 10,") +cpp_quote(" PID_HDR_APPARTO = 11,") +cpp_quote(" PID_HDR_DATE = 12,") +cpp_quote(" PID_HDR_RECEIVED = 13,") +cpp_quote(" PID_HDR_REPLYTO = 14,") +cpp_quote(" PID_HDR_XMAILER = 15,") +cpp_quote(" PID_HDR_BCC = 16,") +cpp_quote(" PID_HDR_MIMEVER = 17,") +cpp_quote(" PID_HDR_CNTTYPE = 18,") +cpp_quote(" PID_HDR_CNTXFER = 19,") +cpp_quote(" PID_HDR_CNTID = 20,") +cpp_quote(" PID_HDR_CNTDESC = 21,") +cpp_quote(" PID_HDR_CNTDISP = 22,") +cpp_quote(" PID_HDR_CNTBASE = 23,") +cpp_quote(" PID_HDR_CNTLOC = 24,") +cpp_quote(" PID_HDR_TO = 25,") +cpp_quote(" PID_HDR_PATH = 26,") +cpp_quote(" PID_HDR_FOLLOWUPTO = 27,") +cpp_quote(" PID_HDR_EXPIRES = 28,") +cpp_quote(" PID_HDR_CC = 29,") + +cpp_quote(" PID_HDR_SENDER = 61,") + +cpp_quote(" PID_HDR_INREPLYTO = 77,") +cpp_quote("} MIMEPROPID;") + +cpp_quote("#define OID_HEADER_RELOAD_TYPE (0x00370000 | VT_UI4)") + + +[ + uuid(e4b28371-83b0-11d0-8259-00c04fd85ab4), + version(1.0) +] +library MIMEOLE +{ + importlib("stdole2.tlb"); + + DECLARE_HANDLE(HCHARSET); + DECLARE_HANDLE(HBODY); + DECLARE_HANDLE(HHEADERROW); + + typedef HCHARSET *LPHCHARSET; + typedef HBODY *LPHBODY; + typedef HHEADERROW *LPHHEADERROW; + typedef DWORD TYPEDID; + typedef const PROPVARIANT *LPCPROPVARIANT; + typedef const BLOB *LPCBLOB; + + typedef enum tagRELOADTYPE + { + RELOAD_HEADER_NONE, + RELOAD_HEADER_RESET, + RELOAD_HEADER_APPEND, + RELOAD_HEADER_REPLACE, + } RELOADTYPE; + + typedef enum tagMIMESAVETYPE + { + SAVE_RFC822, + SAVE_RFC1521, + } MIMESAVETYPE; + + typedef enum tagCSETAPPLYTYPE + { + CSET_APPLY_UNTAGGED, + CSET_APPLY_ALL, + CSET_APPLY_TAG_ALL, + } CSETAPPLYTYPE; + + typedef enum tagENCODINGTYPE + { + IET_BINARY, + IET_BASE64, + IET_UUENCODE, + IET_QP, + IET_7BIT, + IET_8BIT, + IET_INETCSET, + IET_UNICODE, + IET_RFC1522, + IET_ENCODED, + IET_CURRENT, + IET_UNKNOWN, + IET_BINHEX40, + IET_LAST + } ENCODINGTYPE; + + const SHORT IET_DECODED = IET_BINARY; + + const SHORT CCHMAX_HEADER_LINE = 1000; + + [ + uuid(c5588349-7f86-11d0-8252-00c04fd85ab4), + object + ] + interface IMimeInternational : IUnknown + { + typedef [unique] IMimeInternational *LPMIMEINTERNATIONAL; + typedef DWORD CODEPAGEID; + + const CODEPAGEID CP_USASCII = 1252; + const CODEPAGEID CP_UNICODE = 1200; + const CODEPAGEID CP_JAUTODETECT = 50932; + const CODEPAGEID CP_KAUTODETECT = 50949; + const CODEPAGEID CP_ISO2022JPESC = 50221; + const CODEPAGEID CP_ISO2022JPSIO = 50222; + + const SHORT CCHMAX_CSET_NAME = 128; + const SHORT CCHMAX_LANG_NAME = 128; + const SHORT CCHMAX_FACE_NAME = 128; + + typedef struct tagINETCSETINFO + { + CHAR szName[CCHMAX_CSET_NAME]; + HCHARSET hCharset; + CODEPAGEID cpiWindows; + CODEPAGEID cpiInternet; + DWORD dwReserved1; + } INETCSETINFO, *LPINETCSETINFO; + + typedef enum tagINETLANGMASK + { + ILM_FAMILY = 0x01, + ILM_NAME = 0x02, + ILM_BODYCSET = 0x04, + ILM_HEADERCSET = 0x08, + ILM_WEBCSET = 0x10, + ILM_FIXEDFONT = 0x20, + ILM_VARIABLEFONT = 0x40, + } INETLANGMASK; + + typedef struct tagCODEPAGEINFO + { + DWORD dwMask; + CODEPAGEID cpiCodePage; + BOOL fIsValidCodePage; + ULONG ulMaxCharSize; + BOOL fInternetCP; + CODEPAGEID cpiFamily; + CHAR szName[CCHMAX_LANG_NAME]; + CHAR szBodyCset[CCHMAX_CSET_NAME]; + CHAR szHeaderCset[CCHMAX_CSET_NAME]; + CHAR szWebCset[CCHMAX_CSET_NAME]; + CHAR szFixedFont[CCHMAX_FACE_NAME]; + CHAR szVariableFont[CCHMAX_FACE_NAME]; + ENCODINGTYPE ietNewsDefault; + ENCODINGTYPE ietMailDefault; + DWORD dwReserved1; + } CODEPAGEINFO, *LPCODEPAGEINFO; + + typedef struct tagRFC1522INFO + { + BOOL fRfc1522Allowed; + BOOL fRfc1522Used; + BOOL fAllow8bit; + HCHARSET hRfc1522Cset; + } RFC1522INFO, *LPRFC1522INFO; + + typedef enum tagCHARSETTYPE + { + CHARSET_BODY, + CHARSET_HEADER, + CHARSET_WEB, + } CHARSETTYPE; + + + HRESULT SetDefaultCharset( + [in] HCHARSET hCharset); + HRESULT GetDefaultCharset( + [out] LPHCHARSET phCharset); + HRESULT GetCodePageCharset( + [in] CODEPAGEID cpiCodePage, + [in] CHARSETTYPE ctCsetType, + [out] LPHCHARSET phCharset); + HRESULT FindCharset( + [in] LPCSTR pszCharset, + [out] LPHCHARSET phCharset); + HRESULT GetCharsetInfo( + [in] HCHARSET hCharset, + [in, out] LPINETCSETINFO pCsetInfo); + HRESULT GetCodePageInfo( + [in] CODEPAGEID cpiCodePage, + [in, out] LPCODEPAGEINFO pCodePageInfo); + HRESULT DecodeHeader( + [in] HCHARSET hCharset, + [in] LPCSTR pszData, + [in, out] LPPROPVARIANT pDecoded, + [in, out] LPRFC1522INFO pRfc1522Info); + HRESULT EncodeHeader( + [in] HCHARSET hCharset, + [in] LPPROPVARIANT pData, + [out] LPSTR *ppszEncoded, + [in, out] LPRFC1522INFO pRfc1522Info); + HRESULT ConvertBuffer( + [in] CODEPAGEID cpiSource, + [in] CODEPAGEID cpiDest, + [in] LPBLOB pIn, + [in, out] LPBLOB pOut, + [out] ULONG *pcbRead); + HRESULT ConvertString( + [in] CODEPAGEID cpiSource, + [in] CODEPAGEID cpiDest, + [in] LPPROPVARIANT pIn, + [in, out] LPPROPVARIANT pOut); + HRESULT MLANG_ConvertInetReset(); + HRESULT MLANG_ConvertInetString( + [in] CODEPAGEID cpiSource, + [in] CODEPAGEID cpiDest, + [in] LPCSTR pSource, + [in] int *pnSizeOfSource, + [out] LPSTR pDestination, + [in] int *pnDstSize); + HRESULT Rfc1522Decode( + [in] LPCSTR pszValue, + [in] LPCSTR pszCharset, + [in] ULONG cchmax, + [out] LPSTR *ppszDecoded); + HRESULT Rfc1522Encode( + [in] LPCSTR pszValue, + [in] HCHARSET hCharset, + [out] LPSTR *ppszEncoded); + } + + [ + uuid(c5588353-7f86-11d0-8252-00c04fd85ab4), + object + ] + interface IMimeSecurity : IUnknown + { + typedef [unique] IMimeSecurity *LPMIMESECURITY; + + cpp_quote("#ifdef __WINE_WINCRYPT_H") + cpp_quote("typedef PCCERT_CONTEXT PCX509CERT;") + cpp_quote("#else") + typedef const void *PCX509CERT; + typedef void *HCERTSTORE; + cpp_quote("#endif") + + typedef BLOB THUMBBLOB; + typedef void *HCAPICERTSTORE; + + typedef enum tagCERTSTATE + { + CERTIFICATE_OK, + CERTIFICATE_NOT_PRESENT, + CERTIFICATE_EXPIRED, + CERTIFICATE_CHAIN_TOO_LONG, + CERTIFICATE_MISSING_ISSUER, + CERTIFICATE_CRL_LISTED, + CERTIFICATE_NOT_TRUSTED, + CERTIFICATE_INVALID, + CERTIFICATE_ERROR, + CERTIFICATE_NOPRINT, + CERTIFICATE_UNKNOWN + } CERTSTATE; + + typedef enum tagCERTNAMETYPE + { + SIMPLE, + OID, + X500, + } CERTNAMETYPE; + + typedef enum tagCERTDATAID + { + CDID_EMAIL, + CDID_MAX + } CERTDATAID; + + typedef struct tagX509CERTRESULT + { + DWORD cEntries; + CERTSTATE *rgcs; + PCX509CERT *rgpCert; + } X509CERTRESULT, *PX509CERTRESULT; + typedef const X509CERTRESULT *PCX509CERTRESULT; + + HRESULT InitNew(void); + + HRESULT CheckInit(void); + + HRESULT EncodeMessage( + [in] IMimeMessageTree */*const*/ pTree, + [in] DWORD dwFlags); + + HRESULT EncodeBody( + [in] IMimeMessageTree */*const*/ pTree, + [in] HBODY hEncodeRoot, + [in] DWORD dwFlags); + + HRESULT DecodeMessage( + [in] IMimeMessageTree */*const*/ pTree, + [in] DWORD dwFlags); + + HRESULT DecodeBody( + [in] IMimeMessageTree */*const*/ pTree, + [in] HBODY hDecodeRoot, + [in] DWORD dwFlags); + + HRESULT EnumCertificates( + [in] HCAPICERTSTORE hc, + [in] DWORD dwUsage, + [in] PCX509CERT pPrev, + [out] PCX509CERT *ppCert); + + HRESULT GetCertificateName( + [in] const PCX509CERT pX509Cert, + [in] const CERTNAMETYPE cn, + [out] LPSTR *ppszName); + + HRESULT GetMessageType( + [in] const HWND hwndParent, + [in] IMimeBody */*const*/ pBody, + [out] DWORD */*const*/ pdwSecType); + + HRESULT GetCertData( + [in] const PCX509CERT pX509Cert, + [in] const CERTDATAID dataid, + [out, ref] LPPROPVARIANT pValue); + } + + [ + uuid(fd853cd1-7f86-11d0-8252-00c04fd85ab4), + object + ] + interface IMimeHeaderTable : IPersistStream + { + /* FIXME: fill this in */ + } + + [ + uuid(fd853cec-7f86-11d0-8252-00c04fd85ab4), + object + ] + interface IMimePropertySchema : IUnknown + { + typedef enum tagMIMEPROPFLAGS + { + MPF_INETCSET = 0x01, + MPF_RFC1522 = 0x02, + MPF_ADDRESS = 0x04, + MPF_HASPARAMS = 0x08, + MPF_MIME = 0x10, + MPF_READONLY = 0x20 + } MIMEPROPFLAGS; + + /* FIXME: fill this in */ + } + + [ + uuid(fd853cd3-7f86-11d0-8252-00c04fd85ab4), + object + ] + interface IMimePropertySet : IPersistStreamInit + { + typedef [unique] IMimePropertySet *LPMIMEPROPERTYSET; + + cpp_quote("#define PDF_ENCODED 0x00000001") + cpp_quote("#define PDF_NAMEINDATA 0x00000002") + cpp_quote("#define PDF_HEADERFORMAT (0x00000004 | PDF_ENCODED)") + cpp_quote("#define PDF_NOCOMMENTS 0x00000008") + cpp_quote("#define PDF_SAVENOENCODE 0x00000010") + cpp_quote("#define PDF_VECTOR 0x00000020") + + typedef struct tagMIMEPARAMINFO + { + LPSTR pszName; + LPSTR pszData; + } MIMEPARAMINFO, *LPMIMEPARAMINFO; + + typedef enum tagPROPINFOMASK + { + PIM_CHARSET = 0x01, + PIM_ENCODINGTYPE = 0x02, + PIM_ROWNUMBER = 0x04, + PIM_FLAGS = 0x08, + PIM_PROPID = 0x10, + PIM_VALUES = 0x20, + PIM_VTDEFAULT = 0x40, + PIM_VTCURRENT = 0x80 + } PROPINFOMASK; + + typedef struct tagMIMEPROPINFO + { + DWORD dwMask; + HCHARSET hCharset; + ENCODINGTYPE ietEncoding; + DWORD dwRowNumber; + DWORD dwFlags; + DWORD dwPropId; + DWORD cValues; + VARTYPE vtDefault; + VARTYPE vtCurrent; + } MIMEPROPINFO, *LPMIMEPROPINFO; + typedef const MIMEPROPINFO *LPCMIMEPROPINFO; + + HRESULT GetPropInfo( + [in] LPCSTR pszName, + [in,out] LPMIMEPROPINFO pInfo); + + HRESULT SetPropInfo( + [in] LPCSTR pszName, + [in] LPCMIMEPROPINFO pInfo); + +cpp_quote("#ifdef WINE_NO_UNICODE_MACROS") +cpp_quote("#undef GetProp") +cpp_quote("#undef SetProp") +cpp_quote("#undef EnumProps") +cpp_quote("#endif") + HRESULT GetProp( + [in] LPCSTR pszName, + [in] DWORD dwFlags, + [in,out] LPPROPVARIANT pValue); + + HRESULT SetProp( + [in] LPCSTR pszName, + [in] DWORD dwFlags, + [in] LPCPROPVARIANT pValue); + + HRESULT AppendProp( + [in] LPCSTR pszName, + [in] DWORD dwFlags, + [in] LPPROPVARIANT pValue); + + HRESULT DeleteProp( + [in] LPCSTR pszName); + + HRESULT CopyProps( + [in] ULONG cNames, + [in,unique] LPCSTR *prgszName, + [in] IMimePropertySet *pPropertySet); + + HRESULT MoveProps( + [in] ULONG cNames, + [in] LPCSTR *prgszName, + [in] IMimePropertySet *pPropertySet); + + HRESULT DeleteExcept( + [in] ULONG cNames, + [in] LPCSTR *prgszName); + + HRESULT QueryProp( + [in] LPCSTR pszName, + [in] LPCSTR pszCriteria, + [in] boolean fSubString, + [in] boolean fCaseSensitive); + + HRESULT GetCharset( + [out] LPHCHARSET phCharset); + + HRESULT SetCharset( + [in] HCHARSET hCharset, + [in] CSETAPPLYTYPE applytype); + + HRESULT GetParameters( + [in] LPCSTR pszName, + [out] ULONG *pcParams, + [out] LPMIMEPARAMINFO *pprgParam); + + HRESULT IsContentType( + [in] LPCSTR pszPriType, + [in,unique] LPCSTR pszSubType); + + HRESULT BindToObject( + [in] REFIID riid, + [out,iid_is(riid)] void **ppvObject); + + HRESULT Clone( + [out] IMimePropertySet **ppPropertySet); + + HRESULT SetOption( + [in] const TYPEDID oid, + [in] LPCPROPVARIANT pValue); + + HRESULT GetOption( + [in] const TYPEDID oid, + [in,out] LPPROPVARIANT pValue); + + cpp_quote("#define EPF_NONAME 0x00000001") + + HRESULT EnumProps( + [in] DWORD dwFlags, + [out] IMimeEnumProperties **ppEnum); + + } + + [ + uuid(c558834a-7f86-11d0-8252-00c04fd85ab4), + object + ] + interface IMimeAddressTable : IUnknown + { + typedef [unique] IMimeAddressTable *LPMIMEADDRESSTABLE; + + DECLARE_HANDLE(HADDRESS); + typedef HADDRESS *LPHADDRESS; + typedef DWORD IADDRESSTYPE; + + typedef enum tagADDRESSFORMAT + { + AFT_DISPLAY_FRIENDLY, + AFT_DISPLAY_EMAIL, + AFT_DISPLAY_BOTH, + AFT_RFC822_DECODED, + AFT_RFC822_ENCODED, + AFT_RFC822_TRANSMIT, + } ADDRESSFORMAT; + + typedef struct tagADDRESSPROPS + { + DWORD dwProps; + HADDRESS hAddress; + ENCODINGTYPE ietFriendly; + HCHARSET hCharset; + DWORD dwAdrType; + LPSTR pszFriendly; + LPWSTR pwszReserved; + LPSTR pszEmail; + CERTSTATE certstate; + THUMBBLOB tbSigning; + THUMBBLOB tbEncryption; + DWORD dwCookie; + DWORD dwReserved1; + DWORD dwReserved2; + } ADRESSPROPS, *LPADDRESSPROPS; + + typedef struct tagADDRESSLIST + { + ULONG cAdrs; + LPADDRESSPROPS prgAdr; + } ADDRESSLIST, *LPADDRESSLIST; + + /* FIXME: fill this in */ + } + + [ + uuid(ee519f11-851a-11d0-8252-00c04fd85ab4), + object + ] + interface IMimeWebDocument : IUnknown + { + /* FIXME: fill this in */ + } + + [ + uuid(c558834c-7f86-11d0-8252-00c04fd85ab4), + object + ] + interface IMimeBody : IMimePropertySet + { + typedef [unique] IMimeBody *LPMIMEBODY; + + typedef enum tagIMSGBODYTYPE + { + IBT_SECURE, + IBT_ATTACHMENT, + IBT_EMPTY, + IBT_CSETTAGGED, + IBT_AUTOATTACH, + } IMSGBODYTYPE; + + typedef struct tagBODYOFFSETS + { + DWORD cbBoundaryStart; + DWORD cbHeaderStart; + DWORD cbBodyStart; + DWORD cbBodyEnd; + } BODYOFFSETS, *LPBODYOFFSETS; + + typedef struct tagTRANSMITINFO + { + ENCODINGTYPE ietCurrent; + ENCODINGTYPE ietXmitMime; + ENCODINGTYPE ietXmit822; + ULONG cbLongestLine; + ULONG cExtended; + ULONG ulPercentExt; + ULONG cbSize; + ULONG cLines; + } TRANSMITINFO, *LPTRANSMITINFO; + + HRESULT IsType( + [in] IMSGBODYTYPE bodytype); + + HRESULT SetDisplayName( + [in] LPCSTR pszDisplay); + + HRESULT GetDisplayName( + [out] LPSTR *ppszDisplay); + + HRESULT GetOffsets( + [out] LPBODYOFFSETS pOffsets); + + HRESULT GetCurrentEncoding( + [out] ENCODINGTYPE *pietEncoding); + + HRESULT SetCurrentEncoding( + [in] ENCODINGTYPE ietEncoding); + + HRESULT GetEstimatedSize( + [in] ENCODINGTYPE ietEncoding, + [out] ULONG *pcbSize); + + HRESULT GetDataHere( + [in] ENCODINGTYPE ietEncoding, + [in] IStream *pStream); + + HRESULT GetData( + [in] ENCODINGTYPE ietEncoding, + [out] IStream **ppStream); + + HRESULT SetData( + [in] ENCODINGTYPE ietEncoding, + [in,unique] LPCSTR pszPriType, + [in,unique] LPCSTR pszSubType, + [in] REFIID riid, + [in,iid_is(riid)] LPVOID pvObject); + + HRESULT EmptyData(void); + + HRESULT CopyTo( + [in] IMimeBody *pBody); + + HRESULT GetTransmitInfo( + [in,out] LPTRANSMITINFO pTransmitInfo); + + HRESULT SaveToFile( + [in] ENCODINGTYPE ietEncoding, + [in] LPCSTR pszFilePath); + + HRESULT GetHandle( + [out] LPHBODY phBody); + + } + + [ + uuid(fd853cd4-7f86-11d0-8252-00c04fd85ab4), + object + ] + interface IMimeMessageTree : IPersistStreamInit + { + typedef [unique] IMimeMessageTree *LPMIMEMESSAGETREE; + + const HBODY HBODY_ROOT = (HBODY)-1; + + typedef enum tagBODYLOCATION + { + IBL_ROOT, + IBL_PARENT, + IBL_FIRST, + IBL_LAST, + IBL_NEXT, + IBL_PREVIOUS, + } BODYLOCATION; + + typedef struct tagFINDBODY + { + LPSTR pszPriType; + LPSTR pszSubType; + DWORD dwReserved; + } FINDBODY, *LPFINDBODY; + + HRESULT GetMessageSource( + [out] IStream **ppStream, + [in] DWORD dwFlags); + + HRESULT GetMessageSize( + [out] ULONG *pcbSize, + [in] DWORD dwFlags); + + HRESULT LoadOffsetTable( + [in] IStream *pStream); + + HRESULT SaveOffsetTable( + [in] IStream *pStream, + [in] DWORD dwFlags); + + HRESULT GetFlags( + [out] DWORD *pdwFlags); + + HRESULT Commit( + [in] DWORD dwFlags); + + HRESULT HandsOffStorage(); + + HRESULT BindToObject( + [in] const HBODY hBody, + [in] REFIID riid, + [out, iid_is(riid)] void **ppvObject); + + HRESULT SaveBody( + [in] HBODY hBody, + [in] DWORD dwFlags, + [in] IStream *pStream); + + HRESULT InsertBody( + [in] BODYLOCATION location, + [in] HBODY hPivot, + [out] LPHBODY phBody); + + HRESULT GetBody( + [in] BODYLOCATION location, + [in] HBODY hPivot, + [out] LPHBODY phBody); + + HRESULT DeleteBody( + [in] HBODY hBody, + [in] DWORD dwFlags); + + HRESULT MoveBody( + [in] HBODY hBody, + [in] BODYLOCATION location); + + HRESULT CountBodies( + [in] HBODY hParent, + [in] boolean fRecurse, + [out] ULONG *pcBodies); + + HRESULT FindFirst( + [in, out] LPFINDBODY pFindBody, + [out] LPHBODY phBody); + + HRESULT FindNext( + [in, out] LPFINDBODY pFindBody, + [out] LPHBODY phBody); + + HRESULT ResolveURL( + [in] HBODY hRelated, + [in] LPCSTR pszBase, + [in] LPCSTR pszURL, + [in] DWORD dwFlags, + [out] LPHBODY phBody); + + HRESULT ToMultipart( + [in] HBODY hBody, + [in] LPCSTR pszSubType, + [out] LPHBODY phMultipart); + + HRESULT GetBodyOffsets( + [in] HBODY hBody, + [in, out] LPBODYOFFSETS pOffsets); + + HRESULT GetCharset( + [out] LPHCHARSET phCharset); + + HRESULT SetCharset( + [in] HCHARSET hCharset, + [in] CSETAPPLYTYPE applytype); + + HRESULT IsBodyType( + [in] HBODY hBody, + [in] IMSGBODYTYPE bodytype); + + HRESULT IsContentType( + [in] HBODY hBody, + [in] LPCSTR pszPriType, + [in] LPCSTR pszSubType); + + HRESULT QueryBodyProp( + [in] HBODY hBody, + [in] LPCSTR pszName, + [in] LPCSTR pszCriteria, + [in] boolean fSubString, + [in] boolean fCaseSensitive); + + HRESULT GetBodyProp( + [in] HBODY hBody, + [in] LPCSTR pszName, + [in] DWORD dwFlags, + [in, out] LPPROPVARIANT pValue); + + HRESULT SetBodyProp( + [in] HBODY hBody, + [in] LPCSTR pszName, + [in] DWORD dwFlags, + [in] LPCPROPVARIANT pValue); + + HRESULT DeleteBodyProp( + [in] HBODY hBody, + [in] LPCSTR pszName); + + HRESULT SetOption( + [in] const TYPEDID oid, + [in] LPCPROPVARIANT pValue); + + HRESULT GetOption( + [in] const TYPEDID oid, + [in, out] LPPROPVARIANT pValue); + } + + [ + uuid(fd853cd5-7f86-11d0-8252-00c04fd85ab4), + object + ] + interface IMimeMessage : IMimeMessageTree + { + typedef [unique] IMimeMessage *LPMIMEMESSAGE; + + typedef DWORD TEXTTYPE; + + typedef enum tagIMSGFLAGS + { + IMF_ATTACHMENTS = 0x00000001, + IMF_MULTIPART = 0x00000002, + IMF_SUBMULTIPART = 0x00000004, + IMF_MIME = 0x00000008, + IMF_HTML = 0x00000010, + IMF_PLAIN = 0x00000020, + IMF_PARTIAL = 0x00000040, + IMF_SIGNED = 0x00000080, + IMF_ENCRYPTED = 0x00000100, + IMF_TNEF = 0x00000200, + IMF_MHTML = 0x00000400, + IMF_SECURE = 0x00000800, + IMF_TEXT = 0x00001000, + IMF_CSETTAGGED = 0x00002000, + IMF_NEWS = 0x00004000, + IMF_VOICEMAIL = 0x00008000, + IMF_HASVCARD = 0x00010000, + IMF_RFC1154 = 0x00020000, + } IMSGFLAGS; + + typedef enum tagIMSGPRIORITY + { + IMSG_PRI_LOW = 5, + IMSG_PRI_NORMAL = 3, + IMSG_PRI_HIGH = 1, + } IMSGPRIORITY; + + cpp_quote("#define WPF_HTML 0x00000001") + cpp_quote("#define WPF_AUTOINLINE 0x00000002") + cpp_quote("#define WPF_SLIDESHOW 0x00000004") + cpp_quote("#define WPF_ATTACHLINKS 0x00000008") + cpp_quote("#define WPF_IMAGESONLY 0x00000010") + cpp_quote("#define WPF_NOMETACHARSET 0x00000020") + + typedef struct tagWEPAGEOPTIONS + { + DWORD cbSize; + DWORD dwFlags; + DWORD dwDelay; + WCHAR wchQuote; + } WEBPAGEOPTIONS, *LPWEBPAGEOPTIONS; + + cpp_quote("#define TXT_PLAIN 1") + cpp_quote("#define TXT_HTML 2") + + HRESULT CreateWebPage( + [in] IStream *pRootStm, + [in] LPWEBPAGEOPTIONS pOptions, + [in] IMimeMessageCallback *pCallback, + [out] IMoniker **ppMoniker); + + HRESULT GetProp( + [in] LPCSTR pszName, + [in] DWORD dwFlags, + [in,out] LPPROPVARIANT pValue); + + HRESULT SetProp( + [in] LPCSTR pszName, + [in] DWORD dwFlags, + [in] LPCPROPVARIANT pValue); + + HRESULT DeleteProp( + [in] LPCSTR pszName); + + HRESULT QueryProp( + [in] LPCSTR pszName, + [in] LPCSTR pszCriteria, + [in] boolean fSubString, + [in] boolean fCaseSensitive); + + HRESULT GetTextBody( + [in] DWORD dwTxtType, + [in] ENCODINGTYPE ietEncoding, + [out] IStream **pStream, + [out] LPHBODY phBody); + + HRESULT SetTextBody( + [in] DWORD dwTxtType, + [in] ENCODINGTYPE ietEncoding, + [in] HBODY hAlternative, + [in] IStream *pStream, + [out] LPHBODY phBody); + + HRESULT AttachObject( + [in] REFIID riid, + [in, iid_is(riid)] void *pvObject, + [out] LPHBODY phBody); + + HRESULT AttachFile( + [in] LPCSTR pszFilePath, + [in] IStream *pstmFile, + [out] LPHBODY phBody); + + HRESULT AttachURL( + [in] LPCSTR pszBase, + [in] LPCSTR pszURL, + [in] DWORD dwFlags, + [in] IStream *pstmURL, + [out] LPSTR *ppszCIDURL, + [out] LPHBODY phBody); + + HRESULT GetAttachments( + [out] ULONG *pcAttach, + [out] LPHBODY *pprghAttach); + + HRESULT GetAddressTable( + [out] IMimeAddressTable **ppTable); + + HRESULT GetSender( + [in, out] LPADDRESSPROPS pAddress); + + HRESULT GetAddressTypes( + [in] DWORD dwAdrTypes, + [in] DWORD dwProps, + [in, out] LPADDRESSLIST pList); + + HRESULT GetAddressFormat( + [in] DWORD dwAdrTypes, + [in] ADDRESSFORMAT format, + [out] LPSTR *ppszFormat); + + HRESULT EnumAddressTypes( + [in] DWORD dwAdrTypes, + [in] DWORD dwProps, + [out] IMimeEnumAddressTypes **ppEnum); + + HRESULT SplitMessage( + [in] ULONG cbMaxPart, + [out] IMimeMessageParts **ppParts); + + HRESULT GetRootMoniker( + [out] IMoniker **ppMoniker); + } + + [ + uuid(761aa741-7bda-11d1-8aa9-00c04fb951f3), + object + ] + interface IMimeMessageCallback : IUnknown + { + HRESULT OnWebPageSplitter( + [in] DWORD cInlined, + [in] IStream *ppStream); + } + + [ + uuid(de4ad8da-555f-11d1-8dd0-00c04fb951f9), + object + ] + interface IPersistMime : IPersist + { + /* FIXME: fill this in */ + } + + [ + uuid(c558834f-7f86-11d0-8252-00c04fd85ab4), + object + ] + interface IMimeMessageParts : IUnknown + { + /* FIXME: fill this in */ + } + + [ + uuid(c558834d-7f86-11d0-8252-00c04fd85ab4), + object + ] + interface IMimeEnumHeaderRows : IUnknown + { + typedef struct tagENUMHEADERROW + { + HHEADERROW hRow; + LPSTR pszHeader; + LPSTR pszData; + ULONG cchData; + DWORD_PTR dwReserved; + } ENUMHEADERROW, *LPENUMHEADERROW; + + /* FIXME: fill this in */ + } + + [ + uuid(fd853cee-7f86-11d0-8252-00c04fd85ab4), + object + ] + interface IMimeEnumProperties : IUnknown + { + typedef struct tagENUMPROPERTY + { + LPSTR pszName; + HHEADERROW hRow; + DWORD dwPropId; + } ENUMPROPERTY, *LPENUMPROPERTY; + + /* FIXME: fill this in */ + } + + [ + uuid(c5588354-7f86-11d0-8252-00c04fd85ab4), + object + ] + interface IMimeEnumAddressTypes : IUnknown + { + /* FIXME: fill this in */ + } + + [ + uuid(c5588350-7f86-11d0-8252-00c04fd85ab4), + object + ] + interface IMimeEnumMessageParts : IUnknown + { + /* FIXME: fill this in */ + } + + [ + uuid(64577981-86d7-11d1-bdfc-00c04fa31009), + object + ] + interface IHashTable : IUnknown + { + /* FIXME: fill this in */ + } + + [ + uuid(c5588351-7f86-11d0-8252-00c04fd85ab4), + object + ] + interface IMimeAllocator : IMalloc + { + typedef [unique] IMimeAllocator *LPMIMEALLOCATOR; + + HRESULT FreeParamInfoArray( + [in] ULONG cParams, + [in] LPMIMEPARAMINFO prgParam, + [in] boolean fFreeArray); + + HRESULT FreeAddressList( + [in,out] LPADDRESSLIST pList); + + HRESULT FreeAddressProps( + [in,out] LPADDRESSPROPS pAddress); + + HRESULT ReleaseObjects( + [in] ULONG cObjects, + [in] IUnknown **prgpUnknown, + [in] boolean fFreeArray); + + HRESULT FreeEnumHeaderRowArray( + [in] ULONG cRows, + [in] LPENUMHEADERROW prgRow, + [in] boolean fFreeArray); + + HRESULT FreeEnumPropertyArray( + [in] ULONG cProps, + [in] LPENUMPROPERTY prgProp, + [in] boolean fFreeArray); + + HRESULT FreeThumbprint( + [in] THUMBBLOB *pthumbprint); + + HRESULT PropVariantClear( + [in] LPPROPVARIANT pProp); + + } + + [ + uuid(feceaffd-c441-11d1-960e-00c04fbd7c09), + object + ] + interface IMimeObjResolver : IUnknown + { + /* FIXME: fill this in */ + } + + [ + uuid(b0d17fc2-7bc4-11d1-bdfa-00c04fa31009), + object + ] + interface IFontCache : IUnknown + { + /* FIXME: fill this in */ + } + + [ + uuid(b0d17fc5-7bc4-11d1-bdfa-00c04fa31009), + object + ] + interface IFontCacheNotify : IUnknown + { + /* FIXME: fill this in */ + } + + [ + uuid(70183210-7b36-11d2-8c12-00c04fa31009), + object + ] + interface IMimeEditTag : IUnknown + { + /* FIXME: fill this in */ + } + + [ + uuid(d09ee528-7b38-11d2-8c12-00c04fa31009), + object + ] + interface IMimeEditTagCollection : IUnknown + { + /* FIXME: fill this in */ + } +} + +cpp_quote("#ifdef __cplusplus") +cpp_quote(" extern \"C\" {") +cpp_quote("#endif") + +cpp_quote("") +cpp_quote("HRESULT WINAPI MimeOleSetCompatMode(DWORD);") +cpp_quote("HRESULT WINAPI MimeOleContentTypeFromUrl(LPCSTR,LPCSTR,LPSTR*);") +cpp_quote("HRESULT WINAPI MimeOleParseMhtmlUrl(LPSTR,LPSTR*,LPSTR*);") +cpp_quote("HRESULT WINAPI MimeOleObjectFromUrl(LPCSTR,BOOL,REFIID,LPVOID*,IUnknown**);") +cpp_quote("HRESULT WINAPI MimeOleObjectFromMoniker(BINDF,IMoniker*,IBindCtx*,REFIID,LPVOID*,IMoniker**);") +cpp_quote("HRESULT WINAPI MimeOleCombineURL(LPCSTR,ULONG,LPCSTR,ULONG,BOOL,LPSTR*);") +cpp_quote("HRESULT WINAPI MimeOleGetSubjectFileName(IMimePropertySet*,ULONG*,ULONG*,LPSTR,ULONG);") +cpp_quote("HRESULT WINAPI MimeOleCreateWebDocument(LPCSTR,LPCSTR,IMimeWebDocument**);") +cpp_quote("HRESULT WINAPI MimeOleGetRelatedSection(IMimeMessageTree*,boolean,LPHBODY,boolean*);") +cpp_quote("HRESULT WINAPI MimeOleGetMixedSection(IMimeMessageTree*,boolean,LPHBODY,boolean*);") +cpp_quote("HRESULT WINAPI MimeOleGetAlternativeSection(IMimeMessageTree*,LPHBODY,boolean*);") +cpp_quote("HRESULT WINAPI MimeOleGenerateCID(LPSTR,ULONG,boolean);") +cpp_quote("HRESULT WINAPI MimeOleGenerateMID(LPSTR,ULONG,boolean);") +cpp_quote("HRESULT WINAPI MimeOleCreateByteStream(IStream**);") +cpp_quote("HRESULT WINAPI MimeOlGetPropertySchema(IMimePropertySchema**);") +cpp_quote("HRESULT WINAPI MimeOleQueryString(LPCSTR,LPCSTR,boolean,boolean);") +cpp_quote("HRESULT WINAPI MimeOleGetPropA(IMimePropertySet*,LPCSTR,DWORD,LPSTR*);") +cpp_quote("HRESULT WINAPI MimeOleSetPropA(IMimePropertySet*,LPCSTR,DWORD,LPCSTR);") +cpp_quote("HRESULT WINAPI MimeOleGetPropW(IMimePropertySet*,LPCSTR,DWORD,LPWSTR*);") +cpp_quote("HRESULT WINAPI MimeOleSetPropW(IMimePropertySet*,LPCSTR,DWORD,LPCWSTR);") +cpp_quote("HRESULT WINAPI MimeOleGetBodyPropA(IMimeMessageTree*,HBODY,LPCSTR,DWORD,LPSTR*);") +cpp_quote("HRESULT WINAPI MimeOleSetBodyPropA(IMimeMessageTree*,HBODY,LPCSTR,DWORD,LPCSTR);") +cpp_quote("HRESULT WINAPI MimeOleGetBodyPropW(IMimeMessageTree*,HBODY,LPCSTR,DWORD,LPWSTR*);") +cpp_quote("HRESULT WINAPI MimeOleSetBodyPropW(IMimeMessageTree*,HBODY,LPCSTR,DWORD,LPCWSTR);") +cpp_quote("HRESULT WINAPI MimeOleCreateHeaderTable(IMimeHeaderTable**);") +cpp_quote("HRESULT WINAPI MimeOleVariantFree(LPPROPVARIANT);") +cpp_quote("HRESULT WINAPI MimeOleVariantCopy(LPPROPVARIANT,LPPROPVARIANT);") +cpp_quote("HRESULT WINAPI MimeOleGetExtClassId(LPCSTR,LPCLSID);") +cpp_quote("HRESULT WINAPI MimeOleEncodeHeader(HCHARSET,LPPROPVARIANT,LPSTR*,LPRFC1522INFO);") +cpp_quote("HRESULT WINAPI MimeOleDecodeHeader(HCHARSET,LPCSTR,LPPROPVARIANT,LPRFC1522INFO);") +cpp_quote("HRESULT WINAPI MimeOleRfc1522Decode(LPCSTR,LPSTR,ULONG,LPSTR*);") +cpp_quote("HRESULT WINAPI MimeOleRfc1522Encode(LPCSTR,HCHARSET,LPSTR*);") +cpp_quote("HRESULT WINAPI MimeOleGetInternat(IMimeInternational**);") +cpp_quote("HRESULT WINAPI MimeOleFindCharset(LPCSTR,LPHCHARSET);") +cpp_quote("HRESULT WINAPI MimeOleGetCharsetInfo(HCHARSET,LPINETCSETINFO);") +cpp_quote("HRESULT WINAPI MimeOleGetCodePageInfo(HCHARSET,LPCODEPAGEINFO);") +cpp_quote("HRESULT WINAPI MimeOleGetDefaultCharset(LPHCHARSET);") +cpp_quote("HRESULT WINAPI MimeOleSetDefaultCharset(HCHARSET);") +cpp_quote("HRESULT WINAPI MimeOleGetCodePageCharset(CODEPAGEID,CHARSETTYPE,LPHCHARSET);") +cpp_quote("HRESULT WINAPI MimeOleCreateVirtualStream(IStream**);") +cpp_quote("HRESULT WINAPI MimeOleOpenFileStream(LPCSTR,DWORD,DWORD,IStream**);") +cpp_quote("HRESULT WINAPI MimeOleIsTnefStream(IStream*);") +cpp_quote("HRESULT WINAPI MimeOleGenerateFileName(LPCSTR,LPCSTR,LPCSTR,LPSTR*);") +cpp_quote("HRESULT WINAPI MimeOleGetFileExtension(LPCSTR,LPSTR,ULONG);") +cpp_quote("HRESULT WINAPI MimeOleCreateSecurity(IMimeSecurity**);") +cpp_quote("HRESULT WINAPI MimeOleInetDateToFileTime(LPCSTR,LPFILETIME);") +cpp_quote("HRESULT WINAPI MimeOleFileTimeToInetDate(LPFILETIME,LPSTR,ULONG);") +cpp_quote("HRESULT WINAPI MimeOleCreateMessageParts(IMimeMessageParts**);") +cpp_quote("HRESULT WINAPI MimeOleGetAllocator(IMimeAllocator**);") +cpp_quote("HRESULT WINAPI MimeOleParseRfc822Address(DWORD,ENCODINGTYPE,LPCSTR,LPADDRESSLIST);") +cpp_quote("HRESULT WINAPI MimeOleCreateMessage(IUnknown*,IMimeMessage**);") +cpp_quote("HRESULT WINAPI MimeOleMergePartialHeaders(IStream*,IStream*);") +cpp_quote("HRESULT WINAPI MimeOleEscapeString(CODEPAGEID,LPCSTR,LPSTR*);") +cpp_quote("HRESULT WINAPI MimeOleGetExtContentType(LPCSTR,LPSTR*);") +cpp_quote("HRESULT WINAPI MimeOleGetContentTypeExt(LPCSTR,LPSTR*);") +cpp_quote("HRESULT WINAPI MimeOleGetFileInfo(LPSTR,LPSTR*,LPSTR*,LPSTR*,LPSTR*,LPSTR*);") +cpp_quote("HRESULT WINAPI MimeOleCreateBody(IMimeBody**);") +cpp_quote("HRESULT WINAPI MimeOleCreatePropertySet(IUnknown*,IMimePropertySet**);") +cpp_quote("HRESULT WINAPI MimeOleCreateMessageTree(IUnknown*,IMimeMessageTree**);") +cpp_quote("HRESULT WINAPI MimeOleGetCertsFromThumbprints(THUMBBLOB*,X509CERTRESULT*,const HCERTSTORE*,DWORD);") +cpp_quote("HRESULT WINAPI MimeOleSplitMessage(IMimeMessage*,ULONG,IMimeMessageParts**);") +cpp_quote("HRESULT WINAPI MimeOleClearDirtyTree(IMimeMessageTree*);") +cpp_quote("HRESULT WINAPI MimeOleConvertEnrichedToHTML(CODEPAGEID,IStream*,IStream*);") +cpp_quote("HRESULT WINAPI MimeOleSMimeCapsToDlg(LPBYTE,DWORD,DWORD,PCX509CERT*,HWND,DWORD,DWORD,DWORD);") +cpp_quote("HRESULT WINAPI MimeOleSMimeCapsFromDlg(HWND,DWORD,DWORD,DWORD,LPBYTE,DWORD*);") +cpp_quote("HRESULT WINAPI MimeOleSMimeCapInit(LPBYTE,DWORD,LPVOID*);") +cpp_quote("HRESULT WINAPI MimeOleSMimeCapAddSMimeCap(LPBYTE,DWORD,LPVOID);") +cpp_quote("HRESULT WINAPI MimeOleSMimeCapAddCert(LPBYTE,DWORD,BOOL,LPVOID);") +cpp_quote("HRESULT WINAPI MimeOleSMimeCapGetEncAlg(LPVOID,LPBYTE,DWORD*,DWORD*);") +cpp_quote("HRESULT WINAPI MimeOleSMimeCapGetHashAlg(LPVOID,LPBYTE,DWORD*,DWORD*);") +cpp_quote("HRESULT WINAPI MimeOleSMimeCapRelease(LPVOID);") +cpp_quote("HRESULT WINAPI MimeOleAlgNameFromSMimeap(LPBYTE,DWORD,LPCSTR*);") +cpp_quote("HRESULT WINAPI MimeOleAlgStrengthFromSMimeCap(LPBYTE,DWORD,BOOL,DWORD*);") +cpp_quote("HRESULT WINAPI MimeOleSMimeCapsFull(LPVOID,BOOL,BOOL,LPBYTE,DWORD*);") +cpp_quote("HRESULT WINAPI MimeOleCreateHashTable(DWORD,BOOL,IHashTable**);") +cpp_quote("HRESULT WINAPI MimeOleStripHeaders(IMimeMessage*,HBODY,LPCSTR,LPCSTR,IStream**);") + +cpp_quote("HRESULT WINAPI MimeEditViewSource(HWND,IMimeMessage*);") +cpp_quote("HRESULT WINAPI MimeEditIsSafeToRun(HWND,LPCSTR);") +cpp_quote("HRESULT WINAPI MimeEditVerifyTrust(HWND,LPCSTR,LPCSTR);") +cpp_quote("HRESULT WINAPI MimeEditCreateMimeDocument(IUnknown*,IMimeMessage*,DWORD,IMimeMessage**);") +cpp_quote("HRESULT WINAPI MimeEditGetBackgroundImageUrl(IUnknown*,BSTR*);") +cpp_quote("HRESULT WINAPI MimeEditDocumentFromStream(IStream*,REFIID,void**);") + +cpp_quote("#ifdef __cplusplus") +cpp_quote("}") +cpp_quote("#endif")