pEpCOMServerAdapter.idl
branchkeysync
changeset 177 4d197f1c3abb
parent 174 1fa1296363f9
child 180 51f843f18dd2
     1.1 --- a/pEpCOMServerAdapter.idl	Tue Oct 04 22:04:52 2016 +0200
     1.2 +++ b/pEpCOMServerAdapter.idl	Tue Oct 04 23:00:44 2016 +0200
     1.3 @@ -35,6 +35,7 @@
     1.4      pointer_default(unique)
     1.5  ]
     1.6  interface IpEpEngine : IUnknown {
     1.7 +
     1.8      // runtime config of the adapter
     1.9  
    1.10      HRESULT VerboseLogging([in] VARIANT_BOOL enable);
    1.11 @@ -46,68 +47,11 @@
    1.12  
    1.13      // basic API
    1.14  
    1.15 -   // // TODO: Remove this enum, it is not needed in the interface, but it currently is still used in the code...
    1.16 -   //typedef [v1_enum] enum pEpStatus {
    1.17 -   //     pEpStatusOK = 0,
    1.18 -
    1.19 -   //     pEp_INIT_CANNOT_LOAD_GPGME = 0x0110,
    1.20 -   //     pEp_INIT_GPGME_INIT_FAILED = 0x0111,
    1.21 -   //     pEp_INIT_NO_GPG_HOME = 0x0112,
    1.22 -   //     pEp_INIT_NETPGP_INIT_FAILED = 0x0113,
    1.23 -
    1.24 -   //     pEp_INIT_SQLITE3_WITHOUT_MUTEX = 0x0120,
    1.25 -   //     pEp_INIT_CANNOT_OPEN_DB = 0x0121,
    1.26 -   //     pEp_INIT_CANNOT_OPEN_SYSTEM_DB = 0x0122,
    1.27 -
    1.28 -   //     pEp_KEY_NOT_FOUND = 0x0201,
    1.29 -   //     pEp_KEY_HAS_AMBIG_NAME = 0x0202,
    1.30 -   //     pEp_GET_KEY_FAILED = 0x0203,
    1.31 -
    1.32 -   //     pEp_CANNOT_FIND_IDENTITY = 0x0301,
    1.33 -   //     pEp_CANNOT_SET_PERSON = 0x0381,
    1.34 -   //     pEp_CANNOT_SET_PGP_KEYPAIR = 0x0382,
    1.35 -   //     pEp_CANNOT_SET_IDENTITY = 0x0383,
    1.36 -   //     pEp_CANNOT_SET_TRUST = 0x0384,
    1.37 -
    1.38 -   //     pEp_UNENCRYPTED = 0x0400,
    1.39 -   //     pEp_VERIFIED = 0x0401,
    1.40 -   //     pEp_DECRYPTED = 0x0402,
    1.41 -   //     pEp_DECRYPTED_AND_VERIFIED = 0x0403,
    1.42 -   //     pEp_DECRYPT_WRONG_FORMAT = 0x0404,
    1.43 -   //     pEp_DECRYPT_NO_KEY = 0x0405,
    1.44 -   //     pEp_DECRYPT_SIGNATURE_DOES_NOT_MATCH = 0x0406,
    1.45 -   //     pEp_VERIFY_NO_KEY = 0x0407,
    1.46 -   //     pEp_VERIFIED_AND_TRUSTED = 0x0408,
    1.47 -   //     pEp_CANNOT_DECRYPT_UNKNOWN = 0x04ff,
    1.48 -
    1.49 -   //     pEp_TRUSTWORD_NOT_FOUND = 0x0501,
    1.50 -
    1.51 -   //     pEp_CANNOT_CREATE_KEY = 0x0601,
    1.52 -   //     pEp_CANNOT_SEND_KEY = 0x0602,
    1.53 -
    1.54 -   //     pEp_PHRASE_NOT_FOUND = 0x0701,
    1.55 -
    1.56 -   //     pEp_COMMIT_FAILED = 0xff01,
    1.57 -
    1.58 -   //     pEp_CANNOT_CREATE_TEMP_FILE = -5,
    1.59 -   //     pEp_ILLEGAL_VALUE = -4,
    1.60 -   //     pEp_BUFFER_TOO_SMALL = -3,
    1.61 -   //     pEp_OUT_OF_MEMORY = -2,
    1.62 -   //     pEp_UNKNOWN_ERROR = -1
    1.63 -   // } pEpStatus;
    1.64 -
    1.65 -    // HRESULT log([in] BSTR title, [in] BSTR entity, [in, defaultvalue("")] BSTR description, [in, defaultvalue("")] BSTR comment);
    1.66 -    // HRESULT decrypt([in] BSTR ctext, [out] BSTR * ptext, [out] SAFEARRAY(BSTR) * key_list, [out, retval] pEpStatus * decrypt_status);
    1.67 -    // HRESULT decrypt_b([in] BSTR ctext, [out] SAFEARRAY(BYTE) * ptext, [out] SAFEARRAY(BSTR) * key_list, [out, retval] pEpStatus * decrypt_status);
    1.68 -    // HRESULT encrypt([in] SAFEARRAY(BSTR) key_list, [in] BSTR ptext, [out] BSTR * ctext, [out, retval] pEpStatus * status);
    1.69 -    // HRESULT encrypt_b([in] SAFEARRAY(BSTR) key_list, [in] SAFEARRAY(BYTE) ptext, [out] BSTR * ctext, [out, retval] pEpStatus * status);
    1.70 -    // HRESULT verify([in] BSTR text, [in] BSTR signature, [out] SAFEARRAY(BSTR) * key_list, [out, retval] pEpStatus * verify_status);
    1.71 -    // HRESULT trustword([in] LONG value, [in, defaultvalue("en")] BSTR lang, [out, retval] BSTR * word);
    1.72 -    HRESULT TrustWords([in] BSTR fpr, [in, defaultvalue("en")] BSTR lang, [in, defaultvalue(0)] LONG max_words, [out, retval] BSTR * words);
    1.73 +    HRESULT Log([in] BSTR title, [in] BSTR entity, [in, defaultvalue("")] BSTR description, [in, defaultvalue("")] BSTR comment);
    1.74 +    HRESULT TrustWords([in] BSTR fpr, [in, defaultvalue("en")] BSTR lang, [in, defaultvalue(0)] LONG maxWords, [out, retval] BSTR * words);
    1.75      HRESULT GetCrashdumpLog([in, defaultvalue(0)] LONG maxlines, [out, retval] BSTR * log);
    1.76 -    HRESULT GetEngineVersion([out, retval] BSTR * engine_version);
    1.77 -    HRESULT GetLanguagelist([out, retval] BSTR * languages);
    1.78 -    // HRESULT get_phrase([in] BSTR lang, [in] LONG phrase_id, [out, retval] BSTR * phrase);
    1.79 +    HRESULT GetEngineVersion([out, retval] BSTR * engineVersion);
    1.80 +    HRESULT GetLanguageList([out, retval] BSTR * languages);
    1.81  
    1.82      typedef [v1_enum] enum pEpComType {
    1.83          pEpCtUnknown = 0,
    1.84 @@ -172,27 +116,16 @@
    1.85      [uuid(0CB90E62-8A6A-4CA0-99D7-481704051FF0)] struct pEpIdentity {
    1.86          BSTR address;
    1.87          BSTR fpr;
    1.88 -        BSTR user_id;
    1.89 +        BSTR userId;
    1.90          BSTR username;
    1.91 -        pEpComType comm_type;
    1.92 +        pEpComType commType;
    1.93          BSTR lang;
    1.94      };
    1.95 -
    1.96 -    //HRESULT get_identity([in] BSTR address, [in] BSTR user_id, [out, retval] struct pEpIdentity * ident);
    1.97 -    //HRESULT set_identity([in] struct pEpIdentity * ident);
    1.98 -    //HRESULT generate_keypair([in] struct pEpIdentity * ident, [out, retval] BSTR * fpr);
    1.99 -    //HRESULT delete_keypair([in] BSTR fpr);
   1.100 -    //HRESULT import_key([in] BSTR key_data);
   1.101 -    //HRESULT import_key_b([in] SAFEARRAY(BYTE) key_data);
   1.102 -    //HRESULT export_key([in] BSTR fpr, [out, retval] BSTR * key_data);
   1.103 -    //HRESULT recv_key([in] BSTR pattern);
   1.104 -    //HRESULT find_keys([in] BSTR pattern, [out, retval] SAFEARRAY(BSTR) * key_list);
   1.105 -    //HRESULT send_key([in] BSTR pattern);
   1.106 -
   1.107 +    
   1.108 +    // Keymanagement API
   1.109      HRESULT StartKeyserverLookup();
   1.110      HRESULT StopKeyserverLookup();
   1.111  
   1.112 -    //HRESULT examine_identity([in] struct pEpIdentity * ident);
   1.113      HRESULT Myself([in] struct pEpIdentity *ident, [out, retval] struct pEpIdentity *result);
   1.114      HRESULT UpdateIdentity([in] struct pEpIdentity *ident, [out, retval] struct pEpIdentity *result);
   1.115      HRESULT KeyMistrusted([in] struct pEpIdentity *ident);
   1.116 @@ -208,7 +141,7 @@
   1.117  
   1.118  	// PGP compatibility functions
   1.119  
   1.120 -	HRESULT OpenPGP_list_keyinfo([in] BSTR search_pattern, [out, retval] SAFEARRAY(struct StringPair)* keyinfo_list);
   1.121 +	HRESULT OpenPGPListKeyinfo([in] BSTR searchPattern, [out, retval] SAFEARRAY(struct StringPair)* keyinfoList);
   1.122  
   1.123      // Message API
   1.124  
   1.125 @@ -251,14 +184,6 @@
   1.126          pEpDirOutgoing
   1.127      } pEpMsgDirection;
   1.128  
   1.129 -    //typedef  enum _pEp_enc_format {
   1.130 -    //    pEp_enc_none = 0,                       // message is not encrypted
   1.131 -    //    pEp_enc_pieces,                         // inline PGP + PGP extensions
   1.132 -    //    pEp_enc_S_MIME,                         // RFC5751
   1.133 -    //    pEp_enc_PGP_MIME,                       // RFC3156
   1.134 -    //    pEp_enc_pEp                             // pEp encryption format
   1.135 -    //} pEp_enc_format;
   1.136 -
   1.137      [uuid(3A8A4F13-3402-4C4C-94AB-598D87869380)] struct StringPair {
   1.138          BSTR name;
   1.139          BSTR value;
   1.140 @@ -266,7 +191,7 @@
   1.141  
   1.142      [uuid(61DA7AD4-192E-4616-8678-B19AEFB45B45)] struct Blob {
   1.143          SAFEARRAY(BYTE) value;
   1.144 -        BSTR mime_type;
   1.145 +        BSTR mimeType;
   1.146          BSTR filename;
   1.147      };
   1.148  
   1.149 @@ -275,30 +200,32 @@
   1.150          BSTR id;
   1.151          BSTR shortmsg;
   1.152          BSTR longmsg;
   1.153 -        BSTR longmsg_formatted;
   1.154 +        BSTR longmsgFormatted;
   1.155          SAFEARRAY(struct Blob) attachments;
   1.156          hyper sent; // Timestamp: 64 Bit time_t from mktime(), seconds since January 1, 1970, 0:00 UTC.
   1.157          hyper recv; // Timestamp: 64 Bit time_t from mktime(), seconds since January 1, 1970, 0:00 UTC.
   1.158          struct pEpIdentity from;
   1.159          SAFEARRAY(struct pEpIdentity) to;
   1.160 -        struct pEpIdentity recv_by;
   1.161 +        struct pEpIdentity recvBy;
   1.162          SAFEARRAY(struct pEpIdentity) cc;
   1.163          SAFEARRAY(struct pEpIdentity) bcc;
   1.164 -        SAFEARRAY(struct pEpIdentity) reply_to;
   1.165 +        SAFEARRAY(struct pEpIdentity) replyTo;
   1.166          SAFEARRAY(BSTR) references;
   1.167          SAFEARRAY(BSTR) keywords;
   1.168          BSTR comments;
   1.169 -        SAFEARRAY(struct StringPair) opt_fields;
   1.170 +        SAFEARRAY(struct StringPair) optFields;
   1.171      };
   1.172  
   1.173      HRESULT EncryptMessage([in] struct TextMessage *src, [out] struct TextMessage * dst, [in] SAFEARRAY(BSTR) extra, [in, defaultvalue(pEpEncryptFlagsNone)] pEpEncryptFlags flags);
   1.174      HRESULT DecryptMessage([in] struct TextMessage *src, [out] struct TextMessage * dst, [out] SAFEARRAY(BSTR) *keylist, [out] pEpDecryptFlags* flags, [out, retval] pEpRating *rating);
   1.175 +
   1.176      HRESULT OutgoingMessageRating([in] struct TextMessage *msg, [out, retval] pEpRating * pVal);
   1.177      HRESULT IdentityRating([in] struct pEpIdentity * ident, [out, retval] pEpRating * pVal);
   1.178  	HRESULT ColorFromRating([in] pEpRating rating, [out, retval] pEpColor* pVal);
   1.179  
   1.180 -	HRESULT RegisterCallbacks([in] IpEpEngineCallbacks* new_callback);
   1.181 -	HRESULT UnregisterCallbacks([in] IpEpEngineCallbacks* obsolete_callback);
   1.182 +    // callback / keysync API
   1.183 +	HRESULT RegisterCallbacks([in] IpEpEngineCallbacks* newCallback);
   1.184 +	HRESULT UnregisterCallbacks([in] IpEpEngineCallbacks* obsoleteCallback);
   1.185  };
   1.186  
   1.187  [