From 492975c110c669b71db5c60776acd38200e5d7ea Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Thu, 28 Mar 2019 22:07:31 -0700 Subject: [PATCH] results: ncm/kvdb results (thanks @adubbz) --- include/stratosphere/results.hpp | 2 + include/stratosphere/results/kvdb_results.hpp | 26 ++++++++++ include/stratosphere/results/ncm_results.hpp | 51 +++++++++++++++++++ 3 files changed, 79 insertions(+) create mode 100644 include/stratosphere/results/kvdb_results.hpp create mode 100644 include/stratosphere/results/ncm_results.hpp diff --git a/include/stratosphere/results.hpp b/include/stratosphere/results.hpp index aa080101..f8eb0ba7 100644 --- a/include/stratosphere/results.hpp +++ b/include/stratosphere/results.hpp @@ -24,8 +24,10 @@ #include "results/fs_results.hpp" #include "results/hipc_results.hpp" #include "results/kernel_results.hpp" +#include "results/kvdb_results.hpp" #include "results/loader_results.hpp" #include "results/lr_results.hpp" +#include "results/ncm_results.hpp" #include "results/pm_results.hpp" #include "results/sf_results.hpp" #include "results/sm_results.hpp" diff --git a/include/stratosphere/results/kvdb_results.hpp b/include/stratosphere/results/kvdb_results.hpp new file mode 100644 index 00000000..56794b0c --- /dev/null +++ b/include/stratosphere/results/kvdb_results.hpp @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2018 Atmosphère-NX + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once +#include + +static constexpr u32 Module_Kvdb = 20; + +static constexpr Result ResultKvdbTooLargeKey = MAKERESULT(Module_Kvdb, 1); +static constexpr Result ResultKvdbKeyNotFound = MAKERESULT(Module_Kvdb, 2); +static constexpr Result ResultKvdbAllocationFailed = MAKERESULT(Module_Kvdb, 4); +static constexpr Result ResultKvdbInvalidKeyValue = MAKERESULT(Module_Kvdb, 5); +static constexpr Result ResultKvdbBufferInsufficient = MAKERESULT(Module_Kvdb, 6); diff --git a/include/stratosphere/results/ncm_results.hpp b/include/stratosphere/results/ncm_results.hpp new file mode 100644 index 00000000..1d8d7ea2 --- /dev/null +++ b/include/stratosphere/results/ncm_results.hpp @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2018 Atmosphère-NX + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once +#include + +static constexpr u32 Module_Ncm = 5; + +static constexpr Result ResultNcmPlaceHolderAlreadyExists = MAKERESULT(Module_Ncm, 2); +static constexpr Result ResultNcmPlaceHolderNotFound = MAKERESULT(Module_Ncm, 3); +static constexpr Result ResultNcmContentAlreadyExists = MAKERESULT(Module_Ncm, 4); +static constexpr Result ResultNcmContentNotFound = MAKERESULT(Module_Ncm, 5); +static constexpr Result ResultNcmContentMetaNotFound = MAKERESULT(Module_Ncm, 7); +static constexpr Result ResultNcmAllocationFailed = MAKERESULT(Module_Ncm, 8); +static constexpr Result ResultNcmUnknownStorage = MAKERESULT(Module_Ncm, 12); + +static constexpr Result ResultNcmInvalidContentStorage = MAKERESULT(Module_Ncm, 100); +static constexpr Result ResultNcmInvalidContentMetaDatabase = MAKERESULT(Module_Ncm, 110); + +static constexpr Result ResultNcmBufferInsufficient = MAKERESULT(Module_Ncm, 180); +static constexpr Result ResultNcmInvalidContentMetaKey = MAKERESULT(Module_Ncm, 240); + +static constexpr Result ResultNcmContentStorageNotActive = MAKERESULT(Module_Ncm, 250); +static constexpr Result ResultNcmGameCardContentStorageNotActive = MAKERESULT(Module_Ncm, 251); +static constexpr Result ResultNcmNandSystemContentStorageNotActive = MAKERESULT(Module_Ncm, 252); +static constexpr Result ResultNcmNandUserContentStorageNotActive = MAKERESULT(Module_Ncm, 253); +static constexpr Result ResultNcmSdCardContentStorageNotActive = MAKERESULT(Module_Ncm, 254); +static constexpr Result ResultNcmUnknownContentStorageNotActive = MAKERESULT(Module_Ncm, 258); + +static constexpr Result ResultNcmContentMetaDatabaseNotActive = MAKERESULT(Module_Ncm, 260); +static constexpr Result ResultNcmGameCardContentMetaDatabaseNotActive = MAKERESULT(Module_Ncm, 261); +static constexpr Result ResultNcmNandSystemContentMetaDatabaseNotActive = MAKERESULT(Module_Ncm, 262); +static constexpr Result ResultNcmNandUserContentMetaDatabaseNotActive = MAKERESULT(Module_Ncm, 263); +static constexpr Result ResultNcmSdCardContentMetaDatabaseNotActive = MAKERESULT(Module_Ncm, 264); +static constexpr Result ResultNcmUnknownContentMetaDatabaseNotActive = MAKERESULT(Module_Ncm, 268); + +static constexpr Result ResultNcmInvalidArgument = MAKERESULT(Module_Ncm, 8181); +static constexpr Result ResultNcmInvalidOffset = MAKERESULT(Module_Ncm, 8182);