User:Jaffa/Hermes plugins

Background
Hermes currently supports two services: Facebook and Twitter. However, there are patches for both Hyves and Gravatar, as well as requests for LinkedIn , MySpace , Plaxo and LiveJournal. Further services will almost certainly be required.

The existing Hermes source is fairly geared towards Facebook and Twitter, and so there are both architectural and UI challenges in supporting many more services.

Requirements

 * 1) Ability for the user to select which services to use and the priority of them
 * 2) Optional configuration screen for each service, e.g. authentication information
 * 3) UI shouldn't be overly generic to avoid same mistakes of Microfeed.

UI design

 * Change the "Accounts" dialogue to be like the sharing plugins: a list of icon-containing services which are enabled, with an "Add" button, a "Remove" button, "Move Up/Down" buttons and an "Edit" button which is enabled when an item is selected and further preferences are available.
 * Each service needs to provide an interface for opening the preferences for it, if any. For Facebook this'd be "Create birthday-only contacts", an "Authorise"/"Deauthorise" button.

Code design
See early discussion on #6990.

A  class would be introduced to give better defined access to name, service and picture. This is used in manual mapping, and for communication between the controller and the service. It would also store the contacts to which it was mapped, if any.

A root class provides meta-data about the service (such as name and icon) and access to the further UI configuration dialogue (if any) and the backend of the service.

The service backend will implement an interface based on a visitor pattern:

The main engine,, would then do something like the following pseudo-code: