diff --git a/ApplicationCode/SocketInterface/RiaSocketCommand.h b/ApplicationCode/SocketInterface/RiaSocketCommand.h index ee2fe38976..5a393acc90 100644 --- a/ApplicationCode/SocketInterface/RiaSocketCommand.h +++ b/ApplicationCode/SocketInterface/RiaSocketCommand.h @@ -20,7 +20,8 @@ ////////////////////////////////////////////////////////////////////////// -/// Socket commands, to be moved into a separate file +/// The base class for classes interpreting commands sent via socket. +/// Works in close connection with RiaSocketServer ////////////////////////////////////////////////////////////////////////// class RiaSocketServer; @@ -30,7 +31,18 @@ class RiaSocketCommand { public: virtual ~RiaSocketCommand() {} + + /// This method is supposed to interpret the commands received from the calling socket connection and + /// read the data currently available. + /// If it read all the data and completed the command, it is supposed to return true. If it did not read all the data, + /// it is supposed to return false. The socket server will then assume that the command is not completely interpreted, + /// and will continue to call interpretMore() until that method returns true. + virtual bool interpretCommand(RiaSocketServer* server, const QList& args, QDataStream& socketStream) = 0; + + /// This method is supposed to read whatever more data that is available on the socket connection, and return true if it + /// was able to read all the data. If not all the data was available, it must return false, so that the RiaSocketServer + /// will call this method again when more data becomes available. virtual bool interpretMore(RiaSocketServer* server, QTcpSocket* currentClient) { return true; } }; diff --git a/ApplicationCode/UserInterface/RiuProcessMonitor.h b/ApplicationCode/UserInterface/RiuProcessMonitor.h index 50582c2121..7a49b5ffd6 100644 --- a/ApplicationCode/UserInterface/RiuProcessMonitor.h +++ b/ApplicationCode/UserInterface/RiuProcessMonitor.h @@ -52,12 +52,13 @@ public: void startMonitorWorkProcess(caf::UiProcess* process); void stopMonitorWorkProcess(); + void addStringToLog(const QString& text); + public slots: void slotClearTextEdit(); private: void setStatusMsg(const QString& status, int messageType); - void addStringToLog(const QString& text); private slots: void slotShowProcStatusMsg(const QString& message, int messageType);