summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/k_light_client_session.h
blob: 881a15cbda48d231e6b4b4a5cfbe1cec5083cb0c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include "core/hle/kernel/k_auto_object.h"
#include "core/hle/result.h"

namespace Kernel {

class KLightSession;

class KLightClientSession final : public KAutoObject {
    KERNEL_AUTOOBJECT_TRAITS(KLightClientSession, KAutoObject);

public:
    explicit KLightClientSession(KernelCore& kernel);
    ~KLightClientSession();

    void Initialize(KLightSession* parent) {
        // Set member variables.
        m_parent = parent;
    }

    virtual void Destroy() override;

    const KLightSession* GetParent() const {
        return m_parent;
    }

    Result SendSyncRequest(u32* data);

    void OnServerClosed();

private:
    KLightSession* m_parent;
};

} // namespace Kernel