Extensible Command Protocol Handling - AllenJB/polykephal GitHub Wiki
There are several types of commands that can be given:
- Protocol specific commands - These will always have a network parameter.
- Core commands - Commands handled by the core code - configuration storing / saving.
- Add-ons that are not handled by a protocol and are not part of the core code.
It is possible that we will want to allow add-on commands that have a network parameter and/or are protocol specific.
The protocol code will handle any protocol-specific code. To take IRC as an example, it will manage servers, identities (presences) and channels. They will also do with sending and receiving messages and may deal with protocol specific issues - for example implementing away support in a manner that enables icecap clients to only be notified when the away status of a presence changes, instead of all clients having to separately implement methods of scanning for status changes.
Protocol handling will be implemented using QtPlugin.
Add-on command / event handling - these might be generic such as an add-on that generates an event to notify the client when the day changes according to the server (as an arbitrary example).
Add-ons may also be protocol specific, or may want to communicate with many or all protocols (eg. a command to broadcast a message, or set away mode for all protocols that support it).
Iti s unclear currently how best to implement this. It could possibly be done using either QtScript or QtPlugin, tho I'm not sure of the exact methods required for implementation.