|
|
@ -391,6 +391,9 @@ const cmServerResponse cmServerProtocol1_0::Process( |
|
|
|
if (request.Type == kCONFIGURE_TYPE) { |
|
|
|
return this->ProcessConfigure(request); |
|
|
|
} |
|
|
|
if (request.Type == kFILESYSTEM_WATCHERS_TYPE) { |
|
|
|
return this->ProcessFileSystemWatchers(request); |
|
|
|
} |
|
|
|
if (request.Type == kGLOBAL_SETTINGS_TYPE) { |
|
|
|
return this->ProcessGlobalSettings(request); |
|
|
|
} |
|
|
@ -1019,3 +1022,22 @@ cmServerResponse cmServerProtocol1_0::ProcessSetGlobalSettings( |
|
|
|
|
|
|
|
return request.Reply(Json::Value()); |
|
|
|
} |
|
|
|
|
|
|
|
cmServerResponse cmServerProtocol1_0::ProcessFileSystemWatchers( |
|
|
|
const cmServerRequest& request) |
|
|
|
{ |
|
|
|
const cmFileMonitor* const fm = FileMonitor(); |
|
|
|
Json::Value result = Json::objectValue; |
|
|
|
Json::Value files = Json::arrayValue; |
|
|
|
for (const auto& f : fm->WatchedFiles()) { |
|
|
|
files.append(f); |
|
|
|
} |
|
|
|
Json::Value directories = Json::arrayValue; |
|
|
|
for (const auto& d : fm->WatchedDirectories()) { |
|
|
|
directories.append(d); |
|
|
|
} |
|
|
|
result[kWATCHED_FILES_KEY] = files; |
|
|
|
result[kWATCHED_DIRECTORIES_KEY] = directories; |
|
|
|
|
|
|
|
return request.Reply(result); |
|
|
|
} |