js: Key handling stubs, Error handling, refactoring
authorMaximilian Krambach <maximilian.krambach@intevation.de>
Mon, 23 Apr 2018 15:18:46 +0000 (17:18 +0200)
committerMaximilian Krambach <maximilian.krambach@intevation.de>
Mon, 23 Apr 2018 15:18:46 +0000 (17:18 +0200)
commitd62f66b1fb47f2075770d896f672748a4136e70b
tree57cd622c1bfa8e3b9c22ef5a21b14915c3223c65
parent6ab25e40d904007755c5d999bf66ae264236e745
js: Key handling stubs, Error handling, refactoring

--

* Error handling: introduced GPGMEJS_Error class that handles errors
  at a more centralized and consistent position
* src/Connection.js:
  The nativeMessaging port now opens per session instead of per
  message. Some methods were added that reflect this change
  - added methods disconnect() and reconnect()
  - added connection status query
* src/gpgmejs.js
  - stub for key deletion
  - error handling
  - high level API for changing connection status
* src/gpgmejs_openpgpjs.js
  - added stubs for Key/Keyring handling according to current
    state of discussion. It is still subject to change
* src/Helpers.js
  - toKeyIdArray creates an array of KeyIds, now accepting
    fingerprints, GPGMEJS_Key objects and openpgp Key objects.
* Key objects (src/Key.js) Querying information about a key
  directly from gnupg. Currently a stub, only the Key.fingerprint is
  functional.
* Keyring queries (src/Keyring.js): Listing and searching keys.
  Currently a stub.
lang/js/src/Connection.js
lang/js/src/Errors.js [new file with mode: 0644]
lang/js/src/Helpers.js
lang/js/src/Key.js [new file with mode: 0644]
lang/js/src/Keyring.js [new file with mode: 0644]
lang/js/src/Message.js
lang/js/src/gpgmejs.js
lang/js/src/gpgmejs_openpgpjs.js