Register Status Design Notes

Statuses

I plan to change how statuses are stored. Currently, each GalagoPresence? has a list of set statuses. Feeds are free to make up whatever they want for the statuses. However, this is not strict enough, and doesn't provide a clean way of finding out what statuses can be set or a way to actually set them from clients.

The plan is to require that feeds register a list of possible statuses on a GalagoService?. Instead of a GalagoPresence? providing an API where you store a list of set statuses, it will instead have functions for enabling/disabling a status (using an existing GalagoStatus's ID registered on the service), and setting attributes for them.

Notes

  • Prevent clients from calling galago_account_create_presence(). If a "me"-owned account does not have a presence, then it's not settable. This should only happen if the service is not capable of presences, and if the account is offline.
  • Allow clients to connect/disconnect accounts and enable/disable statuses.
  • Change galago_presence_add_status() and galago_presence_remove_status() to galago_presence_enable_status() and galago_presence_disable_status(). The status IDs passed must be in the list of registered status types in GalagoService?.
  • Could either use a GalagoStatus? itself as the key, or a string ID. GalagoStatuses? would be made atomic if used.
  • Rename galago_presence_get_statuses() to galago_presence_get_enabled_statuses().
  • Make GalagoStatus? immutable. Attribute values can no longer be set directly on a GalagoStatus?. They must be set through GalagoPresence? functions.