2018-01-13 16:22:39 -05:00
|
|
|
// Copyright 2018 yuzu emulator team
|
2018-01-07 21:25:57 -05:00
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <memory>
|
2018-01-09 10:41:13 -05:00
|
|
|
#include <string>
|
2018-01-08 21:30:22 -05:00
|
|
|
#include "core/hle/service/nvdrv/nvdrv.h"
|
2018-01-09 10:41:13 -05:00
|
|
|
#include "core/hle/service/service.h"
|
2018-01-07 21:25:57 -05:00
|
|
|
|
|
|
|
namespace Service {
|
2018-01-15 17:39:00 -05:00
|
|
|
namespace Nvidia {
|
2018-01-09 10:41:13 -05:00
|
|
|
|
2018-01-15 18:30:49 -05:00
|
|
|
class NVDRV final : public ServiceFramework<NVDRV> {
|
2018-01-07 21:25:57 -05:00
|
|
|
public:
|
2018-01-15 18:30:49 -05:00
|
|
|
NVDRV(std::shared_ptr<Module> nvdrv, const char* name);
|
|
|
|
~NVDRV() = default;
|
2018-01-07 21:25:57 -05:00
|
|
|
|
|
|
|
private:
|
|
|
|
void Open(Kernel::HLERequestContext& ctx);
|
|
|
|
void Ioctl(Kernel::HLERequestContext& ctx);
|
2018-01-17 11:08:46 -05:00
|
|
|
void Close(Kernel::HLERequestContext& ctx);
|
2018-01-07 21:25:57 -05:00
|
|
|
void Initialize(Kernel::HLERequestContext& ctx);
|
2018-01-18 23:50:18 -05:00
|
|
|
void SetClientPID(Kernel::HLERequestContext& ctx);
|
2018-01-07 21:25:57 -05:00
|
|
|
|
2018-01-15 17:39:00 -05:00
|
|
|
std::shared_ptr<Module> nvdrv;
|
2018-01-21 17:59:50 -05:00
|
|
|
|
|
|
|
u64 pid{};
|
2018-01-07 21:25:57 -05:00
|
|
|
};
|
|
|
|
|
2018-01-15 17:39:00 -05:00
|
|
|
} // namespace Nvidia
|
2018-01-07 21:25:57 -05:00
|
|
|
} // namespace Service
|