mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 17:12:43 +00:00 
			
		
		
		
	 0b7baa7e5a
			
		
	
	
		0b7baa7e5a
		
	
	
	
	
		
			
			https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules "The compiler is more likely to get the default semantics right and you cannot implement these functions better than the compiler."
		
			
				
	
	
		
			30 lines
		
	
	
	
		
			643 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
	
		
			643 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <LibCore/Stream.h>
 | |
| 
 | |
| namespace InspectorServer {
 | |
| 
 | |
| class InspectableProcess {
 | |
| public:
 | |
|     InspectableProcess(pid_t, NonnullOwnPtr<Core::Stream::LocalSocket>);
 | |
|     ~InspectableProcess() = default;
 | |
| 
 | |
|     void send_request(JsonObject const& request);
 | |
|     String wait_for_response();
 | |
| 
 | |
|     static InspectableProcess* from_pid(pid_t);
 | |
| 
 | |
| private:
 | |
|     pid_t m_pid { 0 };
 | |
|     NonnullOwnPtr<Core::Stream::LocalSocket> m_socket;
 | |
| };
 | |
| 
 | |
| extern HashMap<pid_t, NonnullOwnPtr<InspectorServer::InspectableProcess>> g_processes;
 | |
| 
 | |
| }
 |