Skip to content

Commit 1b85e7f

Browse files
authored
Merge branch 'master' into master
2 parents ab9290d + 677a801 commit 1b85e7f

21 files changed

+407
-83
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,5 @@ if (BUILD_REFERENCE)
4848
endif()
4949

5050
add_subdirectory(interfaces)
51+
add_subdirectory(qa_interfaces)
5152
add_subdirectory(definitions)

definitions/CMakeLists.txt

Lines changed: 49 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -30,36 +30,60 @@ find_package(${NAMESPACE}Core REQUIRED)
3030
set(Target ${NAMESPACE}${PROJECT_NAME})
3131

3232
separate_arguments(JSONRPC_PATTERNS)
33-
list(TRANSFORM JSONRPC_PATTERNS PREPEND "${CMAKE_SOURCE_DIR}/jsonrpc/")
34-
file(GLOB JSON_FILE ${JSONRPC_PATTERNS})
33+
set(WORKING_VARIABLE ${JSONRPC_PATTERNS})
34+
list(TRANSFORM WORKING_VARIABLE PREPEND "${CMAKE_SOURCE_DIR}/jsonrpc/")
35+
file(GLOB JSON_FILE ${WORKING_VARIABLE})
36+
37+
separate_arguments(JSONRPC_PATTERNS)
38+
set(WORKING_VARIABLE ${JSONRPC_PATTERNS})
39+
list(TRANSFORM WORKING_VARIABLE PREPEND "${CMAKE_SOURCE_DIR}/qa_jsonrpc/")
40+
file(GLOB QA_JSON_FILE ${WORKING_VARIABLE})
3541

3642
separate_arguments(INTERFACES_PATTERNS)
37-
list(TRANSFORM INTERFACES_PATTERNS PREPEND "${CMAKE_SOURCE_DIR}/interfaces/")
38-
file(GLOB INTERFACE_FILE ${INTERFACES_PATTERNS})
43+
set(WORKING_VARIABLE ${INTERFACES_PATTERNS})
44+
list(TRANSFORM WORKING_VARIABLE PREPEND "${CMAKE_SOURCE_DIR}/interfaces/")
45+
file(GLOB INTERFACE_FILE ${WORKING_VARIABLE})
3946

40-
set(PUBLIC_HEADERS "definitions.h" "ValuePoint.h")
47+
separate_arguments(INTERFACES_PATTERNS)
48+
set(WORKING_VARIABLE ${INTERFACES_PATTERNS})
49+
list(TRANSFORM WORKING_VARIABLE PREPEND "${CMAKE_SOURCE_DIR}/qa_interfaces/")
50+
file(GLOB QA_INTERFACE_FILE ${WORKING_VARIABLE})
51+
52+
set(PUBLIC_HEADERS "definitions.h" "ValuePoint.h" "Module.h")
4153

4254
if(NOT GENERATOR_SEARCH_PATH)
43-
set(GENERATOR_SEARCH_PATH ${CMAKE_SYSROOT}${CMAKE_INSTALL_PREFIX}/include/${NAMESPACE})
55+
set(GENERATOR_SEARCH_PATH ${CMAKE_SYSROOT}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE})
4456
endif()
4557

4658
JsonGenerator(CODE INPUT ${JSON_FILE} OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/generated" INCLUDE_PATH ${GENERATOR_SEARCH_PATH} CPPIFDIR "${CMAKE_CURRENT_SOURCE_DIR}/../interfaces/")
59+
JsonGenerator(CODE INPUT ${QA_JSON_FILE} OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/qa_generated" INCLUDE_PATH ${GENERATOR_SEARCH_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../jsonrpc/" CPPIFDIR "${CMAKE_CURRENT_SOURCE_DIR}/../qa_interfaces/" IFDIR "${CMAKE_CURRENT_SOURCE_DIR}/../jsonrpc/" CPP_INTERFACE_PATH "qa_interfaces" JSON_INTERFACE_PATH "qa_interfaces/json")
4760
JsonGenerator(CODE INPUT ${INTERFACE_FILE} OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/generated" INCLUDE_PATH ${GENERATOR_SEARCH_PATH})
61+
JsonGenerator(CODE NAMESPACE WPEFramework::QualityAssurance INPUT ${QA_INTERFACE_FILE} OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/qa_generated" INCLUDE_PATH ${GENERATOR_SEARCH_PATH} CPP_INTERFACE_PATH "qa_interfaces" JSON_INTERFACE_PATH "qa_interfaces/json" )
4862

4963
file(GLOB JSON_ENUM_SOURCES "${CMAKE_CURRENT_BINARY_DIR}/generated/JsonEnum*.cpp")
5064
file(GLOB JSON_LINK_HEADERS "${CMAKE_CURRENT_BINARY_DIR}/generated/J*.h")
5165

66+
file(GLOB QA_JSON_ENUM_SOURCES "${CMAKE_CURRENT_BINARY_DIR}/qa_generated/JsonEnum*.cpp")
67+
file(GLOB QA_JSON_LINK_HEADERS "${CMAKE_CURRENT_BINARY_DIR}/qa_generated/J*.h")
68+
69+
list(APPEND JSON_LINK_HEADERS "Module.h")
70+
list(APPEND QA_JSON_LINK_HEADERS "Module.h")
71+
5272
include(CreateLink)
53-
CreateLink(LINK "${CMAKE_CURRENT_BINARY_DIR}/generated/Module.h" TARGET "../Module.h")
54-
list(APPEND JSON_LINK_HEADERS "${CMAKE_CURRENT_BINARY_DIR}/generated/Module.h")
55-
CreateLink(LINK "${CMAKE_CURRENT_BINARY_DIR}/generated/Ids.h" TARGET "../Ids.h")
56-
list(APPEND JSON_LINK_HEADERS "${CMAKE_CURRENT_BINARY_DIR}/generated/Ids.h")
57-
CreateLink(LINK "${CMAKE_CURRENT_BINARY_DIR}/Module.h" TARGET "../interfaces/Module.h")
58-
list(APPEND PUBLIC_HEADERS "${CMAKE_CURRENT_BINARY_DIR}/Module.h")
73+
#CreateLink(LINK "${CMAKE_CURRENT_BINARY_DIR}/generated/Module.h" TARGET "../Module.h")
74+
#list(APPEND JSON_LINK_HEADERS "${CMAKE_CURRENT_BINARY_DIR}/generated/Module.h")
75+
#CreateLink(LINK "${CMAKE_CURRENT_BINARY_DIR}/generated/Ids.h" TARGET "../Ids.h")
76+
#list(APPEND JSON_LINK_HEADERS "${CMAKE_CURRENT_BINARY_DIR}/generated/Ids.h")
77+
#CreateLink(LINK "${CMAKE_CURRENT_BINARY_DIR}/Module.h" TARGET "../interfaces/Module.h")
78+
#list(APPEND PUBLIC_HEADERS "${CMAKE_CURRENT_BINARY_DIR}/Module.h")
79+
#CreateLink(LINK "${CMAKE_CURRENT_BINARY_DIR}/qa_generated/QAIds.h" TARGET "../QAIds.h")
80+
#list(APPEND JSON_LINK_HEADERS "${CMAKE_CURRENT_BINARY_DIR}/qa_generated/QAIds.h")
5981

6082
add_library(${Target} SHARED
6183
Definitions.cpp
84+
Module.cpp
6285
${JSON_ENUM_SOURCES}
86+
${QA_JSON_ENUM_SOURCES}
6387
)
6488

6589
target_link_libraries(${Target}
@@ -81,22 +105,27 @@ target_include_directories(${Target}
81105
PRIVATE
82106
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
83107
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
84-
$<INSTALL_INTERFACE:include/${NAMESPACE}>
108+
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE}>
85109
)
86110

87111
install(
88112
TARGETS ${Target} EXPORT ${Target}Targets # for downstream dependencies
89-
ARCHIVE DESTINATION lib/ COMPONENT libs # static lib
90-
LIBRARY DESTINATION lib/ COMPONENT libs # shared lib
91-
RUNTIME DESTINATION bin COMPONENT libs # binaries
92-
FRAMEWORK DESTINATION bin/ COMPONENT libs # for mac
93-
PUBLIC_HEADER DESTINATION include/${NAMESPACE}/definitions COMPONENT devel # headers for mac (note the different component -> different package)
94-
INCLUDES DESTINATION include/${NAMESPACE} # default include path
113+
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/ COMPONENT libs # static lib
114+
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/ COMPONENT libs # shared lib
115+
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT libs # binaries
116+
FRAMEWORK DESTINATION ${CMAKE_INSTALL_BINDIR}/ COMPONENT libs # for mac
117+
PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE}/definitions COMPONENT devel # headers for mac (note the different component -> different package)
118+
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE} # default include path
95119
)
96120

97121
install(
98122
FILES ${JSON_LINK_HEADERS}
99-
DESTINATION include/${NAMESPACE}/interfaces/json
123+
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE}/interfaces/json
124+
)
125+
126+
install(
127+
FILES ${QA_JSON_LINK_HEADERS}
128+
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE}/qa_interfaces/json
100129
)
101130

102131
InstallPackageConfig(

definitions/Definitions.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,7 @@
7979
#include <interfaces/IStoreCache.h>
8080
#include <interfaces/ISwitchBoard.h>
8181
#include <interfaces/ISystemCommands.h>
82-
#include <interfaces/ITestController.h>
8382
#include <interfaces/ITextToSpeech.h>
84-
#include <interfaces/ITestUtility.h>
8583
#include <interfaces/ITimeSync.h>
8684
#include <interfaces/ITimeZone.h>
8785
#include <interfaces/IVoiceHandler.h>
@@ -94,9 +92,11 @@
9492
#include <interfaces/IWatchDog.h>
9593
#include <interfaces/IZigWave.h>
9694
#include "ValuePoint.h"
97-
#endif
9895

99-
MODULE_NAME_DECLARATION(BUILD_REFERENCE)
96+
#include <qa_interfaces/ITestUtility.h>
97+
#include <qa_interfaces/ITestController.h>
98+
#include <qa_interfaces/ITestAutomation.h>
99+
#endif
100100

101101
namespace WPEFramework {
102102

definitions/Definitions.vcxproj

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@
6363
<ClCompile Include="..\interfaces\json\JsonEnum_Streamer.cpp" />
6464
<ClCompile Include="..\interfaces\json\JsonEnum_SubsystemControl.cpp" />
6565
<ClCompile Include="..\interfaces\json\JsonEnum_SystemCommands.cpp" />
66-
<ClCompile Include="..\interfaces\json\JsonEnum_TestController.cpp" />
67-
<ClCompile Include="..\interfaces\json\JsonEnum_TestUtility.cpp" />
6866
<ClCompile Include="..\interfaces\json\JsonEnum_TimeSync.cpp" />
6967
<ClCompile Include="..\interfaces\json\JsonEnum_TimeZone.cpp" />
7068
<ClCompile Include="..\interfaces\json\JsonEnum_TraceControl.cpp" />
@@ -290,12 +288,6 @@
290288
<CustomBuild Include="..\jsonrpc\SystemCommands.json">
291289
<FileType>Document</FileType>
292290
</CustomBuild>
293-
<CustomBuild Include="..\jsonrpc\TestController.json">
294-
<FileType>Document</FileType>
295-
</CustomBuild>
296-
<CustomBuild Include="..\jsonrpc\TestUtility.json">
297-
<FileType>Document</FileType>
298-
</CustomBuild>
299291
<CustomBuild Include="..\jsonrpc\TimeSync.json">
300292
<FileType>Document</FileType>
301293
</CustomBuild>
@@ -612,4 +604,4 @@
612604
<UserProperties _1_1_4jsonrpc_4Butler_1json__JsonSchema="&quot;" />
613605
</VisualStudio>
614606
</ProjectExtensions>
615-
</Project>
607+
</Project>

definitions/Definitions.vcxproj.filters

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,6 @@
153153
<ClCompile Include="..\interfaces\json\JsonEnum_SystemCommands.cpp">
154154
<Filter>Generated Files</Filter>
155155
</ClCompile>
156-
<ClCompile Include="..\interfaces\json\JsonEnum_TestController.cpp">
157-
<Filter>Generated Files</Filter>
158-
</ClCompile>
159-
<ClCompile Include="..\interfaces\json\JsonEnum_TestUtility.cpp">
160-
<Filter>Generated Files</Filter>
161-
</ClCompile>
162156
<ClCompile Include="..\interfaces\json\JsonEnum_TimeSync.cpp">
163157
<Filter>Generated Files</Filter>
164158
</ClCompile>
@@ -300,12 +294,6 @@
300294
<CustomBuild Include="..\jsonrpc\SystemCommands.json">
301295
<Filter>Contracts</Filter>
302296
</CustomBuild>
303-
<CustomBuild Include="..\jsonrpc\TestController.json">
304-
<Filter>Contracts</Filter>
305-
</CustomBuild>
306-
<CustomBuild Include="..\jsonrpc\TestUtility.json">
307-
<Filter>Contracts</Filter>
308-
</CustomBuild>
309297
<CustomBuild Include="..\jsonrpc\TimeSync.json">
310298
<Filter>Contracts</Filter>
311299
</CustomBuild>
@@ -349,4 +337,4 @@
349337
<Filter>Interfaces</Filter>
350338
</CustomBuild>
351339
</ItemGroup>
352-
</Project>
340+
</Project>

definitions/Module.cpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* If not stated otherwise in this file or this component's LICENSE file the
3+
* following copyright and licenses apply:
4+
*
5+
* Copyright 2020 Metrological
6+
*
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
*/
19+
20+
#include "Module.h"
21+
22+
MODULE_NAME_DECLARATION(BUILD_REFERENCE)

definitions/Module.h

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* If not stated otherwise in this file or this component's LICENSE file the
3+
* following copyright and licenses apply:
4+
*
5+
* Copyright 2020 Metrological
6+
*
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
*/
19+
20+
#pragma once
21+
22+
#ifndef MODULE_NAME
23+
#define MODULE_NAME Definitions
24+
#endif
25+
26+
#include <core/core.h>
27+

definitions/definitions.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,8 @@
1919

2020
#pragma once
2121

22-
#ifndef MODULE_NAME
23-
#define MODULE_NAME Definitions
24-
#endif
22+
#include "Module.h"
2523

26-
#include <core/core.h>
2724
#include <messaging/messaging.h>
2825
#include <com/com.h>
2926

interfaces/CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ find_package(${NAMESPACE}COM REQUIRED)
3131
set(Target ${NAMESPACE}${PROJECT_NAME})
3232

3333
if(NOT GENERATOR_SEARCH_PATH)
34-
set(GENERATOR_SEARCH_PATH ${CMAKE_SYSROOT}${CMAKE_INSTALL_PREFIX}/include/${NAMESPACE})
34+
set(GENERATOR_SEARCH_PATH ${CMAKE_SYSROOT}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE})
3535
endif()
3636

3737
separate_arguments(INTERFACES_PATTERNS)
@@ -69,24 +69,24 @@ string(TOLOWER ${NAMESPACE} NAMESPACE_LIB)
6969

7070
install(
7171
TARGETS ${Target} EXPORT ${Target}Targets # for downstream dependencies
72-
LIBRARY DESTINATION lib/${NAMESPACE_LIB}/proxystubs COMPONENT libs # shared lib
72+
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/${NAMESPACE_LIB}/proxystubs COMPONENT libs # shared lib
7373
)
7474

7575
install(
7676
FILES ${INTERFACES_HEADERS}
77-
DESTINATION include/${NAMESPACE}/interfaces
77+
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE}/interfaces
7878
)
7979

8080
install(
8181
FILES ${JSON_HEADERS}
82-
DESTINATION include/${NAMESPACE}/interfaces/json
82+
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE}/interfaces/json
8383
)
8484

8585
include(CreateLink)
8686

8787
CreateLink(
88-
LINK "${CMAKE_SYSROOT}${CMAKE_INSTALL_PREFIX}/include/cdmi.h"
89-
TARGET "${CMAKE_SYSROOT}${CMAKE_INSTALL_PREFIX}/include/${NAMESPACE}/interfaces/IDRM.h"
88+
LINK "${CMAKE_SYSROOT}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/cdmi.h"
89+
TARGET "${CMAKE_SYSROOT}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/${NAMESPACE}/interfaces/IDRM.h"
9090
)
9191

9292

interfaces/Ids.h

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -156,16 +156,6 @@ namespace Exchange {
156156
ID_PACKAGER_PACKAGEINFOEX = RPC::IDS::ID_EXTERNAL_INTERFACE_OFFSET + 0x1C0,
157157
ID_PACKAGER_PACKAGEINFOEX_ITERATOR = ID_PACKAGER_PACKAGEINFOEX + 1,
158158

159-
ID_TESTCONTROLLER = RPC::IDS::ID_EXTERNAL_INTERFACE_OFFSET + 0x1D0,
160-
ID_TESTCONTROLLER_TEST = ID_TESTCONTROLLER + 1,
161-
ID_TESTCONTROLLER_TEST_ITERATOR = ID_TESTCONTROLLER + 2,
162-
ID_TESTCONTROLLER_CATEGORY = ID_TESTCONTROLLER + 3,
163-
ID_TESTCONTROLLER_CATEGORY_ITERATOR = ID_TESTCONTROLLER + 4,
164-
165-
ID_TESTUTILITY = RPC::IDS::ID_EXTERNAL_INTERFACE_OFFSET + 0x1E0,
166-
ID_TESTUTILITY_COMMAND = ID_TESTUTILITY + 1,
167-
ID_TESTUTILITY_ITERATOR = ID_TESTUTILITY + 2,
168-
169159
ID_COMPOSITION = RPC::IDS::ID_EXTERNAL_INTERFACE_OFFSET + 0x1F0,
170160
ID_COMPOSITION_CLIENT = ID_COMPOSITION + 1,
171161
ID_COMPOSITION_RENDER = ID_COMPOSITION + 2,
@@ -379,8 +369,12 @@ namespace Exchange {
379369
ID_DNS_SERVER = RPC::IDS::ID_EXTERNAL_INTERFACE_OFFSET + 0x4E0,
380370
ID_DNS_ZONE = ID_DNS_SERVER + 1,
381371
ID_DNS_RECORD = ID_DNS_SERVER + 2,
372+
373+
ID_TESTAUTOMATIONMEMORY = RPC::IDS::ID_EXTERNAL_INTERFACE_OFFSET + 0x4F0,
374+
ID_TESTAUTOMATIONCOMRPC = ID_TESTAUTOMATIONMEMORY + 1,
375+
ID_TESTAUTOMATIONCOMRPCINTERNAL = ID_TESTAUTOMATIONMEMORY + 2,
382376

383-
ID_USER_SETTINGS = RPC::IDS::ID_EXTERNAL_INTERFACE_OFFSET + 0x4F0,
377+
ID_USER_SETTINGS = RPC::IDS::ID_EXTERNAL_INTERFACE_OFFSET + 0x500,
384378
ID_USER_SETTINGS_NOTIFICATION = ID_USER_SETTINGS + 1
385379
};
386380
}

0 commit comments

Comments
 (0)