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