Services/HLE: Convert the http:C service to the new service framework.
This commit is contained in:
parent
78685065cf
commit
28124c053a
|
@ -2,12 +2,15 @@
|
||||||
// Licensed under GPLv2 or any later version
|
// Licensed under GPLv2 or any later version
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
|
#include "core/hle/ipc_helpers.h"
|
||||||
|
#include "core/hle/kernel/ipc.h"
|
||||||
#include "core/hle/service/http_c.h"
|
#include "core/hle/service/http_c.h"
|
||||||
|
|
||||||
namespace Service {
|
namespace Service {
|
||||||
namespace HTTP {
|
namespace HTTP {
|
||||||
|
|
||||||
const Interface::FunctionInfo FunctionTable[] = {
|
HTTP_C::HTTP_C() : ServiceFramework("http:C", 32) {
|
||||||
|
static const FunctionInfo functions[] = {
|
||||||
{0x00010044, nullptr, "Initialize"},
|
{0x00010044, nullptr, "Initialize"},
|
||||||
{0x00020082, nullptr, "CreateContext"},
|
{0x00020082, nullptr, "CreateContext"},
|
||||||
{0x00030040, nullptr, "CloseContext"},
|
{0x00030040, nullptr, "CloseContext"},
|
||||||
|
@ -47,6 +50,8 @@ const Interface::FunctionInfo FunctionTable[] = {
|
||||||
{0x00250080, nullptr, "AddDefaultCert"},
|
{0x00250080, nullptr, "AddDefaultCert"},
|
||||||
{0x00260080, nullptr, "SelectRootCertChain"},
|
{0x00260080, nullptr, "SelectRootCertChain"},
|
||||||
{0x002700C4, nullptr, "SetClientCert"},
|
{0x002700C4, nullptr, "SetClientCert"},
|
||||||
|
{0x00290080, nullptr, "SetClientCertContext"},
|
||||||
|
{0x002A0040, nullptr, "GetSSLError"},
|
||||||
{0x002B0080, nullptr, "SetSSLOpt"},
|
{0x002B0080, nullptr, "SetSSLOpt"},
|
||||||
{0x002C0080, nullptr, "SetSSLClearOpt"},
|
{0x002C0080, nullptr, "SetSSLClearOpt"},
|
||||||
{0x002D0000, nullptr, "CreateRootCertChain"},
|
{0x002D0000, nullptr, "CreateRootCertChain"},
|
||||||
|
@ -63,10 +68,11 @@ const Interface::FunctionInfo FunctionTable[] = {
|
||||||
{0x003800C0, nullptr, "SetPostDataTypeSize"},
|
{0x003800C0, nullptr, "SetPostDataTypeSize"},
|
||||||
{0x00390000, nullptr, "Finalize"},
|
{0x00390000, nullptr, "Finalize"},
|
||||||
};
|
};
|
||||||
|
RegisterHandlers(functions);
|
||||||
HTTP_C::HTTP_C() {
|
|
||||||
Register(FunctionTable);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void InstallInterfaces(SM::ServiceManager& service_manager) {
|
||||||
|
std::make_shared<HTTP_C>()->InstallAsService(service_manager);
|
||||||
|
}
|
||||||
} // namespace HTTP
|
} // namespace HTTP
|
||||||
} // namespace Service
|
} // namespace Service
|
||||||
|
|
|
@ -9,14 +9,12 @@
|
||||||
namespace Service {
|
namespace Service {
|
||||||
namespace HTTP {
|
namespace HTTP {
|
||||||
|
|
||||||
class HTTP_C final : public Interface {
|
class HTTP_C final : public ServiceFramework<HTTP_C> {
|
||||||
public:
|
public:
|
||||||
HTTP_C();
|
HTTP_C();
|
||||||
|
|
||||||
std::string GetPortName() const override {
|
|
||||||
return "http:C";
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void InstallInterfaces(SM::ServiceManager& service_manager);
|
||||||
|
|
||||||
} // namespace HTTP
|
} // namespace HTTP
|
||||||
} // namespace Service
|
} // namespace Service
|
||||||
|
|
|
@ -256,7 +256,7 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm) {
|
||||||
QTM::InstallInterfaces(*sm);
|
QTM::InstallInterfaces(*sm);
|
||||||
|
|
||||||
CSND::InstallInterfaces(*sm);
|
CSND::InstallInterfaces(*sm);
|
||||||
AddService(new HTTP::HTTP_C);
|
HTTP::InstallInterfaces(*sm);
|
||||||
PM::InstallInterfaces(*sm);
|
PM::InstallInterfaces(*sm);
|
||||||
AddService(new SOC::SOC_U);
|
AddService(new SOC::SOC_U);
|
||||||
SSL::InstallInterfaces(*sm);
|
SSL::InstallInterfaces(*sm);
|
||||||
|
|
Reference in New Issue