Kernel/HLE: Service::Interface no longer inherits from any Kernel object, and is now its own standalone class.
Interface is now used by aggregation in ClientPort, to forward service commands to their HLE implementation if needed.
This commit is contained in:
parent
0a33d915f8
commit
c19afd2118
4 changed files with 52 additions and 24 deletions
|
@ -22,18 +22,16 @@ static const int kMaxPortSize = 8; ///< Maximum size of a port name (8 character
|
|||
static const u32 DefaultMaxSessions = 10; ///< Arbitrary default number of maximum connections to an HLE port
|
||||
|
||||
/// Interface to a CTROS service
|
||||
class Interface : public Kernel::ClientPort {
|
||||
// TODO(yuriks): An "Interface" being a Kernel::Object is mostly non-sense. Interface should be
|
||||
// just something that encapsulates a session and acts as a helper to implement service
|
||||
// processes.
|
||||
class Interface {
|
||||
public:
|
||||
std::string GetName() const override {
|
||||
std::string GetName() const {
|
||||
return GetPortName();
|
||||
}
|
||||
|
||||
virtual void SetVersion(u32 raw_version) {
|
||||
version.raw = raw_version;
|
||||
}
|
||||
virtual ~Interface() {}
|
||||
|
||||
/**
|
||||
* Gets the maximum allowed number of sessions that can be connected to this port at the same time.
|
||||
|
@ -42,8 +40,6 @@ public:
|
|||
*/
|
||||
virtual u32 GetMaxSessions() const { return DefaultMaxSessions; }
|
||||
|
||||
void AddWaitingSession(Kernel::SharedPtr<Kernel::ServerSession> server_session) override { }
|
||||
|
||||
typedef void (*Function)(Interface*);
|
||||
|
||||
struct FunctionInfo {
|
||||
|
@ -60,7 +56,7 @@ public:
|
|||
return "[UNKNOWN SERVICE PORT]";
|
||||
}
|
||||
|
||||
ResultCode HandleSyncRequest() override;
|
||||
ResultCode HandleSyncRequest();
|
||||
|
||||
protected:
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue