25#include <google/protobuf/empty.pb.h>
32using namespace kiapi::common::commands;
33using namespace kiapi::common::types;
34using google::protobuf::Empty;
49 GetVersionResponse reply;
51 reply.mutable_version()->set_full_version(
GetBuildVersion().ToStdString() );
54 reply.mutable_version()->set_major( std::get<0>( version ) );
55 reply.mutable_version()->set_minor( std::get<1>( version ) );
56 reply.mutable_version()->set_patch( std::get<2>( version ) );
65 NetClassesResponse reply;
67 std::shared_ptr<NET_SETTINGS>& netSettings =
70 for(
const auto& [
name, netClass] : netSettings->GetNetclasses() )
72 reply.add_net_classes()->set_name(
name.ToStdString() );
tl::expected< T, ApiResponseStatus > HANDLER_RESULT
const std::tuple< int, int, int > & GetMajorMinorPatchTuple()
Get the build version numbers as a tuple.
wxString GetBuildVersion()
Get the full KiCad version string.
HANDLER_RESULT< commands::GetVersionResponse > handleGetVersion(commands::GetVersion &aMsg, const HANDLER_CONTEXT &aCtx)
HANDLER_RESULT< commands::NetClassesResponse > handleGetNetClasses(commands::GetNetClasses &aMsg, const HANDLER_CONTEXT &aCtx)
HANDLER_RESULT< Empty > handlePing(commands::Ping &aMsg, const HANDLER_CONTEXT &aCtx)
virtual SETTINGS_MANAGER & GetSettingsManager() const
std::shared_ptr< NET_SETTINGS > m_NetSettings
Net settings for this project (owned here)
virtual PROJECT_FILE & GetProjectFile() const
PROJECT & Prj() const
A helper while we are not MDI-capable – return the one and only project.
PGM_BASE & Pgm()
The global Program "get" accessor.