|
|
|
@ -90,6 +90,7 @@ API_HANDLER_PCB::API_HANDLER_PCB( PCB_EDIT_FRAME* aFrame ) : |
|
|
|
&API_HANDLER_PCB::handleExpandTextVariables ); |
|
|
|
registerHandler<GetBoardOrigin, types::Vector2>( &API_HANDLER_PCB::handleGetBoardOrigin ); |
|
|
|
registerHandler<SetBoardOrigin, Empty>( &API_HANDLER_PCB::handleSetBoardOrigin ); |
|
|
|
registerHandler<GetBoardLayerName, BoardLayerNameResponse>( &API_HANDLER_PCB::handleGetBoardLayerName ); |
|
|
|
|
|
|
|
registerHandler<InteractiveMoveItems, Empty>( &API_HANDLER_PCB::handleInteractiveMoveItems ); |
|
|
|
registerHandler<GetNets, NetsResponse>( &API_HANDLER_PCB::handleGetNets ); |
|
|
|
@ -1099,6 +1100,25 @@ HANDLER_RESULT<Empty> API_HANDLER_PCB::handleSetBoardOrigin( |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
HANDLER_RESULT<BoardLayerNameResponse> API_HANDLER_PCB::handleGetBoardLayerName( |
|
|
|
const HANDLER_CONTEXT<GetBoardLayerName>& aCtx ) |
|
|
|
{ |
|
|
|
if( HANDLER_RESULT<bool> documentValidation = validateDocument( aCtx.Request.board() ); |
|
|
|
!documentValidation ) |
|
|
|
{ |
|
|
|
return tl::unexpected( documentValidation.error() ); |
|
|
|
} |
|
|
|
|
|
|
|
BoardLayerNameResponse response; |
|
|
|
|
|
|
|
PCB_LAYER_ID id = FromProtoEnum<PCB_LAYER_ID>( aCtx.Request.layer() ); |
|
|
|
|
|
|
|
response.set_name( frame()->GetBoard()->GetLayerName( id ) ); |
|
|
|
|
|
|
|
return response; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
HANDLER_RESULT<GetBoundingBoxResponse> API_HANDLER_PCB::handleGetBoundingBox( |
|
|
|
const HANDLER_CONTEXT<GetBoundingBox>& aCtx ) |
|
|
|
{ |
|
|
|
|