Windows: Add a token status icon to the NIM plug-in
The Network Identity Manager plug-in for OpenAFS replaces
afscreds.exe for token management. However, unlike afscreds.exe,
the plug-in did not indicate the status of AFS tokens using an
icon in the notification area.
This patch adds a token status icon to the plug-in so that while
the plug-in is used, a familiar padlock icon in the notification
area will indicate the status of tokens as well as the OpenAFS
service.
There are four possible states indicated by the icons:
- No tokens: indicated by a padlock with a bright red 'X' beside
it.
- At least one valid token: indicated by a normal padlock.
- Service is not running: indicated by a grayed out padlock with
a black square beside it.
- Service error: indicated by a padlock broken in half.
The 'Service error' state means that the OpenAFS client service
is technically running (as reported by Windows), but is not
responding to requests.
In addition to the icon, hovering the mouse cursor over the icon
will show details about the current state (such as the list of
cells for which valid tokens exist) and the version of OpenAFS
running on the machine.