mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-05 01:03:43 -04:00
sf: Change interface definition methodology (#1074)
* sf: Begin experimenting with new interface declaration format * sf: convert fs interfaces to new format * sf: finish conversion of libstrat to new definitions * sf: convert loader to new format * sf: convert spl to new format * sf: update ncm for new format * sf: convert pm to new format * sf: convert ro/sm to new format * sf: update fatal for new format * sf: support building dmnt under new scheme * sf: update ams.mitm for new format * sf: correct invocation def for pointer holder * fs: correct 10.x+ user bindings for Get*SpaceSize
This commit is contained in:
parent
94eb2195d3
commit
9fde97cfdd
190 changed files with 3220 additions and 3172 deletions
|
@ -24,7 +24,7 @@ namespace ams::capsrv::server {
|
|||
this->server_manager_holder.emplace();
|
||||
|
||||
/* Register the service. */
|
||||
R_ABORT_UNLESS(this->server_manager_holder->RegisterServer<Service>(ServiceName, MaxSessions, sf::ServiceObjectTraits<Service>::SharedPointerHelper::GetEmptyDeleteSharedPointer(std::addressof(*this->service_holder))));
|
||||
R_ABORT_UNLESS((this->server_manager_holder->RegisterServer<Interface, Service>(ServiceName, MaxSessions, sf::GetSharedPointerTo<Interface>(*this->service_holder))));
|
||||
|
||||
/* Initialize the idle event, we're idle initially. */
|
||||
os::InitializeEvent(std::addressof(this->idle_event), true, os::EventClearMode_ManualClear);
|
||||
|
|
|
@ -26,6 +26,7 @@ namespace ams::capsrv::server {
|
|||
static constexpr inline size_t MaxSessions = 2;
|
||||
static constexpr inline sm::ServiceName ServiceName = sm::ServiceName::Encode("caps:dc");
|
||||
|
||||
using Interface = IDecoderControlService;
|
||||
using Service = DecoderControlService;
|
||||
using ServerOptions = sf::hipc::DefaultServerManagerOptions;
|
||||
using ServerManager = sf::hipc::ServerManager<NumServers, ServerOptions, MaxSessions>;
|
||||
|
|
|
@ -18,17 +18,15 @@
|
|||
|
||||
namespace ams::capsrv::server {
|
||||
|
||||
class DecoderControlService final : public sf::IServiceObject {
|
||||
protected:
|
||||
enum class CommandId {
|
||||
DecodeJpeg = 3001,
|
||||
};
|
||||
#define AMS_CAPSRV_DECODER_CONTROL_SERVICE_INTERFACE_INFO(C, H) \
|
||||
AMS_SF_METHOD_INFO(C, H, 3001, Result, DecodeJpeg, (const sf::OutNonSecureBuffer &out, const sf::InBuffer &in, u32 width, u32 height, const ScreenShotDecodeOption &option))
|
||||
|
||||
AMS_SF_DEFINE_INTERFACE(IDecoderControlService, AMS_CAPSRV_DECODER_CONTROL_SERVICE_INTERFACE_INFO)
|
||||
|
||||
class DecoderControlService final {
|
||||
public:
|
||||
/* Actual commands. */
|
||||
virtual Result DecodeJpeg(const sf::OutNonSecureBuffer &out, const sf::InBuffer &in, u32 width, u32 height, const ScreenShotDecodeOption &option);
|
||||
public:
|
||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||
MAKE_SERVICE_COMMAND_META(DecodeJpeg)
|
||||
};
|
||||
Result DecodeJpeg(const sf::OutNonSecureBuffer &out, const sf::InBuffer &in, u32 width, u32 height, const ScreenShotDecodeOption &option);
|
||||
};
|
||||
static_assert(IsIDecoderControlService<DecoderControlService>);
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue