// Modifications Copyright 2022-current EmoShape. All Rights Reserved
#pragma once

#include "Runtime/Core/Public/Modules/ModuleManager.h"
class FESIONative;

class EMOSHAPESUBSYSTEM_API ESIOClient
{
public:
	TSharedPtr<FESIONative> NewValidNativePointer(const bool bShouldUseTlsLibraries = false, const bool bShouldSkipCertificateVerification = true);
	TSharedPtr<FESIONative> ValidSharedNativePointer(FString SharedId, const bool bShouldUseTlsLibraries, const bool bShouldSkipCertificateVerification);

private:

	//All native pointers manages by the plugin
	TArray<TSharedPtr<FESIONative>> PluginNativePointers;

	//Shared pointers, these will typically be alive past game world lifecycles
	TMap<FString, TSharedPtr<FESIONative>> SharedNativePointers;
	TSet<TSharedPtr<FESIONative>> AllSharedPtrs;	//reverse lookup

	FThreadSafeBool bHasActiveNativePointers;
};
