mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-14 19:06:55 +02:00
Instead, let's create a new class called InstalledPortDatabase that will handle reading, and adding new entries as needed to such database.
18 lines
424 B
C++
18 lines
424 B
C++
/*
|
|
* Copyright (c) 2023-2024, Liav A. <liavalb@hotmail.co.il>
|
|
* Copyright (c) 2023, kleines Filmröllchen <filmroellchen@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include "InstalledPort.h"
|
|
|
|
Optional<InstalledPort::Type> InstalledPort::type_from_string(StringView type)
|
|
{
|
|
if (type == "auto"sv)
|
|
return Type::Auto;
|
|
if (type == "manual"sv)
|
|
return Type::Manual;
|
|
return {};
|
|
}
|