2023-01-29 13:06:05 -05:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2023 Jon Evans <jon@craftyjon.com>
|
2025-01-01 13:30:11 -08:00
|
|
|
* Copyright The KiCad Developers, see AUTHORS.txt for contributors.
|
2023-01-29 13:06:05 -05:00
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License as published by the
|
|
|
|
* Free Software Foundation, either version 3 of the License, or (at your
|
|
|
|
* option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef KICAD_API_HANDLER_COMMON_H
|
|
|
|
#define KICAD_API_HANDLER_COMMON_H
|
|
|
|
|
2024-01-20 18:35:29 -05:00
|
|
|
#include <google/protobuf/empty.pb.h>
|
|
|
|
|
2023-01-29 13:06:05 -05:00
|
|
|
#include <api/api_handler.h>
|
|
|
|
#include <api/common/commands/base_commands.pb.h>
|
2024-01-20 18:35:29 -05:00
|
|
|
#include <api/common/commands/project_commands.pb.h>
|
2023-01-29 13:06:05 -05:00
|
|
|
|
|
|
|
using namespace kiapi::common;
|
2024-01-20 18:35:29 -05:00
|
|
|
using google::protobuf::Empty;
|
2023-01-29 13:06:05 -05:00
|
|
|
|
2024-11-26 20:53:04 -05:00
|
|
|
class API_HANDLER_COMMON : public API_HANDLER
|
2023-01-29 13:06:05 -05:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
API_HANDLER_COMMON();
|
|
|
|
|
2024-11-26 20:53:04 -05:00
|
|
|
~API_HANDLER_COMMON() override {}
|
|
|
|
|
2023-01-29 13:06:05 -05:00
|
|
|
private:
|
2024-12-08 20:13:18 -05:00
|
|
|
HANDLER_RESULT<commands::GetVersionResponse> handleGetVersion(
|
|
|
|
const HANDLER_CONTEXT<commands::GetVersion>& aCtx );
|
2024-01-20 18:35:29 -05:00
|
|
|
|
2025-01-04 10:14:03 -05:00
|
|
|
HANDLER_RESULT<commands::PathResponse> handleGetKiCadBinaryPath(
|
|
|
|
const HANDLER_CONTEXT<commands::GetKiCadBinaryPath>& aCtx );
|
|
|
|
|
2024-12-08 20:13:18 -05:00
|
|
|
HANDLER_RESULT<commands::NetClassesResponse> handleGetNetClasses(
|
|
|
|
const HANDLER_CONTEXT<commands::GetNetClasses>& aCtx );
|
2024-01-20 18:35:29 -05:00
|
|
|
|
2024-12-30 23:29:13 -05:00
|
|
|
HANDLER_RESULT<Empty> handleSetNetClasses(
|
|
|
|
const HANDLER_CONTEXT<commands::SetNetClasses>& aCtx );
|
|
|
|
|
2024-12-08 20:13:18 -05:00
|
|
|
HANDLER_RESULT<Empty> handlePing( const HANDLER_CONTEXT<commands::Ping>& aCtx );
|
2024-11-26 20:53:04 -05:00
|
|
|
|
2024-12-08 20:13:18 -05:00
|
|
|
HANDLER_RESULT<types::Box2> handleGetTextExtents(
|
|
|
|
const HANDLER_CONTEXT<commands::GetTextExtents>& aCtx );
|
2024-11-26 20:53:04 -05:00
|
|
|
|
2024-12-08 20:13:18 -05:00
|
|
|
HANDLER_RESULT<commands::GetTextAsShapesResponse> handleGetTextAsShapes(
|
|
|
|
const HANDLER_CONTEXT<commands::GetTextAsShapes>& aCtx );
|
2024-11-28 19:21:18 -05:00
|
|
|
|
2024-12-08 20:13:18 -05:00
|
|
|
HANDLER_RESULT<commands::ExpandTextVariablesResponse> handleExpandTextVariables(
|
|
|
|
const HANDLER_CONTEXT<commands::ExpandTextVariables>& aCtx );
|
2024-12-28 16:20:49 -05:00
|
|
|
|
|
|
|
HANDLER_RESULT<commands::StringResponse> handleGetPluginSettingsPath(
|
|
|
|
const HANDLER_CONTEXT<commands::GetPluginSettingsPath>& aCtx );
|
2024-12-30 09:31:45 -05:00
|
|
|
|
|
|
|
HANDLER_RESULT<project::TextVariables> handleGetTextVariables(
|
|
|
|
const HANDLER_CONTEXT<commands::GetTextVariables>& aCtx );
|
|
|
|
|
|
|
|
HANDLER_RESULT<Empty> handleSetTextVariables(
|
|
|
|
const HANDLER_CONTEXT<commands::SetTextVariables>& aCtx );
|
2023-01-29 13:06:05 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif //KICAD_API_HANDLER_COMMON_H
|