diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2016-09-13 09:39:24 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-09-19 12:57:57 (GMT) |
commit | d341d077c5fb5c3df3732210b836a9ba6cb53873 (patch) | |
tree | 2235f21ec1ae9ff3c810204f159fc35adb60c45b /Source/cmServerProtocol.h | |
parent | b13d3e0d0b3c644242ef8dc4977d35da73398a9d (diff) | |
download | CMake-d341d077c5fb5c3df3732210b836a9ba6cb53873.zip CMake-d341d077c5fb5c3df3732210b836a9ba6cb53873.tar.gz CMake-d341d077c5fb5c3df3732210b836a9ba6cb53873.tar.bz2 |
cmake-server: Implement ServerProtocol 1.0
Enable the initial handshake of the client to complete the connection
to the server.
The handshake sets the protocol version that client and server will
use to talk to each other. The only way to change this is to quit the
server and start over.
CMake specific information is also set during the initial handshake.
Since cmake so far never had to change basic information about any project
while running, it was decided to keep this information static and
require a restart of the cmake server to change any of these.
Diffstat (limited to 'Source/cmServerProtocol.h')
-rw-r--r-- | Source/cmServerProtocol.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/cmServerProtocol.h b/Source/cmServerProtocol.h index e086f72..33183e9 100644 --- a/Source/cmServerProtocol.h +++ b/Source/cmServerProtocol.h @@ -95,3 +95,21 @@ protected: private: std::unique_ptr<cmake> m_CMakeInstance; }; + +class cmServerProtocol1_0 : public cmServerProtocol +{ +public: + std::pair<int, int> ProtocolVersion() const override; + const cmServerResponse Process(const cmServerRequest& request) override; + +private: + bool DoActivate(const cmServerRequest& request, + std::string* errorMessage) override; + + enum State + { + STATE_INACTIVE, + STATE_ACTIVE + }; + State m_State = STATE_INACTIVE; +}; |