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