renaming, adding keylist param
authorVolker Birk <vb@pep-project.org>
Tue, 05 May 2015 10:27:36 +0200
changeset 1879c848166413
parent 17 3288634317bb
child 19 3cfb847e13cd
renaming, adding keylist param
CpEpEngine.cpp
CpEpEngine.h
pEpCOMServerAdapter.idl
pEpCOMServerAdapter_i.c
pEpCOMServerAdapter_i.h
     1.1 --- a/CpEpEngine.cpp	Fri May 01 11:35:35 2015 +0200
     1.2 +++ b/CpEpEngine.cpp	Tue May 05 10:27:36 2015 +0200
     1.3 @@ -837,7 +837,7 @@
     1.4      return E_FAIL;
     1.5  }
     1.6  
     1.7 -STDMETHODIMP CpEpEngine::message_encrypt(ITextMessage * src, ITextMessage ** dst, SAFEARRAY * extra)
     1.8 +STDMETHODIMP CpEpEngine::encrypt_message(ITextMessage * src, ITextMessage ** dst, SAFEARRAY * extra)
     1.9  {
    1.10      assert(src);
    1.11      assert(dst);
    1.12 @@ -888,10 +888,11 @@
    1.13      return S_OK;
    1.14  }
    1.15  
    1.16 -STDMETHODIMP CpEpEngine::message_decrypt(ITextMessage * src, ITextMessage ** dst)
    1.17 +STDMETHODIMP CpEpEngine::decrypt_message(ITextMessage * src, ITextMessage ** dst, SAFEARRAY ** keylist)
    1.18  {
    1.19      assert(src);
    1.20      assert(dst);
    1.21 +    assert(keylist);
    1.22  
    1.23      CTextMessage *_src = dynamic_cast<CTextMessage *>(src);
    1.24      assert(_src);
    1.25 @@ -900,7 +901,8 @@
    1.26          return E_INVALIDARG;
    1.27  
    1.28      ::message *msg_dst;
    1.29 -    PEP_STATUS status = ::decrypt_message(get_session(), _src->msg, PEP_MIME_none, &msg_dst);
    1.30 +    ::stringlist_t *_keylist;
    1.31 +    PEP_STATUS status = ::decrypt_message(get_session(), _src->msg, PEP_MIME_none, &msg_dst, &_keylist);
    1.32      if (status != PEP_STATUS_OK)
    1.33          FAIL(L"cannot decrypt message");
    1.34  
    1.35 @@ -911,7 +913,8 @@
    1.36      assert(hr == S_OK);
    1.37  
    1.38      if (hr != S_OK) {
    1.39 -        free_message(msg_dst);
    1.40 +        ::free_message(msg_dst);
    1.41 +        ::free_stringlist(_keylist);
    1.42          return hr;
    1.43      }
    1.44  
    1.45 @@ -921,7 +924,19 @@
    1.46      ::free_message(_dst->msg);
    1.47      _dst->msg = msg_dst;
    1.48  
    1.49 +    ULONG len = ::stringlist_length(_keylist);
    1.50 +    CComSafeArray<BSTR> sa;
    1.51 +    sa.Create(len);
    1.52 +
    1.53 +    ::stringlist_t *_kl;
    1.54 +    ULONG i;
    1.55 +    for (_kl = _keylist, i = 0; _kl && _kl->value; _kl = _kl->next, i++)
    1.56 +        sa.SetAt(i, utf16_bstr(_kl->value).Detach(), false);
    1.57 +    ::free_stringlist(_keylist);
    1.58 +
    1.59      *dst = i_dst;
    1.60 +    *keylist = sa.Detach();
    1.61 +
    1.62      return S_OK;
    1.63  }
    1.64  
    1.65 @@ -934,10 +949,37 @@
    1.66      assert(_msg);
    1.67  
    1.68      PEP_color _color;
    1.69 -    PEP_STATUS status = ::get_message_color(get_session(), _msg->msg, &_color);
    1.70 +    PEP_STATUS status = ::message_color(get_session(), _msg->msg, &_color);
    1.71      if (status != PEP_STATUS_OK)
    1.72          FAIL(L"cannot get message color");
    1.73  
    1.74      *pVal = (pEp_color) _color;
    1.75      return S_OK;
    1.76  }
    1.77 +
    1.78 +STDMETHODIMP CpEpEngine::identity_color(struct pEp_identity_s *ident, pEp_color * pVal)
    1.79 +{
    1.80 +    ::pEp_identity *_ident;
    1.81 +
    1.82 +    assert(ident);
    1.83 +    assert(pVal);
    1.84 +
    1.85 +    try {
    1.86 +        _ident = new_identity(ident);
    1.87 +    }
    1.88 +    catch (bad_alloc& e) {
    1.89 +        return E_OUTOFMEMORY;
    1.90 +    }
    1.91 +    catch (exception& e) {
    1.92 +        return E_FAIL;
    1.93 +    }
    1.94 +
    1.95 +    PEP_color _color;
    1.96 +    PEP_STATUS status = ::identity_color(get_session(), _ident, &_color);
    1.97 +    free_identity(_ident);
    1.98 +    if (status != PEP_STATUS_OK)
    1.99 +        FAIL(L"cannot get message color");
   1.100 +
   1.101 +    *pVal = (pEp_color) _color;
   1.102 +    return S_OK;
   1.103 +}
     2.1 --- a/CpEpEngine.h	Fri May 01 11:35:35 2015 +0200
     2.2 +++ b/CpEpEngine.h	Tue May 05 10:27:36 2015 +0200
     2.3 @@ -146,9 +146,11 @@
     2.4      
     2.5      // Message API
     2.6  
     2.7 -    STDMETHOD(message_encrypt)(ITextMessage * src, ITextMessage ** dst, SAFEARRAY * extra);
     2.8 -    STDMETHOD(message_decrypt)(ITextMessage * src, ITextMessage ** dst);
     2.9 +    STDMETHOD(encrypt_message)(ITextMessage * src, ITextMessage ** dst, SAFEARRAY * extra);
    2.10 +    STDMETHOD(decrypt_message)(ITextMessage * src, ITextMessage ** dst, SAFEARRAY ** keylist);
    2.11      STDMETHOD(message_color)(ITextMessage *msg, pEp_color * pVal);
    2.12 +    STDMETHOD(identity_color)(pEp_identity_s * ident, pEp_color * pVal);
    2.13 +
    2.14  };
    2.15  
    2.16  OBJECT_ENTRY_AUTO(__uuidof(pEpEngine), CpEpEngine)
     3.1 --- a/pEpCOMServerAdapter.idl	Fri May 01 11:35:35 2015 +0200
     3.2 +++ b/pEpCOMServerAdapter.idl	Tue May 05 10:27:36 2015 +0200
     3.3 @@ -209,24 +209,26 @@
     3.4      // Message API
     3.5  
     3.6      typedef enum _pEp_color {
     3.7 -        pEp_undefined = 0,
     3.8 -        pEp_unencrypted,
     3.9 -        pEp_unreliable,
    3.10 -        pEp_reliable,
    3.11 -        pEp_yellow = pEp_reliable,
    3.12 -        pEp_trusted,
    3.13 -        pEp_green = pEp_trusted,
    3.14 -        pEp_trusted_and_anonymized,
    3.15 -        pEp_fully_anonymous,
    3.16 +        pEp_rating_undefined = 0,
    3.17 +        pEp_rating_unencrypted,
    3.18 +        pEp_rating_cannot_decrypt,
    3.19 +        pEp_rating_unreliable,
    3.20 +        pEp_rating_reliable,
    3.21 +        pEp_rating_yellow = pEp_rating_reliable,
    3.22 +        pEp_rating_trusted,
    3.23 +        pEp_rating_green = pEp_rating_trusted,
    3.24 +        pEp_rating_trusted_and_anonymized,
    3.25 +        pEp_rating_fully_anonymous,
    3.26  
    3.27 -        pEp_under_attack = -1,
    3.28 -        pEp_red = pEp_under_attack,
    3.29 -        pEp_b0rken = -2
    3.30 +        pEp_rating_under_attack = -1,
    3.31 +        pEp_rating_red = pEp_rating_under_attack,
    3.32 +        pEp_rating_b0rken = -2
    3.33      } pEp_color;
    3.34  
    3.35 -    HRESULT message_encrypt([in] ITextMessage *src, [out] ITextMessage ** dst, [in, optional] SAFEARRAY(BSTR) extra);
    3.36 -    HRESULT message_decrypt([in] ITextMessage *src, [out] ITextMessage ** dst);
    3.37 +    HRESULT encrypt_message([in] ITextMessage *src, [out] ITextMessage ** dst, [in, optional] SAFEARRAY(BSTR) extra);
    3.38 +    HRESULT decrypt_message([in] ITextMessage *src, [out] ITextMessage ** dst, [out] SAFEARRAY(BSTR) *keylist);
    3.39      HRESULT message_color([in] ITextMessage *msg, [out, retval] pEp_color * pVal);
    3.40 +    HRESULT identity_color([in] struct pEp_identity_s * ident, [out, retval] pEp_color * pVal);
    3.41  };
    3.42  
    3.43  [
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/pEpCOMServerAdapter_i.c	Tue May 05 10:27:36 2015 +0200
     4.3 @@ -0,0 +1,97 @@
     4.4 +
     4.5 +
     4.6 +/* this ALWAYS GENERATED file contains the IIDs and CLSIDs */
     4.7 +
     4.8 +/* link this file in with the server and any clients */
     4.9 +
    4.10 +
    4.11 + /* File created by MIDL compiler version 8.00.0603 */
    4.12 +/* at Tue May 05 10:27:03 2015
    4.13 + */
    4.14 +/* Compiler settings for pEpCOMServerAdapter.idl:
    4.15 +    Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 8.00.0603 
    4.16 +    protocol : dce , ms_ext, c_ext, robust
    4.17 +    error checks: allocation ref bounds_check enum stub_data 
    4.18 +    VC __declspec() decoration level: 
    4.19 +         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
    4.20 +         DECLSPEC_UUID(), MIDL_INTERFACE()
    4.21 +*/
    4.22 +/* @@MIDL_FILE_HEADING(  ) */
    4.23 +
    4.24 +#pragma warning( disable: 4049 )  /* more than 64k source lines */
    4.25 +
    4.26 +
    4.27 +#ifdef __cplusplus
    4.28 +extern "C"{
    4.29 +#endif 
    4.30 +
    4.31 +
    4.32 +#include <rpc.h>
    4.33 +#include <rpcndr.h>
    4.34 +
    4.35 +#ifdef _MIDL_USE_GUIDDEF_
    4.36 +
    4.37 +#ifndef INITGUID
    4.38 +#define INITGUID
    4.39 +#include <guiddef.h>
    4.40 +#undef INITGUID
    4.41 +#else
    4.42 +#include <guiddef.h>
    4.43 +#endif
    4.44 +
    4.45 +#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \
    4.46 +        DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8)
    4.47 +
    4.48 +#else // !_MIDL_USE_GUIDDEF_
    4.49 +
    4.50 +#ifndef __IID_DEFINED__
    4.51 +#define __IID_DEFINED__
    4.52 +
    4.53 +typedef struct _IID
    4.54 +{
    4.55 +    unsigned long x;
    4.56 +    unsigned short s1;
    4.57 +    unsigned short s2;
    4.58 +    unsigned char  c[8];
    4.59 +} IID;
    4.60 +
    4.61 +#endif // __IID_DEFINED__
    4.62 +
    4.63 +#ifndef CLSID_DEFINED
    4.64 +#define CLSID_DEFINED
    4.65 +typedef IID CLSID;
    4.66 +#endif // CLSID_DEFINED
    4.67 +
    4.68 +#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \
    4.69 +        const type name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
    4.70 +
    4.71 +#endif !_MIDL_USE_GUIDDEF_
    4.72 +
    4.73 +MIDL_DEFINE_GUID(IID, IID_ITextMessage,0x161538F9,0x53C8,0x4D9C,0x8B,0xA4,0x0F,0xB4,0x3A,0xEC,0x71,0x06);
    4.74 +
    4.75 +
    4.76 +MIDL_DEFINE_GUID(IID, IID_IpEpEngine,0x9A9F4422,0xCF0A,0x45D7,0x90,0xCD,0x1D,0x1B,0x7B,0x2A,0x45,0x40);
    4.77 +
    4.78 +
    4.79 +MIDL_DEFINE_GUID(IID, LIBID_pEpCOMServerAdapterLib,0x3EC2E1A4,0x40E8,0x48E4,0xA7,0xB0,0x18,0x76,0xD3,0x4F,0x94,0x62);
    4.80 +
    4.81 +
    4.82 +MIDL_DEFINE_GUID(IID, DIID__IpEpEngineEvents,0xB6BC9B8E,0xD9E2,0x4419,0xA3,0xA4,0x7B,0x4B,0x58,0x17,0x55,0x49);
    4.83 +
    4.84 +
    4.85 +MIDL_DEFINE_GUID(CLSID, CLSID_pEpEngine,0xEF1B073D,0x5058,0x4E0E,0x82,0x9E,0xB4,0xD2,0x2C,0xA2,0x1E,0xA2);
    4.86 +
    4.87 +
    4.88 +MIDL_DEFINE_GUID(IID, DIID__ITextMessageEvents,0x844B5363,0x4EF4,0x4A39,0xA0,0x30,0x16,0x45,0x27,0x83,0xA6,0xF7);
    4.89 +
    4.90 +
    4.91 +MIDL_DEFINE_GUID(CLSID, CLSID_TextMessage,0xB6CC444F,0xFE14,0x4DFE,0x83,0x15,0x81,0xE4,0xEA,0x16,0xC1,0xCC);
    4.92 +
    4.93 +#undef MIDL_DEFINE_GUID
    4.94 +
    4.95 +#ifdef __cplusplus
    4.96 +}
    4.97 +#endif
    4.98 +
    4.99 +
   4.100 +
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/pEpCOMServerAdapter_i.h	Tue May 05 10:27:36 2015 +0200
     5.3 @@ -0,0 +1,1336 @@
     5.4 +
     5.5 +
     5.6 +/* this ALWAYS GENERATED file contains the definitions for the interfaces */
     5.7 +
     5.8 +
     5.9 + /* File created by MIDL compiler version 8.00.0603 */
    5.10 +/* at Tue May 05 10:27:03 2015
    5.11 + */
    5.12 +/* Compiler settings for pEpCOMServerAdapter.idl:
    5.13 +    Oicf, W1, Zp8, env=Win32 (32b run), target_arch=X86 8.00.0603 
    5.14 +    protocol : dce , ms_ext, c_ext, robust
    5.15 +    error checks: allocation ref bounds_check enum stub_data 
    5.16 +    VC __declspec() decoration level: 
    5.17 +         __declspec(uuid()), __declspec(selectany), __declspec(novtable)
    5.18 +         DECLSPEC_UUID(), MIDL_INTERFACE()
    5.19 +*/
    5.20 +/* @@MIDL_FILE_HEADING(  ) */
    5.21 +
    5.22 +#pragma warning( disable: 4049 )  /* more than 64k source lines */
    5.23 +
    5.24 +
    5.25 +/* verify that the <rpcndr.h> version is high enough to compile this file*/
    5.26 +#ifndef __REQUIRED_RPCNDR_H_VERSION__
    5.27 +#define __REQUIRED_RPCNDR_H_VERSION__ 475
    5.28 +#endif
    5.29 +
    5.30 +#include "rpc.h"
    5.31 +#include "rpcndr.h"
    5.32 +
    5.33 +#ifndef __RPCNDR_H_VERSION__
    5.34 +#error this stub requires an updated version of <rpcndr.h>
    5.35 +#endif // __RPCNDR_H_VERSION__
    5.36 +
    5.37 +#ifndef COM_NO_WINDOWS_H
    5.38 +#include "windows.h"
    5.39 +#include "ole2.h"
    5.40 +#endif /*COM_NO_WINDOWS_H*/
    5.41 +
    5.42 +#ifndef __pEpCOMServerAdapter_i_h__
    5.43 +#define __pEpCOMServerAdapter_i_h__
    5.44 +
    5.45 +#if defined(_MSC_VER) && (_MSC_VER >= 1020)
    5.46 +#pragma once
    5.47 +#endif
    5.48 +
    5.49 +/* Forward Declarations */ 
    5.50 +
    5.51 +#ifndef __ITextMessage_FWD_DEFINED__
    5.52 +#define __ITextMessage_FWD_DEFINED__
    5.53 +typedef interface ITextMessage ITextMessage;
    5.54 +
    5.55 +#endif 	/* __ITextMessage_FWD_DEFINED__ */
    5.56 +
    5.57 +
    5.58 +#ifndef __IpEpEngine_FWD_DEFINED__
    5.59 +#define __IpEpEngine_FWD_DEFINED__
    5.60 +typedef interface IpEpEngine IpEpEngine;
    5.61 +
    5.62 +#endif 	/* __IpEpEngine_FWD_DEFINED__ */
    5.63 +
    5.64 +
    5.65 +#ifndef ___IpEpEngineEvents_FWD_DEFINED__
    5.66 +#define ___IpEpEngineEvents_FWD_DEFINED__
    5.67 +typedef interface _IpEpEngineEvents _IpEpEngineEvents;
    5.68 +
    5.69 +#endif 	/* ___IpEpEngineEvents_FWD_DEFINED__ */
    5.70 +
    5.71 +
    5.72 +#ifndef __pEpEngine_FWD_DEFINED__
    5.73 +#define __pEpEngine_FWD_DEFINED__
    5.74 +
    5.75 +#ifdef __cplusplus
    5.76 +typedef class pEpEngine pEpEngine;
    5.77 +#else
    5.78 +typedef struct pEpEngine pEpEngine;
    5.79 +#endif /* __cplusplus */
    5.80 +
    5.81 +#endif 	/* __pEpEngine_FWD_DEFINED__ */
    5.82 +
    5.83 +
    5.84 +#ifndef ___ITextMessageEvents_FWD_DEFINED__
    5.85 +#define ___ITextMessageEvents_FWD_DEFINED__
    5.86 +typedef interface _ITextMessageEvents _ITextMessageEvents;
    5.87 +
    5.88 +#endif 	/* ___ITextMessageEvents_FWD_DEFINED__ */
    5.89 +
    5.90 +
    5.91 +#ifndef __TextMessage_FWD_DEFINED__
    5.92 +#define __TextMessage_FWD_DEFINED__
    5.93 +
    5.94 +#ifdef __cplusplus
    5.95 +typedef class TextMessage TextMessage;
    5.96 +#else
    5.97 +typedef struct TextMessage TextMessage;
    5.98 +#endif /* __cplusplus */
    5.99 +
   5.100 +#endif 	/* __TextMessage_FWD_DEFINED__ */
   5.101 +
   5.102 +
   5.103 +/* header files for imported files */
   5.104 +#include "oaidl.h"
   5.105 +#include "ocidl.h"
   5.106 +
   5.107 +#ifdef __cplusplus
   5.108 +extern "C"{
   5.109 +#endif 
   5.110 +
   5.111 +
   5.112 +#ifndef __ITextMessage_INTERFACE_DEFINED__
   5.113 +#define __ITextMessage_INTERFACE_DEFINED__
   5.114 +
   5.115 +/* interface ITextMessage */
   5.116 +/* [unique][nonextensible][oleautomation][uuid][object] */ 
   5.117 +
   5.118 +typedef 
   5.119 +enum _pEp_text_format
   5.120 +    {
   5.121 +        pEp_text_format_plain	= 0,
   5.122 +        pEp_text_format_html	= ( pEp_text_format_plain + 1 ) ,
   5.123 +        pEp_text_format_other	= 0xff
   5.124 +    } 	pEp_text_format;
   5.125 +
   5.126 +typedef 
   5.127 +enum _pEp_msg_direction
   5.128 +    {
   5.129 +        pEp_dir_incoming	= 0,
   5.130 +        pEp_dir_outgoing	= ( pEp_dir_incoming + 1 ) 
   5.131 +    } 	pEp_msg_direction;
   5.132 +
   5.133 +typedef 
   5.134 +enum _pEp_MIME_format
   5.135 +    {
   5.136 +        pEp_MIME_none	= 0,
   5.137 +        pEp_MIME_fields_omitted	= ( pEp_MIME_none + 1 ) ,
   5.138 +        pEp_MIME	= ( pEp_MIME_fields_omitted + 1 ) 
   5.139 +    } 	pEp_MIME_format;
   5.140 +
   5.141 +typedef 
   5.142 +enum _pEp_enc_format
   5.143 +    {
   5.144 +        pEp_enc_none	= 0,
   5.145 +        pEp_enc_pieces	= ( pEp_enc_none + 1 ) ,
   5.146 +        pEp_enc_S_MIME	= ( pEp_enc_pieces + 1 ) ,
   5.147 +        pEp_enc_PGP_MIME	= ( pEp_enc_S_MIME + 1 ) ,
   5.148 +        pEp_enc_pEp	= ( pEp_enc_PGP_MIME + 1 ) 
   5.149 +    } 	pEp_enc_format;
   5.150 +
   5.151 +
   5.152 +EXTERN_C const IID IID_ITextMessage;
   5.153 +
   5.154 +#if defined(__cplusplus) && !defined(CINTERFACE)
   5.155 +    
   5.156 +    MIDL_INTERFACE("161538F9-53C8-4D9C-8BA4-0FB43AEC7106")
   5.157 +    ITextMessage : public IUnknown
   5.158 +    {
   5.159 +    public:
   5.160 +        virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_dir( 
   5.161 +            /* [retval][out] */ pEp_msg_direction *pVal) = 0;
   5.162 +        
   5.163 +        virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_dir( 
   5.164 +            /* [in] */ pEp_msg_direction newVal) = 0;
   5.165 +        
   5.166 +        virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_id( 
   5.167 +            /* [retval][out] */ BSTR *pVal) = 0;
   5.168 +        
   5.169 +        virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_id( 
   5.170 +            /* [in] */ BSTR newVal) = 0;
   5.171 +        
   5.172 +        virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_shortmsg( 
   5.173 +            /* [retval][out] */ BSTR *pVal) = 0;
   5.174 +        
   5.175 +        virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_shortmsg( 
   5.176 +            /* [in] */ BSTR newVal) = 0;
   5.177 +        
   5.178 +        virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_longmsg( 
   5.179 +            /* [retval][out] */ BSTR *pVal) = 0;
   5.180 +        
   5.181 +        virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_longmsg( 
   5.182 +            /* [in] */ BSTR newVal) = 0;
   5.183 +        
   5.184 +        virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_longmsg_formatted( 
   5.185 +            /* [retval][out] */ BSTR *pVal) = 0;
   5.186 +        
   5.187 +        virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_longmsg_formatted( 
   5.188 +            /* [in] */ BSTR newVal) = 0;
   5.189 +        
   5.190 +        virtual HRESULT STDMETHODCALLTYPE add_attachment( 
   5.191 +            /* [in] */ SAFEARRAY * data,
   5.192 +            /* [optional][in] */ BSTR mime_type,
   5.193 +            /* [optional][in] */ BSTR filename) = 0;
   5.194 +        
   5.195 +        virtual HRESULT STDMETHODCALLTYPE has_attachments( 
   5.196 +            /* [retval][out] */ boolean *result) = 0;
   5.197 +        
   5.198 +        virtual HRESULT STDMETHODCALLTYPE next_attachment( 
   5.199 +            /* [out] */ SAFEARRAY * *data,
   5.200 +            /* [out] */ BSTR *mime_type,
   5.201 +            /* [out] */ BSTR *filename,
   5.202 +            /* [retval][out] */ boolean *result) = 0;
   5.203 +        
   5.204 +        virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_sent( 
   5.205 +            /* [retval][out] */ hyper *result) = 0;
   5.206 +        
   5.207 +        virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_sent( 
   5.208 +            /* [in] */ hyper val) = 0;
   5.209 +        
   5.210 +        virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_recv( 
   5.211 +            /* [retval][out] */ hyper *result) = 0;
   5.212 +        
   5.213 +        virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_recv( 
   5.214 +            /* [in] */ hyper val) = 0;
   5.215 +        
   5.216 +        virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_from( 
   5.217 +            /* [retval][out] */ struct pEp_identity_s *pVal) = 0;
   5.218 +        
   5.219 +        virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_from( 
   5.220 +            /* [in] */ struct pEp_identity_s *newVal) = 0;
   5.221 +        
   5.222 +        virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_to( 
   5.223 +            /* [retval][out] */ SAFEARRAY * *pVal) = 0;
   5.224 +        
   5.225 +        virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_to( 
   5.226 +            /* [in] */ SAFEARRAY * newVal) = 0;
   5.227 +        
   5.228 +        virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_recv_by( 
   5.229 +            /* [retval][out] */ struct pEp_identity_s *pVal) = 0;
   5.230 +        
   5.231 +        virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_recv_by( 
   5.232 +            /* [in] */ struct pEp_identity_s *newVal) = 0;
   5.233 +        
   5.234 +        virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_cc( 
   5.235 +            /* [retval][out] */ SAFEARRAY * *pVal) = 0;
   5.236 +        
   5.237 +        virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_cc( 
   5.238 +            /* [in] */ SAFEARRAY * newVal) = 0;
   5.239 +        
   5.240 +        virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_bcc( 
   5.241 +            /* [retval][out] */ SAFEARRAY * *pVal) = 0;
   5.242 +        
   5.243 +        virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_bcc( 
   5.244 +            /* [in] */ SAFEARRAY * newVal) = 0;
   5.245 +        
   5.246 +        virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_reply_to( 
   5.247 +            /* [retval][out] */ SAFEARRAY * *pVal) = 0;
   5.248 +        
   5.249 +        virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_reply_to( 
   5.250 +            /* [in] */ SAFEARRAY * newVal) = 0;
   5.251 +        
   5.252 +        virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_references( 
   5.253 +            /* [retval][out] */ SAFEARRAY * *pVal) = 0;
   5.254 +        
   5.255 +        virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_references( 
   5.256 +            /* [in] */ SAFEARRAY * newVal) = 0;
   5.257 +        
   5.258 +        virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_keywords( 
   5.259 +            /* [retval][out] */ SAFEARRAY * *pVal) = 0;
   5.260 +        
   5.261 +        virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_keywords( 
   5.262 +            /* [in] */ SAFEARRAY * newVal) = 0;
   5.263 +        
   5.264 +        virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_comments( 
   5.265 +            /* [retval][out] */ BSTR *pVal) = 0;
   5.266 +        
   5.267 +        virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_comments( 
   5.268 +            /* [in] */ BSTR newVal) = 0;
   5.269 +        
   5.270 +    };
   5.271 +    
   5.272 +    
   5.273 +#else 	/* C style interface */
   5.274 +
   5.275 +    typedef struct ITextMessageVtbl
   5.276 +    {
   5.277 +        BEGIN_INTERFACE
   5.278 +        
   5.279 +        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
   5.280 +            ITextMessage * This,
   5.281 +            /* [in] */ REFIID riid,
   5.282 +            /* [annotation][iid_is][out] */ 
   5.283 +            _COM_Outptr_  void **ppvObject);
   5.284 +        
   5.285 +        ULONG ( STDMETHODCALLTYPE *AddRef )( 
   5.286 +            ITextMessage * This);
   5.287 +        
   5.288 +        ULONG ( STDMETHODCALLTYPE *Release )( 
   5.289 +            ITextMessage * This);
   5.290 +        
   5.291 +        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_dir )( 
   5.292 +            ITextMessage * This,
   5.293 +            /* [retval][out] */ pEp_msg_direction *pVal);
   5.294 +        
   5.295 +        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_dir )( 
   5.296 +            ITextMessage * This,
   5.297 +            /* [in] */ pEp_msg_direction newVal);
   5.298 +        
   5.299 +        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_id )( 
   5.300 +            ITextMessage * This,
   5.301 +            /* [retval][out] */ BSTR *pVal);
   5.302 +        
   5.303 +        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_id )( 
   5.304 +            ITextMessage * This,
   5.305 +            /* [in] */ BSTR newVal);
   5.306 +        
   5.307 +        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_shortmsg )( 
   5.308 +            ITextMessage * This,
   5.309 +            /* [retval][out] */ BSTR *pVal);
   5.310 +        
   5.311 +        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_shortmsg )( 
   5.312 +            ITextMessage * This,
   5.313 +            /* [in] */ BSTR newVal);
   5.314 +        
   5.315 +        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_longmsg )( 
   5.316 +            ITextMessage * This,
   5.317 +            /* [retval][out] */ BSTR *pVal);
   5.318 +        
   5.319 +        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_longmsg )( 
   5.320 +            ITextMessage * This,
   5.321 +            /* [in] */ BSTR newVal);
   5.322 +        
   5.323 +        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_longmsg_formatted )( 
   5.324 +            ITextMessage * This,
   5.325 +            /* [retval][out] */ BSTR *pVal);
   5.326 +        
   5.327 +        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_longmsg_formatted )( 
   5.328 +            ITextMessage * This,
   5.329 +            /* [in] */ BSTR newVal);
   5.330 +        
   5.331 +        HRESULT ( STDMETHODCALLTYPE *add_attachment )( 
   5.332 +            ITextMessage * This,
   5.333 +            /* [in] */ SAFEARRAY * data,
   5.334 +            /* [optional][in] */ BSTR mime_type,
   5.335 +            /* [optional][in] */ BSTR filename);
   5.336 +        
   5.337 +        HRESULT ( STDMETHODCALLTYPE *has_attachments )( 
   5.338 +            ITextMessage * This,
   5.339 +            /* [retval][out] */ boolean *result);
   5.340 +        
   5.341 +        HRESULT ( STDMETHODCALLTYPE *next_attachment )( 
   5.342 +            ITextMessage * This,
   5.343 +            /* [out] */ SAFEARRAY * *data,
   5.344 +            /* [out] */ BSTR *mime_type,
   5.345 +            /* [out] */ BSTR *filename,
   5.346 +            /* [retval][out] */ boolean *result);
   5.347 +        
   5.348 +        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_sent )( 
   5.349 +            ITextMessage * This,
   5.350 +            /* [retval][out] */ hyper *result);
   5.351 +        
   5.352 +        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_sent )( 
   5.353 +            ITextMessage * This,
   5.354 +            /* [in] */ hyper val);
   5.355 +        
   5.356 +        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_recv )( 
   5.357 +            ITextMessage * This,
   5.358 +            /* [retval][out] */ hyper *result);
   5.359 +        
   5.360 +        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_recv )( 
   5.361 +            ITextMessage * This,
   5.362 +            /* [in] */ hyper val);
   5.363 +        
   5.364 +        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_from )( 
   5.365 +            ITextMessage * This,
   5.366 +            /* [retval][out] */ struct pEp_identity_s *pVal);
   5.367 +        
   5.368 +        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_from )( 
   5.369 +            ITextMessage * This,
   5.370 +            /* [in] */ struct pEp_identity_s *newVal);
   5.371 +        
   5.372 +        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_to )( 
   5.373 +            ITextMessage * This,
   5.374 +            /* [retval][out] */ SAFEARRAY * *pVal);
   5.375 +        
   5.376 +        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_to )( 
   5.377 +            ITextMessage * This,
   5.378 +            /* [in] */ SAFEARRAY * newVal);
   5.379 +        
   5.380 +        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_recv_by )( 
   5.381 +            ITextMessage * This,
   5.382 +            /* [retval][out] */ struct pEp_identity_s *pVal);
   5.383 +        
   5.384 +        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_recv_by )( 
   5.385 +            ITextMessage * This,
   5.386 +            /* [in] */ struct pEp_identity_s *newVal);
   5.387 +        
   5.388 +        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_cc )( 
   5.389 +            ITextMessage * This,
   5.390 +            /* [retval][out] */ SAFEARRAY * *pVal);
   5.391 +        
   5.392 +        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_cc )( 
   5.393 +            ITextMessage * This,
   5.394 +            /* [in] */ SAFEARRAY * newVal);
   5.395 +        
   5.396 +        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_bcc )( 
   5.397 +            ITextMessage * This,
   5.398 +            /* [retval][out] */ SAFEARRAY * *pVal);
   5.399 +        
   5.400 +        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_bcc )( 
   5.401 +            ITextMessage * This,
   5.402 +            /* [in] */ SAFEARRAY * newVal);
   5.403 +        
   5.404 +        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_reply_to )( 
   5.405 +            ITextMessage * This,
   5.406 +            /* [retval][out] */ SAFEARRAY * *pVal);
   5.407 +        
   5.408 +        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_reply_to )( 
   5.409 +            ITextMessage * This,
   5.410 +            /* [in] */ SAFEARRAY * newVal);
   5.411 +        
   5.412 +        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_references )( 
   5.413 +            ITextMessage * This,
   5.414 +            /* [retval][out] */ SAFEARRAY * *pVal);
   5.415 +        
   5.416 +        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_references )( 
   5.417 +            ITextMessage * This,
   5.418 +            /* [in] */ SAFEARRAY * newVal);
   5.419 +        
   5.420 +        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_keywords )( 
   5.421 +            ITextMessage * This,
   5.422 +            /* [retval][out] */ SAFEARRAY * *pVal);
   5.423 +        
   5.424 +        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_keywords )( 
   5.425 +            ITextMessage * This,
   5.426 +            /* [in] */ SAFEARRAY * newVal);
   5.427 +        
   5.428 +        /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_comments )( 
   5.429 +            ITextMessage * This,
   5.430 +            /* [retval][out] */ BSTR *pVal);
   5.431 +        
   5.432 +        /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_comments )( 
   5.433 +            ITextMessage * This,
   5.434 +            /* [in] */ BSTR newVal);
   5.435 +        
   5.436 +        END_INTERFACE
   5.437 +    } ITextMessageVtbl;
   5.438 +
   5.439 +    interface ITextMessage
   5.440 +    {
   5.441 +        CONST_VTBL struct ITextMessageVtbl *lpVtbl;
   5.442 +    };
   5.443 +
   5.444 +    
   5.445 +
   5.446 +#ifdef COBJMACROS
   5.447 +
   5.448 +
   5.449 +#define ITextMessage_QueryInterface(This,riid,ppvObject)	\
   5.450 +    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
   5.451 +
   5.452 +#define ITextMessage_AddRef(This)	\
   5.453 +    ( (This)->lpVtbl -> AddRef(This) ) 
   5.454 +
   5.455 +#define ITextMessage_Release(This)	\
   5.456 +    ( (This)->lpVtbl -> Release(This) ) 
   5.457 +
   5.458 +
   5.459 +#define ITextMessage_get_dir(This,pVal)	\
   5.460 +    ( (This)->lpVtbl -> get_dir(This,pVal) ) 
   5.461 +
   5.462 +#define ITextMessage_put_dir(This,newVal)	\
   5.463 +    ( (This)->lpVtbl -> put_dir(This,newVal) ) 
   5.464 +
   5.465 +#define ITextMessage_get_id(This,pVal)	\
   5.466 +    ( (This)->lpVtbl -> get_id(This,pVal) ) 
   5.467 +
   5.468 +#define ITextMessage_put_id(This,newVal)	\
   5.469 +    ( (This)->lpVtbl -> put_id(This,newVal) ) 
   5.470 +
   5.471 +#define ITextMessage_get_shortmsg(This,pVal)	\
   5.472 +    ( (This)->lpVtbl -> get_shortmsg(This,pVal) ) 
   5.473 +
   5.474 +#define ITextMessage_put_shortmsg(This,newVal)	\
   5.475 +    ( (This)->lpVtbl -> put_shortmsg(This,newVal) ) 
   5.476 +
   5.477 +#define ITextMessage_get_longmsg(This,pVal)	\
   5.478 +    ( (This)->lpVtbl -> get_longmsg(This,pVal) ) 
   5.479 +
   5.480 +#define ITextMessage_put_longmsg(This,newVal)	\
   5.481 +    ( (This)->lpVtbl -> put_longmsg(This,newVal) ) 
   5.482 +
   5.483 +#define ITextMessage_get_longmsg_formatted(This,pVal)	\
   5.484 +    ( (This)->lpVtbl -> get_longmsg_formatted(This,pVal) ) 
   5.485 +
   5.486 +#define ITextMessage_put_longmsg_formatted(This,newVal)	\
   5.487 +    ( (This)->lpVtbl -> put_longmsg_formatted(This,newVal) ) 
   5.488 +
   5.489 +#define ITextMessage_add_attachment(This,data,mime_type,filename)	\
   5.490 +    ( (This)->lpVtbl -> add_attachment(This,data,mime_type,filename) ) 
   5.491 +
   5.492 +#define ITextMessage_has_attachments(This,result)	\
   5.493 +    ( (This)->lpVtbl -> has_attachments(This,result) ) 
   5.494 +
   5.495 +#define ITextMessage_next_attachment(This,data,mime_type,filename,result)	\
   5.496 +    ( (This)->lpVtbl -> next_attachment(This,data,mime_type,filename,result) ) 
   5.497 +
   5.498 +#define ITextMessage_get_sent(This,result)	\
   5.499 +    ( (This)->lpVtbl -> get_sent(This,result) ) 
   5.500 +
   5.501 +#define ITextMessage_put_sent(This,val)	\
   5.502 +    ( (This)->lpVtbl -> put_sent(This,val) ) 
   5.503 +
   5.504 +#define ITextMessage_get_recv(This,result)	\
   5.505 +    ( (This)->lpVtbl -> get_recv(This,result) ) 
   5.506 +
   5.507 +#define ITextMessage_put_recv(This,val)	\
   5.508 +    ( (This)->lpVtbl -> put_recv(This,val) ) 
   5.509 +
   5.510 +#define ITextMessage_get_from(This,pVal)	\
   5.511 +    ( (This)->lpVtbl -> get_from(This,pVal) ) 
   5.512 +
   5.513 +#define ITextMessage_put_from(This,newVal)	\
   5.514 +    ( (This)->lpVtbl -> put_from(This,newVal) ) 
   5.515 +
   5.516 +#define ITextMessage_get_to(This,pVal)	\
   5.517 +    ( (This)->lpVtbl -> get_to(This,pVal) ) 
   5.518 +
   5.519 +#define ITextMessage_put_to(This,newVal)	\
   5.520 +    ( (This)->lpVtbl -> put_to(This,newVal) ) 
   5.521 +
   5.522 +#define ITextMessage_get_recv_by(This,pVal)	\
   5.523 +    ( (This)->lpVtbl -> get_recv_by(This,pVal) ) 
   5.524 +
   5.525 +#define ITextMessage_put_recv_by(This,newVal)	\
   5.526 +    ( (This)->lpVtbl -> put_recv_by(This,newVal) ) 
   5.527 +
   5.528 +#define ITextMessage_get_cc(This,pVal)	\
   5.529 +    ( (This)->lpVtbl -> get_cc(This,pVal) ) 
   5.530 +
   5.531 +#define ITextMessage_put_cc(This,newVal)	\
   5.532 +    ( (This)->lpVtbl -> put_cc(This,newVal) ) 
   5.533 +
   5.534 +#define ITextMessage_get_bcc(This,pVal)	\
   5.535 +    ( (This)->lpVtbl -> get_bcc(This,pVal) ) 
   5.536 +
   5.537 +#define ITextMessage_put_bcc(This,newVal)	\
   5.538 +    ( (This)->lpVtbl -> put_bcc(This,newVal) ) 
   5.539 +
   5.540 +#define ITextMessage_get_reply_to(This,pVal)	\
   5.541 +    ( (This)->lpVtbl -> get_reply_to(This,pVal) ) 
   5.542 +
   5.543 +#define ITextMessage_put_reply_to(This,newVal)	\
   5.544 +    ( (This)->lpVtbl -> put_reply_to(This,newVal) ) 
   5.545 +
   5.546 +#define ITextMessage_get_references(This,pVal)	\
   5.547 +    ( (This)->lpVtbl -> get_references(This,pVal) ) 
   5.548 +
   5.549 +#define ITextMessage_put_references(This,newVal)	\
   5.550 +    ( (This)->lpVtbl -> put_references(This,newVal) ) 
   5.551 +
   5.552 +#define ITextMessage_get_keywords(This,pVal)	\
   5.553 +    ( (This)->lpVtbl -> get_keywords(This,pVal) ) 
   5.554 +
   5.555 +#define ITextMessage_put_keywords(This,newVal)	\
   5.556 +    ( (This)->lpVtbl -> put_keywords(This,newVal) ) 
   5.557 +
   5.558 +#define ITextMessage_get_comments(This,pVal)	\
   5.559 +    ( (This)->lpVtbl -> get_comments(This,pVal) ) 
   5.560 +
   5.561 +#define ITextMessage_put_comments(This,newVal)	\
   5.562 +    ( (This)->lpVtbl -> put_comments(This,newVal) ) 
   5.563 +
   5.564 +#endif /* COBJMACROS */
   5.565 +
   5.566 +
   5.567 +#endif 	/* C style interface */
   5.568 +
   5.569 +
   5.570 +
   5.571 +
   5.572 +#endif 	/* __ITextMessage_INTERFACE_DEFINED__ */
   5.573 +
   5.574 +
   5.575 +#ifndef __IpEpEngine_INTERFACE_DEFINED__
   5.576 +#define __IpEpEngine_INTERFACE_DEFINED__
   5.577 +
   5.578 +/* interface IpEpEngine */
   5.579 +/* [unique][nonextensible][oleautomation][uuid][object] */ 
   5.580 +
   5.581 +typedef 
   5.582 +enum _pEp_STATUS
   5.583 +    {
   5.584 +        pEp_STATUS_OK	= 0,
   5.585 +        pEp_KEY_NOT_FOUND	= 0x201,
   5.586 +        pEp_KEY_HAS_AMBIG_NAME	= 0x202,
   5.587 +        pEp_GET_KEY_FAILED	= 0x203,
   5.588 +        pEp_UNENCRYPTED	= 0x400,
   5.589 +        pEp_VERIFIED	= 0x401,
   5.590 +        pEp_DECRYPTED	= 0x402,
   5.591 +        pEp_DECRYPTED_AND_VERIFIED	= 0x403,
   5.592 +        pEp_DECRYPT_WRONG_FORMAT	= 0x404,
   5.593 +        pEp_DECRYPT_NO_KEY	= 0x405,
   5.594 +        pEp_DECRYPT_SIGNATURE_DOES_NOT_MATCH	= 0x406,
   5.595 +        pEp_VERIFY_NO_KEY	= 0x407,
   5.596 +        pEp_VERIFIED_AND_TRUSTED	= 0x408,
   5.597 +        pEp_ILLEGAL_VALUE	= -4,
   5.598 +        pEp_BUFFER_TOO_SMALL	= -3,
   5.599 +        pEp_OUT_OF_MEMORY	= -2,
   5.600 +        pEp_UNKNOWN_ERROR	= -1
   5.601 +    } 	pEp_STATUS;
   5.602 +
   5.603 +typedef 
   5.604 +enum _pEp_comm_type
   5.605 +    {
   5.606 +        pEp_ct_unknown	= 0,
   5.607 +        pEp_ct_no_encryption	= 0x1,
   5.608 +        pEp_ct_no_encrypted_channel	= 0x2,
   5.609 +        pEp_ct_key_not_found	= 0x3,
   5.610 +        pEp_ct_key_expired	= 0x4,
   5.611 +        pEp_ct_key_revoked	= 0x5,
   5.612 +        pEp_ct_key_b0rken	= 0x6,
   5.613 +        pEp_ct_my_key_not_included	= 0x9,
   5.614 +        pEp_ct_security_by_obscurity	= 0xa,
   5.615 +        pEp_ct_b0rken_crypto	= 0xb,
   5.616 +        pEp_ct_key_too_short	= 0xe,
   5.617 +        pEp_ct_compromized	= 0xf,
   5.618 +        pEp_ct_unconfirmed_encryption	= 0x10,
   5.619 +        pEp_ct_OpenPGP_1024_RSA_unconfirmed	= 0x11,
   5.620 +        pEp_ct_OpenPGP_unconfirmed	= 0x3f,
   5.621 +        pEp_ct_unconfirmed_enc_anon	= 0x40,
   5.622 +        pEp_ct_pEp_unconfirmed	= 0x7f,
   5.623 +        pEp_ct_confirmed	= 0x80,
   5.624 +        pEp_ct_confirmed_encryption	= 0x90,
   5.625 +        pEp_ct_OpenPGP_1024_RSA	= 0x91,
   5.626 +        pEp_ct_OpenPGP	= 0xbf,
   5.627 +        pEp_ct_confirmed_enc_anon	= 0xc0,
   5.628 +        pEp_ct_pEp	= 0xff
   5.629 +    } 	pEp_comm_type;
   5.630 +
   5.631 +/* [uuid] */ struct  DECLSPEC_UUID("CAAC4CFB-4EE6-4C27-81F7-E5B4E0A46816") pEp_identity_s
   5.632 +    {
   5.633 +    BSTR address;
   5.634 +    BSTR fpr;
   5.635 +    BSTR user_id;
   5.636 +    BSTR username;
   5.637 +    pEp_comm_type comm_type;
   5.638 +    BSTR lang;
   5.639 +    } ;
   5.640 +typedef 
   5.641 +enum _pEp_color
   5.642 +    {
   5.643 +        pEp_rating_undefined	= 0,
   5.644 +        pEp_rating_unencrypted	= ( pEp_rating_undefined + 1 ) ,
   5.645 +        pEp_rating_cannot_decrypt	= ( pEp_rating_unencrypted + 1 ) ,
   5.646 +        pEp_rating_unreliable	= ( pEp_rating_cannot_decrypt + 1 ) ,
   5.647 +        pEp_rating_reliable	= ( pEp_rating_unreliable + 1 ) ,
   5.648 +        pEp_rating_yellow	= pEp_rating_reliable,
   5.649 +        pEp_rating_trusted	= ( pEp_rating_yellow + 1 ) ,
   5.650 +        pEp_rating_green	= pEp_rating_trusted,
   5.651 +        pEp_rating_trusted_and_anonymized	= ( pEp_rating_green + 1 ) ,
   5.652 +        pEp_rating_fully_anonymous	= ( pEp_rating_trusted_and_anonymized + 1 ) ,
   5.653 +        pEp_rating_under_attack	= -1,
   5.654 +        pEp_rating_red	= pEp_rating_under_attack,
   5.655 +        pEp_rating_b0rken	= -2
   5.656 +    } 	pEp_color;
   5.657 +
   5.658 +
   5.659 +EXTERN_C const IID IID_IpEpEngine;
   5.660 +
   5.661 +#if defined(__cplusplus) && !defined(CINTERFACE)
   5.662 +    
   5.663 +    MIDL_INTERFACE("9A9F4422-CF0A-45D7-90CD-1D1B7B2A4540")
   5.664 +    IpEpEngine : public IUnknown
   5.665 +    {
   5.666 +    public:
   5.667 +        virtual HRESULT STDMETHODCALLTYPE log( 
   5.668 +            /* [in] */ BSTR title,
   5.669 +            /* [in] */ BSTR entity,
   5.670 +            /* [defaultvalue][in] */ BSTR description = L"",
   5.671 +            /* [defaultvalue][in] */ BSTR comment = L"") = 0;
   5.672 +        
   5.673 +        virtual HRESULT STDMETHODCALLTYPE decrypt( 
   5.674 +            /* [in] */ BSTR ctext,
   5.675 +            /* [out] */ BSTR *ptext,
   5.676 +            /* [out] */ SAFEARRAY * *key_list,
   5.677 +            /* [retval][out] */ pEp_STATUS *decrypt_status) = 0;
   5.678 +        
   5.679 +        virtual HRESULT STDMETHODCALLTYPE decrypt_b( 
   5.680 +            /* [in] */ BSTR ctext,
   5.681 +            /* [out] */ SAFEARRAY * *ptext,
   5.682 +            /* [out] */ SAFEARRAY * *key_list,
   5.683 +            /* [retval][out] */ pEp_STATUS *decrypt_status) = 0;
   5.684 +        
   5.685 +        virtual HRESULT STDMETHODCALLTYPE encrypt( 
   5.686 +            /* [in] */ SAFEARRAY * key_list,
   5.687 +            /* [in] */ BSTR ptext,
   5.688 +            /* [out] */ BSTR *ctext,
   5.689 +            /* [retval][out] */ pEp_STATUS *status) = 0;
   5.690 +        
   5.691 +        virtual HRESULT STDMETHODCALLTYPE encrypt_b( 
   5.692 +            /* [in] */ SAFEARRAY * key_list,
   5.693 +            /* [in] */ SAFEARRAY * ptext,
   5.694 +            /* [out] */ BSTR *ctext,
   5.695 +            /* [retval][out] */ pEp_STATUS *status) = 0;
   5.696 +        
   5.697 +        virtual HRESULT STDMETHODCALLTYPE verify( 
   5.698 +            /* [in] */ BSTR text,
   5.699 +            /* [in] */ BSTR signature,
   5.700 +            /* [out] */ SAFEARRAY * *key_list,
   5.701 +            /* [retval][out] */ pEp_STATUS *verify_status) = 0;
   5.702 +        
   5.703 +        virtual HRESULT STDMETHODCALLTYPE trustword( 
   5.704 +            /* [in] */ LONG value,
   5.705 +            /* [defaultvalue][in] */ BSTR lang,
   5.706 +            /* [retval][out] */ BSTR *word) = 0;
   5.707 +        
   5.708 +        virtual HRESULT STDMETHODCALLTYPE trustwords( 
   5.709 +            /* [in] */ BSTR fpr,
   5.710 +            /* [defaultvalue][in] */ BSTR lang,
   5.711 +            /* [defaultvalue][in] */ LONG max_words,
   5.712 +            /* [retval][out] */ BSTR *words) = 0;
   5.713 +        
   5.714 +        virtual HRESULT STDMETHODCALLTYPE get_identity( 
   5.715 +            /* [in] */ BSTR address,
   5.716 +            /* [retval][out] */ struct pEp_identity_s *ident) = 0;
   5.717 +        
   5.718 +        virtual HRESULT STDMETHODCALLTYPE set_identity( 
   5.719 +            /* [in] */ struct pEp_identity_s *ident) = 0;
   5.720 +        
   5.721 +        virtual HRESULT STDMETHODCALLTYPE generate_keypair( 
   5.722 +            /* [in] */ struct pEp_identity_s *ident,
   5.723 +            /* [retval][out] */ BSTR *fpr) = 0;
   5.724 +        
   5.725 +        virtual HRESULT STDMETHODCALLTYPE delete_keypair( 
   5.726 +            /* [in] */ BSTR fpr) = 0;
   5.727 +        
   5.728 +        virtual HRESULT STDMETHODCALLTYPE import_key( 
   5.729 +            /* [in] */ BSTR key_data) = 0;
   5.730 +        
   5.731 +        virtual HRESULT STDMETHODCALLTYPE import_key_b( 
   5.732 +            /* [in] */ SAFEARRAY * key_data) = 0;
   5.733 +        
   5.734 +        virtual HRESULT STDMETHODCALLTYPE export_key( 
   5.735 +            /* [in] */ BSTR fpr,
   5.736 +            /* [retval][out] */ BSTR *key_data) = 0;
   5.737 +        
   5.738 +        virtual HRESULT STDMETHODCALLTYPE recv_key( 
   5.739 +            /* [in] */ BSTR pattern) = 0;
   5.740 +        
   5.741 +        virtual HRESULT STDMETHODCALLTYPE find_keys( 
   5.742 +            /* [in] */ BSTR pattern,
   5.743 +            /* [retval][out] */ SAFEARRAY * *key_list) = 0;
   5.744 +        
   5.745 +        virtual HRESULT STDMETHODCALLTYPE send_key( 
   5.746 +            /* [in] */ BSTR pattern) = 0;
   5.747 +        
   5.748 +        virtual HRESULT STDMETHODCALLTYPE examine_identity( 
   5.749 +            /* [in] */ struct pEp_identity_s *ident) = 0;
   5.750 +        
   5.751 +        virtual HRESULT STDMETHODCALLTYPE examine_myself( 
   5.752 +            /* [in] */ struct pEp_identity_s *myself) = 0;
   5.753 +        
   5.754 +        virtual HRESULT STDMETHODCALLTYPE myself( 
   5.755 +            /* [in] */ struct pEp_identity_s *ident,
   5.756 +            /* [retval][out] */ struct pEp_identity_s *result) = 0;
   5.757 +        
   5.758 +        virtual HRESULT STDMETHODCALLTYPE update_identity( 
   5.759 +            /* [in] */ struct pEp_identity_s *ident,
   5.760 +            /* [retval][out] */ struct pEp_identity_s *result) = 0;
   5.761 +        
   5.762 +        virtual HRESULT STDMETHODCALLTYPE key_compromized( 
   5.763 +            /* [in] */ BSTR fpr) = 0;
   5.764 +        
   5.765 +        virtual HRESULT STDMETHODCALLTYPE encrypt_message( 
   5.766 +            /* [in] */ ITextMessage *src,
   5.767 +            /* [out] */ ITextMessage **dst,
   5.768 +            /* [optional][in] */ SAFEARRAY * extra) = 0;
   5.769 +        
   5.770 +        virtual HRESULT STDMETHODCALLTYPE decrypt_message( 
   5.771 +            /* [in] */ ITextMessage *src,
   5.772 +            /* [out] */ ITextMessage **dst,
   5.773 +            /* [out] */ SAFEARRAY * *keylist) = 0;
   5.774 +        
   5.775 +        virtual HRESULT STDMETHODCALLTYPE message_color( 
   5.776 +            /* [in] */ ITextMessage *msg,
   5.777 +            /* [retval][out] */ pEp_color *pVal) = 0;
   5.778 +        
   5.779 +        virtual HRESULT STDMETHODCALLTYPE identity_color( 
   5.780 +            /* [in] */ struct pEp_identity_s *ident,
   5.781 +            /* [retval][out] */ pEp_color *pVal) = 0;
   5.782 +        
   5.783 +    };
   5.784 +    
   5.785 +    
   5.786 +#else 	/* C style interface */
   5.787 +
   5.788 +    typedef struct IpEpEngineVtbl
   5.789 +    {
   5.790 +        BEGIN_INTERFACE
   5.791 +        
   5.792 +        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
   5.793 +            IpEpEngine * This,
   5.794 +            /* [in] */ REFIID riid,
   5.795 +            /* [annotation][iid_is][out] */ 
   5.796 +            _COM_Outptr_  void **ppvObject);
   5.797 +        
   5.798 +        ULONG ( STDMETHODCALLTYPE *AddRef )( 
   5.799 +            IpEpEngine * This);
   5.800 +        
   5.801 +        ULONG ( STDMETHODCALLTYPE *Release )( 
   5.802 +            IpEpEngine * This);
   5.803 +        
   5.804 +        HRESULT ( STDMETHODCALLTYPE *log )( 
   5.805 +            IpEpEngine * This,
   5.806 +            /* [in] */ BSTR title,
   5.807 +            /* [in] */ BSTR entity,
   5.808 +            /* [defaultvalue][in] */ BSTR description,
   5.809 +            /* [defaultvalue][in] */ BSTR comment);
   5.810 +        
   5.811 +        HRESULT ( STDMETHODCALLTYPE *decrypt )( 
   5.812 +            IpEpEngine * This,
   5.813 +            /* [in] */ BSTR ctext,
   5.814 +            /* [out] */ BSTR *ptext,
   5.815 +            /* [out] */ SAFEARRAY * *key_list,
   5.816 +            /* [retval][out] */ pEp_STATUS *decrypt_status);
   5.817 +        
   5.818 +        HRESULT ( STDMETHODCALLTYPE *decrypt_b )( 
   5.819 +            IpEpEngine * This,
   5.820 +            /* [in] */ BSTR ctext,
   5.821 +            /* [out] */ SAFEARRAY * *ptext,
   5.822 +            /* [out] */ SAFEARRAY * *key_list,
   5.823 +            /* [retval][out] */ pEp_STATUS *decrypt_status);
   5.824 +        
   5.825 +        HRESULT ( STDMETHODCALLTYPE *encrypt )( 
   5.826 +            IpEpEngine * This,
   5.827 +            /* [in] */ SAFEARRAY * key_list,
   5.828 +            /* [in] */ BSTR ptext,
   5.829 +            /* [out] */ BSTR *ctext,
   5.830 +            /* [retval][out] */ pEp_STATUS *status);
   5.831 +        
   5.832 +        HRESULT ( STDMETHODCALLTYPE *encrypt_b )( 
   5.833 +            IpEpEngine * This,
   5.834 +            /* [in] */ SAFEARRAY * key_list,
   5.835 +            /* [in] */ SAFEARRAY * ptext,
   5.836 +            /* [out] */ BSTR *ctext,
   5.837 +            /* [retval][out] */ pEp_STATUS *status);
   5.838 +        
   5.839 +        HRESULT ( STDMETHODCALLTYPE *verify )( 
   5.840 +            IpEpEngine * This,
   5.841 +            /* [in] */ BSTR text,
   5.842 +            /* [in] */ BSTR signature,
   5.843 +            /* [out] */ SAFEARRAY * *key_list,
   5.844 +            /* [retval][out] */ pEp_STATUS *verify_status);
   5.845 +        
   5.846 +        HRESULT ( STDMETHODCALLTYPE *trustword )( 
   5.847 +            IpEpEngine * This,
   5.848 +            /* [in] */ LONG value,
   5.849 +            /* [defaultvalue][in] */ BSTR lang,
   5.850 +            /* [retval][out] */ BSTR *word);
   5.851 +        
   5.852 +        HRESULT ( STDMETHODCALLTYPE *trustwords )( 
   5.853 +            IpEpEngine * This,
   5.854 +            /* [in] */ BSTR fpr,
   5.855 +            /* [defaultvalue][in] */ BSTR lang,
   5.856 +            /* [defaultvalue][in] */ LONG max_words,
   5.857 +            /* [retval][out] */ BSTR *words);
   5.858 +        
   5.859 +        HRESULT ( STDMETHODCALLTYPE *get_identity )( 
   5.860 +            IpEpEngine * This,
   5.861 +            /* [in] */ BSTR address,
   5.862 +            /* [retval][out] */ struct pEp_identity_s *ident);
   5.863 +        
   5.864 +        HRESULT ( STDMETHODCALLTYPE *set_identity )( 
   5.865 +            IpEpEngine * This,
   5.866 +            /* [in] */ struct pEp_identity_s *ident);
   5.867 +        
   5.868 +        HRESULT ( STDMETHODCALLTYPE *generate_keypair )( 
   5.869 +            IpEpEngine * This,
   5.870 +            /* [in] */ struct pEp_identity_s *ident,
   5.871 +            /* [retval][out] */ BSTR *fpr);
   5.872 +        
   5.873 +        HRESULT ( STDMETHODCALLTYPE *delete_keypair )( 
   5.874 +            IpEpEngine * This,
   5.875 +            /* [in] */ BSTR fpr);
   5.876 +        
   5.877 +        HRESULT ( STDMETHODCALLTYPE *import_key )( 
   5.878 +            IpEpEngine * This,
   5.879 +            /* [in] */ BSTR key_data);
   5.880 +        
   5.881 +        HRESULT ( STDMETHODCALLTYPE *import_key_b )( 
   5.882 +            IpEpEngine * This,
   5.883 +            /* [in] */ SAFEARRAY * key_data);
   5.884 +        
   5.885 +        HRESULT ( STDMETHODCALLTYPE *export_key )( 
   5.886 +            IpEpEngine * This,
   5.887 +            /* [in] */ BSTR fpr,
   5.888 +            /* [retval][out] */ BSTR *key_data);
   5.889 +        
   5.890 +        HRESULT ( STDMETHODCALLTYPE *recv_key )( 
   5.891 +            IpEpEngine * This,
   5.892 +            /* [in] */ BSTR pattern);
   5.893 +        
   5.894 +        HRESULT ( STDMETHODCALLTYPE *find_keys )( 
   5.895 +            IpEpEngine * This,
   5.896 +            /* [in] */ BSTR pattern,
   5.897 +            /* [retval][out] */ SAFEARRAY * *key_list);
   5.898 +        
   5.899 +        HRESULT ( STDMETHODCALLTYPE *send_key )( 
   5.900 +            IpEpEngine * This,
   5.901 +            /* [in] */ BSTR pattern);
   5.902 +        
   5.903 +        HRESULT ( STDMETHODCALLTYPE *examine_identity )( 
   5.904 +            IpEpEngine * This,
   5.905 +            /* [in] */ struct pEp_identity_s *ident);
   5.906 +        
   5.907 +        HRESULT ( STDMETHODCALLTYPE *examine_myself )( 
   5.908 +            IpEpEngine * This,
   5.909 +            /* [in] */ struct pEp_identity_s *myself);
   5.910 +        
   5.911 +        HRESULT ( STDMETHODCALLTYPE *myself )( 
   5.912 +            IpEpEngine * This,
   5.913 +            /* [in] */ struct pEp_identity_s *ident,
   5.914 +            /* [retval][out] */ struct pEp_identity_s *result);
   5.915 +        
   5.916 +        HRESULT ( STDMETHODCALLTYPE *update_identity )( 
   5.917 +            IpEpEngine * This,
   5.918 +            /* [in] */ struct pEp_identity_s *ident,
   5.919 +            /* [retval][out] */ struct pEp_identity_s *result);
   5.920 +        
   5.921 +        HRESULT ( STDMETHODCALLTYPE *key_compromized )( 
   5.922 +            IpEpEngine * This,
   5.923 +            /* [in] */ BSTR fpr);
   5.924 +        
   5.925 +        HRESULT ( STDMETHODCALLTYPE *encrypt_message )( 
   5.926 +            IpEpEngine * This,
   5.927 +            /* [in] */ ITextMessage *src,
   5.928 +            /* [out] */ ITextMessage **dst,
   5.929 +            /* [optional][in] */ SAFEARRAY * extra);
   5.930 +        
   5.931 +        HRESULT ( STDMETHODCALLTYPE *decrypt_message )( 
   5.932 +            IpEpEngine * This,
   5.933 +            /* [in] */ ITextMessage *src,
   5.934 +            /* [out] */ ITextMessage **dst,
   5.935 +            /* [out] */ SAFEARRAY * *keylist);
   5.936 +        
   5.937 +        HRESULT ( STDMETHODCALLTYPE *message_color )( 
   5.938 +            IpEpEngine * This,
   5.939 +            /* [in] */ ITextMessage *msg,
   5.940 +            /* [retval][out] */ pEp_color *pVal);
   5.941 +        
   5.942 +        HRESULT ( STDMETHODCALLTYPE *identity_color )( 
   5.943 +            IpEpEngine * This,
   5.944 +            /* [in] */ struct pEp_identity_s *ident,
   5.945 +            /* [retval][out] */ pEp_color *pVal);
   5.946 +        
   5.947 +        END_INTERFACE
   5.948 +    } IpEpEngineVtbl;
   5.949 +
   5.950 +    interface IpEpEngine
   5.951 +    {
   5.952 +        CONST_VTBL struct IpEpEngineVtbl *lpVtbl;
   5.953 +    };
   5.954 +
   5.955 +    
   5.956 +
   5.957 +#ifdef COBJMACROS
   5.958 +
   5.959 +
   5.960 +#define IpEpEngine_QueryInterface(This,riid,ppvObject)	\
   5.961 +    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
   5.962 +
   5.963 +#define IpEpEngine_AddRef(This)	\
   5.964 +    ( (This)->lpVtbl -> AddRef(This) ) 
   5.965 +
   5.966 +#define IpEpEngine_Release(This)	\
   5.967 +    ( (This)->lpVtbl -> Release(This) ) 
   5.968 +
   5.969 +
   5.970 +#define IpEpEngine_log(This,title,entity,description,comment)	\
   5.971 +    ( (This)->lpVtbl -> log(This,title,entity,description,comment) ) 
   5.972 +
   5.973 +#define IpEpEngine_decrypt(This,ctext,ptext,key_list,decrypt_status)	\
   5.974 +    ( (This)->lpVtbl -> decrypt(This,ctext,ptext,key_list,decrypt_status) ) 
   5.975 +
   5.976 +#define IpEpEngine_decrypt_b(This,ctext,ptext,key_list,decrypt_status)	\
   5.977 +    ( (This)->lpVtbl -> decrypt_b(This,ctext,ptext,key_list,decrypt_status) ) 
   5.978 +
   5.979 +#define IpEpEngine_encrypt(This,key_list,ptext,ctext,status)	\
   5.980 +    ( (This)->lpVtbl -> encrypt(This,key_list,ptext,ctext,status) ) 
   5.981 +
   5.982 +#define IpEpEngine_encrypt_b(This,key_list,ptext,ctext,status)	\
   5.983 +    ( (This)->lpVtbl -> encrypt_b(This,key_list,ptext,ctext,status) ) 
   5.984 +
   5.985 +#define IpEpEngine_verify(This,text,signature,key_list,verify_status)	\
   5.986 +    ( (This)->lpVtbl -> verify(This,text,signature,key_list,verify_status) ) 
   5.987 +
   5.988 +#define IpEpEngine_trustword(This,value,lang,word)	\
   5.989 +    ( (This)->lpVtbl -> trustword(This,value,lang,word) ) 
   5.990 +
   5.991 +#define IpEpEngine_trustwords(This,fpr,lang,max_words,words)	\
   5.992 +    ( (This)->lpVtbl -> trustwords(This,fpr,lang,max_words,words) ) 
   5.993 +
   5.994 +#define IpEpEngine_get_identity(This,address,ident)	\
   5.995 +    ( (This)->lpVtbl -> get_identity(This,address,ident) ) 
   5.996 +
   5.997 +#define IpEpEngine_set_identity(This,ident)	\
   5.998 +    ( (This)->lpVtbl -> set_identity(This,ident) ) 
   5.999 +
  5.1000 +#define IpEpEngine_generate_keypair(This,ident,fpr)	\
  5.1001 +    ( (This)->lpVtbl -> generate_keypair(This,ident,fpr) ) 
  5.1002 +
  5.1003 +#define IpEpEngine_delete_keypair(This,fpr)	\
  5.1004 +    ( (This)->lpVtbl -> delete_keypair(This,fpr) ) 
  5.1005 +
  5.1006 +#define IpEpEngine_import_key(This,key_data)	\
  5.1007 +    ( (This)->lpVtbl -> import_key(This,key_data) ) 
  5.1008 +
  5.1009 +#define IpEpEngine_import_key_b(This,key_data)	\
  5.1010 +    ( (This)->lpVtbl -> import_key_b(This,key_data) ) 
  5.1011 +
  5.1012 +#define IpEpEngine_export_key(This,fpr,key_data)	\
  5.1013 +    ( (This)->lpVtbl -> export_key(This,fpr,key_data) ) 
  5.1014 +
  5.1015 +#define IpEpEngine_recv_key(This,pattern)	\
  5.1016 +    ( (This)->lpVtbl -> recv_key(This,pattern) ) 
  5.1017 +
  5.1018 +#define IpEpEngine_find_keys(This,pattern,key_list)	\
  5.1019 +    ( (This)->lpVtbl -> find_keys(This,pattern,key_list) ) 
  5.1020 +
  5.1021 +#define IpEpEngine_send_key(This,pattern)	\
  5.1022 +    ( (This)->lpVtbl -> send_key(This,pattern) ) 
  5.1023 +
  5.1024 +#define IpEpEngine_examine_identity(This,ident)	\
  5.1025 +    ( (This)->lpVtbl -> examine_identity(This,ident) ) 
  5.1026 +
  5.1027 +#define IpEpEngine_examine_myself(This,myself)	\
  5.1028 +    ( (This)->lpVtbl -> examine_myself(This,myself) ) 
  5.1029 +
  5.1030 +#define IpEpEngine_myself(This,ident,result)	\
  5.1031 +    ( (This)->lpVtbl -> myself(This,ident,result) ) 
  5.1032 +
  5.1033 +#define IpEpEngine_update_identity(This,ident,result)	\
  5.1034 +    ( (This)->lpVtbl -> update_identity(This,ident,result) ) 
  5.1035 +
  5.1036 +#define IpEpEngine_key_compromized(This,fpr)	\
  5.1037 +    ( (This)->lpVtbl -> key_compromized(This,fpr) ) 
  5.1038 +
  5.1039 +#define IpEpEngine_encrypt_message(This,src,dst,extra)	\
  5.1040 +    ( (This)->lpVtbl -> encrypt_message(This,src,dst,extra) ) 
  5.1041 +
  5.1042 +#define IpEpEngine_decrypt_message(This,src,dst,keylist)	\
  5.1043 +    ( (This)->lpVtbl -> decrypt_message(This,src,dst,keylist) ) 
  5.1044 +
  5.1045 +#define IpEpEngine_message_color(This,msg,pVal)	\
  5.1046 +    ( (This)->lpVtbl -> message_color(This,msg,pVal) ) 
  5.1047 +
  5.1048 +#define IpEpEngine_identity_color(This,ident,pVal)	\
  5.1049 +    ( (This)->lpVtbl -> identity_color(This,ident,pVal) ) 
  5.1050 +
  5.1051 +#endif /* COBJMACROS */
  5.1052 +
  5.1053 +
  5.1054 +#endif 	/* C style interface */
  5.1055 +
  5.1056 +
  5.1057 +
  5.1058 +
  5.1059 +#endif 	/* __IpEpEngine_INTERFACE_DEFINED__ */
  5.1060 +
  5.1061 +
  5.1062 +
  5.1063 +#ifndef __pEpCOMServerAdapterLib_LIBRARY_DEFINED__
  5.1064 +#define __pEpCOMServerAdapterLib_LIBRARY_DEFINED__
  5.1065 +
  5.1066 +/* library pEpCOMServerAdapterLib */
  5.1067 +/* [version][uuid] */ 
  5.1068 +
  5.1069 +
  5.1070 +EXTERN_C const IID LIBID_pEpCOMServerAdapterLib;
  5.1071 +
  5.1072 +#ifndef ___IpEpEngineEvents_DISPINTERFACE_DEFINED__
  5.1073 +#define ___IpEpEngineEvents_DISPINTERFACE_DEFINED__
  5.1074 +
  5.1075 +/* dispinterface _IpEpEngineEvents */
  5.1076 +/* [uuid] */ 
  5.1077 +
  5.1078 +
  5.1079 +EXTERN_C const IID DIID__IpEpEngineEvents;
  5.1080 +
  5.1081 +#if defined(__cplusplus) && !defined(CINTERFACE)
  5.1082 +
  5.1083 +    MIDL_INTERFACE("B6BC9B8E-D9E2-4419-A3A4-7B4B58175549")
  5.1084 +    _IpEpEngineEvents : public IDispatch
  5.1085 +    {
  5.1086 +    };
  5.1087 +    
  5.1088 +#else 	/* C style interface */
  5.1089 +
  5.1090 +    typedef struct _IpEpEngineEventsVtbl
  5.1091 +    {
  5.1092 +        BEGIN_INTERFACE
  5.1093 +        
  5.1094 +        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
  5.1095 +            _IpEpEngineEvents * This,
  5.1096 +            /* [in] */ REFIID riid,
  5.1097 +            /* [annotation][iid_is][out] */ 
  5.1098 +            _COM_Outptr_  void **ppvObject);
  5.1099 +        
  5.1100 +        ULONG ( STDMETHODCALLTYPE *AddRef )( 
  5.1101 +            _IpEpEngineEvents * This);
  5.1102 +        
  5.1103 +        ULONG ( STDMETHODCALLTYPE *Release )( 
  5.1104 +            _IpEpEngineEvents * This);
  5.1105 +        
  5.1106 +        HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( 
  5.1107 +            _IpEpEngineEvents * This,
  5.1108 +            /* [out] */ UINT *pctinfo);
  5.1109 +        
  5.1110 +        HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( 
  5.1111 +            _IpEpEngineEvents * This,
  5.1112 +            /* [in] */ UINT iTInfo,
  5.1113 +            /* [in] */ LCID lcid,
  5.1114 +            /* [out] */ ITypeInfo **ppTInfo);
  5.1115 +        
  5.1116 +        HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( 
  5.1117 +            _IpEpEngineEvents * This,
  5.1118 +            /* [in] */ REFIID riid,
  5.1119 +            /* [size_is][in] */ LPOLESTR *rgszNames,
  5.1120 +            /* [range][in] */ UINT cNames,
  5.1121 +            /* [in] */ LCID lcid,
  5.1122 +            /* [size_is][out] */ DISPID *rgDispId);
  5.1123 +        
  5.1124 +        /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( 
  5.1125 +            _IpEpEngineEvents * This,
  5.1126 +            /* [annotation][in] */ 
  5.1127 +            _In_  DISPID dispIdMember,
  5.1128 +            /* [annotation][in] */ 
  5.1129 +            _In_  REFIID riid,
  5.1130 +            /* [annotation][in] */ 
  5.1131 +            _In_  LCID lcid,
  5.1132 +            /* [annotation][in] */ 
  5.1133 +            _In_  WORD wFlags,
  5.1134 +            /* [annotation][out][in] */ 
  5.1135 +            _In_  DISPPARAMS *pDispParams,
  5.1136 +            /* [annotation][out] */ 
  5.1137 +            _Out_opt_  VARIANT *pVarResult,
  5.1138 +            /* [annotation][out] */ 
  5.1139 +            _Out_opt_  EXCEPINFO *pExcepInfo,
  5.1140 +            /* [annotation][out] */ 
  5.1141 +            _Out_opt_  UINT *puArgErr);
  5.1142 +        
  5.1143 +        END_INTERFACE
  5.1144 +    } _IpEpEngineEventsVtbl;
  5.1145 +
  5.1146 +    interface _IpEpEngineEvents
  5.1147 +    {
  5.1148 +        CONST_VTBL struct _IpEpEngineEventsVtbl *lpVtbl;
  5.1149 +    };
  5.1150 +
  5.1151 +    
  5.1152 +
  5.1153 +#ifdef COBJMACROS
  5.1154 +
  5.1155 +
  5.1156 +#define _IpEpEngineEvents_QueryInterface(This,riid,ppvObject)	\
  5.1157 +    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
  5.1158 +
  5.1159 +#define _IpEpEngineEvents_AddRef(This)	\
  5.1160 +    ( (This)->lpVtbl -> AddRef(This) ) 
  5.1161 +
  5.1162 +#define _IpEpEngineEvents_Release(This)	\
  5.1163 +    ( (This)->lpVtbl -> Release(This) ) 
  5.1164 +
  5.1165 +
  5.1166 +#define _IpEpEngineEvents_GetTypeInfoCount(This,pctinfo)	\
  5.1167 +    ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) 
  5.1168 +
  5.1169 +#define _IpEpEngineEvents_GetTypeInfo(This,iTInfo,lcid,ppTInfo)	\
  5.1170 +    ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) 
  5.1171 +
  5.1172 +#define _IpEpEngineEvents_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)	\
  5.1173 +    ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) 
  5.1174 +
  5.1175 +#define _IpEpEngineEvents_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)	\
  5.1176 +    ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) 
  5.1177 +
  5.1178 +#endif /* COBJMACROS */
  5.1179 +
  5.1180 +
  5.1181 +#endif 	/* C style interface */
  5.1182 +
  5.1183 +
  5.1184 +#endif 	/* ___IpEpEngineEvents_DISPINTERFACE_DEFINED__ */
  5.1185 +
  5.1186 +
  5.1187 +EXTERN_C const CLSID CLSID_pEpEngine;
  5.1188 +
  5.1189 +#ifdef __cplusplus
  5.1190 +
  5.1191 +class DECLSPEC_UUID("EF1B073D-5058-4E0E-829E-B4D22CA21EA2")
  5.1192 +pEpEngine;
  5.1193 +#endif
  5.1194 +
  5.1195 +#ifndef ___ITextMessageEvents_DISPINTERFACE_DEFINED__
  5.1196 +#define ___ITextMessageEvents_DISPINTERFACE_DEFINED__
  5.1197 +
  5.1198 +/* dispinterface _ITextMessageEvents */
  5.1199 +/* [uuid] */ 
  5.1200 +
  5.1201 +
  5.1202 +EXTERN_C const IID DIID__ITextMessageEvents;
  5.1203 +
  5.1204 +#if defined(__cplusplus) && !defined(CINTERFACE)
  5.1205 +
  5.1206 +    MIDL_INTERFACE("844B5363-4EF4-4A39-A030-16452783A6F7")
  5.1207 +    _ITextMessageEvents : public IDispatch
  5.1208 +    {
  5.1209 +    };
  5.1210 +    
  5.1211 +#else 	/* C style interface */
  5.1212 +
  5.1213 +    typedef struct _ITextMessageEventsVtbl
  5.1214 +    {
  5.1215 +        BEGIN_INTERFACE
  5.1216 +        
  5.1217 +        HRESULT ( STDMETHODCALLTYPE *QueryInterface )( 
  5.1218 +            _ITextMessageEvents * This,
  5.1219 +            /* [in] */ REFIID riid,
  5.1220 +            /* [annotation][iid_is][out] */ 
  5.1221 +            _COM_Outptr_  void **ppvObject);
  5.1222 +        
  5.1223 +        ULONG ( STDMETHODCALLTYPE *AddRef )( 
  5.1224 +            _ITextMessageEvents * This);
  5.1225 +        
  5.1226 +        ULONG ( STDMETHODCALLTYPE *Release )( 
  5.1227 +            _ITextMessageEvents * This);
  5.1228 +        
  5.1229 +        HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( 
  5.1230 +            _ITextMessageEvents * This,
  5.1231 +            /* [out] */ UINT *pctinfo);
  5.1232 +        
  5.1233 +        HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( 
  5.1234 +            _ITextMessageEvents * This,
  5.1235 +            /* [in] */ UINT iTInfo,
  5.1236 +            /* [in] */ LCID lcid,
  5.1237 +            /* [out] */ ITypeInfo **ppTInfo);
  5.1238 +        
  5.1239 +        HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( 
  5.1240 +            _ITextMessageEvents * This,
  5.1241 +            /* [in] */ REFIID riid,
  5.1242 +            /* [size_is][in] */ LPOLESTR *rgszNames,
  5.1243 +            /* [range][in] */ UINT cNames,
  5.1244 +            /* [in] */ LCID lcid,
  5.1245 +            /* [size_is][out] */ DISPID *rgDispId);
  5.1246 +        
  5.1247 +        /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( 
  5.1248 +            _ITextMessageEvents * This,
  5.1249 +            /* [annotation][in] */ 
  5.1250 +            _In_  DISPID dispIdMember,
  5.1251 +            /* [annotation][in] */ 
  5.1252 +            _In_  REFIID riid,
  5.1253 +            /* [annotation][in] */ 
  5.1254 +            _In_  LCID lcid,
  5.1255 +            /* [annotation][in] */ 
  5.1256 +            _In_  WORD wFlags,
  5.1257 +            /* [annotation][out][in] */ 
  5.1258 +            _In_  DISPPARAMS *pDispParams,
  5.1259 +            /* [annotation][out] */ 
  5.1260 +            _Out_opt_  VARIANT *pVarResult,
  5.1261 +            /* [annotation][out] */ 
  5.1262 +            _Out_opt_  EXCEPINFO *pExcepInfo,
  5.1263 +            /* [annotation][out] */ 
  5.1264 +            _Out_opt_  UINT *puArgErr);
  5.1265 +        
  5.1266 +        END_INTERFACE
  5.1267 +    } _ITextMessageEventsVtbl;
  5.1268 +
  5.1269 +    interface _ITextMessageEvents
  5.1270 +    {
  5.1271 +        CONST_VTBL struct _ITextMessageEventsVtbl *lpVtbl;
  5.1272 +    };
  5.1273 +
  5.1274 +    
  5.1275 +
  5.1276 +#ifdef COBJMACROS
  5.1277 +
  5.1278 +
  5.1279 +#define _ITextMessageEvents_QueryInterface(This,riid,ppvObject)	\
  5.1280 +    ( (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) ) 
  5.1281 +
  5.1282 +#define _ITextMessageEvents_AddRef(This)	\
  5.1283 +    ( (This)->lpVtbl -> AddRef(This) ) 
  5.1284 +
  5.1285 +#define _ITextMessageEvents_Release(This)	\
  5.1286 +    ( (This)->lpVtbl -> Release(This) ) 
  5.1287 +
  5.1288 +
  5.1289 +#define _ITextMessageEvents_GetTypeInfoCount(This,pctinfo)	\
  5.1290 +    ( (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) ) 
  5.1291 +
  5.1292 +#define _ITextMessageEvents_GetTypeInfo(This,iTInfo,lcid,ppTInfo)	\
  5.1293 +    ( (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) ) 
  5.1294 +
  5.1295 +#define _ITextMessageEvents_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId)	\
  5.1296 +    ( (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) ) 
  5.1297 +
  5.1298 +#define _ITextMessageEvents_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr)	\
  5.1299 +    ( (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) ) 
  5.1300 +
  5.1301 +#endif /* COBJMACROS */
  5.1302 +
  5.1303 +
  5.1304 +#endif 	/* C style interface */
  5.1305 +
  5.1306 +
  5.1307 +#endif 	/* ___ITextMessageEvents_DISPINTERFACE_DEFINED__ */
  5.1308 +
  5.1309 +
  5.1310 +EXTERN_C const CLSID CLSID_TextMessage;
  5.1311 +
  5.1312 +#ifdef __cplusplus
  5.1313 +
  5.1314 +class DECLSPEC_UUID("B6CC444F-FE14-4DFE-8315-81E4EA16C1CC")
  5.1315 +TextMessage;
  5.1316 +#endif
  5.1317 +#endif /* __pEpCOMServerAdapterLib_LIBRARY_DEFINED__ */
  5.1318 +
  5.1319 +/* Additional Prototypes for ALL interfaces */
  5.1320 +
  5.1321 +unsigned long             __RPC_USER  BSTR_UserSize(     unsigned long *, unsigned long            , BSTR * ); 
  5.1322 +unsigned char * __RPC_USER  BSTR_UserMarshal(  unsigned long *, unsigned char *, BSTR * ); 
  5.1323 +unsigned char * __RPC_USER  BSTR_UserUnmarshal(unsigned long *, unsigned char *, BSTR * ); 
  5.1324 +void                      __RPC_USER  BSTR_UserFree(     unsigned long *, BSTR * ); 
  5.1325 +
  5.1326 +unsigned long             __RPC_USER  LPSAFEARRAY_UserSize(     unsigned long *, unsigned long            , LPSAFEARRAY * ); 
  5.1327 +unsigned char * __RPC_USER  LPSAFEARRAY_UserMarshal(  unsigned long *, unsigned char *, LPSAFEARRAY * ); 
  5.1328 +unsigned char * __RPC_USER  LPSAFEARRAY_UserUnmarshal(unsigned long *, unsigned char *, LPSAFEARRAY * ); 
  5.1329 +void                      __RPC_USER  LPSAFEARRAY_UserFree(     unsigned long *, LPSAFEARRAY * ); 
  5.1330 +
  5.1331 +/* end of Additional Prototypes */
  5.1332 +
  5.1333 +#ifdef __cplusplus
  5.1334 +}
  5.1335 +#endif
  5.1336 +
  5.1337 +#endif
  5.1338 +
  5.1339 +