/*
 * Copyright (c) 2019-2020 Adubbz, 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 
#include 
#define AMS_NCM_I_CONTENT_META_DATABASE_INTERFACE_INFO(C, H)                                                                                                                                                                                                                                                                                                                                                                                          \
    AMS_SF_METHOD_INFO(C, H,  0, Result, Set,                           (const ncm::ContentMetaKey &key, const sf::InBuffer &value),                                                                                                                                                                                      (key, value))                                                                                                               \
    AMS_SF_METHOD_INFO(C, H,  1, Result, Get,                           (sf::Out out_size, const ncm::ContentMetaKey &key, const sf::OutBuffer &out_value),                                                                                                                                                          (out_size, key, out_value))                                                                                                 \
    AMS_SF_METHOD_INFO(C, H,  2, Result, Remove,                        (const ncm::ContentMetaKey &key),                                                                                                                                                                                                                 (key))                                                                                                                      \
    AMS_SF_METHOD_INFO(C, H,  3, Result, GetContentIdByType,            (sf::Out out_content_id, const ncm::ContentMetaKey &key, ncm::ContentType type),                                                                                                                                                  (out_content_id, key, type))                                                                                                \
    AMS_SF_METHOD_INFO(C, H,  4, Result, ListContentInfo,               (sf::Out out_entries_written, const sf::OutArray &out_info, const ncm::ContentMetaKey &key, s32 offset),                                                                                                                   (out_entries_written, out_info, key, offset))                                                                               \
    AMS_SF_METHOD_INFO(C, H,  5, Result, List,                          (sf::Out out_entries_total, sf::Out out_entries_written, const sf::OutArray &out_info, ncm::ContentMetaType meta_type, ncm::ApplicationId application_id, u64 min, u64 max, ncm::ContentInstallType install_type), (out_entries_total, out_entries_written, out_info, meta_type, application_id, min, max, install_type))                      \
    AMS_SF_METHOD_INFO(C, H,  6, Result, GetLatestContentMetaKey,       (sf::Out out_key, u64 id),                                                                                                                                                                                                   (out_key, id))                                                                                                              \
    AMS_SF_METHOD_INFO(C, H,  7, Result, ListApplication,               (sf::Out out_entries_total, sf::Out out_entries_written, const sf::OutArray &out_keys, ncm::ContentMetaType meta_type),                                                                                 (out_entries_total, out_entries_written, out_keys, meta_type))                                                              \
    AMS_SF_METHOD_INFO(C, H,  8, Result, Has,                           (sf::Out out, const ncm::ContentMetaKey &key),                                                                                                                                                                                              (out, key))                                                                                                                 \
    AMS_SF_METHOD_INFO(C, H,  9, Result, HasAll,                        (sf::Out out, const sf::InArray &keys),                                                                                                                                                                                (out, keys))                                                                                                                \
    AMS_SF_METHOD_INFO(C, H, 10, Result, GetSize,                       (sf::Out out_size, const ncm::ContentMetaKey &key),                                                                                                                                                                                          (out_size, key))                                                                                                            \
    AMS_SF_METHOD_INFO(C, H, 11, Result, GetRequiredSystemVersion,      (sf::Out out_version, const ncm::ContentMetaKey &key),                                                                                                                                                                                       (out_version, key))                                                                                                         \
    AMS_SF_METHOD_INFO(C, H, 12, Result, GetPatchId,                    (sf::Out out_patch_id, const ncm::ContentMetaKey &key),                                                                                                                                                                             (out_patch_id, key))                                                                                                        \
    AMS_SF_METHOD_INFO(C, H, 13, Result, DisableForcibly,               (),                                                                                                                                                                                                                                               ())                                                                                                                         \
    AMS_SF_METHOD_INFO(C, H, 14, Result, LookupOrphanContent,           (const sf::OutArray &out_orphaned, const sf::InArray &content_ids),                                                                                                                                                         (out_orphaned, content_ids))                                                                                                \
    AMS_SF_METHOD_INFO(C, H, 15, Result, Commit,                        (),                                                                                                                                                                                                                                               ())                                                                                                                         \
    AMS_SF_METHOD_INFO(C, H, 16, Result, HasContent,                    (sf::Out out, const ncm::ContentMetaKey &key, const ncm::ContentId &content_id),                                                                                                                                                            (out, key, content_id))                                                                                                     \
    AMS_SF_METHOD_INFO(C, H, 17, Result, ListContentMetaInfo,           (sf::Out out_entries_written, const sf::OutArray &out_meta_info, const ncm::ContentMetaKey &key, s32 offset),                                                                                                          (out_entries_written, out_meta_info, key, offset))                                                                          \
    AMS_SF_METHOD_INFO(C, H, 18, Result, GetAttributes,                 (sf::Out out_attributes, const ncm::ContentMetaKey &key),                                                                                                                                                                                     (out_attributes, key))                                                                                                      \
    AMS_SF_METHOD_INFO(C, H, 19, Result, GetRequiredApplicationVersion, (sf::Out out_version, const ncm::ContentMetaKey &key),                                                                                                                                                                                       (out_version, key),                                                                                    hos::Version_2_0_0)  \
    AMS_SF_METHOD_INFO(C, H, 20, Result, GetContentIdByTypeAndIdOffset, (sf::Out out_content_id, const ncm::ContentMetaKey &key, ncm::ContentType type, u8 id_offset),                                                                                                                                    (out_content_id, key, type, id_offset),                                                                hos::Version_5_0_0)  \
    AMS_SF_METHOD_INFO(C, H, 21, Result, GetCount,                      (sf::Out out_count),                                                                                                                                                                                                                         (out_count),                                                                                           hos::Version_10_0_0) \
    AMS_SF_METHOD_INFO(C, H, 22, Result, GetOwnerApplicationId,         (sf::Out out_id, const ncm::ContentMetaKey &key),                                                                                                                                                                             (out_id, key),                                                                                         hos::Version_10_0_0)
AMS_SF_DEFINE_INTERFACE(ams::ncm, IContentMetaDatabase, AMS_NCM_I_CONTENT_META_DATABASE_INTERFACE_INFO)