core: Replace all instances of ResultCode with Result
This commit is contained in:
parent
abfd690601
commit
a7d9be1384
140 changed files with 1133 additions and 1173 deletions
|
@ -153,7 +153,7 @@ class IRegistrar final : public ServiceFramework<IRegistrar> {
|
|||
friend class ARP_W;
|
||||
|
||||
public:
|
||||
using IssuerFn = std::function<ResultCode(u64, ApplicationLaunchProperty, std::vector<u8>)>;
|
||||
using IssuerFn = std::function<Result(u64, ApplicationLaunchProperty, std::vector<u8>)>;
|
||||
|
||||
explicit IRegistrar(Core::System& system_, IssuerFn&& issuer)
|
||||
: ServiceFramework{system_, "IRegistrar"}, issue_process_id{std::move(issuer)} {
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
|
||||
namespace Service::Glue {
|
||||
|
||||
constexpr ResultCode ERR_INVALID_RESOURCE{ErrorModule::ARP, 30};
|
||||
constexpr ResultCode ERR_INVALID_PROCESS_ID{ErrorModule::ARP, 31};
|
||||
constexpr ResultCode ERR_INVALID_ACCESS{ErrorModule::ARP, 42};
|
||||
constexpr ResultCode ERR_NOT_REGISTERED{ErrorModule::ARP, 102};
|
||||
constexpr Result ERR_INVALID_RESOURCE{ErrorModule::ARP, 30};
|
||||
constexpr Result ERR_INVALID_PROCESS_ID{ErrorModule::ARP, 31};
|
||||
constexpr Result ERR_INVALID_ACCESS{ErrorModule::ARP, 42};
|
||||
constexpr Result ERR_NOT_REGISTERED{ErrorModule::ARP, 102};
|
||||
|
||||
} // namespace Service::Glue
|
||||
|
|
|
@ -41,8 +41,8 @@ ResultVal<std::vector<u8>> ARPManager::GetControlProperty(u64 title_id) const {
|
|||
return iter->second.control;
|
||||
}
|
||||
|
||||
ResultCode ARPManager::Register(u64 title_id, ApplicationLaunchProperty launch,
|
||||
std::vector<u8> control) {
|
||||
Result ARPManager::Register(u64 title_id, ApplicationLaunchProperty launch,
|
||||
std::vector<u8> control) {
|
||||
if (title_id == 0) {
|
||||
return ERR_INVALID_PROCESS_ID;
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ ResultCode ARPManager::Register(u64 title_id, ApplicationLaunchProperty launch,
|
|||
return ResultSuccess;
|
||||
}
|
||||
|
||||
ResultCode ARPManager::Unregister(u64 title_id) {
|
||||
Result ARPManager::Unregister(u64 title_id) {
|
||||
if (title_id == 0) {
|
||||
return ERR_INVALID_PROCESS_ID;
|
||||
}
|
||||
|
|
|
@ -42,12 +42,12 @@ public:
|
|||
// Adds a new entry to the internal database with the provided parameters, returning
|
||||
// ERR_INVALID_ACCESS if attempting to re-register a title ID without an intermediate Unregister
|
||||
// step, and ERR_INVALID_PROCESS_ID if the title ID is 0.
|
||||
ResultCode Register(u64 title_id, ApplicationLaunchProperty launch, std::vector<u8> control);
|
||||
Result Register(u64 title_id, ApplicationLaunchProperty launch, std::vector<u8> control);
|
||||
|
||||
// Removes the registration for the provided title ID from the database, returning
|
||||
// ERR_NOT_REGISTERED if it doesn't exist in the database and ERR_INVALID_PROCESS_ID if the
|
||||
// title ID is 0.
|
||||
ResultCode Unregister(u64 title_id);
|
||||
Result Unregister(u64 title_id);
|
||||
|
||||
// Removes all entries from the database, always succeeds. Should only be used when resetting
|
||||
// system state.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue