Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restyle Cleanup Linux platform source includes #20363

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions examples/all-clusters-app/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ source_set("chip-all-clusters-common") {
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp",
"${chip_root}/src/platform/Linux/NetworkCommissioningDriver.h",
"${chip_root}/src/platform/Linux/NetworkCommissioningEthernetDriver.cpp",
"AppOptions.cpp",
"include/tv-callbacks.cpp",
"include/tv-callbacks.h",
Expand Down
2 changes: 2 additions & 0 deletions examples/all-clusters-minimal-app/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ source_set("chip-all-clusters-common") {
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp",
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp",
"${chip_root}/src/platform/Linux/NetworkCommissioningDriver.h",
"${chip_root}/src/platform/Linux/NetworkCommissioningEthernetDriver.cpp",
"AppOptions.cpp",
"include/tv-callbacks.cpp",
"include/tv-callbacks.h",
Expand Down
2 changes: 2 additions & 0 deletions examples/ota-requestor-app/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ executable("chip-ota-requestor-app") {
"${chip_root}/examples/platform/linux:app-main",
"${chip_root}/src/app/server",
"${chip_root}/src/lib",
"${chip_root}/src/platform/Linux/NetworkCommissioningDriver.h",
"${chip_root}/src/platform/Linux/NetworkCommissioningEthernetDriver.cpp",
]

cflags = [ "-Wconversion" ]
Expand Down
2 changes: 1 addition & 1 deletion src/include/platform/NetworkCommissioning.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class Iterator
struct Network
{
uint8_t networkID[kMaxNetworkIDLen];
uint8_t networkIDLen;
size_t networkIDLen;
bool connected;
};

Expand Down
31 changes: 18 additions & 13 deletions src/platform/Linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -68,30 +68,32 @@ static_library("Linux") {
"KeyValueStoreManagerImpl.cpp",
"KeyValueStoreManagerImpl.h",
"Logging.cpp",
"NetworkCommissioningDriver.h",
"NetworkCommissioningEthernetDriver.cpp",
"NetworkCommissioningWiFiDriver.cpp",
"PlatformManagerImpl.cpp",
"PlatformManagerImpl.h",
"PosixConfig.cpp",
"PosixConfig.h",
"SystemPlatformConfig.h",
"SystemTimeSupport.cpp",
"bluez/AdapterIterator.cpp",
"bluez/AdapterIterator.h",
"bluez/ChipDeviceScanner.cpp",
"bluez/ChipDeviceScanner.h",
"bluez/Helper.cpp",
"bluez/Helper.h",
"bluez/MainLoop.cpp",
"bluez/MainLoop.h",
"bluez/Types.h",
]

if (chip_enable_openthread) {
sources += [ "NetworkCommissioningThreadDriver.cpp" ]
}

if (chip_enable_ble) {
sources += [
"bluez/AdapterIterator.cpp",
"bluez/AdapterIterator.h",
"bluez/ChipDeviceScanner.cpp",
"bluez/ChipDeviceScanner.h",
"bluez/Helper.cpp",
"bluez/Helper.h",
"bluez/MainLoop.cpp",
"bluez/MainLoop.h",
"bluez/Types.h",
]
}

deps = [ "${chip_root}/src/setup_payload" ]

public_deps = [
Expand Down Expand Up @@ -135,7 +137,10 @@ static_library("Linux") {
}

if (chip_enable_wifi) {
sources += [ "GlibTypeDeleter.h" ]
sources += [
"GlibTypeDeleter.h",
"NetworkCommissioningWiFiDriver.cpp",
]

public_deps += [ "dbus/wpa" ]
}
Expand Down
4 changes: 2 additions & 2 deletions src/platform/Linux/NetworkCommissioningDriver.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ class LinuxEthernetDriver final : public EthernetDriver

// Public, but cannot be accessed via NetworkIterator interface.
uint8_t interfaceName[kMaxNetworkIDLen];
uint8_t interfaceNameLen = 0;
bool exhausted = false;
size_t interfaceNameLen = 0;
bool exhausted = false;
};

uint8_t GetMaxNetworks() override { return 1; };
Expand Down