Updated .uplugin file
Renamed HarmonyLinkUEBPLibrary files to HarmonyLinkClient
This commit is contained in:
parent
72349e9177
commit
cb724ec3b3
4 changed files with 34 additions and 32 deletions
|
@ -1,24 +1,26 @@
|
||||||
{
|
{
|
||||||
"FileVersion": 3,
|
"FileVersion": 3,
|
||||||
"Version": 1,
|
"Version": 1,
|
||||||
"VersionName": "1.0",
|
"VersionName": "0.1",
|
||||||
"FriendlyName": "HarmonyLinkUE",
|
"FriendlyName": "HarmonyLinkUE",
|
||||||
"Description": "",
|
"Description": "A plugin that provides real-time device metrics for games running on handheld devices, starting with the Steam Deck.",
|
||||||
"Category": "Other",
|
"Category": "Handheld",
|
||||||
"CreatedBy": "Jordon Brooks",
|
"CreatedBy": "Jordon Brooks",
|
||||||
"CreatedByURL": "https://jordongamedev.co.uk",
|
"CreatedByURL": "https://jordongamedev.co.uk",
|
||||||
"DocsURL": "",
|
"DocsURL": "",
|
||||||
"MarketplaceURL": "",
|
"MarketplaceURL": "",
|
||||||
"SupportURL": "",
|
"SupportURL": "",
|
||||||
"CanContainContent": true,
|
"EngineVersion": "5.2.0",
|
||||||
"IsBetaVersion": true,
|
"CanContainContent": false,
|
||||||
"IsExperimentalVersion": false,
|
"IsBetaVersion": false,
|
||||||
|
"IsExperimentalVersion": true,
|
||||||
"Installed": false,
|
"Installed": false,
|
||||||
"Modules": [
|
"Modules": [
|
||||||
{
|
{
|
||||||
"Name": "HarmonyLinkUE",
|
"Name": "HarmonyLinkUE",
|
||||||
"Type": "Runtime",
|
"Type": "Runtime",
|
||||||
"LoadingPhase": "PreLoadingScreen"
|
"LoadingPhase": "PreLoadingScreen",
|
||||||
|
"WhitelistPlatforms": ["Win64", "Win32", "Linux"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,74 +1,74 @@
|
||||||
// .cpp file
|
// .cpp file
|
||||||
|
|
||||||
#include "HarmonyLinkUEBPLibrary.h"
|
#include "HarmonyLinkClient.h"
|
||||||
#include "Interfaces/IHttpResponse.h"
|
#include "Interfaces/IHttpResponse.h"
|
||||||
|
|
||||||
FAllInfo UHarmonyLinkUEBPLibrary::CachedAllInfo;
|
FAllInfo UHarmonyLinkClient::CachedAllInfo;
|
||||||
FHarmonyLinkVersionData UHarmonyLinkUEBPLibrary::CachedVersionData;
|
FHarmonyLinkVersionData UHarmonyLinkClient::CachedVersionData;
|
||||||
bool UHarmonyLinkUEBPLibrary::Connected;
|
bool UHarmonyLinkClient::Connected;
|
||||||
|
|
||||||
UHarmonyLinkUEBPLibrary::UHarmonyLinkUEBPLibrary(const FObjectInitializer& ObjectInitializer)
|
UHarmonyLinkClient::UHarmonyLinkClient(const FObjectInitializer& ObjectInitializer)
|
||||||
: Super(ObjectInitializer)
|
: Super(ObjectInitializer)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UHarmonyLinkUEBPLibrary::CheckServerStatus(FServerStatusCallback Callback)
|
void UHarmonyLinkClient::CheckServerStatus(FServerStatusCallback Callback)
|
||||||
{
|
{
|
||||||
TSharedPtr<IHttpRequest, ESPMode::ThreadSafe> Request = FHttpModule::Get().CreateRequest();
|
TSharedPtr<IHttpRequest, ESPMode::ThreadSafe> Request = FHttpModule::Get().CreateRequest();
|
||||||
Request->SetURL(TEXT("http://localhost:9000/are_you_there"));
|
Request->SetURL(TEXT("http://localhost:9000/are_you_there"));
|
||||||
Request->SetVerb(TEXT("GET"));
|
Request->SetVerb(TEXT("GET"));
|
||||||
|
|
||||||
Request->OnProcessRequestComplete().BindLambda(&UHarmonyLinkUEBPLibrary::OnCheckServerStatusResponseReceived, Callback);
|
Request->OnProcessRequestComplete().BindLambda(&UHarmonyLinkClient::OnCheckServerStatusResponseReceived, Callback);
|
||||||
|
|
||||||
Request->ProcessRequest();
|
Request->ProcessRequest();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UHarmonyLinkUEBPLibrary::RefreshOSInfo(FOSInfoCallback Callback)
|
void UHarmonyLinkClient::RefreshOSInfo(FOSInfoCallback Callback)
|
||||||
{
|
{
|
||||||
TSharedPtr<IHttpRequest, ESPMode::ThreadSafe> Request = FHttpModule::Get().CreateRequest();
|
TSharedPtr<IHttpRequest, ESPMode::ThreadSafe> Request = FHttpModule::Get().CreateRequest();
|
||||||
Request->SetURL(TEXT("http://localhost:9000/os_info"));
|
Request->SetURL(TEXT("http://localhost:9000/os_info"));
|
||||||
Request->SetVerb(TEXT("GET"));
|
Request->SetVerb(TEXT("GET"));
|
||||||
|
|
||||||
Request->OnProcessRequestComplete().BindLambda(&UHarmonyLinkUEBPLibrary::OnOSInfoResponseReceived, Callback);
|
Request->OnProcessRequestComplete().BindLambda(&UHarmonyLinkClient::OnOSInfoResponseReceived, Callback);
|
||||||
|
|
||||||
Request->ProcessRequest();
|
Request->ProcessRequest();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UHarmonyLinkUEBPLibrary::RefreshBatteryInfo(FBatteryInfoCallback Callback)
|
void UHarmonyLinkClient::RefreshBatteryInfo(FBatteryInfoCallback Callback)
|
||||||
{
|
{
|
||||||
TSharedPtr<IHttpRequest, ESPMode::ThreadSafe> Request = FHttpModule::Get().CreateRequest();
|
TSharedPtr<IHttpRequest, ESPMode::ThreadSafe> Request = FHttpModule::Get().CreateRequest();
|
||||||
Request->SetURL(TEXT("http://localhost:9000/battery_info"));
|
Request->SetURL(TEXT("http://localhost:9000/battery_info"));
|
||||||
Request->SetVerb(TEXT("GET"));
|
Request->SetVerb(TEXT("GET"));
|
||||||
|
|
||||||
Request->OnProcessRequestComplete().BindLambda(&UHarmonyLinkUEBPLibrary::OnBatteryInfoResponseReceived, Callback);
|
Request->OnProcessRequestComplete().BindLambda(&UHarmonyLinkClient::OnBatteryInfoResponseReceived, Callback);
|
||||||
|
|
||||||
Request->ProcessRequest();
|
Request->ProcessRequest();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UHarmonyLinkUEBPLibrary::RefreshAllInfo(FDeviceInfoCallback Callback)
|
void UHarmonyLinkClient::RefreshAllInfo(FDeviceInfoCallback Callback)
|
||||||
{
|
{
|
||||||
TSharedPtr<IHttpRequest, ESPMode::ThreadSafe> Request = FHttpModule::Get().CreateRequest();
|
TSharedPtr<IHttpRequest, ESPMode::ThreadSafe> Request = FHttpModule::Get().CreateRequest();
|
||||||
Request->SetURL(TEXT("http://localhost:9000/all_info"));
|
Request->SetURL(TEXT("http://localhost:9000/all_info"));
|
||||||
Request->SetVerb(TEXT("GET"));
|
Request->SetVerb(TEXT("GET"));
|
||||||
|
|
||||||
Request->OnProcessRequestComplete().BindLambda(&UHarmonyLinkUEBPLibrary::OnDeviceInfoResponseReceived, Callback);
|
Request->OnProcessRequestComplete().BindLambda(&UHarmonyLinkClient::OnDeviceInfoResponseReceived, Callback);
|
||||||
|
|
||||||
Request->ProcessRequest();
|
Request->ProcessRequest();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UHarmonyLinkUEBPLibrary::RefreshVersionInfo(FVersionInfoCallback Callback)
|
void UHarmonyLinkClient::RefreshVersionInfo(FVersionInfoCallback Callback)
|
||||||
{
|
{
|
||||||
TSharedPtr<IHttpRequest, ESPMode::ThreadSafe> Request = FHttpModule::Get().CreateRequest();
|
TSharedPtr<IHttpRequest, ESPMode::ThreadSafe> Request = FHttpModule::Get().CreateRequest();
|
||||||
Request->SetURL(TEXT("http://localhost:9000/version_info"));
|
Request->SetURL(TEXT("http://localhost:9000/version_info"));
|
||||||
Request->SetVerb(TEXT("GET"));
|
Request->SetVerb(TEXT("GET"));
|
||||||
|
|
||||||
Request->OnProcessRequestComplete().BindLambda(&UHarmonyLinkUEBPLibrary::OnVersionInfoResponseReceived, Callback);
|
Request->OnProcessRequestComplete().BindLambda(&UHarmonyLinkClient::OnVersionInfoResponseReceived, Callback);
|
||||||
|
|
||||||
Request->ProcessRequest();
|
Request->ProcessRequest();
|
||||||
}
|
}
|
||||||
|
|
||||||
void UHarmonyLinkUEBPLibrary::OnCheckServerStatusResponseReceived(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful, FServerStatusCallback Callback)
|
void UHarmonyLinkClient::OnCheckServerStatusResponseReceived(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful, FServerStatusCallback Callback)
|
||||||
{
|
{
|
||||||
if (bWasSuccessful && Response.IsValid() && Response->GetResponseCode() == EHttpResponseCodes::Ok)
|
if (bWasSuccessful && Response.IsValid() && Response->GetResponseCode() == EHttpResponseCodes::Ok)
|
||||||
{
|
{
|
||||||
|
@ -88,7 +88,7 @@ void UHarmonyLinkUEBPLibrary::OnCheckServerStatusResponseReceived(FHttpRequestPt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UHarmonyLinkUEBPLibrary::OnOSInfoResponseReceived(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful, FOSInfoCallback Callback)
|
void UHarmonyLinkClient::OnOSInfoResponseReceived(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful, FOSInfoCallback Callback)
|
||||||
{
|
{
|
||||||
if (bWasSuccessful && Response.IsValid() && Response->GetResponseCode() == EHttpResponseCodes::Ok)
|
if (bWasSuccessful && Response.IsValid() && Response->GetResponseCode() == EHttpResponseCodes::Ok)
|
||||||
{
|
{
|
||||||
|
@ -122,7 +122,7 @@ void UHarmonyLinkUEBPLibrary::OnOSInfoResponseReceived(FHttpRequestPtr Request,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UHarmonyLinkUEBPLibrary::OnBatteryInfoResponseReceived(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful, FBatteryInfoCallback Callback)
|
void UHarmonyLinkClient::OnBatteryInfoResponseReceived(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful, FBatteryInfoCallback Callback)
|
||||||
{
|
{
|
||||||
if (bWasSuccessful && Response.IsValid() && Response->GetResponseCode() == EHttpResponseCodes::Ok)
|
if (bWasSuccessful && Response.IsValid() && Response->GetResponseCode() == EHttpResponseCodes::Ok)
|
||||||
{
|
{
|
||||||
|
@ -164,7 +164,7 @@ void UHarmonyLinkUEBPLibrary::OnBatteryInfoResponseReceived(FHttpRequestPtr Requ
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UHarmonyLinkUEBPLibrary::OnDeviceInfoResponseReceived(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful, FDeviceInfoCallback Callback)
|
void UHarmonyLinkClient::OnDeviceInfoResponseReceived(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful, FDeviceInfoCallback Callback)
|
||||||
{
|
{
|
||||||
if (bWasSuccessful && Response.IsValid() && Response->GetResponseCode() == EHttpResponseCodes::Ok)
|
if (bWasSuccessful && Response.IsValid() && Response->GetResponseCode() == EHttpResponseCodes::Ok)
|
||||||
{
|
{
|
||||||
|
@ -253,7 +253,7 @@ void UHarmonyLinkUEBPLibrary::OnDeviceInfoResponseReceived(FHttpRequestPtr Reque
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void UHarmonyLinkUEBPLibrary::OnVersionInfoResponseReceived(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful, FVersionInfoCallback Callback)
|
void UHarmonyLinkClient::OnVersionInfoResponseReceived(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful, FVersionInfoCallback Callback)
|
||||||
{
|
{
|
||||||
if (bWasSuccessful && Response.IsValid() && Response->GetResponseCode() == EHttpResponseCodes::Ok)
|
if (bWasSuccessful && Response.IsValid() && Response->GetResponseCode() == EHttpResponseCodes::Ok)
|
||||||
{
|
{
|
|
@ -1,4 +1,4 @@
|
||||||
// Copyright Epic Games, Inc. All Rights Reserved.
|
// Copyright Jordon Brooks © 2023
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
#include "Engine/World.h"
|
#include "Engine/World.h"
|
||||||
#include "Engine/WorldComposition.h"
|
#include "Engine/WorldComposition.h"
|
||||||
|
|
||||||
#include "HarmonyLinkUEBPLibrary.generated.h"
|
#include "HarmonyLinkClient.generated.h"
|
||||||
|
|
||||||
UENUM(BlueprintType)
|
UENUM(BlueprintType)
|
||||||
enum class EDockModel : uint8
|
enum class EDockModel : uint8
|
||||||
|
@ -219,7 +219,7 @@ DECLARE_DYNAMIC_DELEGATE_OneParam(FServerStatusCallback, const bool, connected);
|
||||||
* https://wiki.unrealengine.com/Custom_Blueprint_Node_Creation
|
* https://wiki.unrealengine.com/Custom_Blueprint_Node_Creation
|
||||||
*/
|
*/
|
||||||
UCLASS()
|
UCLASS()
|
||||||
class HARMONYLINKUE_API UHarmonyLinkUEBPLibrary : public UBlueprintFunctionLibrary
|
class HARMONYLINKUE_API UHarmonyLinkClient : public UBlueprintFunctionLibrary
|
||||||
{
|
{
|
||||||
GENERATED_UCLASS_BODY()
|
GENERATED_UCLASS_BODY()
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// Copyright Epic Games, Inc. All Rights Reserved.
|
// Copyright Jordon Brooks © 2023
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue