diff options
author | bunnei <bunneidev@gmail.com> | 2018-09-04 17:49:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-04 17:49:22 +0200 |
commit | c156ee8eb8b25c9b4b6c4c13893b15821c6b9245 (patch) | |
tree | cc87df1534e9e5f2bbf8871eff9cec75b4c927d4 /src/core/hle/service | |
parent | Merge pull request #1231 from lioncash/global (diff) | |
parent | ssl: Move SSL class to cpp file (diff) | |
download | yuzu-c156ee8eb8b25c9b4b6c4c13893b15821c6b9245.tar yuzu-c156ee8eb8b25c9b4b6c4c13893b15821c6b9245.tar.gz yuzu-c156ee8eb8b25c9b4b6c4c13893b15821c6b9245.tar.bz2 yuzu-c156ee8eb8b25c9b4b6c4c13893b15821c6b9245.tar.lz yuzu-c156ee8eb8b25c9b4b6c4c13893b15821c6b9245.tar.xz yuzu-c156ee8eb8b25c9b4b6c4c13893b15821c6b9245.tar.zst yuzu-c156ee8eb8b25c9b4b6c4c13893b15821c6b9245.zip |
Diffstat (limited to 'src/core/hle/service')
-rw-r--r-- | src/core/hle/service/ssl/ssl.cpp | 62 | ||||
-rw-r--r-- | src/core/hle/service/ssl/ssl.h | 14 |
2 files changed, 39 insertions, 37 deletions
diff --git a/src/core/hle/service/ssl/ssl.cpp b/src/core/hle/service/ssl/ssl.cpp index 40aea6090..63b86e099 100644 --- a/src/core/hle/service/ssl/ssl.cpp +++ b/src/core/hle/service/ssl/ssl.cpp @@ -3,6 +3,9 @@ // Refer to the license.txt file included. #include "core/hle/ipc_helpers.h" +#include "core/hle/kernel/hle_ipc.h" +#include "core/hle/service/service.h" +#include "core/hle/service/sm/sm.h" #include "core/hle/service/ssl/ssl.h" namespace Service::SSL { @@ -81,36 +84,43 @@ private: } }; -void SSL::CreateContext(Kernel::HLERequestContext& ctx) { - LOG_WARNING(Service_SSL, "(STUBBED) called"); +class SSL final : public ServiceFramework<SSL> { +public: + explicit SSL() : ServiceFramework{"ssl"} { + // clang-format off + static const FunctionInfo functions[] = { + {0, &SSL::CreateContext, "CreateContext"}, + {1, nullptr, "GetContextCount"}, + {2, nullptr, "GetCertificates"}, + {3, nullptr, "GetCertificateBufSize"}, + {4, nullptr, "DebugIoctl"}, + {5, &SSL::SetInterfaceVersion, "SetInterfaceVersion"}, + {6, nullptr, "FlushSessionCache"}, + }; + // clang-format on - IPC::ResponseBuilder rb{ctx, 2, 0, 1}; - rb.Push(RESULT_SUCCESS); - rb.PushIpcInterface<ISslContext>(); -} + RegisterHandlers(functions); + } -SSL::SSL() : ServiceFramework("ssl") { - static const FunctionInfo functions[] = { - {0, &SSL::CreateContext, "CreateContext"}, - {1, nullptr, "GetContextCount"}, - {2, nullptr, "GetCertificates"}, - {3, nullptr, "GetCertificateBufSize"}, - {4, nullptr, "DebugIoctl"}, - {5, &SSL::SetInterfaceVersion, "SetInterfaceVersion"}, - {6, nullptr, "FlushSessionCache"}, - }; - RegisterHandlers(functions); -} +private: + void CreateContext(Kernel::HLERequestContext& ctx) { + LOG_WARNING(Service_SSL, "(STUBBED) called"); -void SSL::SetInterfaceVersion(Kernel::HLERequestContext& ctx) { - LOG_WARNING(Service_SSL, "(STUBBED) called"); - IPC::RequestParser rp{ctx}; - u32 unk1 = rp.Pop<u32>(); // Probably minor/major? - u32 unk2 = rp.Pop<u32>(); // TODO(ogniK): Figure out what this does + IPC::ResponseBuilder rb{ctx, 2, 0, 1}; + rb.Push(RESULT_SUCCESS); + rb.PushIpcInterface<ISslContext>(); + } - IPC::ResponseBuilder rb{ctx, 2}; - rb.Push(RESULT_SUCCESS); -} + void SetInterfaceVersion(Kernel::HLERequestContext& ctx) { + LOG_WARNING(Service_SSL, "(STUBBED) called"); + IPC::RequestParser rp{ctx}; + u32 unk1 = rp.Pop<u32>(); // Probably minor/major? + u32 unk2 = rp.Pop<u32>(); // TODO(ogniK): Figure out what this does + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(RESULT_SUCCESS); + } +}; void InstallInterfaces(SM::ServiceManager& service_manager) { std::make_shared<SSL>()->InstallAsService(service_manager); diff --git a/src/core/hle/service/ssl/ssl.h b/src/core/hle/service/ssl/ssl.h index 8fef13022..5cb04c3b9 100644 --- a/src/core/hle/service/ssl/ssl.h +++ b/src/core/hle/service/ssl/ssl.h @@ -4,20 +4,12 @@ #pragma once -#include "core/hle/service/service.h" +namespace Service::SM { +class ServiceManager; +} namespace Service::SSL { -class SSL final : public ServiceFramework<SSL> { -public: - explicit SSL(); - ~SSL() = default; - -private: - void CreateContext(Kernel::HLERequestContext& ctx); - void SetInterfaceVersion(Kernel::HLERequestContext& ctx); -}; - /// Registers all SSL services with the specified service manager. void InstallInterfaces(SM::ServiceManager& service_manager); |