Files
serenity/Userland/Utilities/pkg/InstalledPort.cpp
Liav A. 1e13d758a2 Utilities/pkg: Move ports database handling from InstalledPort{.h,.cpp}
Instead, let's create a new class called InstalledPortDatabase that will
handle reading, and adding new entries as needed to such database.
2024-06-23 00:59:54 +02:00

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 {};
}