Skip to content

Commit

Permalink
Move OnboardingCodesUtil
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Gielniewski <[email protected]>
  • Loading branch information
adigie committed Feb 5, 2025
1 parent 9ef7896 commit 173c56a
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/app/chip_data_model.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ function(chip_configure_data_model APP_TARGET)
${CHIP_APP_BASE_DIR}/server/DefaultTermsAndConditionsProvider.cpp
${CHIP_APP_BASE_DIR}/server/Dnssd.cpp
${CHIP_APP_BASE_DIR}/server/EchoHandler.cpp
${CHIP_APP_BASE_DIR}/server/OnboardingCodesUtil.cpp
${CHIP_APP_BASE_DIR}/server/Server.cpp
)

Expand Down
29 changes: 29 additions & 0 deletions src/app/onboarding-codes-utils/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright (c) 2020 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import("//build_overrides/chip.gni")
import("${chip_root}/src/app/common_flags.gni")

source_set("onboarding-codes-utils") {
sources = [
"OnboardingCodesUtil.cpp",
"OnboardingCodesUtil.h",
]

deps = [
"${chip_root}/src/platform",
"${chip_root}/src/setup_payload",
]
public_configs = [ "${chip_root}/src:includes" ]
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* limitations under the License.
*/

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

#include <algorithm>
#include <inttypes.h>
Expand Down
File renamed without changes.
3 changes: 0 additions & 3 deletions src/app/server/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ static_library("server") {
"Dnssd.h",
"EchoHandler.cpp",
"EchoHandler.h",
"OnboardingCodesUtil.cpp",
"OnboardingCodesUtil.h",
"Server.cpp",
"Server.h",
]
Expand All @@ -81,7 +79,6 @@ static_library("server") {
"${chip_root}/src/messaging",
"${chip_root}/src/platform",
"${chip_root}/src/protocols",
"${chip_root}/src/setup_payload",
"${chip_root}/src/transport",
]

Expand Down
1 change: 1 addition & 0 deletions src/lib/shell/commands/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ source_set("commands") {

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

cflags = [ "-Wconversion" ]
Expand Down
2 changes: 1 addition & 1 deletion src/lib/shell/commands/NFC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#if CONFIG_DEVICE_LAYER
#include <platform/CHIPDeviceLayer.h>
#endif
#include <app/server/OnboardingCodesUtil.h>
#include <app/onboarding-codes-utils/OnboardingCodesUtil.h>
#include <lib/shell/Engine.h>
#include <lib/support/CodeUtils.h>

Expand Down
2 changes: 1 addition & 1 deletion src/lib/shell/commands/OnboardingCodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

#include <app/server/OnboardingCodesUtil.h>
#include <app/onboarding-codes-utils/OnboardingCodesUtil.h>
#include <inttypes.h>
#include <lib/core/CHIPCore.h>
#include <lib/shell/Commands.h>
Expand Down

0 comments on commit 173c56a

Please sign in to comment.