A Demo Project for the UnrealEngineSDK
Loading...
Searching...
No Matches
VaRestLibrary.h
Go to the documentation of this file.
1// Copyright 2014-2019 Vladimir Alyamkin. All Rights Reserved.
2
3#pragma once
4
5#include "Kismet/BlueprintFunctionLibrary.h"
6
7#include "VaRestTypes.h"
8
9#include "VaRestLibrary.generated.h"
10
11class UVaRestSettings;
12
16UCLASS()
17class VAREST_API UVaRestLibrary : public UBlueprintFunctionLibrary
18{
19 GENERATED_BODY()
20
22 // Data Accessors
23public:
25 UFUNCTION(BlueprintPure, Category = "VaRest|Common")
26 static UVaRestSettings* GetVaRestSettings();
27
29 // Helpers
30
31public:
33 UFUNCTION(BlueprintCallable, Category = "VaRest|Utility")
34 static FString PercentEncode(const FString& Source);
35
42 UFUNCTION(BlueprintCallable, Category = "VaRest|Utility", meta = (DisplayName = "Base64 Encode"))
43 static FString Base64Encode(const FString& Source);
44
52 UFUNCTION(BlueprintCallable, Category = "VaRest|Utility", meta = (DisplayName = "Base64 Decode"))
53 static bool Base64Decode(const FString& Source, FString& Dest);
54
61 UFUNCTION(BlueprintCallable, Category = "VaRest|Utility", meta = (DisplayName = "Base64 Encode Data"))
62 static bool Base64EncodeData(const TArray<uint8>& Data, FString& Dest);
63
71 UFUNCTION(BlueprintCallable, Category = "VaRest|Utility", meta = (DisplayName = "Base64 Decode Data"))
72 static bool Base64DecodeData(const FString& Source, TArray<uint8>& Dest);
73
79 UFUNCTION(BlueprintCallable, Category = "VaRest|Utility", meta = (DisplayName = "String to MD5"))
80 static FString StringToMd5(const FString& StringToHash);
81
85 UFUNCTION(BlueprintCallable, Category = "VaRest|Utility", meta = (DisplayName = "String to SHA1"))
86 static FString StringToSha1(const FString& StringToHash);
87
91 UFUNCTION(BlueprintPure, Category = "VaRest|Utility", meta = (DisplayName = "HTTP Status Int To Enum"))
92 static FORCEINLINE EVaRestHttpStatusCode::Type HTTPStatusIntToEnum(int32 StatusCode) { return (EVaRestHttpStatusCode::Type)StatusCode; }
93
97 UFUNCTION(BlueprintPure, Category = "VaRest|Utility", meta = (DisplayName = "Get VaRest Version"))
98 static FString GetVaRestVersion();
99
101 // Common Network Helpers
102
103public:
107 UFUNCTION(BlueprintPure, Category = "VaRest|Utility", meta = (WorldContext = "WorldContextObject"))
108 static FVaRestURL GetWorldURL(UObject* WorldContextObject);
109};
static FORCEINLINE EVaRestHttpStatusCode::Type HTTPStatusIntToEnum(int32 StatusCode)
UFUNCTION(BlueprintPure, Category = "VaRest|Utility", meta = (DisplayName = "HTTP Status Int To Enum"...
UCLASS(config = Engine, defaultconfig)
UENUM(BlueprintType)
Definition VaRestTypes.h:65
USTRUCT(BlueprintType)