2017-12-24 01:30:52 +00:00
|
|
|
#pragma once
|
|
|
|
|
2018-05-28 00:50:02 +00:00
|
|
|
#include "method.h"
|
|
|
|
#include "query.h"
|
2018-05-13 16:52:19 +00:00
|
|
|
#include "timer.h"
|
|
|
|
|
2018-05-28 00:50:02 +00:00
|
|
|
#include <string>
|
2018-05-13 16:52:19 +00:00
|
|
|
#include <unordered_map>
|
2018-05-28 00:50:02 +00:00
|
|
|
#include <vector>
|
2017-12-24 01:30:52 +00:00
|
|
|
|
2018-03-06 01:18:33 +00:00
|
|
|
class DiagnosticsEngine;
|
2018-05-05 22:29:17 +00:00
|
|
|
struct VFS;
|
2017-12-29 15:52:43 +00:00
|
|
|
struct Project;
|
2017-12-24 01:30:52 +00:00
|
|
|
struct WorkingFiles;
|
2018-05-28 00:50:02 +00:00
|
|
|
struct lsBaseOutMessage;
|
2017-12-24 01:30:52 +00:00
|
|
|
|
2018-05-28 00:50:02 +00:00
|
|
|
namespace ccls::pipeline {
|
|
|
|
|
|
|
|
void Init();
|
|
|
|
void LaunchStdin(std::unordered_map<MethodType, Timer>* request_times);
|
|
|
|
void LaunchStdout(std::unordered_map<MethodType, Timer>* request_times);
|
2018-04-04 06:05:41 +00:00
|
|
|
void Indexer_Main(DiagnosticsEngine* diag_engine,
|
2018-05-05 22:29:17 +00:00
|
|
|
VFS* vfs,
|
2017-12-29 15:56:34 +00:00
|
|
|
Project* project,
|
2018-05-28 00:50:02 +00:00
|
|
|
WorkingFiles* working_files);
|
|
|
|
void MainLoop();
|
|
|
|
|
|
|
|
void Index(const std::string& path,
|
|
|
|
const std::vector<std::string>& args,
|
|
|
|
bool is_interactive,
|
|
|
|
lsRequestId id = {});
|
2017-12-29 15:52:43 +00:00
|
|
|
|
2018-05-28 00:50:02 +00:00
|
|
|
std::optional<std::string> LoadCachedFileContents(const std::string& path);
|
|
|
|
void WriteStdout(MethodType method, lsBaseOutMessage& response);
|
|
|
|
}
|