From 12dc05032b1c8dfdb000faf1ec883abff045cede Mon Sep 17 00:00:00 2001 From: FearlessTobi Date: Sun, 7 Aug 2022 23:54:51 +0200 Subject: ldn: Add better stubs and more data types Co-Authored-By: Narr the Reg <5944268+german77@users.noreply.github.com> Co-Authored-By: Morph <39850852+Morph1984@users.noreply.github.com> --- src/core/hle/service/ldn/ldn.h | 73 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) (limited to 'src/core/hle/service/ldn/ldn.h') diff --git a/src/core/hle/service/ldn/ldn.h b/src/core/hle/service/ldn/ldn.h index a0031ac71..331455e3f 100644 --- a/src/core/hle/service/ldn/ldn.h +++ b/src/core/hle/service/ldn/ldn.h @@ -3,6 +3,14 @@ #pragma once +#include "core/hle/ipc_helpers.h" +#include "core/hle/kernel/k_event.h" +#include "core/hle/result.h" +#include "core/hle/service/kernel_helpers.h" +#include "core/hle/service/ldn/ldn_results.h" +#include "core/hle/service/ldn/ldn_types.h" +#include "core/hle/service/sm/sm.h" + namespace Core { class System; } @@ -16,4 +24,69 @@ namespace Service::LDN { /// Registers all LDN services with the specified service manager. void InstallInterfaces(SM::ServiceManager& sm, Core::System& system); +class IUserLocalCommunicationService final + : public ServiceFramework { +public: + explicit IUserLocalCommunicationService(Core::System& system_); + ~IUserLocalCommunicationService() override; + + void GetState(Kernel::HLERequestContext& ctx); + + void GetNetworkInfo(Kernel::HLERequestContext& ctx); + + void GetDisconnectReason(Kernel::HLERequestContext& ctx); + + void GetSecurityParameter(Kernel::HLERequestContext& ctx); + + void GetNetworkConfig(Kernel::HLERequestContext& ctx); + + void AttachStateChangeEvent(Kernel::HLERequestContext& ctx); + + void GetNetworkInfoLatestUpdate(Kernel::HLERequestContext& ctx); + + void Scan(Kernel::HLERequestContext& ctx); + void ScanPrivate(Kernel::HLERequestContext& ctx); + void ScanImpl(Kernel::HLERequestContext& ctx, bool is_private = false); + + void OpenAccessPoint(Kernel::HLERequestContext& ctx); + + void CloseAccessPoint(Kernel::HLERequestContext& ctx); + + void CreateNetwork(Kernel::HLERequestContext& ctx); + void CreateNetworkPrivate(Kernel::HLERequestContext& ctx); + void CreateNetworkImpl(Kernel::HLERequestContext& ctx, bool is_private); + + void DestroyNetwork(Kernel::HLERequestContext& ctx); + + void SetAdvertiseData(Kernel::HLERequestContext& ctx); + + void SetStationAcceptPolicy(Kernel::HLERequestContext& ctx); + + void AddAcceptFilterEntry(Kernel::HLERequestContext& ctx); + + void OpenStation(Kernel::HLERequestContext& ctx); + + void CloseStation(Kernel::HLERequestContext& ctx); + + void Disconnect(Kernel::HLERequestContext& ctx); + + void Connect(Kernel::HLERequestContext& ctx); + + void Initialize(Kernel::HLERequestContext& ctx); + + void Finalize(Kernel::HLERequestContext& ctx); + + void Initialize2(Kernel::HLERequestContext& ctx); + Result InitializeImpl(Kernel::HLERequestContext& ctx); + +private: + void OnEventFired(); + + KernelHelpers::ServiceContext service_context; + Kernel::KEvent* state_change_event; + Network::RoomNetwork& room_network; + + bool is_initialized{}; +}; + } // namespace Service::LDN -- cgit v1.2.3