Added Module Remote To add HTTP basic RemoteControl

This commit is contained in:
2025-07-16 02:41:08 +02:00
parent d6b8874827
commit da89e35eb2
13 changed files with 769 additions and 25 deletions

View File

@ -432,6 +432,7 @@ FGuid UDTFluxCoreSubsystem::InitContestRankingsDisplay(const int ContestId)
// no need to request ContestRankings;
if (IsContestRankingSealed(ContestId))
{
UE_LOG(logDTFluxCoreSubsystem, Warning, TEXT("ContestRankings already Sealed for ContestId %i"), ContestId);
const FGuid DisplayRequestId = FGuid::NewGuid();
OnContestRankingDisplayReady.Broadcast(DisplayRequestId, true);
return DisplayRequestId;
@ -548,7 +549,7 @@ FGuid UDTFluxCoreSubsystem::InitSplitRankingsDisplay(const int ContestId, const
EDTFluxApiDataType::SplitRanking, ContestId, StageId, SplitId, OnSuccess, OnError, true);
return DisplayRequestId;
}
UE_LOG(logDTFluxCoreSubsystem, Error, TEXT("DTFluxDatastorage unavailable ..."));
UE_LOG(logDTFluxCoreSubsystem, Error, TEXT("DTFluxDataStorage unavailable ..."));
OnSplitRankingDisplayReady.Broadcast(FGuid(), false);
return FGuid();
}
@ -607,25 +608,7 @@ bool UDTFluxCoreSubsystem::GetSplitRankingForBib(const int ContestId, const int
return false;
}
bool UDTFluxCoreSubsystem::GetContestRanking(const int ContestId, FDTFluxContestRanking& OutContestRanking)
{
if (DataStorage)
{
FDTFluxContest Contest;
if (GetContestForId(ContestId, Contest))
{
for (auto& Ranking : DataStorage->ContestRankings[ContestId].Rankings)
{
OutContestRanking = Ranking;
return true;
}
}
UE_LOG(logDTFluxCoreSubsystem, Warning, TEXT("Unable to find ContestRanking for ContestId %i"), ContestId);
return false;
}
UE_LOG(logDTFluxCoreSubsystem, Error, TEXT("DataStorage not available"));
return false;
}
bool UDTFluxCoreSubsystem::GetContestRankings(const int ContestId,
FDTFluxContestRankings& OutContestRankings)
@ -638,8 +621,9 @@ bool UDTFluxCoreSubsystem::GetContestRankings(const int ContestId,
if (NetworkSubsystem)
{
UE_LOG(logDTFluxCoreSubsystem, Warning, TEXT("Requesting ContestRankings for ContestId %i"), ContestId);
TArray<int> TackedContestIds = {ContestId};
TrackedRequestContestRankings(TackedContestIds);
TArray<int> TrackedContestIds;
TrackedContestIds.Add(ContestId);
TrackedRequestContestRankings(TrackedContestIds);
return false;
}
UE_LOG(logDTFluxCoreSubsystem, Error, TEXT("NetworkSubsystem unavailable"));

View File

@ -121,7 +121,6 @@ public:
UFUNCTION(BlueprintCallable, Category="DTFlux|Core Subsystem")
FGuid InitSplitRankingsDisplay(const int ContestId, const int StageId, const int SplitId);
UFUNCTION(BlueprintCallable, Category="DTFlux|Core Subsystem")
bool GetStageRankingForBib(const int ContestId, const int StageId, const int Bib,
@ -129,8 +128,8 @@ public:
UFUNCTION(BlueprintCallable, Category="DTFlux|Core Subsystem")
bool GetSplitRankingForBib(const int ContestId, const int StageId, const int SplitId, const int Bib,
FDTFluxSplitRanking& OutSplitRankings);
UFUNCTION(BlueprintCallable, Category="DTFlux|Core Subsystem")
bool GetContestRanking(const int ContestId, FDTFluxContestRanking& OutContestRanking);
UFUNCTION(BlueprintCallable, Category="DTFlux|Core Subsystem")
bool GetContestRankings(const int ContestId, FDTFluxContestRankings& OutContestRankings);
UFUNCTION(BlueprintCallable, Category="DTFlux|Core Subsystem")