util::string_view, update pgl for new sf semantics

This commit is contained in:
Michael Scire 2021-01-18 05:20:27 -08:00 committed by SciresM
parent 83c04fa5d7
commit 3bb94aa146
13 changed files with 448 additions and 70 deletions

View file

@ -20,6 +20,6 @@
namespace ams::pgl::srv {
void Initialize(ShellInterface *interface, MemoryResource *mr);
void Initialize();
}

View file

@ -20,18 +20,16 @@
namespace ams::pgl::srv {
class ShellInterface final {
class ShellInterface {
NON_COPYABLE(ShellInterface);
NON_MOVEABLE(ShellInterface);
private:
MemoryResource *memory_resource;
using Allocator = ams::sf::ExpHeapAllocator;
using ObjectFactory = ams::sf::ObjectFactory<ams::sf::ExpHeapAllocator::Policy>;
private:
Allocator *m_allocator;
public:
constexpr ShellInterface() : memory_resource(nullptr) { /* ... */ }
void Initialize(MemoryResource *mr) {
AMS_ASSERT(this->memory_resource == nullptr);
this->memory_resource = mr;
}
constexpr ShellInterface(Allocator *a) : m_allocator(a) { /* ... */ }
public:
/* Interface commands. */
Result LaunchProgram(ams::sf::Out<os::ProcessId> out, const ncm::ProgramLocation &loc, u32 pm_flags, u8 pgl_flags);