|
|
|
#ifndef SRC_INSPECTOR_AGENT_H_
|
|
|
|
#define SRC_INSPECTOR_AGENT_H_
|
|
|
|
|
|
|
|
#if !HAVE_INSPECTOR
|
|
|
|
#error("This header can only be used when inspector is enabled")
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// Forward declaration to break recursive dependency chain with src/env.h.
|
|
|
|
namespace node {
|
|
|
|
class Environment;
|
|
|
|
} // namespace node
|
|
|
|
|
|
|
|
namespace v8 {
|
|
|
|
class Platform;
|
|
|
|
} // namespace v8
|
|
|
|
|
|
|
|
namespace node {
|
|
|
|
namespace inspector {
|
|
|
|
|
|
|
|
class AgentImpl;
|
|
|
|
|
|
|
|
class Agent {
|
|
|
|
public:
|
|
|
|
explicit Agent(node::Environment* env);
|
|
|
|
~Agent();
|
|
|
|
|
|
|
|
// Start the inspector agent thread
|
|
|
|
void Start(v8::Platform* platform, int port, bool wait);
|
|
|
|
// Stop the inspector agent
|
|
|
|
void Stop();
|
|
|
|
|
|
|
|
bool IsStarted();
|
|
|
|
bool IsConnected();
|
|
|
|
void WaitForDisconnect();
|
|
|
|
private:
|
|
|
|
AgentImpl* impl;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace inspector
|
|
|
|
} // namespace node
|
|
|
|
|
|
|
|
#endif // SRC_INSPECTOR_AGENT_H_
|