diff options
Diffstat (limited to 'src/core/hle/kernel/domain.h')
-rw-r--r-- | src/core/hle/kernel/domain.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/core/hle/kernel/domain.h b/src/core/hle/kernel/domain.h new file mode 100644 index 000000000..74f7ad0dd --- /dev/null +++ b/src/core/hle/kernel/domain.h @@ -0,0 +1,45 @@ +// Copyright 2017 Citra Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include <memory> +#include <string> +#include <vector> +#include "core/hle/kernel/sync_object.h" +#include "core/hle/result.h" + +namespace Kernel { + +class Session; +class SessionRequestHandler; + +class Domain final : public SyncObject { +public: + std::string GetTypeName() const override { + return "Domain"; + } + + static const HandleType HANDLE_TYPE = HandleType::Domain; + HandleType GetHandleType() const override { + return HANDLE_TYPE; + } + + static ResultVal<SharedPtr<Domain>> CreateFromSession(const Session& server); + + ResultCode SendSyncRequest(SharedPtr<Thread> thread) override; + + /// The name of this domain (optional) + std::string name; + + std::vector<std::shared_ptr<SessionRequestHandler>> request_handlers; + +private: + Domain() = default; + ~Domain() override = default; + + static ResultVal<SharedPtr<Domain>> Create(std::string name = "Unknown"); +}; + +} // namespace Kernel |