2018-01-18 14:35:03 -05:00
|
|
|
// Copyright 2018 yuzu emulator team
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "core/hle/kernel/hle_ipc.h"
|
|
|
|
#include "core/hle/service/service.h"
|
|
|
|
|
2018-04-19 21:41:44 -04:00
|
|
|
namespace Service::Sockets {
|
2018-01-18 14:35:03 -05:00
|
|
|
|
2018-03-25 05:41:00 -04:00
|
|
|
class BSD final : public ServiceFramework<BSD> {
|
2018-01-18 14:35:03 -05:00
|
|
|
public:
|
2018-03-25 05:41:00 -04:00
|
|
|
explicit BSD(const char* name);
|
|
|
|
~BSD() = default;
|
2018-01-18 14:35:03 -05:00
|
|
|
|
|
|
|
private:
|
|
|
|
void RegisterClient(Kernel::HLERequestContext& ctx);
|
2018-02-22 05:04:23 -05:00
|
|
|
void StartMonitoring(Kernel::HLERequestContext& ctx);
|
2018-01-18 14:35:03 -05:00
|
|
|
void Socket(Kernel::HLERequestContext& ctx);
|
|
|
|
void Connect(Kernel::HLERequestContext& ctx);
|
|
|
|
void SendTo(Kernel::HLERequestContext& ctx);
|
2018-01-30 01:29:47 -05:00
|
|
|
void Close(Kernel::HLERequestContext& ctx);
|
2018-01-18 14:35:03 -05:00
|
|
|
|
|
|
|
/// Id to use for the next open file descriptor.
|
|
|
|
u32 next_fd = 1;
|
|
|
|
};
|
|
|
|
|
2018-07-26 00:55:33 -04:00
|
|
|
class BSDCFG final : public ServiceFramework<BSDCFG> {
|
|
|
|
public:
|
|
|
|
explicit BSDCFG();
|
|
|
|
};
|
|
|
|
|
2018-04-19 21:41:44 -04:00
|
|
|
} // namespace Service::Sockets
|