pEpCOMServerAdapter.idl
author Thomas
Tue, 14 Jul 2020 16:37:56 +0200
branchCOM-117
changeset 448 409157799a91
parent 447 18a75cc8b45f
permissions -rw-r--r--
COM-117: Wrap all methods in passphrase cache api. Not building yet.
     1 // pEpCOMServerAdapter.idl : IDL source for pEpCOMServerAdapter
     2 //
     3 
     4 // This file will be processed by the MIDL tool to
     5 // produce the type library (pEpCOMServerAdapter.tlb) and marshalling code.
     6 
     7 import "oaidl.idl";
     8 import "ocidl.idl";
     9 
    10 [
    11     object,
    12     uuid(4DA92647-A858-448E-B01F-BE4DCB8C86A1),
    13     oleautomation,
    14     nonextensible,
    15     pointer_default(unique)
    16 ]
    17 interface IpEpEngineCallbacks : IUnknown {
    18     typedef [v1_enum] enum SyncHandshakeSignal {
    19         SyncNotifyUndefined = 0,
    20 
    21         // request show handshake dialog
    22         SyncNotifyInitAddOurDevice = 1,
    23         SyncNotifyInitAddOtherDevice = 2,
    24         SyncNotifyInitFormGroup = 3,
    25         // SyncNotifyInitMoveOurDevice = 4,
    26 
    27         // handshake process timed out
    28         SyncNotifyTimeout = 5,
    29 
    30         // handshake accepted by user
    31         SyncNotifyAcceptedDeviceAdded = 6,
    32         SyncNotifyAcceptedGroupCreated = 7,
    33         SyncNotifyAcceptedDeviceAccepted = 8,
    34 
    35         // handshake dialog must be closed
    36         // SyncNotifyOvertaken = 9,
    37 
    38         // forming group
    39         // SyncNotifyFormingGroup = 10,
    40 
    41         SyncNotifyStart = 126,
    42         SyncNotifyStop = 127,
    43 
    44         // message cannot be sent, need passphrase
    45         SyncNotifyPassphraseRequired = 128,
    46 
    47         // notificaton of actual group status
    48         SyncNotifySole = 254,
    49         SyncNotifyInGroup = 255
    50     } SyncHandshakeSignal;
    51 
    52     [id(1)] HRESULT MessageToSend([in] struct TextMessage * msg);
    53 
    54     [id(2)] HRESULT NotifyHandshake([in] struct pEpIdentity * self, [in] struct pEpIdentity * partner, [in] SyncHandshakeSignal signal);
    55 };
    56 
    57 [
    58     object,
    59     uuid(045E49AF-0975-4876-A53B-8CA5AB28C0F8),
    60     oleautomation,
    61     nonextensible,
    62     pointer_default(unique)
    63 ]
    64 interface IpEpEngine : IUnknown {
    65 
    66     // runtime config of the adapter
    67 
    68     [id(1)] HRESULT VerboseLogging([in] VARIANT_BOOL enable);
    69 
    70     // runtime config of the engine
    71 
    72     [id(2)] HRESULT PassiveMode([in] VARIANT_BOOL enable);
    73     [id(3)] HRESULT UnencryptedSubject([in] VARIANT_BOOL enable);
    74 
    75     // basic API
    76 
    77     [id(4)] HRESULT ExportKey([in] BSTR fpr, [out, retval] BSTR * keyData);
    78     [id(5)] HRESULT Log([in] BSTR title, [in] BSTR entity, [in, defaultvalue("")] BSTR description, [in, defaultvalue("")] BSTR comment);
    79     [id(6)] HRESULT Trustwords([in] BSTR fpr, [in, defaultvalue("en")] BSTR lang, [in, defaultvalue(0)] LONG maxWords, [out, retval] BSTR * words);
    80     [id(7)] HRESULT GetTrustwords([in] struct pEpIdentity * id1, [in] struct pEpIdentity * id2, [in, defaultvalue("en")] BSTR lang, [in, defaultvalue(0)] VARIANT_BOOL full, [out, retval] BSTR * words);
    81     [id(8)] HRESULT GetCrashdumpLog([in, defaultvalue(0)] LONG maxlines, [out, retval] BSTR * log);
    82     [id(9)] HRESULT GetEngineVersion([out, retval] BSTR * engineVersion);
    83     [id(10)] HRESULT GetLanguageList([out, retval] BSTR * languages);
    84 
    85     typedef [v1_enum] enum pEpComType {
    86         pEpCtUnknown = 0,
    87 
    88         // range 0x01 to 0x09: no encryption, 0x0a to 0x0e: nothing reasonable
    89 
    90         pEpCtNoEncryption = 0x01,                // generic
    91         pEpCtNoEncryptedChannel = 0x02,
    92         pEpCtKeyNotFound = 0x03,
    93         pEpCtKeyExpired = 0x04,
    94         pEpCtKeyRevoked = 0x05,
    95         pEpCtKeyB0rken = 0x06,
    96         pEpCtMyKeyNotIncluded = 0x09,
    97 
    98         pEpCtSecurityByObscurity = 0x0a,
    99         pEpCtB0rkenCrypto = 0x0b,
   100         pEpCtKeyTooShort = 0x0c,
   101 
   102         pEpCtCompromised = 0x0e,                 // known compromized connection
   103         pEpCtMistrusted = 0x0f,                  // known mistrusted key
   104 
   105         // range 0x10 to 0x3f: unconfirmed encryption
   106 
   107         pEpCtUnconfirmedEncryption = 0x10,       // generic
   108         pEpCtOpenPGPWeakUnconfirmed = 0x11,      // RSA 1024 is weak
   109 
   110         pEpCtToBeChecked = 0x20,                 // generic
   111         pEpCtSMIMEUnconfirmed = 0x21,
   112         pEpCtCMSUnconfirmed = 0x22,
   113 
   114         pEpCtStrongButUnconfirmed = 0x30,        // generic
   115         pEpCtOpenPGPUnconfirmed = 0x38,          // key at least 2048 bit RSA or EC
   116         pEpCtOTRUnconfirmed = 0x3a,
   117 
   118         // range 0x40 to 0x7f: unconfirmed encryption and anonymization
   119 
   120         pEpCtUnconfirmedEncAnon = 0x40,          // generic
   121         pEpCtpEpUnconfirmed = 0x7f,
   122 
   123         pEpCtConfirmed = 0x80,                   // this bit decides if trust is confirmed
   124 
   125         // range 0x81 to 0x8f: reserved
   126         // range 0x90 to 0xbf: confirmed encryption
   127 
   128         pEpCtConfirmedEncryption = 0x90,         // generic
   129         pEpCtOpenPGPWeak = 0x91,                 // RSA 1024 is weak
   130 
   131         pEpCtToBeCheckedConfirmed = 0xa0,        // generic
   132         pEpCtSMIME = 0xa1,
   133         pEpCtCMS = 0xa2,
   134 
   135         pEpCtStrongEncryption = 0xb0,            // generic
   136         pEpCtOpenPGP = 0xb8,                     // key at least 2048 bit RSA or EC
   137         pEpCtOTR = 0xba,
   138 
   139         // range 0xc0 to 0xff: confirmed encryption and anonymization
   140 
   141         pEpCtConfirmedEncAnon = 0xc0,            // generic
   142         pEpCtpEp = 0xff
   143     } pEpComType;
   144 
   145     typedef enum pEpStatus {
   146         pEpStatusOk = 0,
   147 
   148         pEpInitCannotLoadGpgme = 0x0110,
   149         pEpInitGpgmeInitFailed = 0x0111,
   150         pEpInitNoGpgHome = 0x0112,
   151         pEpInitNetpgpInitFailed = 0x0113,
   152         pEpInitCannotDetermineGpgVersion = 0x0114,
   153         pEpInitUnsupportedGpgVersion = 0x0115,
   154         pEpInitCannotConfigGpgAgent = 0x0116,
   155 
   156         pEpInitSqlite3WithoutMutex = 0x0120,
   157         pEpInitCannotOpenDb = 0x0121,
   158         pEpInitCannotOpenSystemDb = 0x0122,
   159 
   160         pEpKeyNotFound = 0x0201,
   161         pEpKeyHasAmbigName = 0x0202,
   162         pEpGetKeyFailed = 0x0203,
   163         pEpCannotExportKey = 0x0204,
   164         pEpCannotEditKey = 0x0205,
   165         pEpKeyUnsuitable = 0x0206,
   166 
   167         pEpCannotFindIdentity = 0x0301,
   168         pEpCannotSetPerson = 0x0381,
   169         pEpCannotSetPgpKeypair = 0x0382,
   170         pEpCannotSetIdentity = 0x0383,
   171         pEpCannotSetTrust = 0x0384,
   172         pEpKeyBlacklisted = 0x0385,
   173         pEpCannotFindPerson = 0x0386,
   174 
   175         pEpCannotFindAlias = 0x0391,
   176         pEpCannotSetAlias = 0x0392,
   177 
   178         pEpUnencrypted = 0x0400,
   179         pEpVerified = 0x0401,
   180         pEpDecrypted = 0x0402,
   181         pEpDecryptedAndVerified = 0x0403,
   182         pEpDecryptWrongFormat = 0x0404,
   183         pEpDecryptNoKey = 0x0405,
   184         pEpDecryptSignatureDoesNotMatch = 0x0406,
   185         pEpVerifyNoKey = 0x0407,
   186         pEpVerifiedAndTrusted = 0x0408,
   187         pEpCannotDecryptUnknown = 0x04ff,
   188 
   189         pEpTrustwordNotFound = 0x0501,
   190         pEpTrustwordsFprWrongLength = 0x0502,
   191         pEpTrustwordsDuplicateFpr = 0x0503,
   192 
   193         pEpCannotCreateKey = 0x0601,
   194         pEpCannotSendKey = 0x0602,
   195 
   196         pEpPhraseNotFound = 0x0701,
   197 
   198         pEpSendFunctionNotRegistered = 0x0801,
   199         pEpContraintsViolated = 0x0802,
   200         pEpCannotEncode = 0x0803,
   201 
   202         pEpSyncNoNotifyCallback = 0x0901,
   203         pEpSyncIllegalMessage = 0x0902,
   204         pEpSyncNoInjectCallback = 0x0903,
   205 
   206         pEpSequenceViolated = 0x0970,
   207         pEpCannotIncreaseSequence = 0x0971,
   208         pEpCannotSetSequenceValue = 0x0972,
   209         pEpOwnSequence = 0x097f,
   210 
   211         pEpSyncStatemachineError = 0x0980,
   212         pEpSyncNoTrust = 0x0981,
   213         pEpStatemachineInvalidState = 0x0982,
   214         pEpStatemachineInvalidEvent = 0x0983,
   215         pEpStatemachineInvalidCondition = 0x0984,
   216         pEpStatemachineInvalidAction = 0x0985,
   217         pEpStatemachineInhibitedEvent = 0x0986,
   218 
   219         pEpCommitFailed = 0xff01,
   220         pEpMessageConsume = 0xff02,
   221         pEpMessageIgnore = 0xff03,
   222 
   223         pEpRecordNotFound = -6,
   224         pEpCannotCreateTempFile = -5,
   225         pEpIllegalValue = -4,
   226         pEpBufferTooSmall = -3,
   227         pEpOutOfMemory = -2,
   228         pEpUnknownError = -1,
   229 
   230         pEpVersionMismatch = -7,
   231     } pEpStatus;
   232 
   233     typedef [v1_enum] enum pEpIdentityFlags {
   234         pEpIdfNone = 0,
   235         pEpIdfNotForSync = 0x0001,
   236         pEpIdfList = 0x0002,
   237         pEpIdfDevicegroup = 0x0100
   238     } pEpIdentityFlags;
   239 
   240     [uuid(C3A3814E-567F-4D1C-9F44-9B1DA3957A89)] struct pEpIdentity {
   241         BSTR Address;
   242         BSTR Fpr;
   243         BSTR UserId;
   244         BSTR UserName;
   245         pEpComType CommType;
   246         BSTR Lang;
   247         VARIANT_BOOL Me;
   248         pEpIdentityFlags Flags;
   249     };
   250 
   251     [id(11)] HRESULT SetIdentityFlags([in] struct pEpIdentity *identity, [in] pEpIdentityFlags flags);
   252     [id(12)] HRESULT UnsetIdentityFlags([in] struct pEpIdentity *identity, [in] pEpIdentityFlags flags);
   253 
   254     // Keymanagement API
   255 
   256     [id(13)] HRESULT StartKeyserverLookup();
   257     [id(14)] HRESULT StopKeyserverLookup();
   258 
   259     [id(15)] HRESULT Myself([in] struct pEpIdentity *ident, [out, retval] struct pEpIdentity *result);
   260     [id(16)] HRESULT UpdateIdentity([in] struct pEpIdentity *ident, [out, retval] struct pEpIdentity *result);
   261     [id(17)] HRESULT KeyMistrusted([in] struct pEpIdentity *ident);
   262     [id(18)] HRESULT KeyResetTrust([in] struct pEpIdentity *ident);
   263     [id(19)] HRESULT TrustPersonalKey([in] struct pEpIdentity *ident, [out, retval] struct pEpIdentity *result);
   264     [id(20)] HRESULT OwnIdentitiesRetrieve([out, retval] SAFEARRAY(struct pEpIdentity)* ownIdentities);
   265     // [id(21)] HRESULT UndoLastMistrust(); NOT IMPLEMENTED ANY MORE - USE KeyResetTrust() instead
   266     [id(22)] HRESULT IspEpUser([in] struct pEpIdentity *ident, [out, retval] VARIANT_BOOL *ispEp);
   267 
   268     // Blacklist API
   269     
   270     [id(23)] HRESULT BlacklistAdd([in] BSTR fpr);
   271     [id(24)] HRESULT BlacklistDelete([in] BSTR fpr);
   272     [id(25)] HRESULT BlacklistIsListed([in] BSTR fpr, [out, retval] VARIANT_BOOL *listed);
   273     [id(26)] HRESULT BlacklistRetrieve([out, retval] SAFEARRAY(BSTR) *blacklist);
   274 
   275     // PGP compatibility functions
   276 
   277     [id(27)] HRESULT OpenPGPListKeyinfo([in] BSTR searchPattern, [out, retval] SAFEARRAY(struct StringPair)* keyinfoList);
   278 
   279     // Message API
   280 
   281     typedef [v1_enum] enum pEpRating {
   282         pEpRatingUndefined = 0,
   283         pEpRatingCannotDecrypt,
   284         pEpRatingHaveNoKey,
   285         pEpRatingUnencrypted,
   286         pEpRatingUnencryptedForSome,
   287         pEpRatingUnreliable,
   288         pEpRatingReliable,
   289         pEpRatingTrusted,
   290         pEpRatingTrustedAndAnonymized,
   291         pEpRatingFullyAnonymous,
   292 
   293         pEpRatingMistrust = -1,
   294         pEpRatingB0rken = -2,
   295         pEpRatingUnderAttack = -3
   296     } pEpRating;
   297 
   298     typedef [v1_enum] enum pEpColor {
   299         pEpColorNoColor = 0,
   300         pEpColorYellow,
   301         pEpColorGreen,
   302         pEpColorRed = -1,
   303     } pEpColor;
   304 
   305     typedef [v1_enum] enum pEpEncryptFlags {
   306         pEpEncryptFlagDefault = 0,
   307         pEpEncryptFlagForceEncryption = 0x1,
   308 
   309         // This flag is for special uses and should not be used
   310         // by normal pEp clients!
   311         pEpEncryptFlagForceUnsigned = 0x2,
   312 
   313         // This flag is for special uses and should not be used
   314         // by normal pEp clients!
   315         pEpEncryptFlagForceNoAttachedKey = 0x4,
   316 
   317         //This is mainly used by pEp clients to send private keys to 
   318         // their own PGP-only device
   319         pEpEncryptFlagForceVersion1 = 0x16
   320     } pEpEncryptFlags;
   321 
   322     typedef [v1_enum] enum pEpDecryptFlags {
   323         pEpDecryptFlagsNone = 0,
   324         pEpDecryptFlagOwnPrivateKey = 0x1,
   325         pEpDecryptFlagConsume = 0x2,
   326         pEpDecryptFlagIgnore = 0x4,
   327         pEpDecryptFlagSrcModified = 0x8,
   328         pEpDecryptFlagUntrustedServer = 0x100,
   329         pEpDecryptFlagDontTriggerSync = 0x200
   330     } pEpDecryptFlags;
   331 
   332     typedef [v1_enum] enum pEpMsgDirection {
   333         pEpDirIncoming = 0,
   334         pEpDirOutgoing
   335     } pEpMsgDirection;
   336 
   337     typedef [v1_enum] enum pEpEncFormat {
   338         pEpEncNone = 0,                       // message is not encrypted
   339         pEpEncPieces,                         // inline PGP + PGP extensions
   340         pEpEncSMime,                          // RFC5751
   341         pEpEncPgpMime,                        // RFC3156
   342         pEpEncPep,                            // pEp encryption format
   343         pEpEncPgpMimeOutlook1                 // Message B0rken by Outlook type 1
   344     } pEpEncFormat;
   345 
   346     [uuid(47FB0795-6B64-455C-BB0E-54998CAB8ACB)] struct StringPair {
   347         BSTR Name;
   348         BSTR Value;
   349     };
   350 
   351     [uuid(634EB7CE-99AA-460D-BDF8-F7CDA7232CA6)] struct Blob {
   352         SAFEARRAY(BYTE) value;
   353         BSTR MimeType;
   354         BSTR Filename;
   355     };
   356 
   357     [uuid(B6F40887-E761-4A47-B204-A0193EE0284D)] struct TextMessage {
   358         pEpMsgDirection Dir;
   359         BSTR Id;
   360         BSTR ShortMsg;
   361         BSTR LongMsg;
   362         BSTR LongMsgFormatted;
   363         SAFEARRAY(struct Blob) Attachments;
   364         hyper Sent; // Timestamp: 64 Bit time_t from mktime(), seconds since January 1, 1970, 0:00 UTC.
   365         hyper Recv; // Timestamp: 64 Bit time_t from mktime(), seconds since January 1, 1970, 0:00 UTC.
   366         struct pEpIdentity From;
   367         SAFEARRAY(struct pEpIdentity) To;
   368         struct pEpIdentity RecvBy;
   369         SAFEARRAY(struct pEpIdentity) Cc;
   370         SAFEARRAY(struct pEpIdentity) Bcc;
   371         SAFEARRAY(struct pEpIdentity) ReplyTo;
   372         SAFEARRAY(BSTR) References;
   373         SAFEARRAY(BSTR) Keywords;
   374         BSTR Comments;
   375         SAFEARRAY(struct StringPair) OptFields;
   376         [readonly] BSTR SenderFpr;
   377     };
   378 
   379     [id(28)] HRESULT EncryptMessage(
   380         [in, out] struct TextMessage *src,
   381         [out] struct TextMessage * dst,
   382         [in] SAFEARRAY(BSTR) extra,
   383         [in, defaultvalue(pEpEncryptFlagDefault)] pEpEncryptFlags flags,
   384         // Use pEpEncFormat.pEpEncNone for unencrypted, outgoing messages.
   385         // Default is pEpEncFormat.pEpEncPep, all other formats are only 
   386         // for compatibility and not intended for normal use.
   387         [in, defaultvalue(pEpEncPep)] pEpEncFormat encFormat);
   388 
   389     [id(29)] HRESULT DecryptMessage(
   390         [in, out] struct TextMessage *src,
   391         [out] struct TextMessage * dst,
   392         [in, out] SAFEARRAY(BSTR) *keylist,
   393         [in, out] pEpDecryptFlags* flags,
   394         [out, retval] pEpRating *rating);
   395 
   396     [id(30)] HRESULT OutgoingMessageRating([in] struct TextMessage *msg, [out, retval] pEpRating * pVal);
   397     [id(31)] HRESULT IdentityRating([in] struct pEpIdentity * ident, [out, retval] pEpRating * pVal);
   398     [id(32)] HRESULT ColorFromRating([in] pEpRating rating, [out, retval] pEpColor* pVal);
   399 
   400     [id(33)] HRESULT GetMessageTrustwords(
   401         [in] struct TextMessage *msg,
   402         [in] struct pEpIdentity * receivedBy,
   403         [in] SAFEARRAY(BSTR) keylist,
   404         [in, defaultvalue("en")] BSTR lang,
   405         [in, defaultvalue(0)] VARIANT_BOOL full,
   406         [out, retval] BSTR * words
   407     );
   408 
   409     [id(34)] HRESULT EncryptMessageForSelf(
   410         [in] struct pEpIdentity* targetId,
   411         [in] struct TextMessage* src,
   412         [in] SAFEARRAY(BSTR) extra, // Fingerprints for extra keys for encryption.
   413         [out] struct TextMessage* dst,
   414         [in, defaultvalue(pEpEncryptFlagDefault)] pEpEncryptFlags flags
   415     );
   416 
   417     [id(35)] HRESULT ReEvaluateMessageRating(
   418         [in] struct TextMessage *src,
   419         [in] SAFEARRAY(BSTR) x_KeyList, // referring to X-KeyList mail header
   420         [in] pEpRating x_EncStatus, // referring to X-EncStatus mail header
   421         [out, retval] pEpRating *rating
   422     );
   423 
   424     // callback / keysync API
   425     [id(36)] HRESULT RegisterCallbacks([in] IpEpEngineCallbacks* newCallback);
   426     [id(37)] HRESULT UnregisterCallbacks();
   427 
   428     // mark imported keys as trusted
   429 
   430     [id(38)] HRESULT SetOwnKey(
   431         [in] struct pEpIdentity * ident,
   432         [in] BSTR fpr,
   433         [out, retval] struct pEpIdentity * result
   434     );
   435 
   436     [id(39)] HRESULT EncryptMessageAndAddPrivKey(
   437         [in] struct TextMessage *src,
   438         [out] struct TextMessage * dst,
   439         [in] BSTR to_fpr,
   440         [in, defaultvalue(pEpEncryptFlagDefault)] pEpEncryptFlags flags,
   441         // Use pEpEncFormat.pEpEncNone for unencrypted, outgoing messages.
   442         // Default is pEpEncFormat.pEpEncPep, all other formats are only 
   443         // for compatibility and not intended for normal use.
   444         [in, defaultvalue(pEpEncPep)] pEpEncFormat encFormat);
   445 
   446     // Trigger an immediate update check.
   447     [id(40)] HRESULT UpdateNow([in] BSTR productCode, [out] VARIANT_BOOL *didUpdate);
   448 
   449     // Get a preview of the outgoint message rating
   450     [id(41)] HRESULT OutgoingMessageRatingPreview([in] struct TextMessage *msg, [out, retval] pEpRating *rating);
   451 
   452     // Trust own public key. To be used for manual key import.
   453     [id(42)] HRESULT TrustOwnKey([in] struct pEpIdentity * ident);
   454 
   455     // Engine startup and shutdown
   456     [id(43)] HRESULT Startup();
   457 
   458     // Get the rating for a specific key
   459     [id(44)] HRESULT GetKeyRatingForUser([in] BSTR userId, [in] BSTR fpr, [out, retval] pEpRating *rating);
   460 
   461     // Resets the database status for a key
   462     [id(45)] HRESULT KeyResetIdentity([in] struct pEpIdentity ident, [in] BSTR fpr);
   463 
   464     // Resets the default database status for the user / keypair provided
   465     [id(46)] HRESULT KeyResetUser([in] BSTR userId, [in] BSTR fpr);
   466 
   467     // revoke and mistrust all own keys, generate new keys for all own identities, and opportunistically communicate
   468     // key reset information to people we have recently contacted. 
   469     [id(47)] HRESULT KeyResetAllOwnKeys();
   470 
   471     // sync API
   472 
   473     typedef [v1_enum] enum SyncHandshakeResult {
   474         SyncHandshakeCancel = -1,
   475         SyncHandshakeAccepted = 0,
   476         SyncHandshakeRejected = 1
   477     } SyncHandshakeResult;
   478 
   479     [id(48)] HRESULT DeliverHandshakeResult([in] enum SyncHandshakeResult result, [in] SAFEARRAY(struct pEpIdentity) identities_sharing);
   480 
   481     // Imports keys from data
   482     [id(49)] HRESULT ImportKey([in] BSTR keyData, [out] SAFEARRAY(struct pEpIdentity)* privateKeys);
   483 
   484     typedef [v1_enum] enum pEpCipherSuite {
   485         pEpCipherSuiteDefault = 0,
   486         pEpCipherSuiteCV25519 = 1,
   487         pEpCipherSuiteP256 = 2,
   488         pEpCipherSuiteP384 = 3,
   489         pEpCipherSuiteP521 = 4,
   490         pEpCipherSuiteRSA2K = 5,
   491         pEpCipherSuiteRSA3K = 6,
   492         pEpCipherSuiteRSA4K = 7,
   493         pEpCipherSuiteRSA8K = 8
   494     } pEpCipherSuite;
   495 
   496     // Sets the cipher suite
   497     [id(50)] HRESULT ConfigCipherSuite([in, defaultvalue(pEpCipherSuiteDefault)] pEpCipherSuite cipherSuite);
   498 
   499     // Leave the device group
   500     [id(51)] HRESULT LeaveDeviceGroup();
   501 
   502     // Get Trustwords for a pair of fprs
   503     [id(52)] HRESULT GetTrustwordsForFprs([in] BSTR fpr1, [in] BSTR fpr2, [in, defaultvalue("en")] BSTR lang, [in, defaultvalue(0)] VARIANT_BOOL full, [out, retval] BSTR * words);
   504 
   505     // Get the comm type a bare key has
   506     [id(53)] HRESULT GetKeyRating([in] BSTR fpr, [out, retval] pEpComType *commType);
   507 
   508     // Decode a Sync message from PER into XER
   509     [id(54)] HRESULT PERToXERSyncMessage([in] struct TextMessage *msg, [out, retval] BSTR *xer);
   510 
   511     // Disable Sync for this identity
   512     [id(55)] HRESULT DisableIdentityForSync([in] struct pEpIdentity * ident);
   513 
   514     // Enable Sync for this identity
   515     [id(56)] HRESULT EnableIdentityForSync([in] struct pEpIdentity * ident);
   516 
   517     // Gets the directory where shared files are stored
   518     [id(57)] HRESULT PerMachineDirectory([out, retval] BSTR *directory);
   519 
   520     // Gets the directory for user files
   521     [id(58)] HRESULT PerUserDirectory([out, retval] BSTR *directory);
   522 
   523     // Converts a comm type to a pEp rating
   524     [id(59)] HRESULT RatingFromCommType([in] pEpComType commType, [out, retval] pEpRating * rating);
   525 
   526     // Gets if sync is enabled
   527     [id(60)] HRESULT GetIsSyncRunning([out, retval] VARIANT_BOOL *running);
   528 
   529     // Shuts down sync
   530     [id(61)] HRESULT ShutDownSync();
   531 
   532     // Decodes a MIME message
   533     [id(62)] HRESULT MIMEDecodeMessage([in] BSTR mimeText, [out, retval] struct TextMessage *msg);
   534 
   535     // Encodes a MIME message
   536     [id(63)] HRESULT MIMEEncodeMessage([in] struct TextMessage *msg, [in] VARIANT_BOOL omitFields, [out, retval] BSTR *mimeText);
   537 
   538     // Configures a key passphrase for the current session
   539     [id(64)] HRESULT ConfigPassphrase([in] BSTR passphrase);
   540 
   541     // Passphrase enablement for newly-generated secret keys
   542     [id(65)] HRESULT ConfigPassphraseForNewKeys([in] VARIANT_BOOL enable, [in] BSTR passphrase);
   543 
   544     // Shows a notification in the notification tray
   545     [id(66)] HRESULT ShowNotification([in] BSTR title, [in] BSTR message);
   546 };
   547 
   548 [
   549     uuid(564A4350-419E-47F1-B0DF-6FCCF0CD0BBC),
   550     version(1.0),
   551 ]
   552 library pEpCOMServerAdapterLib
   553 {
   554     importlib("stdole2.tlb");
   555 
   556     [
   557         uuid(5FF6682B-727B-4DFE-A68D-28982874C0C7)
   558     ]
   559     coclass pEpEngine {
   560         [default] interface IpEpEngine;
   561         interface IpEpEngineCallbacks;
   562     };
   563 };