pEpCOMServerAdapter.idl
changeset 4 fdd8cf02d2cc
parent 0 0aa9866d751c
child 5 d959f594e4f7
     1.1 --- a/pEpCOMServerAdapter.idl	Thu Apr 16 21:09:40 2015 +0200
     1.2 +++ b/pEpCOMServerAdapter.idl	Thu Apr 23 22:26:12 2015 +0200
     1.3 @@ -7,7 +7,6 @@
     1.4  import "oaidl.idl";
     1.5  import "ocidl.idl";
     1.6  
     1.7 -
     1.8  [
     1.9      object,
    1.10      uuid(9A9F4422-CF0A-45D7-90CD-1D1B7B2A4540),
    1.11 @@ -39,14 +38,14 @@
    1.12          pEp_UNKNOWN_ERROR = -1
    1.13      } pEp_STATUS;
    1.14  
    1.15 -    [id(1)] HRESULT log([in] BSTR title, [in] BSTR entity, [in, defaultvalue("")] BSTR description, [in, defaultvalue("")] BSTR comment);
    1.16 -    [id(2)] HRESULT decrypt([in] BSTR ctext, [out] BSTR * ptext, [out] SAFEARRAY(BSTR) * key_list, [out, retval] pEp_STATUS * decrypt_status);
    1.17 -    [id(3)] HRESULT decrypt_b([in] BSTR ctext, [out] SAFEARRAY(BYTE) * ptext, [out] SAFEARRAY(BSTR) * key_list, [out, retval] pEp_STATUS * decrypt_status);
    1.18 -    [id(4)] HRESULT encrypt([in] SAFEARRAY(BSTR) key_list, [in] BSTR ptext, [out] BSTR * ctext, [out, retval] pEp_STATUS * status);
    1.19 -    [id(5)] HRESULT encrypt_b([in] SAFEARRAY(BSTR) key_list, [in] SAFEARRAY(BYTE) ptext, [out] BSTR * ctext, [out, retval] pEp_STATUS * status);
    1.20 -    [id(21)] HRESULT verify([in] BSTR text, [in] BSTR signature, [out] SAFEARRAY(BSTR) * key_list, [out, retval] pEp_STATUS * verify_status);
    1.21 -    [id(6)] HRESULT safeword([in] LONG value, [in, defaultvalue("en")] BSTR lang, [out, retval] BSTR * word);
    1.22 -    [id(7)] HRESULT safewords([in] BSTR fpr, [in, defaultvalue("en")] BSTR lang, [in, defaultvalue(0)] LONG max_words, [out, retval] BSTR * words);
    1.23 +    HRESULT log([in] BSTR title, [in] BSTR entity, [in, defaultvalue("")] BSTR description, [in, defaultvalue("")] BSTR comment);
    1.24 +    HRESULT decrypt([in] BSTR ctext, [out] BSTR * ptext, [out] SAFEARRAY(BSTR) * key_list, [out, retval] pEp_STATUS * decrypt_status);
    1.25 +    HRESULT decrypt_b([in] BSTR ctext, [out] SAFEARRAY(BYTE) * ptext, [out] SAFEARRAY(BSTR) * key_list, [out, retval] pEp_STATUS * decrypt_status);
    1.26 +    HRESULT encrypt([in] SAFEARRAY(BSTR) key_list, [in] BSTR ptext, [out] BSTR * ctext, [out, retval] pEp_STATUS * status);
    1.27 +    HRESULT encrypt_b([in] SAFEARRAY(BSTR) key_list, [in] SAFEARRAY(BYTE) ptext, [out] BSTR * ctext, [out, retval] pEp_STATUS * status);
    1.28 +    HRESULT verify([in] BSTR text, [in] BSTR signature, [out] SAFEARRAY(BSTR) * key_list, [out, retval] pEp_STATUS * verify_status);
    1.29 +    HRESULT safeword([in] LONG value, [in, defaultvalue("en")] BSTR lang, [out, retval] BSTR * word);
    1.30 +    HRESULT safewords([in] BSTR fpr, [in, defaultvalue("en")] BSTR lang, [in, defaultvalue(0)] LONG max_words, [out, retval] BSTR * words);
    1.31  
    1.32      typedef enum _pEp_comm_type {
    1.33          pEp_ct_unknown = 0,
    1.34 @@ -103,22 +102,59 @@
    1.35          BSTR lang;
    1.36      };
    1.37  
    1.38 -    [id(8)] HRESULT get_identity([in] BSTR address, [out, retval] struct pEp_identity_s * ident);
    1.39 -    [id(9)] HRESULT set_identity([in] struct pEp_identity_s * ident);
    1.40 -    [id(10)] HRESULT generate_keypair([in] struct pEp_identity_s * ident, [out, retval] BSTR * fpr);
    1.41 -    [id(11)] HRESULT delete_keypair([in] BSTR fpr);
    1.42 -    [id(12)] HRESULT import_key([in] BSTR key_data);
    1.43 -    [id(13)] HRESULT import_key_b([in] SAFEARRAY(BYTE) key_data);
    1.44 -    [id(14)] HRESULT export_key([in] BSTR fpr, [out, retval] BSTR * key_data);
    1.45 -    [id(15)] HRESULT recv_key([in] BSTR pattern);
    1.46 -    [id(16)] HRESULT find_keys([in] BSTR pattern, [out, retval] SAFEARRAY(BSTR) * key_list);
    1.47 -    [id(17)] HRESULT send_key([in] BSTR pattern);
    1.48 +    HRESULT get_identity([in] BSTR address, [out, retval] struct pEp_identity_s * ident);
    1.49 +    HRESULT set_identity([in] struct pEp_identity_s * ident);
    1.50 +    HRESULT generate_keypair([in] struct pEp_identity_s * ident, [out, retval] BSTR * fpr);
    1.51 +    HRESULT delete_keypair([in] BSTR fpr);
    1.52 +    HRESULT import_key([in] BSTR key_data);
    1.53 +    HRESULT import_key_b([in] SAFEARRAY(BYTE) key_data);
    1.54 +    HRESULT export_key([in] BSTR fpr, [out, retval] BSTR * key_data);
    1.55 +    HRESULT recv_key([in] BSTR pattern);
    1.56 +    HRESULT find_keys([in] BSTR pattern, [out, retval] SAFEARRAY(BSTR) * key_list);
    1.57 +    HRESULT send_key([in] BSTR pattern);
    1.58  
    1.59 -    [id(19)] HRESULT examine_identity([in] struct pEp_identity_s * ident);
    1.60 -    [id(20)] HRESULT examine_myself([in] struct pEp_identity_s * myself);
    1.61 -    [id(22)] HRESULT myself([in] struct pEp_identity_s *ident, [out, retval] struct pEp_identity_s *result);
    1.62 -    [id(23)] HRESULT update_identity([in] struct pEp_identity_s *ident, [out, retval] struct pEp_identity_s *result);
    1.63 +    HRESULT examine_identity([in] struct pEp_identity_s * ident);
    1.64 +    HRESULT examine_myself([in] struct pEp_identity_s * myself);
    1.65 +    HRESULT myself([in] struct pEp_identity_s *ident, [out, retval] struct pEp_identity_s *result);
    1.66 +    HRESULT update_identity([in] struct pEp_identity_s *ident, [out, retval] struct pEp_identity_s *result);
    1.67  };
    1.68 +
    1.69 +[
    1.70 +    object,
    1.71 +    uuid(BC9AB54D-2CDA-47A5-AB40-64857B9E9555),
    1.72 +    oleautomation,
    1.73 +    nonextensible,
    1.74 +    pointer_default(unique)
    1.75 +]
    1.76 +interface IMessageAPI_Outlook : IUnknown {
    1.77 +    typedef enum _pEp_text_format {
    1.78 +        pEp_text_format_plain = 0,
    1.79 +        pEp_text_format_html,
    1.80 +        pEp_text_format_other = 0xff
    1.81 +    } pEp_text_format;
    1.82 +
    1.83 +    typedef enum _pEp_msg_direction {
    1.84 +        pEp_dir_incoming = 0,
    1.85 +        pEp_dir_outgoing
    1.86 +    } pEp_msg_direction;
    1.87 +
    1.88 +    typedef enum _pEp_MIME_format {
    1.89 +        pEp_MIME_none = 0,                      // message is not MIME encoded
    1.90 +        pEp_MIME_fields_omitted,                // message content but no fields
    1.91 +        pEp_MIME                                // message is fully MIME encoded
    1.92 +    } pEp_MIME_format;
    1.93 +
    1.94 +    typedef enum _pEp_enc_format {
    1.95 +        pEp_enc_none = 0,                       // message is not encrypted
    1.96 +        pEp_enc_pieces,                         // inline PGP + PGP extensions
    1.97 +        pEp_enc_S_MIME,                         // RFC5751
    1.98 +        pEp_enc_PGP_MIME,                       // RFC3156
    1.99 +        pEp_enc_pEp                             // pEp encryption format
   1.100 +    } pEp_enc_format;
   1.101 +
   1.102 +    HRESULT key_compromized([in] BSTR fpr);
   1.103 +};
   1.104 +
   1.105  [
   1.106      uuid(3EC2E1A4-40E8-48E4-A7B0-1876D34F9462),
   1.107      version(1.0),
   1.108 @@ -140,6 +176,7 @@
   1.109      coclass pEpEngine {
   1.110          [default] interface IpEpEngine;
   1.111          [default, source] dispinterface _IpEpEngineEvents;
   1.112 +        interface IMessageAPI_Outlook;
   1.113      };
   1.114  };
   1.115