mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-29 05:55:16 -04:00
spl: refactor into sts namespace
This commit is contained in:
parent
1671c04e24
commit
f9b48f06a3
30 changed files with 2230 additions and 2152 deletions
|
@ -19,22 +19,24 @@
|
|||
#include <stratosphere.hpp>
|
||||
|
||||
#include "spl_types.hpp"
|
||||
#include "spl_secmon_wrapper.hpp"
|
||||
|
||||
class RandomService final : public IServiceObject {
|
||||
private:
|
||||
SecureMonitorWrapper *secmon_wrapper;
|
||||
public:
|
||||
RandomService(SecureMonitorWrapper *sw) : secmon_wrapper(sw) {
|
||||
/* ... */
|
||||
}
|
||||
namespace sts::spl {
|
||||
|
||||
virtual ~RandomService() { /* ... */ }
|
||||
private:
|
||||
/* Actual commands. */
|
||||
virtual Result GenerateRandomBytes(OutBuffer<u8> out);
|
||||
public:
|
||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||
MakeServiceCommandMeta<Csrng_Cmd_GenerateRandomBytes, &RandomService::GenerateRandomBytes>(),
|
||||
};
|
||||
};
|
||||
class RandomService final : public IServiceObject {
|
||||
protected:
|
||||
enum class CommandId {
|
||||
GenerateRandomBytes = 0,
|
||||
};
|
||||
public:
|
||||
RandomService() { /* ... */ }
|
||||
virtual ~RandomService() { /* ... */ }
|
||||
private:
|
||||
/* Actual commands. */
|
||||
virtual Result GenerateRandomBytes(OutBuffer<u8> out);
|
||||
public:
|
||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||
MakeServiceCommandMeta<CommandId::GenerateRandomBytes, &RandomService::GenerateRandomBytes>(),
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue