MCPcopy Index your code
hub / github.com/mailvelope/mailvelope / addSyncHandler

Method addSyncHandler

src/client-API/client-api.js:490–501  ·  view source on GitHub ↗

* Add various functions for keyring synchronization * @param {SyncHandlerObject} syncHandlerObj * @returns {Promise. }

(syncHandlerObj)

Source from the content-addressed store, hash-verified

488 * @returns {Promise.<undefined, Error>}
489 */
490 addSyncHandler(syncHandlerObj) {
491 if (typeof syncHandlerObj.uploadSync !== typeof syncHandlerObj.downloadSync) {
492 return Promise.reject(new Error('uploadSync and downloadSync Handler cannot be set exclusively.'));
493 }
494 return send('add-sync-handler', {identifier: this.identifier}).then(syncHandlerId => {
495 if (syncHandler) {
496 syncHandler.update(syncHandlerObj);
497 } else {
498 syncHandler = new SyncHandler(syncHandlerId, syncHandlerObj);
499 }
500 });
501 }
502
503 /**
504 * @typedef {Object} OpenSettingsOptions

Callers

nothing calls this directly

Calls 3

rejectMethod · 0.80
updateMethod · 0.80
sendFunction · 0.70

Tested by

no test coverage detected