mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-26 17:14:18 +01:00
Add additional nifm stubs
This commit is contained in:
parent
a164635f32
commit
7d30ac0cd8
@ -317,6 +317,7 @@ add_library(skyline SHARED
|
||||
${source_DIR}/skyline/services/nfp/IUser.cpp
|
||||
${source_DIR}/skyline/services/nifm/IStaticService.cpp
|
||||
${source_DIR}/skyline/services/nifm/IGeneralService.cpp
|
||||
${source_DIR}/skyline/services/nifm/IScanRequest.cpp
|
||||
${source_DIR}/skyline/services/nifm/IRequest.cpp
|
||||
${source_DIR}/skyline/services/socket/bsd/IClient.cpp
|
||||
${source_DIR}/skyline/services/spl/IRandomInterface.cpp
|
||||
|
@ -1,14 +1,26 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
// Copyright © 2020 Skyline Team and Contributors (https://github.com/skyline-emu/)
|
||||
|
||||
#include "IScanRequest.h"
|
||||
#include "IRequest.h"
|
||||
#include "IGeneralService.h"
|
||||
|
||||
namespace skyline::service::nifm {
|
||||
IGeneralService::IGeneralService(const DeviceState &state, ServiceManager &manager) : BaseService(state, manager) {}
|
||||
|
||||
Result IGeneralService::CreateScanRequest(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
manager.RegisterService(SRVREG(IScanRequest), session, response);
|
||||
return {};
|
||||
}
|
||||
|
||||
Result IGeneralService::CreateRequest(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
manager.RegisterService(SRVREG(IRequest), session, response);
|
||||
return {};
|
||||
}
|
||||
|
||||
Result IGeneralService::IsAnyInternetRequestAccepted(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
// We don't emulate networking so always return false
|
||||
response.Push(false);
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
@ -15,13 +15,24 @@ namespace skyline::service::nifm {
|
||||
IGeneralService(const DeviceState &state, ServiceManager &manager);
|
||||
|
||||
/**
|
||||
* @brief Creates an IRequest instance that can be used to bring up the network
|
||||
* @url https://switchbrew.org/wiki/Network_Interface_services#CreateScanRequest
|
||||
*/
|
||||
Result CreateScanRequest(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
/**
|
||||
* @url https://switchbrew.org/wiki/Network_Interface_services#CreateRequest
|
||||
*/
|
||||
Result CreateRequest(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
/**
|
||||
* @url https://switchbrew.org/wiki/Network_Interface_services#IsAnyInternetRequestAccepted
|
||||
*/
|
||||
Result IsAnyInternetRequestAccepted(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
SERVICE_DECL(
|
||||
SFUNC(0x4, IGeneralService, CreateRequest)
|
||||
SFUNC(0x1, IGeneralService, CreateScanRequest),
|
||||
SFUNC(0x4, IGeneralService, CreateRequest),
|
||||
SFUNC(0x15, IGeneralService, IsAnyInternetRequestAccepted)
|
||||
)
|
||||
};
|
||||
}
|
||||
|
8
app/src/main/cpp/skyline/services/nifm/IScanRequest.cpp
Normal file
8
app/src/main/cpp/skyline/services/nifm/IScanRequest.cpp
Normal file
@ -0,0 +1,8 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
// Copyright © 2022 Skyline Team and Contributors (https://github.com/skyline-emu/)
|
||||
|
||||
#include "IScanRequest.h"
|
||||
|
||||
namespace skyline::service::nifm {
|
||||
IScanRequest::IScanRequest(const DeviceState &state, ServiceManager &manager) : BaseService(state, manager) {}
|
||||
}
|
17
app/src/main/cpp/skyline/services/nifm/IScanRequest.h
Normal file
17
app/src/main/cpp/skyline/services/nifm/IScanRequest.h
Normal file
@ -0,0 +1,17 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
// Copyright © 2020 Skyline Team and Contributors (https://github.com/skyline-emu/)
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <services/serviceman.h>
|
||||
|
||||
namespace skyline::service::nifm {
|
||||
/**
|
||||
* @brief IScanRequest is used by applications to scan for networks
|
||||
* @url https://switchbrew.org/wiki/Network_Interface_services#IScanRequest
|
||||
*/
|
||||
class IScanRequest : public BaseService {
|
||||
public:
|
||||
IScanRequest(const DeviceState &state, ServiceManager &manager);
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user