FredPluginFCPMessageHandler: Add draft of class FCPPluginMessage to serve as container for FCP messages
- The primary goal of this is to refactor the way reply messages are sent. With the old approach without this class, the message handling functions were passed a FCPPluginClient and could call its send() functions to send a reply OR many replies. With this class, they shall instead return an object of it as a reply.
- I have thought for a rather long time about this, and it is necessary for making synchronous FCP calls easy: With this class, we can force the message handling functions to return a reply message. So the code which deploys the synchronous calls will know exactly what the reply is, and particularly whether it is a success / failure. This would not have been possible easily with the old approach of allowing the message handling function to call send() on the FCPPluginClient: What is the success/failure of a message handler if it called send() multiple times?
- Nevertheless, of course the message handling functions will still be shipped a FCPPluginClient as a parameter in case they need to send more than one reply, and particularly send future replies.