// Copyright (c) 2020-2021, NVIDIA CORPORATION. All rights reserved.
//
// NVIDIA CORPORATION and its licensors retain all intellectual property
// and proprietary rights in and to this software, related documentation
// and any modifications thereto.  Any use, reproduction, disclosure or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA CORPORATION is strictly prohibited.
//
#pragma once

#include <carb/Types.h>

namespace carb { namespace ujitso { struct Agent; } };
namespace omni
{
namespace fabric
{
struct FabricId;
struct UsdStageId;
}
};

namespace omni
{
namespace population
{
    // Temporary struct until cache merging and querying are implemented in FabricAgent
    struct FabricCache
    {
        const omni::fabric::FabricId& fabricId;
        const omni::fabric::UsdStageId& usdStageId;
    };

    struct IPopulation
    {
        CARB_PLUGIN_INTERFACE("omni::population::IPopulation", 0, 1);

        // fabricCache is optional, nullptr will create a new cache. Will be removed later.
        // if fabricCache contains data, that stage and cache will be populated.
        // We pass both the Fabric stage and the cache because in IStageReaderWriter they are tied.
        void(CARB_ABI* populateFabric)(carb::ujitso::Agent& agent, const char* usdStagePath, const FabricCache* fabricCache);
    };

    // TODO: this is only for tests right now, the entire code should be in tests.
    // The reason it is here is because test.unit has no dependency on USD now.
    // We can either add USD dependency to test.unit or move omni.population tests to e.g. test.unit.fabric
    struct IValidate
    {
        CARB_PLUGIN_INTERFACE("omni::population::IValidate", 0, 1);

        bool (CARB_ABI* validateFabric)(const char* stagePath, const omni::fabric::FabricId& fabricId);
    };

} // namespace population
} // namespace omni

