322 lines
13 KiB
Plaintext
322 lines
13 KiB
Plaintext
/*
|
|
@doc MAILMSGI INTERNAL
|
|
|
|
@module MAILMSGI.IDL - IDL for internal interfaces to Mail Message Object. |
|
|
This module declares the various internal interfaces exported for access to
|
|
the Mail Message Object.
|
|
|
|
THESE INTERFACES ARE INTERNAL, AND ARE FOR USE BY OPERATING SYSTEM COMPONENTS
|
|
ONLY. NO APPLICATION COMPONENT MAY MAKE USE OF THESE INTERFACES.
|
|
*/
|
|
|
|
cpp_quote("/*++")
|
|
cpp_quote("")
|
|
cpp_quote("Copyright (c) 1996, 1997 Microsoft Corporation")
|
|
cpp_quote("")
|
|
cpp_quote("Module Name:")
|
|
cpp_quote("")
|
|
cpp_quote(" mailmsgi.idl / mailmsgi.h")
|
|
cpp_quote("")
|
|
cpp_quote("Abstract:")
|
|
cpp_quote("")
|
|
cpp_quote(" This module contains definitions for the internal COM interfaces")
|
|
cpp_quote(" for the Mail Message Object.")
|
|
cpp_quote("")
|
|
cpp_quote(" THESE INTERFACES ARE INTERNAL, AND ARE FOR USE BY OPERATING SYSTEM COMPONENTS")
|
|
cpp_quote(" ONLY. NO APPLICATION COMPONENT MAY MAKE USE OF THESE INTERFACES.")
|
|
cpp_quote("")
|
|
cpp_quote("Author:")
|
|
cpp_quote("")
|
|
cpp_quote(" Don Dumitru (dondu@microsoft.com)")
|
|
cpp_quote("")
|
|
cpp_quote("Revision History:")
|
|
cpp_quote("")
|
|
cpp_quote(" dondu 4/1/98 created")
|
|
cpp_quote("")
|
|
cpp_quote("--*/")
|
|
|
|
|
|
// mailimsg.idl : IDL source for mailmsgi.dll
|
|
//
|
|
|
|
// This file will be processed by the MIDL tool to
|
|
// produce the type library (mailmsg.tlb) and marshalling code.
|
|
|
|
|
|
import "oaidl.idl";
|
|
import "ocidl.idl";
|
|
|
|
import "mailmsg.idl";
|
|
|
|
|
|
//@doc MAILMSGI INTERNAL
|
|
|
|
|
|
#if 0
|
|
cpp_quote("#if 0")
|
|
cpp_quote(" // We define these here because we want the various")
|
|
cpp_quote(" // methods below to be declared using these types.")
|
|
cpp_quote(" // When the generated .H file is used in a C++")
|
|
cpp_quote(" // compilation, this section will get thrown away by")
|
|
cpp_quote(" // the preprocessor, and the actual definitions from")
|
|
cpp_quote(" // atq.h and winbase.h will be used instead.")
|
|
cpp_quote(" // The only real problems with doing this are that")
|
|
cpp_quote(" // MIDL can't generate the correct marshalling code")
|
|
cpp_quote(" // in this instance - which doesn't matter because")
|
|
cpp_quote(" // these interfaces are [local]. And of course, the")
|
|
cpp_quote(" // type library get generated wrong, so tools like")
|
|
cpp_quote(" // VB which read the type library will get confused...")
|
|
struct _OVERLAPPED {
|
|
int dummy;
|
|
};
|
|
typedef struct _OVERLAPPED OVERLAPPED;
|
|
struct _ATQ_CONTEXT_PUBLIC {
|
|
int dummy;
|
|
};
|
|
struct _ATQ_COMPLETION {
|
|
int dummy;
|
|
};
|
|
typedef struct _ATQ_COMPLETION *ATQ_COMPLETION;
|
|
cpp_quote("#endif")
|
|
typedef BOOL (*PFNAtqAddAsyncHandle)(struct _ATQ_CONTEXT_PUBLIC **,
|
|
void *,
|
|
void *,
|
|
ATQ_COMPLETION,
|
|
DWORD,
|
|
HANDLE);
|
|
typedef void (*PFNAtqFreeContext)(struct _ATQ_CONTEXT_PUBLIC *,
|
|
BOOL);
|
|
|
|
#endif
|
|
|
|
#if 0
|
|
/*
|
|
@interface IMailMsgBindATQ | Interface for ATQ binding operations on a mail message.
|
|
@meth HRESULT | BindToStore | Bind a mail message to a store, with ATQ info.
|
|
@meth HRESULT | GetATQInfo | Get the ATQ binding (with async completion).
|
|
@meth HRESULT | ReleaseATQHandle | Decrement the reference count on the ATQ binding.
|
|
*/
|
|
[
|
|
helpstring("Interface for ATQ binding operations on a mail message."),
|
|
local,
|
|
object,
|
|
pointer_default(unique),
|
|
uuid(accb770c-c9d5-11d1-9ff2-00c04fa37348)
|
|
]
|
|
interface IMailMsgBindATQ : IMailMsgBind
|
|
{
|
|
|
|
//@method HRESULT | IMailMsgBindATQ | BindToStore | Bind a mail message to a store, with ATQ info.
|
|
// This method will associate the content file with ATQ, and return the ATQ context. It increments
|
|
// the usage count on the ATQ handle, so the caller must call ReleaseATQHandle at some point after
|
|
// making this call in order to release that reference.
|
|
//@parm IMailMsgPropertyStream * | pStream | [in] Specifies the property stream.
|
|
//@parm IMailMsgStoreDriver * | pStore | [in] Specifies the store driver.
|
|
//@parm PFIO_CONTEXT | hContentFile | [in] Specifies the content file.
|
|
//@parm void * | pvClientContext | [in] Specifies the client context. This parameter is passed as
|
|
// the ClientContext parameter to AtqAddAsyncHandle if the message object needs to re-associate the
|
|
// content handle with the ATQ.
|
|
//@parm ATQ_COMPLETION | pfnCompletion | [in] Specifies the completion function. This parameter is
|
|
// passed as the pfnCompletion parameter to AtqAddAsyncHandle if the message object needs to
|
|
// re-associate the content handle with the ATQ.
|
|
//@parm DWORD | dwTimeout | [in] Specifies the i/o timeout. This parameter is passed as the TimeOut
|
|
// parameter to AtqAddAsyncHandle if the message object needs to re-associate the conent handle with
|
|
// the ATQ.
|
|
//@parm struct _ATQ_CONTEXT_PUBLIC ** | ppATQContext | [out] Receives the ATQ context.
|
|
//@parm PFNAtqAddAsyncHandle | pfnAtqAddAsyncHandle | [in] Function to call to add an async handle.
|
|
//@parm PFNAtqFreeContext | pfnAtqFreeContext | [in] Function to call to free an async context.
|
|
//@rvalue S_OK | Success.
|
|
HRESULT BindToStore([in] IMailMsgPropertyStream *pStream,
|
|
[in] IMailMsgStoreDriver *pStore,
|
|
[in] PFIO_CONTEXT hContentFile,
|
|
[in] void *pvClientContext,
|
|
[in] ATQ_COMPLETION pfnCompletion,
|
|
[in] DWORD dwTimeout,
|
|
[out] struct _ATQ_CONTEXT_PUBLIC **ppATQContext,
|
|
[in] PFNAtqAddAsyncHandle pfnAtqAddAsyncHandle,
|
|
[in] PFNAtqFreeContext pfnAtqFreeContext);
|
|
|
|
//@method HRESULT | IMailMsgBindATQ | GetATQInfo | Get the ATQ binding (with async completion). This
|
|
// method increments the usage count on the ATQ binding, preventing the content handle from being
|
|
// closed. The IMailMsgBindATQ::ReleaseATQHandle method must be called to decrement the usage count
|
|
// once operations on the handle are complete.
|
|
//@parm struct _ATQ_CONTEXT_PUBLIC ** | ppATQContext | [out] Receives the ATQ context.
|
|
//@parm PFIO_CONTEXT * | phAsyncIO | [out] Receives the file handle.
|
|
//@parm IMailMsgNotify * | pNotify | [in,unique] Interface to notify for async completion. If this
|
|
// value is NULL, then the method will complete synchronously. Even if this value is non-NULL, the
|
|
// method may still complete synchronously (i.e. it may return S_OK instead of MAILMSG_S_PENDING).
|
|
//@rvalue S_OK | Success. The operation completed synchronously.
|
|
//@rvalue MAILMSG_S_PENDING | Success. The operation is pending, and pNotify->Notify will be called
|
|
// with the result of the operation when it completes.
|
|
//@xref <i IMailMsgNotify> <om IMailMsgNotify.Notify> <om IMailMsgBindATQ.ReleaseATQHandle>
|
|
[helpstring("Get the ATQ binding (with async completion).")]
|
|
HRESULT GetATQInfo([out] struct _ATQ_CONTEXT_PUBLIC **ppATQContext,
|
|
[out] PFIO_CONTEXT *phAsyncIO,
|
|
[in,unique] IMailMsgNotify *pNotify);
|
|
|
|
//@method HRESULT | IMailMsgBindATQ | ReleaseATQHandle | Decrement the reference count on the ATQ
|
|
// binding.
|
|
//@rvalue S_OK | Success.
|
|
//@xref <om IMailMsgBindATQ.GetATQInfo>
|
|
[helpstring("Decrement the reference count on the ATQ binding.")]
|
|
HRESULT ReleaseATQHandle();
|
|
};
|
|
#endif
|
|
|
|
|
|
/*
|
|
@interface IMailMsgPushContent | Interface for pushing content into a mail message.
|
|
@meth HRESULT | Push | Push content into a mail message.
|
|
@meth HRESULT | Complete | Signal that all of the content has been pushed into the mail message.
|
|
@meth HRESULT | GetTotalHeaderSize | Get the total size of all of the headers.
|
|
@meth HRESULT | GetHeaders | Get the headers into a buffer.
|
|
@meth HRESULT | Write Headers | Write the headers to the content file (with async completion).
|
|
@meth HRESULT | ReleaseContent | Signal that all operations on the headers are complete, and that the
|
|
input blocks are to be released.
|
|
*/
|
|
[
|
|
helpstring("Interface for pushing content into a mail message."),
|
|
local,
|
|
object,
|
|
pointer_default(unique),
|
|
uuid(7c5b895e-c9df-11d1-9ff2-00c04fa37348)
|
|
]
|
|
interface IMailMsgPushContent : IUnknown
|
|
{
|
|
//@method HRESULT | IMailMsgPushContent | Push | Push content into a mail message.
|
|
//@parm DWORD | dwLength | [in] Specifies the length of the block of content.
|
|
//@parm BYTE * | pbData | [in] Specifies the block of content. The caller must not change this block
|
|
// of memory until after calling IMailMsgPustContent::ReleaseContent.
|
|
//@parm DWORD * | pdwBodyOffset | [out] Receives the offset of the start of the body. This parameter
|
|
// is only set when the method returns S_OK. This parameter may be NULL.
|
|
//@rvalue S_OK | Success. All of the headers have been pushed, and header manipulation through
|
|
// the MIMEOLE interface may be done. The pdwOffset parameter is set with the offset of the start
|
|
// of the body. Even when all of the content has been pushed, this method might not return S_OK -
|
|
// if, after the last block has been pushed an S_OK has not been returned, the caller must call
|
|
// IMailMsgPustContent::Complete.
|
|
//@rvalue S_FALSE | Success. Not all of the headers have been pushed.
|
|
//@xref <om IMailMsgPustContent.ReleaseContent> <om IMailMsgPustContent::Complete>
|
|
[helpstring("Push content into a mail message.")]
|
|
HRESULT Push([in] DWORD dwLength,
|
|
[in,size_is(dwLength)] BYTE *pbData,
|
|
[out] DWORD *pdwBodyOffset);
|
|
|
|
//@method HRESULT | IMailMsgPushContent | Complete | Signal that all of the content has been pushed
|
|
// into the mail message.
|
|
//@parm DWORD * | pdwBodyOffset | [out] Receives the offset of the start of the body. This parameter
|
|
// may be NULL.
|
|
//@rvalue S_OK | Success.
|
|
//@rvalue E_INVALIDARG | Failure. The content is malformed.
|
|
[helpstring("Signal that all of the content has been pushed into the mail message.")]
|
|
HRESULT Complete([out] DWORD *pdwBodyOffset);
|
|
|
|
//@method HRESULT | IMailMsgPushContent | GetTotalHeaderSize | Get the total size of all of the
|
|
// headers. This method can only be called once header manipulation through MIMEOLE is complete.
|
|
//@parm DWORD * | pdwHeaderSize | [out] Receives the result.
|
|
//@rvalue S_OK | Success.
|
|
[helpstring("Get the total size of all of the headers.")]
|
|
HRESULT GetTotalHeaderSize([out] DWORD *pdwHeaderSize);
|
|
|
|
//@method HRESULT | IMailMsgPushContent | GetHeaders | Get the headers into a buffer. This method can
|
|
// only be called once header manipulation through MIMEOLE is complete.
|
|
//@parm DWORD | dwLength | [in] Specifies the length of the buffer.
|
|
//@parm BYTE * | pbData | [out] Specifies the buffer.
|
|
//@rvalue S_OK | Success.
|
|
[helpstring("Get the headers into a buffer.")]
|
|
HRESULT GetHeaders([in] DWORD dwLength,
|
|
[out,unique,size_is(dwLength)] BYTE *pbData);
|
|
|
|
//@method HRESULT | IMailMsgPushContent | WriteHeaders | Write the headers (with async completion).
|
|
// The content file must have been set using IMailMsgBind::BindToStore. This method can only be
|
|
// called once header manipulation through MIMEOLE is complete. The method performs its i/o through
|
|
// an OVERLAPPED operation - the client may safely perform concurrent i/o on the content file before
|
|
// this method completes.
|
|
//@parm IMailMsgNotify * | pNotify | [in,unique] Interface to notify for async completion. If this
|
|
// value is NULL, then the method will complete synchronously. Even if this value is non-NULL, the
|
|
// method may still complete synchronously (i.e. it may return S_OK instead of MAILMSG_S_PENDING).
|
|
//@rvalue S_OK | Success. The operation completed synchronously.
|
|
//@rvalue MAILMSG_S_PENDING | Success. The operation is pending, and pNotify->Notify will be called
|
|
// with the result of the operation when it completes.
|
|
//@xref <i IMailMsgNotify> <om IMailMsgNotify.Notify> <om IMailMsgBind.BindToStore>
|
|
[helpstring("Write the headers to the content file (with async completion).")]
|
|
HRESULT WriteHeaders([in,unique] IMailMsgNotify *pNotify);
|
|
|
|
//@method HRESULT | IMailMsgPushContent | ReleaseContent | Signal that all operations on the headers
|
|
// are complete, and that the input blocks are to be released.
|
|
//@rvalue S_OK | Success.
|
|
//@xref <om IMailMsgPushContent.Push>
|
|
[helpstring("Signal that all operations on the headers are complete, and that the input blocks are to be released.")]
|
|
HRESULT ReleaseContent();
|
|
};
|
|
|
|
/*
|
|
@interface IMailMsgAQueueListEntry | Interface to allow AQ to get a pointer to our list entry.
|
|
@meth HRESULT | GetListEntry | Get the list entry pointer
|
|
*/
|
|
[
|
|
helpstring("Internal interface to allow AQueue to access list entry."),
|
|
local,
|
|
object,
|
|
pointer_default(unique),
|
|
uuid(a83bf034-a988-11d2-94e8-00c04fa379f1)
|
|
]
|
|
interface IMailMsgAQueueListEntry : IUnknown
|
|
{
|
|
//@method HRESULT | IMailMsgAQueueListEntry | GetListEntry | Get a pointer
|
|
// to a LIST_ENTRY for use by AQueue.
|
|
//@parm void ** | pple | [in] A pointer to receive the pointer to
|
|
// the list entry. The LIST_ENTRY should be immediately followed by a
|
|
// PVOID. All three of these pointers are owned by the transport
|
|
// implementation.
|
|
//@rvalue S_OK | Success. This method cannot fail.
|
|
[helpstring("GetListEntry method")]
|
|
HRESULT GetListEntry([in] void **pple);
|
|
};
|
|
|
|
[
|
|
helpstring("Mail Message Internal 1.0 Type Library"),
|
|
uuid(8e73c9a8-c9d5-11d1-9ff2-00c04fa37348),
|
|
version(1.0)
|
|
]
|
|
library MailMsgILib
|
|
{
|
|
importlib("stdole2.tlb");
|
|
|
|
interface IMailMsgNotify;
|
|
interface IMailMsgPropertyStream;
|
|
interface IMailMsgRecipientsBase;
|
|
interface IMailMsgRecipientsAdd;
|
|
interface IMailMsgRecipients;
|
|
interface IMailMsgProperties;
|
|
interface IMailMsgPropertyManagement;
|
|
interface IMailMsgEnumMessages;
|
|
interface IMailMsgStoreDriver;
|
|
interface IMailMsgBind;
|
|
// interface IMailMsgBindATQ;
|
|
interface IMailMsgAQueueListEntry;
|
|
|
|
[
|
|
helpstring("Mail Message Class"),
|
|
uuid(39b16f50-a8ba-11d1-aa91-00aa006bc80b)
|
|
]
|
|
coclass MsgImp
|
|
{
|
|
[default] interface IMailMsgProperties;
|
|
interface IMailMsgPropertyManagement;
|
|
interface IMailMsgRecipients;
|
|
interface IMailMsgBind;
|
|
// interface IMailMsgBindATQ;
|
|
};
|
|
|
|
[
|
|
helpstring("SMTP Server Class"),
|
|
uuid(0be449d4-ec28-11d1-aa65-00c04fa35b82)
|
|
]
|
|
coclass CSMTPServer
|
|
{
|
|
[default] interface ISMTPServer;
|
|
interface ISMTPServerEx;
|
|
};
|
|
|
|
};
|