// imsg.idl : IDL source for imsg.dll
//

// This file will be processed by the MIDL tool to
// produce the type library (imsg.tlb) and marshalling code.

import "oaidl.idl";
import "ocidl.idl";

cpp_quote("#define IMSG_MAX_DOMAIN_LEN 250")


        [
                object,
                uuid(2DB263AD-499F-11D1-B78F-0080C731C893),
                dual,
                helpstring("IMsg Interface"),
                pointer_default(unique)
        ]
        interface IMsg : IDispatch
        {
                [propget, id(0), helpstring("property Value")] HRESULT Value(BSTR szPropertyName, [out, retval] VARIANT *pVal);
                [propput, id(0), helpstring("property Value")] HRESULT Value(BSTR szPropertyName, [in] VARIANT newVal);
                [id(1), helpstring("method SetContentFile")] HRESULT SetContentFile(BSTR szFileName, DWORD hFile);
                [id(2), helpstring("method GetContentFile")] HRESULT GetContentFile(DWORD *phFile);
                [id(3), helpstring("method Delete")] HRESULT Delete();
                [id(4), helpstring("method Persist")] HRESULT Persist();
                [id(5), helpstring("method CloseContentFile")] HRESULT CloseContentFile();
                [id(6), helpstring("method PutStringA")] HRESULT PutStringA(LPCSTR szPropertyName, [in] LPCSTR szValue);
                [id(7), helpstring("method GetStringA")] HRESULT GetStringA(LPCSTR szPropertyName, DWORD cchLength, [out, max_is(cchLength), string] LPSTR pszValue);
                [id(8), helpstring("method PutStringW")] HRESULT PutStringW(LPCWSTR szPropertyName, [in] LPCWSTR szValue);
                [id(9), helpstring("method GetStringW")] HRESULT GetStringW(LPCWSTR szPropertyName, DWORD cchLength, [out, max_is(cchLength), string] LPWSTR pszValue);
                [id(10), helpstring("method PutDWORDA")] HRESULT PutDWORDA(LPCSTR szPropertyName, DWORD szValue);
                [id(11), helpstring("method GetDWORDA")] HRESULT GetDWORDA(LPCSTR szPropertyName, [out, retval] LPDWORD pszValue);
                [id(12), helpstring("method PutDWORDW")] HRESULT PutDWORDW(LPCWSTR szPropertyName, DWORD szValue);
                [id(13), helpstring("method GetDWORDW")] HRESULT GetDWORDW(LPCWSTR szPropertyName, [out, retval] LPDWORD pszValue);
                [id(14), helpstring("method put_ValueA")] HRESULT put_ValueA(LPSTR szPropertyName, [in] VARIANT newVal);
                [id(15), helpstring("method get_ValueA")] HRESULT get_ValueA(LPSTR szPropertyName, [out, retval] VARIANT *pVal);
        };
        [
                object,
                uuid(B4B23806-4710-11D1-B78D-0080C731C893),
                dual,
                helpstring("IRecipient Interface"),
                pointer_default(unique)
        ]
        interface IRecipient : IDispatch
        {
                [propget, id(0), helpstring("property Value")] HRESULT Value(BSTR szPropertyName, [out, retval] VARIANT *pVal);
                [propput, id(0), helpstring("property Value")] HRESULT Value(BSTR szPropertyName, [in] VARIANT newVal);
                [propget, id(1), helpstring("property Address")] HRESULT Address([out, retval] BSTR *pVal);
                [propput, id(1), helpstring("property Address")] HRESULT Address([in] BSTR newVal);
                [propget, id(2), helpstring("property AddressType")] HRESULT AddressType([out, retval] BSTR *pVal);
                [propput, id(2), helpstring("property AddressType")] HRESULT AddressType([in] BSTR newVal);
                [id(3), helpstring("method get_AddressA")] HRESULT get_AddressA(DWORD cchLength, [out, max_is(cchLength), string] LPSTR pszAddress);
                [id(4), helpstring("method put_AddressA")] HRESULT put_AddressA(LPSTR szAddress);
                [id(6), helpstring("method PutStringA")] HRESULT PutStringA(LPCSTR szPropertyName, [in] LPCSTR szValue);
                [id(7), helpstring("method GetStringA")] HRESULT GetStringA(LPCSTR szPropertyName, DWORD cchLength, [out, max_is(cchLength), string] LPSTR pszValue);
                [id(8), helpstring("method PutStringW")] HRESULT PutStringW(LPCWSTR szPropertyName, [in] LPCWSTR szValue);
                [id(9), helpstring("method GetStringW")] HRESULT GetStringW(LPCWSTR szPropertyName, DWORD cchLength, [out, max_is(cchLength), string] LPWSTR pszValue);
                [id(10), helpstring("method PutDWORDA")] HRESULT PutDWORDA(LPCSTR szPropertyName, DWORD szValue);
                [id(11), helpstring("method GetDWORDA")] HRESULT GetDWORDA(LPCSTR szPropertyName, [out, retval] LPDWORD pszValue);
                [id(12), helpstring("method PutDWORDW")] HRESULT PutDWORDW(LPCWSTR szPropertyName, DWORD szValue);
                [id(13), helpstring("method GetDWORDW")] HRESULT GetDWORDW(LPCWSTR szPropertyName, [out, retval] LPDWORD pszValue);
                [id(14), helpstring("method put_ValueA")] HRESULT put_ValueA(LPSTR szPropertyName, [in] VARIANT newVal);
                [id(15), helpstring("method get_ValueA")] HRESULT get_ValueA(LPSTR szPropertyName, [out, retval] VARIANT *pVal);
        };
        [
                object,
                uuid(B4B23803-4710-11D1-B78D-0080C731C893),
                dual,
                helpstring("IMsgRecipientList Interface"),
                pointer_default(unique)
        ]
        interface IMsgRecipientList : IDispatch
        {
                [id(1), helpstring("method Count")] HRESULT Count(LPDWORD pcRecipients);
                [id(2), helpstring("method Index")] HRESULT Index(DWORD n, IRecipient **ppRecipient);
                [id(3), helpstring("method Add")] HRESULT Add(BSTR szAddrType, BSTR szAddress);
                [id(4), helpstring("method DeleteAll")] HRESULT DeleteAll();
                [id(5), helpstring("method AddA")] HRESULT AddA(LPSTR szAddrType, LPSTR szAddress);
        };
        [
                object,
                uuid(05bbdd90-5d5a-11d1-b7a7-0080c731c893),
                helpstring("IRecipientDomainList Interface"),
                pointer_default(unique)
        ]
        interface IRecipientDomainList : IUnknown
        {
                HRESULT Count(LPDWORD pcDomains);
                HRESULT Index(DWORD n, LPSTR szDomain, LPDWORD pnRecipientStartIndex, LPDWORD pnRecipientEndIndex);
        }

[
        uuid(2DB263A0-499F-11D1-B78F-0080C731C893),
        version(1.0),
        helpstring("imsg 1.0 Type Library")
]
library IMSGLib
{
        importlib("stdole2.tlb");

        [
                uuid(2DB263AE-499F-11D1-B78F-0080C731C893),
                helpstring("Msg Class")
        ]
        coclass Msg
        {
                [default] interface IMsg;
                interface IMsgRecipientList;
        };
        [
                uuid(B4B23807-4710-11D1-B78D-0080C731C893),
                helpstring("Recipient Class")
        ]
        coclass Recipient
        {
                [default] interface IRecipient;
        };
        [
                uuid(d16e9660-6081-11d1-b7a9-0080c731c893),
                helpstring("Recipient Domain List")
        ]
        coclass RecipientDomainList
        {
                [default] interface IRecipientDomainList;
        };

};