diff options
author | David Marcec <dmarcecguzman@gmail.com> | 2018-08-08 14:26:42 +0200 |
---|---|---|
committer | David Marcec <dmarcecguzman@gmail.com> | 2018-08-08 14:26:42 +0200 |
commit | 6f691e71bfa30de8789327a969cb7c2fdd1669f2 (patch) | |
tree | c48798f2d3fdde5b0ff5ab2dc6d2a4f6fdc9b5c8 /src/core/hle/service/acc/acc.h | |
parent | Switched uuids from u128 to new UUID struct (diff) | |
download | yuzu-6f691e71bfa30de8789327a969cb7c2fdd1669f2.tar yuzu-6f691e71bfa30de8789327a969cb7c2fdd1669f2.tar.gz yuzu-6f691e71bfa30de8789327a969cb7c2fdd1669f2.tar.bz2 yuzu-6f691e71bfa30de8789327a969cb7c2fdd1669f2.tar.lz yuzu-6f691e71bfa30de8789327a969cb7c2fdd1669f2.tar.xz yuzu-6f691e71bfa30de8789327a969cb7c2fdd1669f2.tar.zst yuzu-6f691e71bfa30de8789327a969cb7c2fdd1669f2.zip |
Diffstat (limited to 'src/core/hle/service/acc/acc.h')
-rw-r--r-- | src/core/hle/service/acc/acc.h | 41 |
1 files changed, 4 insertions, 37 deletions
diff --git a/src/core/hle/service/acc/acc.h b/src/core/hle/service/acc/acc.h index e392b3557..a9bea77ce 100644 --- a/src/core/hle/service/acc/acc.h +++ b/src/core/hle/service/acc/acc.h @@ -5,46 +5,10 @@ #pragma once #include "core/hle/service/service.h" +#include "profile_manager.h" namespace Service::Account { -struct UUID { - // UUIDs which are 0 are considered invalid! - u128 uuid{0, 0}; - UUID() = default; - explicit UUID(const u128& id) { - uuid[0] = id[0]; - uuid[1] = id[1]; - }; - explicit UUID(const u64& lo, const u64& hi) { - uuid[0] = lo; - uuid[1] = hi; - }; - operator bool() const { - return uuid[0] != 0x0 && uuid[1] != 0x0; - } - - bool operator==(const UUID& rhs) { - return uuid[0] == rhs.uuid[0] && uuid[1] == rhs.uuid[1]; - } - - bool operator!=(const UUID& rhs) { - return uuid[0] != rhs.uuid[0] || uuid[1] != rhs.uuid[1]; - } - - // TODO(ogniK): Properly generate uuids based on RFC-4122 - const UUID& Generate() { - uuid[0] = (static_cast<u64>(std::rand()) << 32) | std::rand(); - uuid[1] = (static_cast<u64>(std::rand()) << 32) | std::rand(); - return *this; - } - - std::string Format() { - return fmt::format("0x{:016X}{:016X}", uuid[1], uuid[0]); - } -}; -static_assert(sizeof(UUID) == 16, "UUID is an invalid size!"); - class Module final { public: class Interface : public ServiceFramework<Interface> { @@ -60,6 +24,9 @@ public: void InitializeApplicationInfo(Kernel::HLERequestContext& ctx); void GetBaasAccountManagerForApplication(Kernel::HLERequestContext& ctx); + private: + std::unique_ptr<ProfileManager> profile_manager{}; + protected: std::shared_ptr<Module> module; }; |