2014-04-16 03:28:03 +00:00
|
|
|
// Copyright 2014 Citra Emulator Project
|
2014-12-17 05:38:14 +00:00
|
|
|
// Licensed under GPLv2 or any later version
|
2014-04-16 03:28:03 +00:00
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
2016-12-15 20:40:51 +00:00
|
|
|
#pragma once
|
|
|
|
|
2017-06-07 04:25:28 +00:00
|
|
|
#include "core/hle/kernel/kernel.h"
|
2014-04-16 03:28:03 +00:00
|
|
|
#include "core/hle/service/service.h"
|
|
|
|
|
2017-06-07 04:25:28 +00:00
|
|
|
namespace Kernel {
|
|
|
|
class HLERequestContext;
|
|
|
|
class Semaphore;
|
|
|
|
}
|
|
|
|
|
2016-12-10 12:51:50 +00:00
|
|
|
namespace Service {
|
2017-06-06 05:18:19 +00:00
|
|
|
namespace SM {
|
2014-04-16 03:28:03 +00:00
|
|
|
|
2014-04-17 00:46:05 +00:00
|
|
|
/// Interface to "srv:" service
|
2017-06-07 04:25:28 +00:00
|
|
|
class SRV final : public ServiceFramework<SRV> {
|
2014-04-16 03:28:03 +00:00
|
|
|
public:
|
2017-06-07 04:25:28 +00:00
|
|
|
explicit SRV(std::shared_ptr<ServiceManager> service_manager);
|
|
|
|
~SRV();
|
|
|
|
|
|
|
|
private:
|
|
|
|
void RegisterClient(Kernel::HLERequestContext& ctx);
|
|
|
|
void EnableNotification(Kernel::HLERequestContext& ctx);
|
|
|
|
void GetServiceHandle(Kernel::HLERequestContext& ctx);
|
|
|
|
void Subscribe(Kernel::HLERequestContext& ctx);
|
|
|
|
void Unsubscribe(Kernel::HLERequestContext& ctx);
|
|
|
|
void PublishToSubscriber(Kernel::HLERequestContext& ctx);
|
2014-04-16 03:28:03 +00:00
|
|
|
|
2017-06-07 04:25:28 +00:00
|
|
|
std::shared_ptr<ServiceManager> service_manager;
|
|
|
|
Kernel::SharedPtr<Kernel::Semaphore> notification_semaphore;
|
2014-04-16 03:28:03 +00:00
|
|
|
};
|
|
|
|
|
2017-06-06 05:18:19 +00:00
|
|
|
} // namespace SM
|
2016-12-10 12:51:50 +00:00
|
|
|
} // namespace Service
|