-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add RequestDevices to FirmwareUpdateManager.
This function requests the list of currently connected devices from the fwupd DBus client. Bug: 1252981 Test: ash_unittests Change-Id: I16d9b2f47595fce76c82ec35fe686a322b77b913 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3234593 Commit-Queue: Anton Swifton <swifton@google.com> Reviewed-by: Jimmy Gong <jimmyxgong@chromium.org> Cr-Commit-Position: refs/heads/main@{#935320}
- Loading branch information
Anton Swifton
authored and
Chromium LUCI CQ
committed
Oct 27, 2021
1 parent
9adf8fc
commit 6e4379b
Showing
11 changed files
with
171 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright 2021 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "chromeos/dbus/fwupd/fwupd_device.h" | ||
|
||
namespace chromeos { | ||
|
||
FwupdDevice::FwupdDevice() = default; | ||
|
||
FwupdDevice::FwupdDevice(const std::string& id, | ||
const std::u16string& device_name) | ||
: id(id), device_name(device_name) {} | ||
|
||
FwupdDevice::FwupdDevice(const FwupdDevice& other) = default; | ||
|
||
FwupdDevice::~FwupdDevice() = default; | ||
|
||
} // namespace chromeos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Copyright 2021 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef CHROMEOS_DBUS_FWUPD_FWUPD_DEVICE_H_ | ||
#define CHROMEOS_DBUS_FWUPD_FWUPD_DEVICE_H_ | ||
|
||
#include <string> | ||
|
||
#include "base/component_export.h" | ||
|
||
namespace chromeos { | ||
|
||
// Structure to hold FwupdDevice data received from fwupd. | ||
struct COMPONENT_EXPORT(CHROMEOS_DBUS_FWUPD) FwupdDevice { | ||
FwupdDevice(); | ||
FwupdDevice(const std::string& id, const std::u16string& device_name); | ||
FwupdDevice(const FwupdDevice& other); | ||
~FwupdDevice(); | ||
|
||
std::string id; | ||
std::u16string device_name; | ||
}; | ||
|
||
typedef std::vector<FwupdDevice> FwupdDeviceList; | ||
|
||
} // namespace chromeos | ||
|
||
#endif // CHROMEOS_DBUS_FWUPD_FWUPD_DEVICE_H_ |