p≡p COM server adapter
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

564 lines
20 KiB

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