    Directory "watch" contains everything necessary to monitor the status of
hot-plug partitions. Its makefile builds the library watch.a

    Directory "annex" contains code used to read username, home and
configuration file and provide the results to the rest of the program. It
can also manage a pid file. Its makefile builds the library annex.a

    Directory GTK2 contains a main program and functions to implement a
user interface based on GTK+-2

    The interface between the User Interface (ie GTK2) and the two
libraries is declared in hopman.h .

    The application is essentially reactive: reaction to events in the Linux
Virtual File System and to external signals, and reaction to user actions.
The design favours the centralization of all reactions in one system call,
typically select(), or a wrapper around it provided by the UI's library.

    Three events in two directories are monitored by the inotify API:
      - creation of a device file in /dev
      - deletion of a device file in /dev
      - creation of a symbolic link in /dev/disk/by-label

    Four signals are routed to a pseudo-file by the signalfd API:
      - SIGWAIT, generated when a child process terminates,
      - SIGHUP,  can be used to show the UI when it is normally hidden,
      - SIGTERM and SIGINT to gracefully terminate the application when it
      	is killed by one of these signals.

    These lead to 3 channels monitored by select()/poll()/epoll():
      - the inotify pseudo file, for the "input ready" condidion,
      - the signalfd pseudo file, for the "input ready" condition,
      - /proc/self/mountinfo, for the "urgent data" condition.

    By these means, Hopman can react to 4 kinds of events in the VFS and 4
signals. Reactions to user actions are transmitted by the UI.

    The main program must be provided by the UI, it must call a number of
functions provided in library annex.a and watch.a to read configuration and
initialize inotify and signalfd and open mountinfo. It must do the necessary
marshalling between the simple data types used by watch.a and the data types
required by the graphics library, ie, incorporate the file descriptors provided
by these APIs in its select() wrapper and call watch.a functions in its
corresponding callbacks.

    watch.a provides functions to mount, unmount and open the mounted
partition(s) in either a terminal or a file-manager. The UI just needs to
provide simple wrappers around these, and the configuration file must provide
command lines to invoke external helper commands to perform these actions, eg
pmount, pumount, thunar, xfce4-terminal. The commands are executed by /bin/sh.
