summaryrefslogtreecommitdiffstats
path: root/Source/cmServer.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmServer.h')
-rw-r--r--Source/cmServer.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/Source/cmServer.h b/Source/cmServer.h
index 38a11bb..dde5333 100644
--- a/Source/cmServer.h
+++ b/Source/cmServer.h
@@ -24,6 +24,7 @@
#include <string>
#include <vector>
+class cmServerConnection;
class cmServerProtocol;
class cmServerRequest;
class cmServerResponse;
@@ -33,18 +34,18 @@ class cmServer
public:
class DebugInfo;
- cmServer(bool supportExperimental);
+ cmServer(cmServerConnection* conn, bool supportExperimental);
~cmServer();
- bool Serve();
-
- // for callbacks:
- void PopOne();
- void handleData(std::string const& data);
+ bool Serve(std::string* errorMessage);
private:
void RegisterProtocol(cmServerProtocol* protocol);
+ // Callbacks from cmServerConnection:
+ void PopOne();
+ void QueueRequest(const std::string& request);
+
static void reportProgress(const char* msg, float progress, void* data);
static void reportMessage(const char* msg, const char* title, bool& cancel,
void* data);
@@ -69,6 +70,7 @@ private:
static cmServerProtocol* FindMatchingProtocol(
const std::vector<cmServerProtocol*>& protocols, int major, int minor);
+ cmServerConnection* Connection = nullptr;
const bool SupportExperimental;
cmServerProtocol* Protocol = nullptr;
@@ -94,4 +96,5 @@ private:
mutable bool Writing = false;
friend class cmServerRequest;
+ friend class cmServerConnection;
};