js: change in initialization ancd connection handling
authorMaximilian Krambach <maximilian.krambach@intevation.de>
Tue, 24 Apr 2018 16:44:30 +0000 (18:44 +0200)
committerMaximilian Krambach <maximilian.krambach@intevation.de>
Tue, 24 Apr 2018 16:44:30 +0000 (18:44 +0200)
commit461dd0c8b41683a91073b362d100ee5217ec53f6
tree15ab814b70a583db52f7f9e664aaa016057d98d0
parent727340b295f25e04cb595022ba143cda48364697
js: change in initialization ancd connection handling

--

* The Connection will now be started before an object is created, to
  better account for failures.
* index.js: now exposes an init(), which returns a Promise of
  configurable <GpgME | gpgmeGpgME_openPGPCompatibility> with an
  established connection.
* TODO: There is currently no way to recover from a "connection lost"
* Connection.js offers Connection.isConnected, which toggles on port
  closing.
lang/js/src/Connection.js
lang/js/src/Keyring.js
lang/js/src/gpgmejs.js
lang/js/src/gpgmejs_openpgpjs.js
lang/js/src/index.js
lang/js/testapplication.js