Skip to content

Commit ffa6e92

Browse files
authored
[json-rpc] Fetch RpcInterface.h from csolution-rpc repository
1 parent f1e5df6 commit ffa6e92

File tree

6 files changed

+80
-333
lines changed

6 files changed

+80
-333
lines changed

tools/projmgr/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
templates/debug-adapters.yml

tools/projmgr/CMakeLists.txt

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ file(DOWNLOAD
1212
${CMAKE_CURRENT_SOURCE_DIR}/templates/debug-adapters.yml
1313
)
1414

15+
# rpc interface
16+
include(FetchContent)
17+
FetchContent_Declare(
18+
rpc-interface
19+
URL https://github.com/Open-CMSIS-Pack/csolution-rpc/releases/download/v0.0.1/csolution-rpc.zip
20+
URL_HASH SHA256=e5e6528ace7cf9b31a24ef268f9d86a9810d3a84c0e4e166dfe2c745e734524a
21+
)
22+
FetchContent_MakeAvailable(rpc-interface)
23+
1524
set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT projmgr)
1625

1726
# projmgr library
@@ -30,13 +39,16 @@ SET(PROJMGR_HEADER_FILES ProjMgr.h ProjMgrKernel.h ProjMgrCallback.h
3039
ProjMgrYamlEmitter.h ProjMgrUtils.h ProjMgrExtGenerator.h
3140
ProjMgrCbuildBase.h ProjMgrRunDebug.h
3241
ProjMgrRpcServer.h ProjMgrRpcServerData.h
33-
RpcInterface.h
3442
)
3543

3644
list(TRANSFORM PROJMGR_SOURCE_FILES PREPEND src/)
3745
list(TRANSFORM PROJMGR_HEADER_FILES PREPEND include/)
3846

39-
add_library(projmgrlib OBJECT ${PROJMGR_SOURCE_FILES} ${PROJMGR_HEADER_FILES})
47+
add_library(projmgrlib OBJECT
48+
${PROJMGR_SOURCE_FILES}
49+
${PROJMGR_HEADER_FILES}
50+
${rpc-interface_SOURCE_DIR}/RpcInterface.h
51+
)
4052
target_link_libraries(projmgrlib
4153
PUBLIC
4254
CrossPlatform RteFsUtils RteUtils XmlTree XmlTreeSlim XmlReader
@@ -45,6 +57,7 @@ target_link_libraries(projmgrlib
4557
target_include_directories(projmgrlib PUBLIC include ${PROJECT_BINARY_DIR}
4658
${CMAKE_SOURCE_DIR}/external/json
4759
${CMAKE_SOURCE_DIR}/external/json-rpc-cxx/include
60+
${rpc-interface_SOURCE_DIR}
4861
)
4962

5063
if(SWIG_LIBS)

tools/projmgr/include/ProjMgrRpcServerData.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#ifndef PROJMGRRPCSERVERDATA_H
77
#define PROJMGRRPCSERVERDATA_H
88

9-
#include <RpcInterface.h>
9+
#include "RpcInterface.h"
1010

1111
using namespace std;
1212

@@ -23,19 +23,19 @@ class RpcDataCollector {
2323

2424
RteTarget* GetTarget() const { return m_target; }
2525

26-
void CollectCtClasses(Args::CtRoot& ctRoot) const;
27-
void CollectUsedItems(Args::UsedItems& usedItems) const;
26+
void CollectCtClasses(RpcArgs::CtRoot& ctRoot) const;
27+
void CollectUsedItems(RpcArgs::UsedItems& usedItems) const;
2828

29-
Args::Component FromRteComponent(const RteComponent* rteComponent) const;
30-
Args::ComponentInstance FromComponentInstance(const RteComponentInstance* rteCi) const;
29+
RpcArgs::Component FromRteComponent(const RteComponent* rteComponent) const;
30+
RpcArgs::ComponentInstance FromComponentInstance(const RteComponentInstance* rteCi) const;
3131
RteItem* GetTaxonomyItem(const RteComponentGroup* rteGroup) const;
3232

3333
protected:
3434

35-
void CollectCtBundles(Args::CtClass& ctClass, RteComponentGroup* rteClass) const;
36-
void CollectCtChildren(Args::CtTreeItem& parent, RteComponentGroup* rteGroup, const string& bundleName) const;
37-
void CollectCtAggregates(Args::CtTreeItem& parent, RteComponentGroup* rteGroup, const string& bundleName) const;
38-
void CollectCtVariants(Args::CtAggregate& ctAggregate, RteComponentAggregate* rteAggregate) const;
35+
void CollectCtBundles(RpcArgs::CtClass& ctClass, RteComponentGroup* rteClass) const;
36+
void CollectCtChildren(RpcArgs::CtTreeItem& parent, RteComponentGroup* rteGroup, const string& bundleName) const;
37+
void CollectCtAggregates(RpcArgs::CtTreeItem& parent, RteComponentGroup* rteGroup, const string& bundleName) const;
38+
void CollectCtVariants(RpcArgs::CtAggregate& ctAggregate, RteComponentAggregate* rteAggregate) const;
3939

4040
private:
4141
RteTarget* m_target;

tools/projmgr/include/RpcInterface.h

Lines changed: 0 additions & 266 deletions
This file was deleted.

0 commit comments

Comments
 (0)