21#ifndef KICAD_API_SERVER_H
22#define KICAD_API_SERVER_H
30#include <wx/filename.h>
79 std::string SocketPath()
const;
92 void onApiRequest( std::string* aRequest );
98 void handleApiEvent( wxCommandEvent& aEvent );
100 void handleApiRequestString( std::string& aRequestString );
102 void log(
const std::string& aOutput );
wxDECLARE_EVENT(API_REQUEST_EVENT, wxCommandEvent)
static wxString s_logFileName
void RegisterHandler(API_HANDLER *aHandler)
Adds a new request handler to the server.
wxString m_socketPathOverride
std::set< API_HANDLER * > m_handlers
std::atomic< bool > m_readyToReply
const std::string & Token() const
void SetReadyToReply(bool aReady=true)
void SetSocketPath(const wxString &aSocketPath)
KICAD_API_SERVER(bool aAutoStart=true)
void DeregisterHandler(API_HANDLER *aHandler)
std::unique_ptr< KINNG_REQUEST_SERVER > m_server