pEpCOMServerAdapter.idl
changeset 15 b1c2c371379c
parent 13 d83d94f11e62
child 17 3288634317bb
     1.1 --- a/pEpCOMServerAdapter.idl	Wed Apr 29 09:49:18 2015 +0200
     1.2 +++ b/pEpCOMServerAdapter.idl	Fri May 01 00:24:12 2015 +0200
     1.3 @@ -7,7 +7,92 @@
     1.4  import "oaidl.idl";
     1.5  import "ocidl.idl";
     1.6  
     1.7 -interface IMessageAPI_Outlook;
     1.8 +
     1.9 +[
    1.10 +    object,
    1.11 +    uuid(161538F9-53C8-4D9C-8BA4-0FB43AEC7106),
    1.12 +    oleautomation,
    1.13 +    nonextensible,
    1.14 +    pointer_default(unique)
    1.15 +]
    1.16 +interface ITextMessage : IUnknown {
    1.17 +    typedef enum _pEp_text_format {
    1.18 +        pEp_text_format_plain = 0,
    1.19 +        pEp_text_format_html,
    1.20 +        pEp_text_format_other = 0xff
    1.21 +    } pEp_text_format;
    1.22 +
    1.23 +    typedef enum _pEp_msg_direction {
    1.24 +        pEp_dir_incoming = 0,
    1.25 +        pEp_dir_outgoing
    1.26 +    } pEp_msg_direction;
    1.27 +
    1.28 +    typedef enum _pEp_MIME_format {
    1.29 +        pEp_MIME_none = 0,                      // message is not MIME encoded
    1.30 +        pEp_MIME_fields_omitted,                // message content but no fields
    1.31 +        pEp_MIME                                // message is fully MIME encoded
    1.32 +    } pEp_MIME_format;
    1.33 +
    1.34 +    typedef enum _pEp_enc_format {
    1.35 +        pEp_enc_none = 0,                       // message is not encrypted
    1.36 +        pEp_enc_pieces,                         // inline PGP + PGP extensions
    1.37 +        pEp_enc_S_MIME,                         // RFC5751
    1.38 +        pEp_enc_PGP_MIME,                       // RFC3156
    1.39 +        pEp_enc_pEp                             // pEp encryption format
    1.40 +    } pEp_enc_format;
    1.41 +
    1.42 +    [propget] HRESULT dir([out, retval] pEp_msg_direction *pVal);
    1.43 +    [propput] HRESULT dir([in] pEp_msg_direction newVal);
    1.44 +
    1.45 +    [propget] HRESULT id([out, retval] BSTR *pVal);
    1.46 +    [propput] HRESULT id([in] BSTR newVal);
    1.47 +
    1.48 +    [propget] HRESULT shortmsg([out, retval] BSTR *pVal);
    1.49 +    [propput] HRESULT shortmsg([in] BSTR newVal);
    1.50 +
    1.51 +    [propget] HRESULT longmsg([out, retval] BSTR *pVal);
    1.52 +    [propput] HRESULT longmsg([in] BSTR newVal);
    1.53 +
    1.54 +    [propget] HRESULT longmsg_formatted([out, retval] BSTR *pVal);
    1.55 +    [propput] HRESULT longmsg_formatted([in] BSTR newVal);
    1.56 +
    1.57 +    HRESULT add_attachment([in] SAFEARRAY(BYTE) data, [in, optional] BSTR mime_type, [in, optional] BSTR filename);
    1.58 +    HRESULT has_attachments([out, retval] boolean *result);
    1.59 +    HRESULT next_attachment([out] SAFEARRAY(BYTE) * data, [out] BSTR * mime_type, [out] BSTR * filename, [out, retval] boolean *result);
    1.60 +
    1.61 +    [propget] HRESULT sent([out, retval] hyper * result);
    1.62 +    [propput] HRESULT sent([in] hyper val);
    1.63 +
    1.64 +    [propget] HRESULT recv([out, retval] hyper * result);
    1.65 +    [propput] HRESULT recv([in] hyper val);
    1.66 +
    1.67 +    [propget] HRESULT from([out, retval] struct pEp_identity_s *pVal);
    1.68 +    [propput] HRESULT from([in] struct pEp_identity_s *newVal);
    1.69 +
    1.70 +    [propget] HRESULT to([out, retval] SAFEARRAY(struct pEp_identity_s) *pVal);
    1.71 +    [propput] HRESULT to([in] SAFEARRAY(struct pEp_identity_s) newVal);
    1.72 +
    1.73 +    [propget] HRESULT recv_by([out, retval] struct pEp_identity_s *pVal);
    1.74 +    [propput] HRESULT recv_by([in] struct pEp_identity_s *newVal);
    1.75 +
    1.76 +    [propget] HRESULT cc([out, retval] SAFEARRAY(struct pEp_identity_s) *pVal);
    1.77 +    [propput] HRESULT cc([in] SAFEARRAY(struct pEp_identity_s) newVal);
    1.78 +
    1.79 +    [propget] HRESULT bcc([out, retval] SAFEARRAY(struct pEp_identity_s) *pVal);
    1.80 +    [propput] HRESULT bcc([in] SAFEARRAY(struct pEp_identity_s) newVal);
    1.81 +
    1.82 +    [propget] HRESULT reply_to([out, retval] SAFEARRAY(struct pEp_identity_s) *pVal);
    1.83 +    [propput] HRESULT reply_to([in] SAFEARRAY(struct pEp_identity_s) newVal);
    1.84 +
    1.85 +    [propget] HRESULT references([out, retval] SAFEARRAY(BSTR) *pVal);
    1.86 +    [propput] HRESULT references([in] SAFEARRAY(BSTR) newVal);
    1.87 +
    1.88 +    [propget] HRESULT keywords([out, retval] SAFEARRAY(BSTR) *pVal);
    1.89 +    [propput] HRESULT keywords([in] SAFEARRAY(BSTR) newVal);
    1.90 +
    1.91 +    [propget] HRESULT comments([out, retval] BSTR *pVal);
    1.92 +    [propput] HRESULT comments([in] BSTR newVal);
    1.93 +};
    1.94  
    1.95  [
    1.96      object,
    1.97 @@ -120,57 +205,28 @@
    1.98      HRESULT myself([in] struct pEp_identity_s *ident, [out, retval] struct pEp_identity_s *result);
    1.99      HRESULT update_identity([in] struct pEp_identity_s *ident, [out, retval] struct pEp_identity_s *result);
   1.100      HRESULT key_compromized([in] BSTR fpr);
   1.101 -};
   1.102  
   1.103 +    // Message API
   1.104  
   1.105 -[
   1.106 -    object,
   1.107 -    uuid(161538F9-53C8-4D9C-8BA4-0FB43AEC7106),
   1.108 -    oleautomation,
   1.109 -    nonextensible,
   1.110 -    pointer_default(unique)
   1.111 -]
   1.112 -interface ITextMessage : IUnknown {
   1.113 +    typedef enum _pEp_color {
   1.114 +        pEp_undefined = 0,
   1.115 +        pEp_unencrypted,
   1.116 +        pEp_unreliable,
   1.117 +        pEp_reliable,
   1.118 +        pEp_yellow = pEp_reliable,
   1.119 +        pEp_trusted,
   1.120 +        pEp_green = pEp_trusted,
   1.121 +        pEp_trusted_and_anonymized,
   1.122 +        pEp_fully_anonymous,
   1.123  
   1.124 -    [propget] HRESULT from([out, retval] struct pEp_identity_s *pVal);
   1.125 -    [propput] HRESULT from([in] struct pEp_identity_s *newVal);
   1.126 +        pEp_under_attack = -1,
   1.127 +        pEp_red = pEp_under_attack,
   1.128 +        pEp_b0rken = -2
   1.129 +    } pEp_color;
   1.130  
   1.131 -    [propget] HRESULT to([out, retval] SAFEARRAY(struct pEp_identity_s) *pVal);
   1.132 -    [propput] HRESULT to([in] SAFEARRAY(struct pEp_identity_s) newVal);
   1.133 -};
   1.134 -
   1.135 -[
   1.136 -    object,
   1.137 -    uuid(BC9AB54D-2CDA-47A5-AB40-64857B9E9555),
   1.138 -    oleautomation,
   1.139 -    nonextensible,
   1.140 -    pointer_default(unique)
   1.141 -]
   1.142 -interface IMessageAPI_Outlook : IUnknown {
   1.143 -    typedef enum _pEp_text_format {
   1.144 -        pEp_text_format_plain = 0,
   1.145 -        pEp_text_format_html,
   1.146 -        pEp_text_format_other = 0xff
   1.147 -    } pEp_text_format;
   1.148 -
   1.149 -    typedef enum _pEp_msg_direction {
   1.150 -        pEp_dir_incoming = 0,
   1.151 -        pEp_dir_outgoing
   1.152 -    } pEp_msg_direction;
   1.153 -
   1.154 -    typedef enum _pEp_MIME_format {
   1.155 -        pEp_MIME_none = 0,                      // message is not MIME encoded
   1.156 -        pEp_MIME_fields_omitted,                // message content but no fields
   1.157 -        pEp_MIME                                // message is fully MIME encoded
   1.158 -    } pEp_MIME_format;
   1.159 -
   1.160 -    typedef enum _pEp_enc_format {
   1.161 -        pEp_enc_none = 0,                       // message is not encrypted
   1.162 -        pEp_enc_pieces,                         // inline PGP + PGP extensions
   1.163 -        pEp_enc_S_MIME,                         // RFC5751
   1.164 -        pEp_enc_PGP_MIME,                       // RFC3156
   1.165 -        pEp_enc_pEp                             // pEp encryption format
   1.166 -    } pEp_enc_format;
   1.167 +    HRESULT message_encrypt([in] ITextMessage *src, [out] ITextMessage ** dst, [in, optional] SAFEARRAY(BSTR) extra);
   1.168 +    HRESULT message_decrypt([in] ITextMessage *src, [out] ITextMessage ** dst);
   1.169 +    HRESULT message_color([in] ITextMessage *msg, [out, retval] pEp_color * pVal);
   1.170  };
   1.171  
   1.172  [
   1.173 @@ -194,7 +250,6 @@
   1.174      coclass pEpEngine {
   1.175          [default] interface IpEpEngine;
   1.176          [default, source] dispinterface _IpEpEngineEvents;
   1.177 -        interface IMessageAPI_Outlook;
   1.178      };
   1.179  	[
   1.180  		uuid(844B5363-4EF4-4A39-A030-16452783A6F7)		
   1.181 @@ -213,4 +268,3 @@
   1.182  		[default, source] dispinterface _ITextMessageEvents;
   1.183  	};
   1.184  };
   1.185 -