/* * Copyright (c) 2018-2019 Atmosphère-NX * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #pragma once #include #include namespace ams::util { struct Uuid { u8 uuid[0x10]; bool operator==(const Uuid& other) const { return memcmp(this->uuid, other.uuid, sizeof(Uuid)) == 0; } bool operator!=(const Uuid& other) const { return !(*this == other); } u8& operator[](size_t i) { return uuid[i]; } }; static_assert(sizeof(Uuid) == 0x10, "Uuid definition!"); static constexpr Uuid InvalidUuid = { { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } }; }