blob: 6d6249a2e991d2282e6b6ce7fe359e4e84a8080b [file] [log] [blame]
// Copyright 2020 The Chromium OS 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 "typecd/partner.h"
#include <base/logging.h>
namespace typecd {
Partner::Partner(const base::FilePath& syspath) : syspath_(syspath) {}
void Partner::AddAltMode(int index, uint16_t svid, uint32_t vdo) {
alt_modes_.emplace(index, std::make_unique<AltMode>(svid, vdo));
}
AltMode* Partner::GetAltMode(int index) {
auto it = alt_modes_.find(index);
if (it != alt_modes_.end())
return it->second.get();
return nullptr;
}
void Partner::UpdateAltModesFromSysfs() {
NOTIMPLEMENTED();
}
} // namespace typecd