syncany/syncany — pull request #237 by binwiederhier (2014-09-26 20:33:28+00:00)
Title: Hooks and progress information

The [feature/hooks](https://github.com/syncany/syncany/compare/feature/hooks) branch now contains the solution to issue #155 and #223. And from what I can see, it's ready for review. It might need a bit of polishing in terms of JavaDoc, but the code and concepts are solid, I think.

**Can someone review what I did with the daemon hooks branch here?**

Summary:
- I replaced `{Up|Down|Watch|Index}Listener` with Guava event bus based notififications (`LocalEventBus`). That's okay. I like that.
- System events are now distributed as `Event`s. `ExternalEvent`s are also meant for WebSocket channels (GUI, web), `InternalEvent`s are for internal usage (not used yet). That's also a good distinction, I think.
- `Command`s can now subscribe to local events and display status information based on these events. This allows displaying status information while uploading/downloading/etc. See here: https://asciinema.org/a/12486
- There is currently just one "hook", it can be set up by adding the following lines to the daemon.xml. `%subject` is replaced with something like `1 file(s) added, 2 file(s) changed`, but this will be a lot more flexible in the future:

```xml

notify-send "%subject"

```