Skip to content

Commit cbb8887

Browse files
committed
Move OnboardingCodesUtil
Signed-off-by: Adrian Gielniewski <adrian.gielniewski@gmail.com>
1 parent 9ef7896 commit cbb8887

File tree

8 files changed

+34
-7
lines changed

8 files changed

+34
-7
lines changed

src/app/chip_data_model.cmake

-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ function(chip_configure_data_model APP_TARGET)
8686
${CHIP_APP_BASE_DIR}/server/DefaultTermsAndConditionsProvider.cpp
8787
${CHIP_APP_BASE_DIR}/server/Dnssd.cpp
8888
${CHIP_APP_BASE_DIR}/server/EchoHandler.cpp
89-
${CHIP_APP_BASE_DIR}/server/OnboardingCodesUtil.cpp
9089
${CHIP_APP_BASE_DIR}/server/Server.cpp
9190
)
9291

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Copyright (c) 2020 Project CHIP Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
import("//build_overrides/chip.gni")
16+
import("${chip_root}/src/app/common_flags.gni")
17+
18+
source_set("onboarding-codes-utils") {
19+
sources = [
20+
"OnboardingCodesUtil.cpp",
21+
"OnboardingCodesUtil.h",
22+
]
23+
24+
deps = [
25+
"${chip_root}/src/setup_payload",
26+
"${chip_root}/src/platform",
27+
]
28+
public_configs = [ "${chip_root}/src:includes" ]
29+
}
30+

src/app/server/OnboardingCodesUtil.cpp src/app/onboarding-codes-utils/OnboardingCodesUtil.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* limitations under the License.
1717
*/
1818

19-
#include <app/server/OnboardingCodesUtil.h>
19+
#include <app/onboarding-codes-utils/OnboardingCodesUtil.h>
2020

2121
#include <algorithm>
2222
#include <inttypes.h>

src/app/server/BUILD.gn

-3
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ static_library("server") {
5757
"Dnssd.h",
5858
"EchoHandler.cpp",
5959
"EchoHandler.h",
60-
"OnboardingCodesUtil.cpp",
61-
"OnboardingCodesUtil.h",
6260
"Server.cpp",
6361
"Server.h",
6462
]
@@ -81,7 +79,6 @@ static_library("server") {
8179
"${chip_root}/src/messaging",
8280
"${chip_root}/src/platform",
8381
"${chip_root}/src/protocols",
84-
"${chip_root}/src/setup_payload",
8582
"${chip_root}/src/transport",
8683
]
8784

src/lib/shell/commands/BUILD.gn

+1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ source_set("commands") {
6666

6767
if (chip_device_platform != "none") {
6868
public_deps += [ "${chip_root}/src/app/server" ]
69+
public_deps += [ "${chip_root}/src/app/onboarding-codes-utils" ]
6970
}
7071

7172
cflags = [ "-Wconversion" ]

src/lib/shell/commands/NFC.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#if CONFIG_DEVICE_LAYER
2121
#include <platform/CHIPDeviceLayer.h>
2222
#endif
23-
#include <app/server/OnboardingCodesUtil.h>
23+
#include <app/onboarding-codes-utils/OnboardingCodesUtil.h>
2424
#include <lib/shell/Engine.h>
2525
#include <lib/support/CodeUtils.h>
2626

src/lib/shell/commands/OnboardingCodes.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
#include <app/server/OnboardingCodesUtil.h>
18+
#include <app/onboarding-codes-utils/OnboardingCodesUtil.h>
1919
#include <inttypes.h>
2020
#include <lib/core/CHIPCore.h>
2121
#include <lib/shell/Commands.h>

0 commit comments

Comments
 (0)