1/*
2 * Copyright (c) 2018-2020 Atmosphère-NX
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18#include <vapours/results/results_common.hpp>
19
20namespace ams::ncm {
21
22 R_DEFINE_NAMESPACE_RESULT_MODULE(5);
23
24 R_DEFINE_ERROR_RESULT(InvalidContentStorageBase, 1);
25 R_DEFINE_ERROR_RESULT(PlaceHolderAlreadyExists, 2);
26 R_DEFINE_ERROR_RESULT(PlaceHolderNotFound, 3);
27 R_DEFINE_ERROR_RESULT(ContentAlreadyExists, 4);
28 R_DEFINE_ERROR_RESULT(ContentNotFound, 5);
29 R_DEFINE_ERROR_RESULT(ContentMetaNotFound, 7);
30 R_DEFINE_ERROR_RESULT(AllocationFailed, 8);
31 R_DEFINE_ERROR_RESULT(UnknownStorage, 12);
32
33 R_DEFINE_ERROR_RESULT(InvalidContentStorage, 100);
34 R_DEFINE_ERROR_RESULT(InvalidContentMetaDatabase, 110);
35 R_DEFINE_ERROR_RESULT(InvalidPackageFormat, 130);
36 R_DEFINE_ERROR_RESULT(InvalidContentHash, 140);
37
38 R_DEFINE_ERROR_RESULT(InvalidInstallTaskState, 160);
39 R_DEFINE_ERROR_RESULT(InvalidPlaceHolderFile, 170);
40 R_DEFINE_ERROR_RESULT(BufferInsufficient, 180);
41 R_DEFINE_ERROR_RESULT(WriteToReadOnlyContentStorage, 190);
42 R_DEFINE_ERROR_RESULT(NotEnoughInstallSpace, 200);
43 R_DEFINE_ERROR_RESULT(SystemUpdateNotFoundInPackage, 210);
44 R_DEFINE_ERROR_RESULT(ContentInfoNotFound, 220);
45 R_DEFINE_ERROR_RESULT(DeltaNotFound, 237);
46 R_DEFINE_ERROR_RESULT(InvalidContentMetaKey, 240);
47 R_DEFINE_ERROR_RESULT(IgnorableInstallTicketFailure, 280);
48
49 R_DEFINE_ERROR_RESULT(ContentStorageBaseNotFound, 310);
50 R_DEFINE_ERROR_RESULT(ListPartiallyNotCommitted, 330);
51 R_DEFINE_ERROR_RESULT(UnexpectedContentMetaPrepared, 360);
52 R_DEFINE_ERROR_RESULT(InvalidFirmwareVariation, 380);
53
54 R_DEFINE_ERROR_RANGE(ContentStorageNotActive, 250, 258);
55 R_DEFINE_ERROR_RESULT(GameCardContentStorageNotActive, 251);
56 R_DEFINE_ERROR_RESULT(BuiltInSystemContentStorageNotActive, 252);
57 R_DEFINE_ERROR_RESULT(BuiltInUserContentStorageNotActive, 253);
58 R_DEFINE_ERROR_RESULT(SdCardContentStorageNotActive, 254);
59 R_DEFINE_ERROR_RESULT(UnknownContentStorageNotActive, 258);
60
61 R_DEFINE_ERROR_RANGE(ContentMetaDatabaseNotActive, 260, 268);
62 R_DEFINE_ERROR_RESULT(GameCardContentMetaDatabaseNotActive, 261);
63 R_DEFINE_ERROR_RESULT(BuiltInSystemContentMetaDatabaseNotActive, 262);
64 R_DEFINE_ERROR_RESULT(BuiltInUserContentMetaDatabaseNotActive, 263);
65 R_DEFINE_ERROR_RESULT(SdCardContentMetaDatabaseNotActive, 264);
66 R_DEFINE_ERROR_RESULT(UnknownContentMetaDatabaseNotActive, 268);
67
68 R_DEFINE_ERROR_RANGE(InstallTaskCancelled, 290, 299);
69 R_DEFINE_ERROR_RESULT(CreatePlaceHolderCancelled, 291);
70 R_DEFINE_ERROR_RESULT(WritePlaceHolderCancelled, 292);
71
72 R_DEFINE_ERROR_RANGE(InvalidArgument, 8181, 8191);
73 R_DEFINE_ERROR_RESULT(InvalidOffset, 8182);
74
75}
76