From a8c6e9460f0521b89adf64f28d5c7fd94c2f6d33 Mon Sep 17 00:00:00 2001 From: Devrim Yasar Date: Wed, 16 Apr 2025 13:25:40 -0500 Subject: [PATCH] removed varest --- Plugins/FSR3-550/FSR3/FSR3.uplugin | 5 +- .../FSR3MovieRenderPipeline.uplugin | 5 +- .../Binaries/Mac/UnrealEditor.modules | 8 - .../UnrealEditor-VaRest-Win64-DebugGame.exp | Bin 104622 -> 0 bytes .../Binaries/Win64/UnrealEditor-VaRest.exp | Bin 104590 -> 0 bytes ...ealEditor-VaRestEditor-Win64-DebugGame.exp | Bin 16416 -> 0 bytes .../Win64/UnrealEditor-VaRestEditor.exp | Bin 16384 -> 0 bytes .../UnrealEditor-Win64-DebugGame.modules | 8 - .../Binaries/Win64/UnrealEditor.modules | 8 - Plugins/VaRestPlugin/Config/BaseVaRest.ini | 24 - Plugins/VaRestPlugin/Config/DefaultVaRest.ini | 24 - Plugins/VaRestPlugin/Resources/Icon128.png | Bin 9885 -> 0 bytes Plugins/VaRestPlugin/Source/.clang-format | 41 - .../Source/VaRest/Private/VaRest.cpp | 58 - .../VaRest/Private/VaRestJsonObject.cpp | 801 ------------ .../VaRest/Private/VaRestJsonParser.cpp | 1150 ----------------- .../Source/VaRest/Private/VaRestJsonParser.h | 210 --- .../Source/VaRest/Private/VaRestJsonValue.cpp | 210 --- .../Source/VaRest/Private/VaRestLibrary.cpp | 101 -- .../VaRest/Private/VaRestRequestJSON.cpp | 643 --------- .../Source/VaRest/Private/VaRestSettings.cpp | 10 - .../Source/VaRest/Private/VaRestSubsystem.cpp | 217 ---- .../Source/VaRest/Public/VaRest.h | 43 - .../Source/VaRest/Public/VaRestDefines.h | 20 - .../Source/VaRest/Public/VaRestJsonObject.h | 289 ----- .../Source/VaRest/Public/VaRestJsonValue.h | 101 -- .../Source/VaRest/Public/VaRestLibrary.h | 109 -- .../Source/VaRest/Public/VaRestRequestJSON.h | 358 ----- .../Source/VaRest/Public/VaRestSettings.h | 20 - .../Source/VaRest/Public/VaRestSubsystem.h | 129 -- .../Source/VaRest/Public/VaRestTypes.h | 199 --- .../Source/VaRest/VaRest.Build.cs | 34 - .../VaRestEditor/Private/VaRestEditor.cpp | 22 - .../VaRestEditor/Private/VaRest_BreakJson.cpp | 561 -------- .../Source/VaRestEditor/Public/VaRestEditor.h | 14 - .../VaRestEditor/Public/VaRest_BreakJson.h | 100 -- .../Source/VaRestEditor/VaRestEditor.Build.cs | 60 - Plugins/VaRestPlugin/VaRest.uplugin | 28 - Source/LuckyWorldV2/LuckyWorldV2.Build.cs | 7 +- .../Private/Core/LuckyRobotsGameInstance.cpp | 175 ++- .../Private/Menus/MainScreenUserWidget.cpp | 32 +- 41 files changed, 137 insertions(+), 5687 deletions(-) delete mode 100644 Plugins/VaRestPlugin/Binaries/Mac/UnrealEditor.modules delete mode 100644 Plugins/VaRestPlugin/Binaries/Win64/UnrealEditor-VaRest-Win64-DebugGame.exp delete mode 100644 Plugins/VaRestPlugin/Binaries/Win64/UnrealEditor-VaRest.exp delete mode 100644 Plugins/VaRestPlugin/Binaries/Win64/UnrealEditor-VaRestEditor-Win64-DebugGame.exp delete mode 100644 Plugins/VaRestPlugin/Binaries/Win64/UnrealEditor-VaRestEditor.exp delete mode 100644 Plugins/VaRestPlugin/Binaries/Win64/UnrealEditor-Win64-DebugGame.modules delete mode 100644 Plugins/VaRestPlugin/Binaries/Win64/UnrealEditor.modules delete mode 100644 Plugins/VaRestPlugin/Config/BaseVaRest.ini delete mode 100644 Plugins/VaRestPlugin/Config/DefaultVaRest.ini delete mode 100644 Plugins/VaRestPlugin/Resources/Icon128.png delete mode 100644 Plugins/VaRestPlugin/Source/.clang-format delete mode 100644 Plugins/VaRestPlugin/Source/VaRest/Private/VaRest.cpp delete mode 100644 Plugins/VaRestPlugin/Source/VaRest/Private/VaRestJsonObject.cpp delete mode 100644 Plugins/VaRestPlugin/Source/VaRest/Private/VaRestJsonParser.cpp delete mode 100644 Plugins/VaRestPlugin/Source/VaRest/Private/VaRestJsonParser.h delete mode 100644 Plugins/VaRestPlugin/Source/VaRest/Private/VaRestJsonValue.cpp delete mode 100644 Plugins/VaRestPlugin/Source/VaRest/Private/VaRestLibrary.cpp delete mode 100644 Plugins/VaRestPlugin/Source/VaRest/Private/VaRestRequestJSON.cpp delete mode 100644 Plugins/VaRestPlugin/Source/VaRest/Private/VaRestSettings.cpp delete mode 100644 Plugins/VaRestPlugin/Source/VaRest/Private/VaRestSubsystem.cpp delete mode 100644 Plugins/VaRestPlugin/Source/VaRest/Public/VaRest.h delete mode 100644 Plugins/VaRestPlugin/Source/VaRest/Public/VaRestDefines.h delete mode 100644 Plugins/VaRestPlugin/Source/VaRest/Public/VaRestJsonObject.h delete mode 100644 Plugins/VaRestPlugin/Source/VaRest/Public/VaRestJsonValue.h delete mode 100644 Plugins/VaRestPlugin/Source/VaRest/Public/VaRestLibrary.h delete mode 100644 Plugins/VaRestPlugin/Source/VaRest/Public/VaRestRequestJSON.h delete mode 100644 Plugins/VaRestPlugin/Source/VaRest/Public/VaRestSettings.h delete mode 100644 Plugins/VaRestPlugin/Source/VaRest/Public/VaRestSubsystem.h delete mode 100644 Plugins/VaRestPlugin/Source/VaRest/Public/VaRestTypes.h delete mode 100644 Plugins/VaRestPlugin/Source/VaRest/VaRest.Build.cs delete mode 100644 Plugins/VaRestPlugin/Source/VaRestEditor/Private/VaRestEditor.cpp delete mode 100644 Plugins/VaRestPlugin/Source/VaRestEditor/Private/VaRest_BreakJson.cpp delete mode 100644 Plugins/VaRestPlugin/Source/VaRestEditor/Public/VaRestEditor.h delete mode 100644 Plugins/VaRestPlugin/Source/VaRestEditor/Public/VaRest_BreakJson.h delete mode 100644 Plugins/VaRestPlugin/Source/VaRestEditor/VaRestEditor.Build.cs delete mode 100644 Plugins/VaRestPlugin/VaRest.uplugin diff --git a/Plugins/FSR3-550/FSR3/FSR3.uplugin b/Plugins/FSR3-550/FSR3/FSR3.uplugin index aaf33cae..08d7d104 100644 --- a/Plugins/FSR3-550/FSR3/FSR3.uplugin +++ b/Plugins/FSR3-550/FSR3/FSR3.uplugin @@ -92,10 +92,7 @@ { "Name": "FFXFSR3Settings", "Type": "Runtime", - "LoadingPhase": "EarliestPossible", - "PlatformAllowList": [ - "Win64" - ] + "LoadingPhase": "EarliestPossible" } ] } \ No newline at end of file diff --git a/Plugins/FSR3-550/FSR3MovieRenderPipeline/FSR3MovieRenderPipeline.uplugin b/Plugins/FSR3-550/FSR3MovieRenderPipeline/FSR3MovieRenderPipeline.uplugin index 46b168e2..1997602d 100644 --- a/Plugins/FSR3-550/FSR3MovieRenderPipeline/FSR3MovieRenderPipeline.uplugin +++ b/Plugins/FSR3-550/FSR3MovieRenderPipeline/FSR3MovieRenderPipeline.uplugin @@ -33,7 +33,10 @@ }, { "Name": "FSR3", - "Enabled": true + "Enabled": true, + "PlatformAllowList": [ + "Win64" + ] } ] } \ No newline at end of file diff --git a/Plugins/VaRestPlugin/Binaries/Mac/UnrealEditor.modules b/Plugins/VaRestPlugin/Binaries/Mac/UnrealEditor.modules deleted file mode 100644 index 7e37d5a3..00000000 --- a/Plugins/VaRestPlugin/Binaries/Mac/UnrealEditor.modules +++ /dev/null @@ -1,8 +0,0 @@ -{ - "BuildId": "37670630", - "Modules": - { - "VaRest": "UnrealEditor-VaRest.dylib", - "VaRestEditor": "UnrealEditor-VaRestEditor.dylib" - } -} \ No newline at end of file diff --git a/Plugins/VaRestPlugin/Binaries/Win64/UnrealEditor-VaRest-Win64-DebugGame.exp b/Plugins/VaRestPlugin/Binaries/Win64/UnrealEditor-VaRest-Win64-DebugGame.exp deleted file mode 100644 index 6930844deeeff821cf2f460e8fde7c478d4cd200..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 104622 zcmeI5dz@8O`Tw6Iq*j`!sFjegF8qoL3#$ z@4cR9J$v2nYvA<<(F^$d?+ZjU1^>t2+{{2amv;WmzmHr)G=Tq}Kkl#t2N5;me{%;i zYbMr}bvl&jPoqRfZFQfV|2ERJ1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W7wI%rP!1 z^~^FZD)r1$j7n=<%N}pYJH8#Asty~E=++d5Z*NO#q`!sBHH_1e+jz)dOVN?*8{`zB zg@?bti>jDU^R?vOiT=eAc+)*b>nT}*#~NdI{^Vg=?&Uvu zDvO+o%|p+)>4@C7ldm!1i*@tOi-@@R73!qvs@_9$F!%>Iu8l*X*uD?r=$MzK~8 z7n)ww=$Wd`3)jNaF5{NBoMz*A?m zCQ)&gcNY-GIGQl>8L_=1aZ@C6@k<`LBWCkQGCPuO0ZFJUW)DcxZ;IIzl2k?HHjktV z5^MrVsw%)1mBsC_-W{UjOL~XA~t|b$`>!M%+F`5Xy?KkYQAC z%CDG42dj$T&XLE*jmL+LLrW3gG(J5&vZ16Z)I6*_Y7tg-4}9}J9^VmPA4r; z&K5r8?u1zT@WQ?-xBSk#+vw_uSSFdQ%ucX&F+q9L-an9;muVR47{cLXgH1!L2Zqu( KmTYV=P5%$81QkdC diff --git a/Plugins/VaRestPlugin/Binaries/Win64/UnrealEditor-VaRestEditor-Win64-DebugGame.exp b/Plugins/VaRestPlugin/Binaries/Win64/UnrealEditor-VaRestEditor-Win64-DebugGame.exp deleted file mode 100644 index 4b48a65218c507840f5e10b33a80874763ac5018..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16416 zcmeHNX^b4j8U5_R2VjhC3>afzZPs8gUgp}%U}k2=vp#pd-pgwk7{)v8^{}%u%N#y{ z#E=j|lt_sbB9Vk#3Q7DUk)j+D${`VvNJt?HN}_~F`Qa!;B1#ky!4H&+ysxTzy1J{o zXLjxUbIY!M^QOL6Usu<3SH0@OGfU}x9Q(HsJxlWFG79;6-u!?+8`csP@b?M)<>P7m zPvT!!!8q2K=^SH@kFVqV7q64pDwDKkfHAjWaZ3P_=6{R3^!HK^5G|pl6r#&$87-$3 zw305TE9gpEMOV>kx|-I|T3Scf(0aO-uA}Q|1KmIy=|>3w6+D+CsNdCvBzM z=yuvhchH@*o$jI?)J1nwm?9LV7{#fZdZ?HBs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JBJ^7q6Qxyf8)THM6Qh)iiBrSHbklcTOb@;3VtQ#K zya-jfkM_Hmemd)9B4PT1i;2(=TuhYy>SAJa9~=v%tw@~8E~cAab}>D4-o^CN`!1%B zHp0?SmHR2~WTIgjb1@Nm)Wt;UD=sERue+Ey#bAIaZAH83GcKlwe&=F(X#+--8r4US zxR`$Wp_7S)>1`Jip-wmjQ;6j;lL254e~f`l5^JrSmSPkFJNgqU!Y1 zkdx^S(-{{Np%-0Dl>Y2uV$=!yMN#gK(}OMsW5dPt&>JqMm#&7{qU!X~VHeX+pLQ}m zVfwv`iBJd37)7TiO2=JHjK1Sy;`E;;!*?wFXqyM$-K48;QIe@xAMsZ*U)7jDYRo!L z%{*k(UX3}eG2hadpKA>7QCNpmzCr#Gq=Y4nc|l|Tt}&}|zqAhdWpg4=QZX}8nYSqLhFz^ z4{6M2HRjhE^Dm9rg1e)2NacBr`LV{lqcPiXceDqU<|i7n0{24ekUGN}^PI+<*O=|N z7h1qzCYj}W;f~^)z)r;*@C;SEpP84m{k|Qdk`$pY*N3bj#u0lzFXk*vD@DzXe%z* zln;_=V((qz-0i3BX*8LB*>6O7B?9&I!SY47#wp6)jF8@Vz_XAx0{{eb# B_L2Yq diff --git a/Plugins/VaRestPlugin/Binaries/Win64/UnrealEditor-VaRestEditor.exp b/Plugins/VaRestPlugin/Binaries/Win64/UnrealEditor-VaRestEditor.exp deleted file mode 100644 index 0686f751ebc8c8e5c0a44323d22e52e0df73ca79..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16384 zcmeHNS&SUT8UF3T2L_C73>Yx5w%1?|FLUi>Ff+5`S=-pVUiR|Z3=Hj^_ImJmW;2Hm zNMZ;_$f-mk5mAs5g+#G(NIWDG4?!X#N{E6Kln@Cic_4xZ66I9#fD{z+{Z-x5)m_~^ zvuo$gE&JbZzN!DOzpHAhtG?>uGfU|sT(@r{dY0tXV-}5uVST`#m1~KL_*=$bzMjJW zH2(Dz%_GgZ?g{4j`YO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^1Q~pqA~x{m~EIH?Mucvq%oh-m^U%zXB>l!o!Cbu1$H z&KKWFw>N~!lG-|G2|O@S-eh+c%^{~VVdX!`_v@#)I;e=``9D2yc51v z{QrMC5^?~e=5rpWBH?EkN+SgxVuVL<(hLp&mHOg4>3HkddXN2roNo9ZlQ_NMKAQK626yrQjFWR^|b!(>lC}7rxO?SRHFTPg71B| zJ;U&81x0u7==8x7jpdTcUQjrJ#bYn%9ri_@HmFtVA=J8qP8rk)?w8AzhSbjog58`- z1HC#rO|WY4mUY5ArwCTj#h)I82WVBP_o?fZ_JyAoxOME#PYF8m3m4_XLbPspVQ<6R rZVRb+F{c3T)EBG%hs*TJ;1Ad7!^7B3l1{gca=}#o3#jggsQUi{;05Vw diff --git a/Plugins/VaRestPlugin/Binaries/Win64/UnrealEditor-Win64-DebugGame.modules b/Plugins/VaRestPlugin/Binaries/Win64/UnrealEditor-Win64-DebugGame.modules deleted file mode 100644 index 15befc2f..00000000 --- a/Plugins/VaRestPlugin/Binaries/Win64/UnrealEditor-Win64-DebugGame.modules +++ /dev/null @@ -1,8 +0,0 @@ -{ - "BuildId": "37670630", - "Modules": - { - "VaRest": "UnrealEditor-VaRest-Win64-DebugGame.dll", - "VaRestEditor": "UnrealEditor-VaRestEditor-Win64-DebugGame.dll" - } -} \ No newline at end of file diff --git a/Plugins/VaRestPlugin/Binaries/Win64/UnrealEditor.modules b/Plugins/VaRestPlugin/Binaries/Win64/UnrealEditor.modules deleted file mode 100644 index 5e46479c..00000000 --- a/Plugins/VaRestPlugin/Binaries/Win64/UnrealEditor.modules +++ /dev/null @@ -1,8 +0,0 @@ -{ - "BuildId": "37670630", - "Modules": - { - "VaRest": "UnrealEditor-VaRest.dll", - "VaRestEditor": "UnrealEditor-VaRestEditor.dll" - } -} \ No newline at end of file diff --git a/Plugins/VaRestPlugin/Config/BaseVaRest.ini b/Plugins/VaRestPlugin/Config/BaseVaRest.ini deleted file mode 100644 index 0ad8fd95..00000000 --- a/Plugins/VaRestPlugin/Config/BaseVaRest.ini +++ /dev/null @@ -1,24 +0,0 @@ -[CoreRedirects] -+PackageRedirects=(OldName="/VaRestPlugin/", NewName="/VaRest/", MatchSubstring=true) -+ClassRedirects=(OldName="/Script/VaRestPlugin.VaRestJsonObject",NewName="/Script/VaRest.VaRestJsonObject") -+ClassRedirects=(OldName="/Script/VaRestPlugin.VaRestJsonValue",NewName="/Script/VaRest.VaRestJsonValue") -+ClassRedirects=(OldName="/Script/VaRestPlugin.VaRestLibrary",NewName="/Script/VaRest.VaRestLibrary") -+ClassRedirects=(OldName="/Script/VaRestPlugin.VaRestRequestJSON",NewName="/Script/VaRest.VaRestRequestJSON") -+StructRedirects=(OldName="/Script/VaRestPlugin.VaRestCallResponse",NewName="/Script/VaRest.VaRestCallResponse") -+EnumRedirects=(OldName="/Script/VaRestPlugin.EVaJson",NewName="/Script/VaRest.EVaJson") -+EnumRedirects=(OldName="/Script/VaRestPlugin.EVaRestRequestVerb",NewName="/Script/VaRest.EVaRestRequestVerb") -+EnumRedirects=(OldName="/Script/VaRestPlugin.EVaRestRequestContentType",NewName="/Script/VaRest.EVaRestRequestContentType") -+EnumRedirects=(OldName="/Script/VaRestPlugin.EVaRestRequestStatus",NewName="/Script/VaRest.EVaRestRequestStatus") -+EnumRedirects=(OldName="/Script/VaRest.ERequestVerb",NewName="/Script/VaRest.EVaRestRequestVerb") -+EnumRedirects=(OldName="/Script/VaRest.ERequestContentType",NewName="/Script/VaRest.EVaRestRequestContentType") -+EnumRedirects=(OldName="/Script/VaRest.ERequestStatus",NewName="/Script/VaRest.EVaRestRequestStatus") -+EnumRedirects=(OldName="/Script/VaRest.EHttpStatusCode",NewName="/Script/VaRest.EVaRestHttpStatusCode") -+FunctionRedirects=(OldName="VaRestRequestJSON.ConstructRequest",NewName="VaRestRequestJSON.ConstructVaRestRequest") -+FunctionRedirects=(OldName="VaRestRequestJSON.ConstructRequestExt",NewName="VaRestRequestJSON.ConstructVaRestRequestExt") -+FunctionRedirects=(OldName="VaRestJsonObject.ConstructJsonObject",NewName="VaRestJsonObject.ConstructVaRestJsonObject") -+FunctionRedirects=(OldName="VaRestJsonValue.ConstructJsonValueNumber",NewName="VaRestSubsystem.ConstructJsonValueNumber") -+FunctionRedirects=(OldName="VaRestJsonValue.ConstructJsonValueString",NewName="VaRestSubsystem.ConstructJsonValueString") -+FunctionRedirects=(OldName="VaRestJsonValue.ConstructJsonValueBool",NewName="VaRestSubsystem.ConstructJsonValueBool") -+FunctionRedirects=(OldName="VaRestJsonValue.ConstructJsonValueArray",NewName="VaRestSubsystem.ConstructJsonValueArray") -+FunctionRedirects=(OldName="VaRestJsonValue.ConstructJsonValueObject",NewName="VaRestSubsystem.ConstructJsonValueObject") -+FunctionRedirects=(OldName="VaRestJsonValue.ConstructJsonValue",NewName="VaRestSubsystem.ConstructJsonValue") \ No newline at end of file diff --git a/Plugins/VaRestPlugin/Config/DefaultVaRest.ini b/Plugins/VaRestPlugin/Config/DefaultVaRest.ini deleted file mode 100644 index 0ad8fd95..00000000 --- a/Plugins/VaRestPlugin/Config/DefaultVaRest.ini +++ /dev/null @@ -1,24 +0,0 @@ -[CoreRedirects] -+PackageRedirects=(OldName="/VaRestPlugin/", NewName="/VaRest/", MatchSubstring=true) -+ClassRedirects=(OldName="/Script/VaRestPlugin.VaRestJsonObject",NewName="/Script/VaRest.VaRestJsonObject") -+ClassRedirects=(OldName="/Script/VaRestPlugin.VaRestJsonValue",NewName="/Script/VaRest.VaRestJsonValue") -+ClassRedirects=(OldName="/Script/VaRestPlugin.VaRestLibrary",NewName="/Script/VaRest.VaRestLibrary") -+ClassRedirects=(OldName="/Script/VaRestPlugin.VaRestRequestJSON",NewName="/Script/VaRest.VaRestRequestJSON") -+StructRedirects=(OldName="/Script/VaRestPlugin.VaRestCallResponse",NewName="/Script/VaRest.VaRestCallResponse") -+EnumRedirects=(OldName="/Script/VaRestPlugin.EVaJson",NewName="/Script/VaRest.EVaJson") -+EnumRedirects=(OldName="/Script/VaRestPlugin.EVaRestRequestVerb",NewName="/Script/VaRest.EVaRestRequestVerb") -+EnumRedirects=(OldName="/Script/VaRestPlugin.EVaRestRequestContentType",NewName="/Script/VaRest.EVaRestRequestContentType") -+EnumRedirects=(OldName="/Script/VaRestPlugin.EVaRestRequestStatus",NewName="/Script/VaRest.EVaRestRequestStatus") -+EnumRedirects=(OldName="/Script/VaRest.ERequestVerb",NewName="/Script/VaRest.EVaRestRequestVerb") -+EnumRedirects=(OldName="/Script/VaRest.ERequestContentType",NewName="/Script/VaRest.EVaRestRequestContentType") -+EnumRedirects=(OldName="/Script/VaRest.ERequestStatus",NewName="/Script/VaRest.EVaRestRequestStatus") -+EnumRedirects=(OldName="/Script/VaRest.EHttpStatusCode",NewName="/Script/VaRest.EVaRestHttpStatusCode") -+FunctionRedirects=(OldName="VaRestRequestJSON.ConstructRequest",NewName="VaRestRequestJSON.ConstructVaRestRequest") -+FunctionRedirects=(OldName="VaRestRequestJSON.ConstructRequestExt",NewName="VaRestRequestJSON.ConstructVaRestRequestExt") -+FunctionRedirects=(OldName="VaRestJsonObject.ConstructJsonObject",NewName="VaRestJsonObject.ConstructVaRestJsonObject") -+FunctionRedirects=(OldName="VaRestJsonValue.ConstructJsonValueNumber",NewName="VaRestSubsystem.ConstructJsonValueNumber") -+FunctionRedirects=(OldName="VaRestJsonValue.ConstructJsonValueString",NewName="VaRestSubsystem.ConstructJsonValueString") -+FunctionRedirects=(OldName="VaRestJsonValue.ConstructJsonValueBool",NewName="VaRestSubsystem.ConstructJsonValueBool") -+FunctionRedirects=(OldName="VaRestJsonValue.ConstructJsonValueArray",NewName="VaRestSubsystem.ConstructJsonValueArray") -+FunctionRedirects=(OldName="VaRestJsonValue.ConstructJsonValueObject",NewName="VaRestSubsystem.ConstructJsonValueObject") -+FunctionRedirects=(OldName="VaRestJsonValue.ConstructJsonValue",NewName="VaRestSubsystem.ConstructJsonValue") \ No newline at end of file diff --git a/Plugins/VaRestPlugin/Resources/Icon128.png b/Plugins/VaRestPlugin/Resources/Icon128.png deleted file mode 100644 index 3624a4bcfc6232ff551733075a5c105fd334ec24..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9885 zcmZ`tbTEaA_a;=ao1C<&?3d%orAl(7dyBVDNb>BcZ$2ayA*ea%lGr%nL9h# z%+4m8AIU!1$tF}@Rtyc902u%PGzoDL#dq%aA0fiO&)ovx;dcgW`d#Kb08~YzJcHrh z*JOs`iZTG;LH#Zl2mp`&$sYiKGb;f6(+2?FBmls(OKVo(f8T&NkP;IC-u@eZ+6v+T zfGS!- zj(*|h&k8HZ3iNE*!xE5x)RYR0;YQ!_LO~4t5V(YOMHKi!oq-iz8v&ZhjyRlDJU5VR zLOgF^7rL~Lwx95rmWvYCbtv$Iak7(3Ae%=>=QZAffY1j7{?d!c4{9 z*24vYPqz><`i{qkxMG17d7X=Alrv@TyZz~h6JI@%5f!f|)9L%=(adevhOwQL3fYaf z(~RMrP{aFaViw0fIs^{iP0i}XKU$2J8A9HsXMGg_`M1gr(F~$!&wd6>5`Wp~P9w;& zQ9cH>n6_zE9|E=?QstcAto~I6Ih7D?pabTVaF2o46H50)Pm!E;Ie{jwmhY(sq>O>S z-RUq%7{Zv+p+9RWR4k*ZrD#rSc-&qD)qK%)CtAp+n8J~FGcFf$y-BU6B_z*)NWcmv zAT(j+Mc@T22P<4qzQbuyc3s#hw~jbs8|OU6lX&--KI-j2rXqOmLzbkNiE4}-RrZqO zOkqJ!qYH*=+0_^_>c`H^g|?&j-c#r@x&s1tsZ1nqZBGLG*qzW8bS6-1@2g*k?2a4FTK%{q$z z6m@1<-DG#RAn93+p>qNQn?;2ij;8o4H0j(DmP>4TWKWk`D|B$qz!|r6(Y~sI$p@l7 zeNr0=WX0&R>Dqs~@Oe_mWG>gK`kN{El)&ZswtMPcqgt`5IKS%cXM+lGiAY{hnLGX- z*52LZts_Y<>w`bc*I^b>3kP8!e&gk?Qp9S5P=rAgG)O&f+Rdd%8_!~c?wH(N4P`I@ zO+-K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QAsd`nCuhiy^#oLz7lmtwaQ&@D@^N@D$H`m168UtQVZr|7@5NKiGk?9_< znQ@Ju(BzF@Jck9SM6!gk@dRP_>pZ#Nc z(2$$)p=$erw7U)K7mc2riEI~oI(c*XR%S*YR_89pM7g!)_;AK6IJ(9d2!i=zdi*4O z8}bJM_?q*7Xxk9DHqcB{~uTgBU1nX diff --git a/Plugins/VaRestPlugin/Source/.clang-format b/Plugins/VaRestPlugin/Source/.clang-format deleted file mode 100644 index f2faa030..00000000 --- a/Plugins/VaRestPlugin/Source/.clang-format +++ /dev/null @@ -1,41 +0,0 @@ ---- -Language: Cpp -BasedOnStyle: LLVM -IndentWidth: 4 -TabWidth: 4 -UseTab: ForContinuationAndIndentation -Standard: Cpp11 -AccessModifierOffset: -4 -AlignAfterOpenBracket: DontAlign -AlignEscapedNewlines: Right -AlignTrailingComments: true -AllowShortCaseLabelsOnASingleLine: true -AllowShortFunctionsOnASingleLine: InlineOnly -AllowShortLambdasOnASingleLine: All -BraceWrapping: - AfterCaseLabel: true - AfterClass: true - AfterControlStatement: true - AfterEnum: true - AfterFunction: true - AfterNamespace: true - AfterStruct: true - AfterUnion: true - AfterExternBlock: false - BeforeCatch: true - BeforeElse: true - BeforeLambdaBody: false - BeforeWhile: true - SplitEmptyFunction: true - SplitEmptyRecord: true - SplitEmptyNamespace: true -BreakBeforeBraces: Custom -BreakConstructorInitializersBeforeComma: true -ColumnLimit: 0 -PointerAlignment: Left -SpacesInAngles: false -CommentPragmas: '^[^ ]' ---- -Language: ObjC -DisableFormat: true -... diff --git a/Plugins/VaRestPlugin/Source/VaRest/Private/VaRest.cpp b/Plugins/VaRestPlugin/Source/VaRest/Private/VaRest.cpp deleted file mode 100644 index f4829540..00000000 --- a/Plugins/VaRestPlugin/Source/VaRest/Private/VaRest.cpp +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2014-2019 Vladimir Alyamkin. All Rights Reserved. - -#include "VaRest.h" - -#include "VaRestDefines.h" -#include "VaRestLibrary.h" -#include "VaRestSettings.h" - -#include "Developer/Settings/Public/ISettingsModule.h" -#include "UObject/Package.h" - -#define LOCTEXT_NAMESPACE "FVaRestModule" - -void FVaRestModule::StartupModule() -{ - ModuleSettings = NewObject(GetTransientPackage(), "VaRestSettings", RF_Standalone); - ModuleSettings->AddToRoot(); - - // Register settings - if (ISettingsModule* SettingsModule = FModuleManager::GetModulePtr("Settings")) - { - SettingsModule->RegisterSettings("Project", "Plugins", "VaRest", - LOCTEXT("RuntimeSettingsName", "VaRest"), - LOCTEXT("RuntimeSettingsDescription", "Configure VaRest plugin settings"), - ModuleSettings); - } - - UE_LOG(LogVaRest, Log, TEXT("%s: VaRest (%s) module started"), *VA_FUNC_LINE, *UVaRestLibrary::GetVaRestVersion()); -} - -void FVaRestModule::ShutdownModule() -{ - if (ISettingsModule* SettingsModule = FModuleManager::GetModulePtr("Settings")) - { - SettingsModule->UnregisterSettings("Project", "Plugins", "VaRest"); - } - - if (!GExitPurge) - { - ModuleSettings->RemoveFromRoot(); - } - else - { - ModuleSettings = nullptr; - } -} - -UVaRestSettings* FVaRestModule::GetSettings() const -{ - check(ModuleSettings); - return ModuleSettings; -} - -IMPLEMENT_MODULE(FVaRestModule, VaRest) - -DEFINE_LOG_CATEGORY(LogVaRest); - -#undef LOCTEXT_NAMESPACE diff --git a/Plugins/VaRestPlugin/Source/VaRest/Private/VaRestJsonObject.cpp b/Plugins/VaRestPlugin/Source/VaRest/Private/VaRestJsonObject.cpp deleted file mode 100644 index 0e872725..00000000 --- a/Plugins/VaRestPlugin/Source/VaRest/Private/VaRestJsonObject.cpp +++ /dev/null @@ -1,801 +0,0 @@ -// Copyright 2014-2019 Vladimir Alyamkin. All Rights Reserved. - -#include "VaRestJsonObject.h" - -#include "VaRestDefines.h" -#include "VaRestJsonParser.h" -#include "VaRestJsonValue.h" - -#include "HAL/FileManager.h" -#include "Misc/Paths.h" -#include "Policies/CondensedJsonPrintPolicy.h" -#include "Serialization/JsonSerializer.h" -#include "Serialization/JsonWriter.h" - -typedef TJsonWriterFactory> FCondensedJsonStringWriterFactory; -typedef TJsonWriter> FCondensedJsonStringWriter; - -UVaRestJsonObject::UVaRestJsonObject(const FObjectInitializer& ObjectInitializer) - : Super(ObjectInitializer) - , JsonObj(MakeShared()) -{ -} - -void UVaRestJsonObject::Reset() -{ - JsonObj = MakeShared(); -} - -TSharedRef& UVaRestJsonObject::GetRootObject() -{ - return JsonObj; -} - -void UVaRestJsonObject::SetRootObject(const TSharedPtr& JsonObject) -{ - if (JsonObject.IsValid()) - { - JsonObj = JsonObject.ToSharedRef(); - } - else - { - UE_LOG(LogVaRest, Error, TEXT("%s: Trying to set invalid json object as root one. Reset now."), *VA_FUNC_LINE); - Reset(); - } -} - -////////////////////////////////////////////////////////////////////////// -// Serialization - -FString UVaRestJsonObject::EncodeJson() const -{ - FString OutputString; - const auto Writer = TJsonWriterFactory<>::Create(&OutputString); - FJsonSerializer::Serialize(JsonObj, Writer); - - return OutputString; -} - -FString UVaRestJsonObject::EncodeJsonToSingleString() const -{ - FString OutputString; - const auto Writer = FCondensedJsonStringWriterFactory::Create(&OutputString); - FJsonSerializer::Serialize(JsonObj, Writer); - - return OutputString; -} - -bool UVaRestJsonObject::DecodeJson(const FString& JsonString, bool bUseIncrementalParser) -{ - if (bUseIncrementalParser) - { - const int32 BytesRead = DeserializeFromTCHARBytes(JsonString.GetCharArray().GetData(), JsonString.Len()); - - // JsonObj is always valid, but read bytes is zero when something went wrong - if (BytesRead > 0) - { - return true; - } - } - else - { - const TSharedRef> Reader = TJsonReaderFactory<>::Create(*JsonString); - TSharedPtr OutJsonObj; - if (FJsonSerializer::Deserialize(Reader, OutJsonObj)) - { - JsonObj = OutJsonObj.ToSharedRef(); - return true; - } - } - - // If we've failed to deserialize the string, we should clear our internal data - Reset(); - - UE_LOG(LogVaRest, Error, TEXT("Json decoding failed for: %s"), *JsonString); - - return false; -} - -////////////////////////////////////////////////////////////////////////// -// FJsonObject API - -FString UVaRestJsonObject::GetFieldTypeString(const FString& FieldName) const -{ - if (!JsonObj->HasTypedField(FieldName)) - { - return TEXT("Null"); - } - else if (!JsonObj->HasTypedField(FieldName)) - { - return TEXT("String"); - } - else if (!JsonObj->HasTypedField(FieldName)) - { - return TEXT("Number"); - } - else if (!JsonObj->HasTypedField(FieldName)) - { - return TEXT("Boolean"); - } - else if (!JsonObj->HasTypedField(FieldName)) - { - return TEXT("Object"); - } - else if (!JsonObj->HasTypedField(FieldName)) - { - return TEXT("Array"); - } - - UE_LOG(LogVaRest, Warning, TEXT("Field with name %s type unknown"), *FieldName); - return ""; -} - -TArray UVaRestJsonObject::GetFieldNames() const -{ - TArray Result; - JsonObj->Values.GetKeys(Result); - - return Result; -} - -bool UVaRestJsonObject::HasField(const FString& FieldName) const -{ - if (FieldName.IsEmpty()) - { - return false; - } - - return JsonObj->HasField(FieldName); -} - -void UVaRestJsonObject::RemoveField(const FString& FieldName) -{ - if (FieldName.IsEmpty()) - { - return; - } - - JsonObj->RemoveField(FieldName); -} - -UVaRestJsonValue* UVaRestJsonObject::GetField(const FString& FieldName) const -{ - if (FieldName.IsEmpty()) - { - return nullptr; - } - - TSharedPtr NewVal = JsonObj->TryGetField(FieldName); - if (NewVal.IsValid()) - { - UVaRestJsonValue* NewValue = NewObject(); - NewValue->SetRootValue(NewVal); - - return NewValue; - } - - return nullptr; -} - -void UVaRestJsonObject::SetField(const FString& FieldName, UVaRestJsonValue* JsonValue) -{ - if (FieldName.IsEmpty()) - { - return; - } - - JsonObj->SetField(FieldName, JsonValue->GetRootValue()); -} - -////////////////////////////////////////////////////////////////////////// -// FJsonObject API Helpers (easy to use with simple Json objects) - -float UVaRestJsonObject::GetNumberField(const FString& FieldName) const -{ - if (!JsonObj->HasTypedField(FieldName)) - { - UE_LOG(LogVaRest, Warning, TEXT("No field with name %s of type Number"), *FieldName); - return 0.0f; - } - - return JsonObj->GetNumberField(FieldName); -} - -void UVaRestJsonObject::SetNumberField(const FString& FieldName, float Number) -{ - if (FieldName.IsEmpty()) - { - return; - } - - JsonObj->SetNumberField(FieldName, Number); -} - -void UVaRestJsonObject::SetNumberFieldDouble(const FString& FieldName, double Number) -{ - if (FieldName.IsEmpty()) - { - return; - } - - JsonObj->SetNumberField(FieldName, Number); -} - -int32 UVaRestJsonObject::GetIntegerField(const FString& FieldName) const -{ - if (!JsonObj->HasTypedField(FieldName)) - { - UE_LOG(LogVaRest, Warning, TEXT("No field with name %s of type Number"), *FieldName); - return 0; - } - - return JsonObj->GetIntegerField(FieldName); -} - -void UVaRestJsonObject::SetIntegerField(const FString& FieldName, int32 Number) -{ - if (FieldName.IsEmpty()) - { - return; - } - - JsonObj->SetNumberField(FieldName, Number); -} - -int64 UVaRestJsonObject::GetInt64Field(const FString& FieldName) const -{ - if (!JsonObj->HasTypedField(FieldName)) - { - UE_LOG(LogVaRest, Warning, TEXT("No field with name %s of type Number"), *FieldName); - return 0; - } - - return static_cast(JsonObj->GetNumberField(FieldName)); -} - -void UVaRestJsonObject::SetInt64Field(const FString& FieldName, int64 Number) -{ - if (FieldName.IsEmpty()) - { - return; - } - - JsonObj->SetNumberField(FieldName, Number); -} - -FString UVaRestJsonObject::GetStringField(const FString& FieldName) const -{ - if (!JsonObj->HasTypedField(FieldName)) - { - UE_LOG(LogVaRest, Warning, TEXT("No field with name %s of type String"), *FieldName); - return TEXT(""); - } - - return JsonObj->GetStringField(FieldName); -} - -void UVaRestJsonObject::SetStringField(const FString& FieldName, const FString& StringValue) -{ - if (FieldName.IsEmpty()) - { - return; - } - - JsonObj->SetStringField(FieldName, StringValue); -} - -bool UVaRestJsonObject::GetBoolField(const FString& FieldName) const -{ - if (!JsonObj->HasTypedField(FieldName)) - { - UE_LOG(LogVaRest, Warning, TEXT("No field with name %s of type Boolean"), *FieldName); - return false; - } - - return JsonObj->GetBoolField(FieldName); -} - -void UVaRestJsonObject::SetBoolField(const FString& FieldName, bool InValue) -{ - if (FieldName.IsEmpty()) - { - return; - } - - JsonObj->SetBoolField(FieldName, InValue); -} - -TArray UVaRestJsonObject::GetArrayField(const FString& FieldName) const -{ - TArray OutArray; - if (FieldName.IsEmpty()) - { - return OutArray; - } - - if (!JsonObj->HasTypedField(FieldName)) - { - UE_LOG(LogVaRest, Warning, TEXT("%s: No field with name %s of type Array"), *VA_FUNC_LINE, *FieldName); - return OutArray; - } - - TArray> ValArray = JsonObj->GetArrayField(FieldName); - for (auto Value : ValArray) - { - UVaRestJsonValue* NewValue = NewObject(); - NewValue->SetRootValue(Value); - - OutArray.Add(NewValue); - } - - return OutArray; -} - -void UVaRestJsonObject::SetArrayField(const FString& FieldName, const TArray& InArray) -{ - if (FieldName.IsEmpty()) - { - return; - } - - TArray> ValArray; - - // Process input array and COPY original values - for (auto InVal : InArray) - { - if (InVal == nullptr) - continue; - - const TSharedPtr JsonVal = InVal->GetRootValue(); - - switch (InVal->GetType()) - { - case EVaJson::None: - break; - - case EVaJson::Null: - ValArray.Add(MakeShareable(new FJsonValueNull())); - break; - - case EVaJson::String: - ValArray.Add(MakeShareable(new FJsonValueString(JsonVal->AsString()))); - break; - - case EVaJson::Number: - ValArray.Add(MakeShareable(new FJsonValueNumber(JsonVal->AsNumber()))); - break; - - case EVaJson::Boolean: - ValArray.Add(MakeShareable(new FJsonValueBoolean(JsonVal->AsBool()))); - break; - - case EVaJson::Array: - ValArray.Add(MakeShareable(new FJsonValueArray(JsonVal->AsArray()))); - break; - - case EVaJson::Object: - ValArray.Add(MakeShareable(new FJsonValueObject(JsonVal->AsObject()))); - break; - - default: - break; - } - } - - JsonObj->SetArrayField(FieldName, ValArray); -} - -void UVaRestJsonObject::MergeJsonObject(UVaRestJsonObject* InJsonObject, bool Overwrite) -{ - if (!InJsonObject || !InJsonObject->IsValidLowLevel()) - { - return; - } - - TArray Keys = InJsonObject->GetFieldNames(); - - for (auto Key : Keys) - { - if (Overwrite == false && HasField(Key)) - { - continue; - } - - SetField(Key, InJsonObject->GetField(Key)); - } -} - -UVaRestJsonObject* UVaRestJsonObject::GetObjectField(const FString& FieldName) const -{ - if (!JsonObj->HasTypedField(FieldName)) - { - UE_LOG(LogVaRest, Warning, TEXT("%s: No field with name %s of type Object"), *VA_FUNC_LINE, *FieldName); - return nullptr; - } - - const TSharedPtr JsonObjField = JsonObj->GetObjectField(FieldName); - - UVaRestJsonObject* OutRestJsonObj = NewObject(); - OutRestJsonObj->SetRootObject(JsonObjField); - - return OutRestJsonObj; -} - -void UVaRestJsonObject::SetObjectField(const FString& FieldName, UVaRestJsonObject* JsonObject) -{ - if (FieldName.IsEmpty() || !JsonObject || !JsonObject->IsValidLowLevel()) - { - return; - } - - JsonObj->SetObjectField(FieldName, JsonObject->GetRootObject()); -} - -void UVaRestJsonObject::SetMapFields_string(const TMap& Fields) -{ - for (auto& field : Fields) - { - SetStringField(field.Key, field.Value); - } -} - -void UVaRestJsonObject::SetMapFields_uint8(const TMap& Fields) -{ - SetMapFields_Impl(Fields); -} - -void UVaRestJsonObject::SetMapFields_int32(const TMap& Fields) -{ - SetMapFields_Impl(Fields); -} - -void UVaRestJsonObject::SetMapFields_int64(const TMap& Fields) -{ - SetMapFields_Impl(Fields); -} - -void UVaRestJsonObject::SetMapFields_bool(const TMap& Fields) -{ - SetMapFields_Impl(Fields); -} - -////////////////////////////////////////////////////////////////////////// -// Array fields helpers (uniform arrays) - -TArray UVaRestJsonObject::GetNumberArrayField(const FString& FieldName) const -{ - return GetTypeArrayField(FieldName); -} - -TArray UVaRestJsonObject::GetIntegerArrayField(const FString& FieldName) const -{ - return GetTypeArrayField(FieldName); -} - -void UVaRestJsonObject::SetNumberArrayField(const FString& FieldName, const TArray& NumberArray) -{ - if (FieldName.IsEmpty()) - { - return; - } - - TArray> EntriesArray; - - for (auto Number : NumberArray) - { - EntriesArray.Add(MakeShareable(new FJsonValueNumber(Number))); - } - - JsonObj->SetArrayField(FieldName, EntriesArray); -} - -void UVaRestJsonObject::SetNumberArrayFieldDouble(const FString& FieldName, const TArray& NumberArray) -{ - if (FieldName.IsEmpty()) - { - return; - } - - TArray> EntriesArray; - - for (auto Number : NumberArray) - { - EntriesArray.Add(MakeShareable(new FJsonValueNumber(Number))); - } - - JsonObj->SetArrayField(FieldName, EntriesArray); -} - -TArray UVaRestJsonObject::GetStringArrayField(const FString& FieldName) const -{ - TArray StringArray; - if (!JsonObj->HasTypedField(FieldName) || FieldName.IsEmpty()) - { - UE_LOG(LogVaRest, Warning, TEXT("%s: No field with name %s of type Array"), *VA_FUNC_LINE, *FieldName); - return StringArray; - } - - const TArray> JsonArrayValues = JsonObj->GetArrayField(FieldName); - for (TArray>::TConstIterator It(JsonArrayValues); It; ++It) - { - const auto Value = (*It).Get(); - if (Value->Type != EJson::String) - { - UE_LOG(LogVaRest, Error, TEXT("Not String element in array with field name %s"), *FieldName); - } - - StringArray.Add((*It)->AsString()); - } - - return StringArray; -} - -void UVaRestJsonObject::SetStringArrayField(const FString& FieldName, const TArray& StringArray) -{ - if (FieldName.IsEmpty()) - { - return; - } - - TArray> EntriesArray; - for (auto String : StringArray) - { - EntriesArray.Add(MakeShareable(new FJsonValueString(String))); - } - - JsonObj->SetArrayField(FieldName, EntriesArray); -} - -TArray UVaRestJsonObject::GetBoolArrayField(const FString& FieldName) const -{ - TArray BoolArray; - if (!JsonObj->HasTypedField(FieldName) || FieldName.IsEmpty()) - { - UE_LOG(LogVaRest, Warning, TEXT("%s: No field with name %s of type Array"), *VA_FUNC_LINE, *FieldName); - return BoolArray; - } - - const TArray> JsonArrayValues = JsonObj->GetArrayField(FieldName); - for (TArray>::TConstIterator It(JsonArrayValues); It; ++It) - { - const auto Value = (*It).Get(); - if (Value->Type != EJson::Boolean) - { - UE_LOG(LogVaRest, Error, TEXT("Not Boolean element in array with field name %s"), *FieldName); - } - - BoolArray.Add((*It)->AsBool()); - } - - return BoolArray; -} - -void UVaRestJsonObject::SetBoolArrayField(const FString& FieldName, const TArray& BoolArray) -{ - if (FieldName.IsEmpty()) - { - return; - } - - TArray> EntriesArray; - for (auto Boolean : BoolArray) - { - EntriesArray.Add(MakeShareable(new FJsonValueBoolean(Boolean))); - } - - JsonObj->SetArrayField(FieldName, EntriesArray); -} - -TArray UVaRestJsonObject::GetObjectArrayField(const FString& FieldName) const -{ - TArray OutArray; - if (!JsonObj->HasTypedField(FieldName) || FieldName.IsEmpty()) - { - UE_LOG(LogVaRest, Warning, TEXT("%s: No field with name %s of type Array"), *VA_FUNC_LINE, *FieldName); - return OutArray; - } - - TArray> ValArray = JsonObj->GetArrayField(FieldName); - for (const auto& Value : ValArray) - { - if (Value->Type != EJson::Object) - { - UE_LOG(LogVaRest, Error, TEXT("Not Object element in array with field name %s"), *FieldName); - } - - TSharedPtr NewObj = Value->AsObject(); - - UVaRestJsonObject* NewJson = NewObject(); - NewJson->SetRootObject(NewObj); - - OutArray.Add(NewJson); - } - - return OutArray; -} - -void UVaRestJsonObject::SetObjectArrayField(const FString& FieldName, const TArray& ObjectArray) -{ - if (FieldName.IsEmpty()) - { - return; - } - - TArray> EntriesArray; - for (auto Value : ObjectArray) - { - if (Value == nullptr) - continue; - - EntriesArray.Add(MakeShareable(new FJsonValueObject(Value->GetRootObject()))); - } - - JsonObj->SetArrayField(FieldName, EntriesArray); -} - -////////////////////////////////////////////////////////////////////////// -// Deserialize - -int32 UVaRestJsonObject::DeserializeFromUTF8Bytes(const ANSICHAR* Bytes, int32 Size) -{ - FJSONReader Reader; - - const ANSICHAR* EndByte = Bytes + Size; - while (Bytes < EndByte) - { - TCHAR Char = FUtf8Helper::CodepointFromUtf8(Bytes, EndByte - Bytes); - if (Char > 0xFFFF) - { - Char = UNICODE_BOGUS_CHAR_CODEPOINT; - } - - if (!Reader.Read(Char)) - { - break; - } - } - - SetRootObject(Reader.State.Root); - return Reader.State.Size; -} - -int32 UVaRestJsonObject::DeserializeFromTCHARBytes(const TCHAR* Bytes, int32 Size) -{ - FJSONReader Reader; - - int32 i = 0; - while (i < Size) - { - if (!Reader.Read(Bytes[i++])) - { - break; - } - } - - SetRootObject(Reader.State.Root); - return Reader.State.Size; -} - -void UVaRestJsonObject::DecodeFromArchive(TUniquePtr& Reader) -{ - FArchive& Ar = (*Reader.Get()); - uint8 SymbolBytes[2]; - - // Read first two bytes - Ar << SymbolBytes[0]; - Ar << SymbolBytes[1]; - - bool bIsIntelByteOrder = true; - - if (SymbolBytes[0] == 0xff && SymbolBytes[1] == 0xfe) - { - // Unicode Intel byte order. Less 1 for the FFFE header, additional 1 for null terminator. - bIsIntelByteOrder = true; - } - else if (SymbolBytes[0] == 0xfe && SymbolBytes[1] == 0xff) - { - // Unicode non-Intel byte order. Less 1 for the FFFE header, additional 1 for null terminator. - bIsIntelByteOrder = false; - } - - FJSONReader JsonReader; - TCHAR Char; - - while (!Ar.AtEnd()) - { - Ar << SymbolBytes[0]; - - if (Ar.AtEnd()) - { - break; - } - - Ar << SymbolBytes[1]; - - if (bIsIntelByteOrder) - { - Char = CharCast(static_cast(static_cast(SymbolBytes[0]) + static_cast(SymbolBytes[1]) * 256)); - } - else - { - Char = CharCast(static_cast(static_cast(SymbolBytes[1]) + static_cast(SymbolBytes[0]) * 256)); - } - - if (!JsonReader.Read(Char)) - { - break; - } - } - - SetRootObject(JsonReader.State.Root); - - if (!Ar.Close()) - { - UE_LOG(LogVaRest, Error, TEXT("UVaRestJsonObject::DecodeFromArchive: Error! Can't close file!")); - } -} - -////////////////////////////////////////////////////////////////////////// -// Serialize - -bool UVaRestJsonObject::WriteToFile(const FString& Path) const -{ - TUniquePtr FileWriter(IFileManager::Get().CreateFileWriter(*Path)); - if (!FileWriter) - { - return false; - } - - FArchive& Ar = *FileWriter.Get(); - - UCS2CHAR BOM = UNICODE_BOM; - Ar.Serialize(&BOM, sizeof(UCS2CHAR)); - - FString Str = FString(TEXT("{")); - WriteStringToArchive(Ar, *Str, Str.Len()); - - int32 ElementCount = 0; - FJSONWriter JsonWriter; - for (auto JsonObjectValuePair : JsonObj->Values) - { - Str = FString(TEXT("\"")); - WriteStringToArchive(Ar, *Str, Str.Len()); - - const TCHAR* BufferPtr = *JsonObjectValuePair.Key; - for (int i = 0; i < JsonObjectValuePair.Key.Len(); ++i) - { - Str = FString(1, &BufferPtr[i]); - WriteStringToArchive(Ar, *Str, Str.Len()); - } - - Str = FString(TEXT("\"")); - WriteStringToArchive(Ar, *Str, Str.Len()); - - Str = FString(TEXT(":")); - WriteStringToArchive(Ar, *Str, Str.Len()); - - ++ElementCount; - - JsonWriter.Write(JsonObjectValuePair.Value, FileWriter.Get(), ElementCount >= JsonObj->Values.Num()); - } - - Str = FString(TEXT("}")); - WriteStringToArchive(Ar, *Str, Str.Len()); - - FileWriter->Close(); - - return true; -} - -bool UVaRestJsonObject::WriteToFilePath(const FString& Path, const bool bIsRelativeToProjectDir) -{ - return WriteToFile(bIsRelativeToProjectDir ? FPaths::ProjectDir() / Path : Path); -} - -bool UVaRestJsonObject::WriteStringToArchive(FArchive& Ar, const TCHAR* StrPtr, int64 Len) -{ - const auto Src = StringCast(StrPtr, Len); - Ar.Serialize(const_cast(Src.Get()), Src.Length() * sizeof(UCS2CHAR)); - - return true; -} diff --git a/Plugins/VaRestPlugin/Source/VaRest/Private/VaRestJsonParser.cpp b/Plugins/VaRestPlugin/Source/VaRest/Private/VaRestJsonParser.cpp deleted file mode 100644 index bc6ae72c..00000000 --- a/Plugins/VaRestPlugin/Source/VaRest/Private/VaRestJsonParser.cpp +++ /dev/null @@ -1,1150 +0,0 @@ -// Copyright 2015-2019 Mail.Ru Group. All Rights Reserved. - -#include "VaRestJsonParser.h" - -#include "VaRestJsonObject.h" - -#include "Dom/JsonObject.h" -#include "Dom/JsonValue.h" - -uint32 FUtf8Helper::CodepointFromUtf8(const ANSICHAR*& SourceString, const uint32 SourceLengthRemaining) -{ - checkSlow(SourceLengthRemaining > 0); - - const ANSICHAR* OctetPtr = SourceString; - - uint32 Codepoint = 0; - uint32 Octet = (uint32)((uint8)*SourceString); - uint32 Octet2, Octet3, Octet4; - - if (Octet < 128) // one octet char: 0 to 127 - { - ++SourceString; // skip to next possible start of codepoint. - return Octet; - } - else if (Octet < 192) // bad (starts with 10xxxxxx). - { - // Apparently each of these is supposed to be flagged as a bogus - // char, instead of just resyncing to the next valid codepoint. - ++SourceString; // skip to next possible start of codepoint. - return UNICODE_BOGUS_CHAR_CODEPOINT; - } - else if (Octet < 224) // two octets - { - // Ensure our string has enough characters to read from - if (SourceLengthRemaining < 2) - { - // Skip to end and write out a single char (we always have room for at least 1 char) - SourceString += SourceLengthRemaining; - return UNICODE_BOGUS_CHAR_CODEPOINT; - } - - Octet -= (128 + 64); - Octet2 = (uint32)((uint8) * (++OctetPtr)); - if ((Octet2 & (128 + 64)) != 128) // Format isn't 10xxxxxx? - { - ++SourceString; // Sequence was not valid UTF-8. Skip the first byte and continue. - return UNICODE_BOGUS_CHAR_CODEPOINT; - } - - Codepoint = ((Octet << 6) | (Octet2 - 128)); - if ((Codepoint >= 0x80) && (Codepoint <= 0x7FF)) - { - SourceString += 2; // skip to next possible start of codepoint. - return Codepoint; - } - } - else if (Octet < 240) // three octets - { - // Ensure our string has enough characters to read from - if (SourceLengthRemaining < 3) - { - // Skip to end and write out a single char (we always have room for at least 1 char) - SourceString += SourceLengthRemaining; - return UNICODE_BOGUS_CHAR_CODEPOINT; - } - - Octet -= (128 + 64 + 32); - Octet2 = (uint32)((uint8) * (++OctetPtr)); - if ((Octet2 & (128 + 64)) != 128) // Format isn't 10xxxxxx? - { - ++SourceString; // Sequence was not valid UTF-8. Skip the first byte and continue. - return UNICODE_BOGUS_CHAR_CODEPOINT; - } - - Octet3 = (uint32)((uint8) * (++OctetPtr)); - if ((Octet3 & (128 + 64)) != 128) // Format isn't 10xxxxxx? - { - ++SourceString; // Sequence was not valid UTF-8. Skip the first byte and continue. - return UNICODE_BOGUS_CHAR_CODEPOINT; - } - - Codepoint = (((Octet << 12)) | ((Octet2 - 128) << 6) | ((Octet3 - 128))); - - // UTF-8 characters cannot be in the UTF-16 surrogates range - if (StringConv::IsHighSurrogate(Codepoint) || StringConv::IsLowSurrogate(Codepoint)) - { - ++SourceString; // Sequence was not valid UTF-8. Skip the first byte and continue. - return UNICODE_BOGUS_CHAR_CODEPOINT; - } - - // 0xFFFE and 0xFFFF are illegal, too, so we check them at the edge. - if ((Codepoint >= 0x800) && (Codepoint <= 0xFFFD)) - { - SourceString += 3; // skip to next possible start of codepoint. - return Codepoint; - } - } - else if (Octet < 248) // four octets - { - // Ensure our string has enough characters to read from - if (SourceLengthRemaining < 4) - { - // Skip to end and write out a single char (we always have room for at least 1 char) - SourceString += SourceLengthRemaining; - return UNICODE_BOGUS_CHAR_CODEPOINT; - } - - Octet -= (128 + 64 + 32 + 16); - Octet2 = (uint32)((uint8) * (++OctetPtr)); - if ((Octet2 & (128 + 64)) != 128) // Format isn't 10xxxxxx? - { - ++SourceString; // Sequence was not valid UTF-8. Skip the first byte and continue. - return UNICODE_BOGUS_CHAR_CODEPOINT; - } - - Octet3 = (uint32)((uint8) * (++OctetPtr)); - if ((Octet3 & (128 + 64)) != 128) // Format isn't 10xxxxxx? - { - ++SourceString; // Sequence was not valid UTF-8. Skip the first byte and continue. - return UNICODE_BOGUS_CHAR_CODEPOINT; - } - - Octet4 = (uint32)((uint8) * (++OctetPtr)); - if ((Octet4 & (128 + 64)) != 128) // Format isn't 10xxxxxx? - { - ++SourceString; // Sequence was not valid UTF-8. Skip the first byte and continue. - return UNICODE_BOGUS_CHAR_CODEPOINT; - } - - Codepoint = (((Octet << 18)) | ((Octet2 - 128) << 12) | - ((Octet3 - 128) << 6) | ((Octet4 - 128))); - if ((Codepoint >= 0x10000) && (Codepoint <= 0x10FFFF)) - { - SourceString += 4; // skip to next possible start of codepoint. - return Codepoint; - } - } - // Five and six octet sequences became illegal in rfc3629. - // We throw the codepoint away, but parse them to make sure we move - // ahead the right number of bytes and don't overflow the buffer. - else if (Octet < 252) // five octets - { - // Ensure our string has enough characters to read from - if (SourceLengthRemaining < 5) - { - // Skip to end and write out a single char (we always have room for at least 1 char) - SourceString += SourceLengthRemaining; - return UNICODE_BOGUS_CHAR_CODEPOINT; - } - - Octet = (uint32)((uint8) * (++OctetPtr)); - if ((Octet & (128 + 64)) != 128) // Format isn't 10xxxxxx? - { - ++SourceString; // Sequence was not valid UTF-8. Skip the first byte and continue. - return UNICODE_BOGUS_CHAR_CODEPOINT; - } - - Octet = (uint32)((uint8) * (++OctetPtr)); - if ((Octet & (128 + 64)) != 128) // Format isn't 10xxxxxx? - { - ++SourceString; // Sequence was not valid UTF-8. Skip the first byte and continue. - return UNICODE_BOGUS_CHAR_CODEPOINT; - } - - Octet = (uint32)((uint8) * (++OctetPtr)); - if ((Octet & (128 + 64)) != 128) // Format isn't 10xxxxxx? - { - ++SourceString; // Sequence was not valid UTF-8. Skip the first byte and continue. - return UNICODE_BOGUS_CHAR_CODEPOINT; - } - - Octet = (uint32)((uint8) * (++OctetPtr)); - if ((Octet & (128 + 64)) != 128) // Format isn't 10xxxxxx? - { - ++SourceString; // Sequence was not valid UTF-8. Skip the first byte and continue. - return UNICODE_BOGUS_CHAR_CODEPOINT; - } - - SourceString += 5; // skip to next possible start of codepoint. - return UNICODE_BOGUS_CHAR_CODEPOINT; - } - - else // six octets - { - // Ensure our string has enough characters to read from - if (SourceLengthRemaining < 6) - { - // Skip to end and write out a single char (we always have room for at least 1 char) - SourceString += SourceLengthRemaining; - return UNICODE_BOGUS_CHAR_CODEPOINT; - } - - Octet = (uint32)((uint8) * (++OctetPtr)); - if ((Octet & (128 + 64)) != 128) // Format isn't 10xxxxxx? - { - ++SourceString; // Sequence was not valid UTF-8. Skip the first byte and continue. - return UNICODE_BOGUS_CHAR_CODEPOINT; - } - - Octet = (uint32)((uint8) * (++OctetPtr)); - if ((Octet & (128 + 64)) != 128) // Format isn't 10xxxxxx? - { - ++SourceString; // Sequence was not valid UTF-8. Skip the first byte and continue. - return UNICODE_BOGUS_CHAR_CODEPOINT; - } - - Octet = (uint32)((uint8) * (++OctetPtr)); - if ((Octet & (128 + 64)) != 128) // Format isn't 10xxxxxx? - { - ++SourceString; // Sequence was not valid UTF-8. Skip the first byte and continue. - return UNICODE_BOGUS_CHAR_CODEPOINT; - } - - Octet = (uint32)((uint8) * (++OctetPtr)); - if ((Octet & (128 + 64)) != 128) // Format isn't 10xxxxxx? - { - ++SourceString; // Sequence was not valid UTF-8. Skip the first byte and continue. - return UNICODE_BOGUS_CHAR_CODEPOINT; - } - - Octet = (uint32)((uint8) * (++OctetPtr)); - if ((Octet & (128 + 64)) != 128) // Format isn't 10xxxxxx? - { - ++SourceString; // Sequence was not valid UTF-8. Skip the first byte and continue. - return UNICODE_BOGUS_CHAR_CODEPOINT; - } - - SourceString += 6; // skip to next possible start of codepoint. - return UNICODE_BOGUS_CHAR_CODEPOINT; - } - - ++SourceString; // Sequence was not valid UTF-8. Skip the first byte and continue. - return UNICODE_BOGUS_CHAR_CODEPOINT; // catch everything else. -} - -FJSONState::FJSONState() - : Notation(EJSONNotation::NONE) - , bEscape(false) - , bError(false) - , Quote(UNICODE_BOGUS_CHAR_CODEPOINT) -{ - Key.Reserve(1024); - Data.Reserve(4096); - - Root = TSharedPtr(nullptr); - - Objects.Reserve(64); - Tokens.Reserve(64); - - Tokens.Add(EJSONToken::ROOT); - - Size = 0; -} - -EJSONToken FJSONState::GetToken(int32 Index) -{ - return Tokens.Num() > Index ? Tokens.Last(Index) : EJSONToken::ERROR; -} - -bool FJSONState::CheckTokens(EJSONToken T1) -{ - return T1 == GetToken(0); -} - -bool FJSONState::CheckTokens(EJSONToken T1, EJSONToken T2) -{ - return T1 == GetToken(1) && T2 == GetToken(0); -} - -bool FJSONState::CheckTokens(EJSONToken T1, EJSONToken T2, EJSONToken T3) -{ - return T1 == GetToken(2) && T2 == GetToken(1) && T3 == GetToken(0); -} - -void FJSONState::PopToken(int32 Num) -{ - if (Num > 0) - { - if (Tokens.Num() >= Num) - { - Tokens.RemoveAt(Tokens.Num() - Num, Num, false); - } - else - { - bError = true; - } - } - - Notation = EJSONNotation::NONE; -} - -void FJSONState::PopObject() -{ - if (Objects.Num() > 0) - { - const auto Object = Objects.Pop(false); - if (Object->Type == EJson::Object) - { - return; - } - } - - bError = true; -} - -void FJSONState::PopArray() -{ - if (Objects.Num() > 0) - { - const auto Object = Objects.Pop(false); - if (Object->Type == EJson::Array) - { - return; - } - } - - bError = true; -} - -void FJSONState::PopValue(bool bCheckType) -{ - if (Objects.Num() > 0) - { - const auto Value = Objects.Last(0); - if (Value->Type == EJson::Object || Value->Type == EJson::Array) - { - if (bCheckType) - { - bError = true; - } - } - else - { - Objects.Pop(false); - if (Objects.Num() > 0) - { - switch (Value->Type) - { - case EJson::Null: - { - const auto LowerCase = Data.ToLower(); - if (LowerCase != TEXT("null")) - { - bError = true; - } - break; - } - case EJson::String: - { - FJsonValueNonConstString* JsonValueString = ((FJsonValueNonConstString*)Value.Get()); - JsonValueString->AsNonConstString() = Data; - JsonValueString->AsNonConstString().Shrink(); - Size += JsonValueString->AsNonConstString().GetAllocatedSize(); - break; - } - case EJson::Number: - { - const FString LowerCase = Data.ToLower(); - int32 ePosition = INDEX_NONE; - LowerCase.FindChar('e', ePosition); - if (ePosition == INDEX_NONE) - { - if (LowerCase.IsNumeric()) - { - ((FJsonValueNonConstNumber*)Value.Get())->AsNonConstNumber() = FCString::Atod(*LowerCase); - } - else - { - bError = true; - } - } - else if (LowerCase.Len() > ePosition + 2) - { - const FString Left = LowerCase.Left(ePosition); - const FString Rigth = LowerCase.Right(LowerCase.Len() - ePosition - 1); - if (Left.IsNumeric() && Rigth.IsNumeric()) - { - ((FJsonValueNonConstNumber*)Value.Get())->AsNonConstNumber() = FCString::Atod(*Left) * FMath::Pow(10.f, FCString::Atoi(*Rigth)); - } - else - { - bError = true; - } - } - else - { - bError = true; - } - break; - } - case EJson::Boolean: - { - const auto LowerCase = Data.ToLower(); - if (LowerCase == TEXT("true")) - { - ((FJsonValueNonConstBoolean*)Value.Get())->AsNonConstBool() = true; - } - else if (LowerCase == TEXT("false")) - { - ((FJsonValueNonConstBoolean*)Value.Get())->AsNonConstBool() = false; - } - else - { - bError = true; - } - break; - } - default: - { - bError = true; - return; - } - } - - ClearData(); - - const auto Container = Objects.Last(0); - if (Container->Type == EJson::Object) - { - if (Key.Len() > 0) - { - FString KeyCopy = Key; - KeyCopy.Shrink(); - Container->AsObject()->SetField(KeyCopy, Value); - Size += KeyCopy.GetAllocatedSize(); - ClearKey(); - } - else - { - bError = true; - } - } - else if (Container->Type == EJson::Array) - { - ((FJsonValueNonConstArray*)Container.Get())->AsNonConstArray().Add(Value); - } - else - { - bError = true; - } - } - else - { - bError = true; - } - } - } - else - { - bError = true; - } -} - -FJsonValue* FJSONState::GetLast() -{ - if (Objects.Num() > 0) - { - return Objects.Last(0).Get(); - } - bError = true; - return nullptr; -} - -FJsonValueObject* FJSONState::GetObject() -{ - FJsonValue* Value = GetLast(); - if (Value != nullptr && Value->Type == EJson::Object) - { - return (FJsonValueObject*)Value; - } - bError = true; - return nullptr; -} - -FJsonValueNonConstArray* FJSONState::GetArray() -{ - FJsonValue* Value = GetLast(); - if (Value != nullptr && Value->Type == EJson::Array) - { - return (FJsonValueNonConstArray*)Value; - } - bError = true; - return nullptr; -} - -TSharedPtr FJSONState::PushObject() -{ - TSharedPtr Result(new FJsonValueObject(MakeShared())); - Objects.Add(Result); - Size += sizeof(TSharedPtr) + sizeof(FJsonValueObject); - return Result; -} - -TSharedPtr FJSONState::PushObject(TSharedPtr Object) -{ - TSharedPtr Result(new FJsonValueObject(Object)); - Objects.Add(Result); - Size += sizeof(TSharedPtr) + sizeof(FJsonValueObject); - return Result; -} - -TSharedPtr FJSONState::PushArray() -{ - const TArray> Empty; - TSharedPtr Result(new FJsonValueNonConstArray(Empty)); - Objects.Add(Result); - Size += sizeof(TSharedPtr) + sizeof(FJsonValueNonConstArray); - return Result; -} - -TSharedPtr FJSONState::PushBoolean() -{ - TSharedPtr Result(new FJsonValueNonConstBoolean(false)); - Objects.Add(Result); - Size += sizeof(TSharedPtr) + sizeof(FJsonValueNonConstBoolean); - return Result; -} - -TSharedPtr FJSONState::PushNull() -{ - TSharedPtr Result(new FJsonValueNull()); - Objects.Add(Result); - Size += sizeof(TSharedPtr) + sizeof(FJsonValueNull); - return Result; -} - -TSharedPtr FJSONState::PushNumber() -{ - TSharedPtr Result(new FJsonValueNonConstNumber(0.f)); - Objects.Add(Result); - Size += sizeof(TSharedPtr) + sizeof(FJsonValueNonConstNumber); - return Result; -} - -TSharedPtr FJSONState::PushString() -{ - TSharedPtr Result(new FJsonValueNonConstString(TEXT(""))); - Objects.Add(Result); - Size += sizeof(TSharedPtr) + sizeof(FJsonValueNonConstString); - return Result; -} - -void FJSONState::ClearData() -{ - Data.Reset(); -} - -void FJSONState::ClearKey() -{ - Key.Reset(); -} - -void FJSONState::DataToKey() -{ - ClearKey(); - Key += Data; - ClearData(); -} - -void FJSONState::Error() -{ - bError = true; -} - -FJSONReader::FJSONReader() -{ -} - -bool FJSONReader::IsNewLine(const TCHAR& Char) -{ - return Char == '\n'; -} - -bool FJSONReader::IsSpace(const TCHAR& Char) -{ - return IsNewLine(Char) || Char == ' ' || Char == '\t' || Char == '\r'; -} - -bool FJSONReader::FindToken(const TCHAR& Char) -{ - if (State.bEscape) - { - return false; - } - - if (State.Notation != EJSONNotation::STRING) - { - switch (Char) - { - case '{': State.Tokens.Add(EJSONToken::CURLY_BEGIN); return true; - case '}': State.Tokens.Add(EJSONToken::CURLY_END); return true; - case '[': State.Tokens.Add(EJSONToken::SQUARE_BEGIN); return true; - case ']': State.Tokens.Add(EJSONToken::SQUARE_END); return true; - case ',': State.Tokens.Add(EJSONToken::COMMA); return true; - case ':': State.Tokens.Add(EJSONToken::COLON); return true; - } - } - return false; -} - -void FJSONReader::UpdateNotation() -{ - switch (State.GetToken()) - { - case EJSONToken::ROOT: - { - return; - } - case EJSONToken::CURLY_BEGIN: - { - if (State.CheckTokens(EJSONToken::SQUARE_BEGIN, EJSONToken::CURLY_BEGIN)) // Object in array "[{" - { - State.Notation = EJSONNotation::OBJECT; - auto Value = State.GetArray(); - if (Value != nullptr) - { - Value->AsNonConstArray().Add(State.PushObject()); - } - else - { - State.Error(); - } - } - else if (State.CheckTokens(EJSONToken::CURLY_BEGIN, EJSONToken::COLON, EJSONToken::CURLY_BEGIN)) // Object in key "{:{" - { - if (State.Key.Len() > 0) - { - State.Notation = EJSONNotation::OBJECT; - const auto Value = State.GetObject(); - if (Value != nullptr) - { - Value->AsObject()->SetField(State.Key, State.PushObject()); - State.ClearKey(); - } - else - { - State.Error(); - } - } - else - { - State.Error(); - } - } - else if (State.CheckTokens(EJSONToken::ROOT, EJSONToken::CURLY_BEGIN)) // Root object "{" - { - if (State.Root.IsValid()) - { - State.Error(); - } - else - { - State.Root = MakeShared(); - State.PushObject(State.Root); // add root object - State.Notation = EJSONNotation::OBJECT; - } - } - else - { - State.Error(); - } - break; - } - case EJSONToken::CURLY_END: - { - if (State.CheckTokens(EJSONToken::CURLY_BEGIN, EJSONToken::CURLY_END)) // Close object "{}" - { - State.PopToken(2); // pop "{}" - State.PopObject(); // remove object - } - else if (State.CheckTokens(EJSONToken::CURLY_BEGIN, EJSONToken::COLON, EJSONToken::CURLY_END)) // Close object "{:}" - { - State.PopToken(3); // pop "{:}" - State.PopValue(); // remove value - State.PopObject(); // remove object - } - else - { - State.Error(); - } - - if (State.CheckTokens(EJSONToken::COLON)) // Object in object ":" - { - State.PopToken(1); // pop ":" - } - - State.Notation = EJSONNotation::SKIP; - - break; - } - case EJSONToken::SQUARE_BEGIN: - { - if (State.CheckTokens(EJSONToken::SQUARE_BEGIN, EJSONToken::SQUARE_BEGIN)) // Array in array "[[" - { - State.Notation = EJSONNotation::ARRAY; - auto Value = State.GetArray(); - if (Value != nullptr) - { - Value->AsNonConstArray().Add(State.PushArray()); - } - else - { - State.Error(); - } - } - else if (State.CheckTokens(EJSONToken::CURLY_BEGIN, EJSONToken::COLON, EJSONToken::SQUARE_BEGIN)) // Array in key "{:[" - { - State.Notation = EJSONNotation::ARRAY; - if (State.Key.Len() > 0) - { - const auto Value = State.GetObject(); - if (Value != nullptr) - { - Value->AsObject()->SetField(State.Key, State.PushArray()); - State.ClearKey(); - } - else - { - State.Error(); - } - } - else - { - State.Error(); - } - } - else if (State.CheckTokens(EJSONToken::ROOT, EJSONToken::SQUARE_BEGIN)) // Root array "{" - { - State.Error(); // Not support - } - else - { - State.Error(); - } - break; - } - case EJSONToken::SQUARE_END: - { - if (State.CheckTokens(EJSONToken::SQUARE_BEGIN, EJSONToken::SQUARE_END)) // Close array "[]" - { - State.PopToken(2); // remove token "[]" - State.PopValue(false); // remove value if exists - State.PopArray(); // remove array - - if (State.CheckTokens(EJSONToken::COLON)) // Array in object ":" - { - State.PopToken(1); // pop ":" - } - } - else - { - State.Error(); - } - - State.Notation = EJSONNotation::SKIP; - - break; - } - case EJSONToken::COMMA: - { - if (State.CheckTokens(EJSONToken::CURLY_BEGIN, EJSONToken::COLON, EJSONToken::COMMA)) // Next record in object "{:," - { - State.PopToken(2); // remove token ":," - State.PopValue(false); // remove value - State.Notation = EJSONNotation::OBJECT; - } - else if (State.CheckTokens(EJSONToken::CURLY_BEGIN, EJSONToken::COMMA)) // Next record in object "{," - { - State.PopToken(1); // remove token "," - State.Notation = EJSONNotation::OBJECT; - } - else if (State.CheckTokens(EJSONToken::SQUARE_BEGIN, EJSONToken::COMMA)) // Next record in array "[," - { - State.PopToken(1); // remove token "," - State.PopValue(false); // remove value - State.Notation = EJSONNotation::ARRAY; - } - else - { - State.Error(); - } - break; - } - case EJSONToken::COLON: - { - if (State.CheckTokens(EJSONToken::CURLY_BEGIN, EJSONToken::COLON)) // Object key close "{:" - { - State.Notation = EJSONNotation::OBJECT; - if (State.Data.Len() > 0) - { - State.DataToKey(); - } - else - { - State.Error(); - } - } - else - { - State.Error(); - } - break; - } - case EJSONToken::ERROR: - { - State.Error(); - break; - } - } - - if (!State.bError && State.Notation == EJSONNotation::NONE) - { - UpdateNotation(); - } -} - -void FJSONReader::ReadAsString(const TCHAR& Char) -{ - if (IsNewLine(Char)) - { - State.Error(); - return; - } - - if (!State.bEscape && State.Quote == Char) - { - State.Quote = UNICODE_BOGUS_CHAR_CODEPOINT; - State.Notation = EJSONNotation::SKIP; - } - else - { - if (State.bEscape) - { - switch (Char) - { - case 'n': State.Data.AppendChar('\n'); break; - case 't': State.Data.AppendChar('\t'); break; - default: State.Data.AppendChar(Char); break; - } - } - else - { - State.Data.AppendChar(Char); - } - } -} - -void FJSONReader::ReadAsStringSpecial(const TCHAR& Char) -{ - if (IsSpace(Char) && State.Data.Len() > 0) - { - State.Notation = EJSONNotation::SKIP; - return; - } - - State.Data.AppendChar(Char); -} - -void FJSONReader::ReadAsNumber(const TCHAR& Char) -{ - if (IsSpace(Char) && State.Data.Len() > 0) - { - State.Notation = EJSONNotation::SKIP; - return; - } - - if ((Char >= '0' && Char <= '9') || Char == '-' || Char == '.' || Char == '+' || Char == 'e' || Char == 'E') - { - State.Data.AppendChar(Char); - } - else - { - State.Error(); - } -} - -void FJSONReader::ReadBasicValue(const TCHAR& Char) -{ - switch (Char) - { - case 'T': - case 't': - case 'F': - case 'f': - { - State.PushBoolean(); - State.Notation = EJSONNotation::STRING_SPECIAL; - ReadAsStringSpecial(Char); - return; - } - case 'N': - case 'n': - { - State.PushNull(); - State.Notation = EJSONNotation::STRING_SPECIAL; - ReadAsStringSpecial(Char); - return; - } - case '\'': - case '"': - { - State.PushString(); - State.Notation = EJSONNotation::STRING; - State.Quote = Char; - return; - } - } - - if ((Char >= '0' && Char <= '9') || Char == '-') - { - State.PushNumber(); - State.Notation = EJSONNotation::NUMBER; - ReadAsNumber(Char); - return; - } -} - -void FJSONReader::ReadAsArray(const TCHAR& Char) -{ - if (IsSpace(Char)) - { - return; - } - ReadBasicValue(Char); -} - -void FJSONReader::ReadAsObject(const TCHAR& Char) -{ - if (IsSpace(Char)) - { - return; - } - - if (State.CheckTokens(EJSONToken::CURLY_BEGIN)) // read key "{" - { - if (Char == '\'' || Char == '"') - { - State.Notation = EJSONNotation::STRING; - State.Quote = Char; - } - else - { - State.Notation = EJSONNotation::STRING_SPECIAL; - ReadAsStringSpecial(Char); - } - } - else if (State.CheckTokens(EJSONToken::CURLY_BEGIN, EJSONToken::COLON)) // read value "{:" - { - ReadBasicValue(Char); - } -} - -void FJSONReader::Skip(const TCHAR& Char) -{ - if (!IsSpace(Char)) - { - State.Error(); - } -} - -bool FJSONReader::Read(const TCHAR Char) -{ - if (Char == '\\' && !State.bEscape) - { - State.bEscape = true; - return true; - } - - if (FindToken(Char)) - { - State.Notation = EJSONNotation::NONE; - UpdateNotation(); - return true; - } - - switch (State.Notation) - { - case EJSONNotation::NONE: UpdateNotation(); break; - - case EJSONNotation::STRING: ReadAsString(Char); break; - case EJSONNotation::STRING_SPECIAL: ReadAsStringSpecial(Char); break; - case EJSONNotation::NUMBER: ReadAsNumber(Char); break; - case EJSONNotation::ARRAY: ReadAsArray(Char); break; - case EJSONNotation::OBJECT: ReadAsObject(Char); break; - - case EJSONNotation::SKIP: Skip(Char); break; - } - - if (State.bError) - { - State.Root = TSharedPtr(nullptr); - State.Size = 0; - return false; - } - - State.bEscape = false; - - return true; -} - -FJSONWriter::FJSONWriter() -{ -} - -bool FJSONWriter::GetStartChar(const TSharedPtr& JsonValue, FString& Str) -{ - switch (JsonValue->Type) - { - case EJson::Object: - Str = FString(TEXT("{")); - break; - case EJson::Array: - Str = FString(TEXT("[")); - break; - case EJson::String: - Str = FString(TEXT("\"")); - break; - default: - return false; - break; - } - - return true; -} - -bool FJSONWriter::GetEndChar(const TSharedPtr& JsonValue, FString& Str) -{ - switch (JsonValue->Type) - { - case EJson::Object: - Str = FString(TEXT("}")); - break; - case EJson::Array: - Str = FString(TEXT("]")); - break; - case EJson::String: - Str = FString(TEXT("\"")); - break; - default: - return false; - break; - } - - return true; -} - -void FJSONWriter::Write(TSharedPtr JsonValue, FArchive* Writer, bool IsLastElement) -{ - FString Str; - FArchive& Ar = *Writer; - - if (GetStartChar(JsonValue, Str)) - { - UVaRestJsonObject::WriteStringToArchive(Ar, *Str, Str.Len()); - } - - switch (JsonValue->Type) - { - case EJson::Object: - { - int ElementsCount = 0; - auto Values = JsonValue->AsObject()->Values; - - for (auto& ChildJsonPair : Values) - { - Str = FString(TEXT("\"")); - UVaRestJsonObject::WriteStringToArchive(Ar, *Str, Str.Len()); - - const TCHAR* BufferPtr = *ChildJsonPair.Key; - for (int i = 0; i < ChildJsonPair.Key.Len(); ++i) - { - Str = FString(1, &ChildJsonPair.Key[i]); - UVaRestJsonObject::WriteStringToArchive(Ar, *Str, Str.Len()); - } - - Str = FString(TEXT("\"")); - UVaRestJsonObject::WriteStringToArchive(Ar, *Str, Str.Len()); - - Str = FString(TEXT(":")); - UVaRestJsonObject::WriteStringToArchive(Ar, *Str, Str.Len()); - - ++ElementsCount; - - Write(ChildJsonPair.Value, Writer, ElementsCount >= Values.Num()); - } - break; - } - case EJson::Array: - { - int ElementsCount = 0; - auto Array = JsonValue->AsArray(); - - for (auto& ChildJsonValue : Array) - { - ++ElementsCount; - Write(ChildJsonValue, Writer, ElementsCount >= Array.Num()); - } - break; - } - default: - { - const FString Value = JsonValue->AsString(); - - const TCHAR* BufferPtr = *Value; - for (int i = 0; i < Value.Len(); ++i) - { - Str = FString(1, &BufferPtr[i]); - if (Str == TEXT("\"")) - { - Str = FString(TEXT("\\")); - UVaRestJsonObject::WriteStringToArchive(Ar, *Str, Str.Len()); - Str = FString(1, &BufferPtr[i]); - } - if (Str == TEXT("\n")) - { - Str = FString(TEXT("\\")); - UVaRestJsonObject::WriteStringToArchive(Ar, *Str, Str.Len()); - Str = FString(TEXT("n")); - UVaRestJsonObject::WriteStringToArchive(Ar, *Str, Str.Len()); - Str = FString(1, &BufferPtr[i]); - } - else if (Str == TEXT("\t")) - { - Str = FString(TEXT("\\")); - UVaRestJsonObject::WriteStringToArchive(Ar, *Str, Str.Len()); - Str = FString(TEXT("t")); - UVaRestJsonObject::WriteStringToArchive(Ar, *Str, Str.Len()); - Str = FString(1, &BufferPtr[i]); - } - else - { - UVaRestJsonObject::WriteStringToArchive(Ar, *Str, Str.Len()); - } - } - - break; - } - } - - if (GetEndChar(JsonValue, Str)) - { - UVaRestJsonObject::WriteStringToArchive(Ar, *Str, Str.Len()); - } - - if (!IsLastElement) - { - Str = FString(TEXT(",")); - UVaRestJsonObject::WriteStringToArchive(Ar, *Str, Str.Len()); - } -} diff --git a/Plugins/VaRestPlugin/Source/VaRest/Private/VaRestJsonParser.h b/Plugins/VaRestPlugin/Source/VaRest/Private/VaRestJsonParser.h deleted file mode 100644 index 80b545d0..00000000 --- a/Plugins/VaRestPlugin/Source/VaRest/Private/VaRestJsonParser.h +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright 2015-2019 Mail.Ru Group. All Rights Reserved. - -#pragma once - -#include "CoreMinimal.h" -#include "Dom/JsonValue.h" - -struct FUtf8Helper -{ - /** @See FUTF8ToTCHAR_Convert::CodepointFromUtf8 */ - static uint32 CodepointFromUtf8(const ANSICHAR*& SourceString, const uint32 SourceLengthRemaining); -}; - -class FJsonValueNonConstArray : public FJsonValueArray -{ -public: - FJsonValueNonConstArray(const TArray>& InArray) - : FJsonValueArray(InArray) - { - } - - /** return non const array */ - TArray>& AsNonConstArray() { return Value; } -}; - -class FJsonValueNonConstBoolean : public FJsonValueBoolean -{ -public: - FJsonValueNonConstBoolean(bool InBool) - : FJsonValueBoolean(InBool) - { - } - - /** return non const bool */ - bool& AsNonConstBool() { return Value; } -}; - -class FJsonValueNonConstString : public FJsonValueString -{ -public: - FJsonValueNonConstString(const FString& InString) - : FJsonValueString(InString) - { - } - - /** return non const string */ - FString& AsNonConstString() { return Value; } -}; - -class FJsonValueNonConstNumber : public FJsonValueNumber -{ -public: - FJsonValueNonConstNumber(double InNumber) - : FJsonValueNumber(InNumber) - { - } - - /** return non const number */ - double& AsNonConstNumber() { return Value; } -}; - -enum class EJSONNotation -{ - NONE, - STRING, - STRING_SPECIAL, - SKIP, - NUMBER, - ARRAY, - OBJECT, -}; - -enum class EJSONToken -{ - CURLY_BEGIN, - CURLY_END, - SQUARE_BEGIN, - SQUARE_END, - COMMA, - COLON, - ROOT, - ERROR, -}; - -struct FJSONState -{ - /** Key */ - FString Key; - - /** Data */ - FString Data; - - /** Root object */ - TSharedPtr Root; - - /** Object list */ - TArray> Objects; - - /** Tokens */ - TArray Tokens; - - /** Notation */ - EJSONNotation Notation; - - /** Current char has escape */ - bool bEscape; - - /** Has error */ - int32 bError; - - /** Las quote for string */ - TCHAR Quote; - - /** Size */ - int32 Size; - - /** Default constructor */ - FJSONState(); - - EJSONToken GetToken(int32 Index = 0); - - FORCEINLINE bool CheckTokens(EJSONToken T1); - - FORCEINLINE bool CheckTokens(EJSONToken T1, EJSONToken T2); - - FORCEINLINE bool CheckTokens(EJSONToken T1, EJSONToken T2, EJSONToken T3); - - FORCEINLINE void PopToken(int32 Num); - - FORCEINLINE void PopObject(); - - FORCEINLINE void PopArray(); - - FORCEINLINE void PopValue(bool bCheckType = true); - - FORCEINLINE FJsonValue* GetLast(); - - FORCEINLINE FJsonValueObject* GetObject(); - - FORCEINLINE FJsonValueNonConstArray* GetArray(); - - FORCEINLINE TSharedPtr PushObject(); - - FORCEINLINE TSharedPtr PushObject(TSharedPtr Object); - - FORCEINLINE TSharedPtr PushArray(); - - FORCEINLINE TSharedPtr PushBoolean(); - - FORCEINLINE TSharedPtr PushNull(); - - FORCEINLINE TSharedPtr PushNumber(); - - FORCEINLINE TSharedPtr PushString(); - - FORCEINLINE void ClearData(); - - FORCEINLINE void ClearKey(); - - FORCEINLINE void DataToKey(); - - FORCEINLINE void Error(); -}; - -struct FJSONReader -{ - /** State */ - FJSONState State; - - /** Default constructor */ - FJSONReader(); - -private: - FORCEINLINE bool IsNewLine(const TCHAR& Char); - - FORCEINLINE bool IsSpace(const TCHAR& Char); - - FORCEINLINE bool FindToken(const TCHAR& Char); - - FORCEINLINE void UpdateNotation(); - - FORCEINLINE void ReadAsString(const TCHAR& Char); - - FORCEINLINE void ReadAsStringSpecial(const TCHAR& Char); - - FORCEINLINE void ReadAsNumber(const TCHAR& Char); - - FORCEINLINE void ReadBasicValue(const TCHAR& Char); - - FORCEINLINE void ReadAsArray(const TCHAR& Char); - - FORCEINLINE void ReadAsObject(const TCHAR& Char); - - FORCEINLINE void Skip(const TCHAR& Char); - -public: - bool Read(const TCHAR Char); // @Pushkin -}; - -struct FJSONWriter -{ - FJSONWriter(); - - FORCEINLINE bool GetStartChar(const TSharedPtr& JsonValue, FString& Char); - - FORCEINLINE bool GetEndChar(const TSharedPtr& JsonValue, FString& Char); - -public: - void Write(TSharedPtr JsonValue, FArchive* Writer, bool IsLastElement); // @Pushkin -}; diff --git a/Plugins/VaRestPlugin/Source/VaRest/Private/VaRestJsonValue.cpp b/Plugins/VaRestPlugin/Source/VaRest/Private/VaRestJsonValue.cpp deleted file mode 100644 index 043d2d99..00000000 --- a/Plugins/VaRestPlugin/Source/VaRest/Private/VaRestJsonValue.cpp +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright 2014-2019 Vladimir Alyamkin. All Rights Reserved. - -#include "VaRestJsonValue.h" - -#include "VaRestDefines.h" -#include "VaRestJsonObject.h" - -UVaRestJsonValue::UVaRestJsonValue(const FObjectInitializer& ObjectInitializer) - : Super(ObjectInitializer) -{ -} - -void UVaRestJsonValue::Reset() -{ - JsonVal = nullptr; -} - -TSharedPtr& UVaRestJsonValue::GetRootValue() -{ - return JsonVal; -} - -void UVaRestJsonValue::SetRootValue(TSharedPtr& JsonValue) -{ - JsonVal = JsonValue; -} - -////////////////////////////////////////////////////////////////////////// -// FJsonValue API - -EVaJson UVaRestJsonValue::GetType() const -{ - if (!JsonVal.IsValid()) - { - return EVaJson::None; - } - - switch (JsonVal->Type) - { - case EJson::None: - return EVaJson::None; - - case EJson::Null: - return EVaJson::Null; - - case EJson::String: - return EVaJson::String; - - case EJson::Number: - return EVaJson::Number; - - case EJson::Boolean: - return EVaJson::Boolean; - - case EJson::Array: - return EVaJson::Array; - - case EJson::Object: - return EVaJson::Object; - - default: - return EVaJson::None; - } -} - -FString UVaRestJsonValue::GetTypeString() const -{ - if (!JsonVal.IsValid()) - { - return "None"; - } - - switch (JsonVal->Type) - { - case EJson::None: - return TEXT("None"); - - case EJson::Null: - return TEXT("Null"); - - case EJson::String: - return TEXT("String"); - - case EJson::Number: - return TEXT("Number"); - - case EJson::Boolean: - return TEXT("Boolean"); - - case EJson::Array: - return TEXT("Array"); - - case EJson::Object: - return TEXT("Object"); - - default: - return TEXT("None"); - } -} - -bool UVaRestJsonValue::IsNull() const -{ - if (!JsonVal.IsValid()) - { - return true; - } - - return JsonVal->IsNull(); -} - -float UVaRestJsonValue::AsNumber() const -{ - if (!JsonVal.IsValid()) - { - ErrorMessage(TEXT("Number")); - return 0.f; - } - - return static_cast(JsonVal->AsNumber()); -} - -int32 UVaRestJsonValue::AsInt32() const -{ - if (!JsonVal.IsValid()) - { - ErrorMessage(TEXT("Number")); - return 0.f; - } - - return static_cast(JsonVal->AsNumber()); -} - -int64 UVaRestJsonValue::AsInt64() const -{ - if (!JsonVal.IsValid()) - { - ErrorMessage(TEXT("Number")); - return 0.f; - } - - return static_cast(JsonVal->AsNumber()); -} - -FString UVaRestJsonValue::AsString() const -{ - if (!JsonVal.IsValid()) - { - ErrorMessage(TEXT("String")); - return FString(); - } - - return JsonVal->AsString(); -} - -bool UVaRestJsonValue::AsBool() const -{ - if (!JsonVal.IsValid()) - { - ErrorMessage(TEXT("Boolean")); - return false; - } - - return JsonVal->AsBool(); -} - -TArray UVaRestJsonValue::AsArray() const -{ - TArray OutArray; - - if (!JsonVal.IsValid()) - { - ErrorMessage(TEXT("Array")); - return OutArray; - } - - TArray> ValArray = JsonVal->AsArray(); - for (auto Value : ValArray) - { - UVaRestJsonValue* NewValue = NewObject(); - NewValue->SetRootValue(Value); - - OutArray.Add(NewValue); - } - - return OutArray; -} - -UVaRestJsonObject* UVaRestJsonValue::AsObject() -{ - if (!JsonVal.IsValid()) - { - ErrorMessage(TEXT("Object")); - return nullptr; - } - - const TSharedPtr NewObj = JsonVal->AsObject(); - - UVaRestJsonObject* JsonObj = NewObject(); - JsonObj->SetRootObject(NewObj); - - return JsonObj; -} - -////////////////////////////////////////////////////////////////////////// -// Helpers - -void UVaRestJsonValue::ErrorMessage(const FString& InType) const -{ - UE_LOG(LogVaRest, Error, TEXT("Json Value of type '%s' used as a '%s'."), *GetTypeString(), *InType); -} diff --git a/Plugins/VaRestPlugin/Source/VaRest/Private/VaRestLibrary.cpp b/Plugins/VaRestPlugin/Source/VaRest/Private/VaRestLibrary.cpp deleted file mode 100644 index 9c6f16f8..00000000 --- a/Plugins/VaRestPlugin/Source/VaRest/Private/VaRestLibrary.cpp +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright 2014-2019 Vladimir Alyamkin. All Rights Reserved. - -#include "VaRestLibrary.h" - -#include "VaRest.h" -#include "VaRestDefines.h" -#include "VaRestRequestJSON.h" - -#include "Engine/World.h" -#include "GenericPlatform/GenericPlatformHttp.h" -#include "Interfaces/IPluginManager.h" -#include "Misc/Base64.h" - -UVaRestSettings* UVaRestLibrary::GetVaRestSettings() -{ - return FVaRestModule::Get().GetSettings(); -} - -FString UVaRestLibrary::PercentEncode(const FString& Source) -{ - return FGenericPlatformHttp::UrlEncode(Source); -} - -FString UVaRestLibrary::Base64Encode(const FString& Source) -{ - TArray ByteArray; - const FTCHARToUTF8 StringSrc = FTCHARToUTF8(Source.GetCharArray().GetData()); - ByteArray.Append((uint8*)StringSrc.Get(), StringSrc.Length()); - - return FBase64::Encode(ByteArray); -} - -bool UVaRestLibrary::Base64Decode(const FString& Source, FString& Dest) -{ - TArray ByteArray; - const bool Success = FBase64::Decode(Source, ByteArray); - - const FUTF8ToTCHAR StringSrc = FUTF8ToTCHAR((const ANSICHAR*)ByteArray.GetData(), ByteArray.Num()); - Dest = FString(); - Dest.AppendChars(StringSrc.Get(), StringSrc.Length()); - - return Success; -} - -bool UVaRestLibrary::Base64EncodeData(const TArray& Data, FString& Dest) -{ - if (Data.Num() > 0) - { - Dest = FBase64::Encode(Data); - return true; - } - - Dest = FString(); - return false; -} - -bool UVaRestLibrary::Base64DecodeData(const FString& Source, TArray& Dest) -{ - return FBase64::Decode(Source, Dest); -} - -FString UVaRestLibrary::StringToMd5(const FString& StringToHash) -{ - return FMD5::HashAnsiString(*StringToHash); -} - -FString UVaRestLibrary::StringToSha1(const FString& StringToHash) -{ - FSHA1 Sha1Gen; - - Sha1Gen.Update((unsigned char*)TCHAR_TO_ANSI(*StringToHash), FCString::Strlen(*StringToHash)); - Sha1Gen.Final(); - - FString Sha1String; - for (int32 i = 0; i < 20; i++) - { - Sha1String += FString::Printf(TEXT("%02x"), Sha1Gen.m_digest[i]); - } - - return Sha1String; -} - -FString UVaRestLibrary::GetVaRestVersion() -{ - const auto PluginRef = IPluginManager::Get().FindPlugin("VaRest"); - - return !PluginRef.IsValid() ? FString("invalid") : PluginRef->GetDescriptor().VersionName; -} - -FVaRestURL UVaRestLibrary::GetWorldURL(UObject* WorldContextObject) -{ - if (WorldContextObject) - { - if (UWorld* World = WorldContextObject->GetWorld()) - { - return FVaRestURL(World->URL); - } - } - - return FVaRestURL(); -} diff --git a/Plugins/VaRestPlugin/Source/VaRest/Private/VaRestRequestJSON.cpp b/Plugins/VaRestPlugin/Source/VaRest/Private/VaRestRequestJSON.cpp deleted file mode 100644 index c344dc31..00000000 --- a/Plugins/VaRestPlugin/Source/VaRest/Private/VaRestRequestJSON.cpp +++ /dev/null @@ -1,643 +0,0 @@ -// Copyright 2014-2019 Vladimir Alyamkin. All Rights Reserved. - -#include "VaRestRequestJSON.h" - -#include "VaRestDefines.h" -#include "VaRestJsonObject.h" -#include "VaRestJsonValue.h" -#include "VaRestLibrary.h" -#include "VaRestSettings.h" - -#include "Engine/Engine.h" -#include "Engine/LatentActionManager.h" -#include "Engine/World.h" -#include "Interfaces/IHttpResponse.h" -#include "Serialization/JsonSerializer.h" -#include "Serialization/JsonWriter.h" - -FString UVaRestRequestJSON::DeprecatedResponseString(TEXT("DEPRECATED: Please use GetResponseContentAsString() instead")); - -template -void FVaRestLatentAction::Cancel() -{ - UObject* Obj = Request.Get(); - if (Obj != nullptr) - { - ((UVaRestRequestJSON*)Obj)->Cancel(); - } -} - -UVaRestRequestJSON::UVaRestRequestJSON(const class FObjectInitializer& PCIP) - : Super(PCIP) - , BinaryContentType(TEXT("application/octet-stream")) -{ - ContinueAction = nullptr; - - RequestVerb = EVaRestRequestVerb::GET; - RequestContentType = EVaRestRequestContentType::x_www_form_urlencoded_url; - - ResetData(); -} - -void UVaRestRequestJSON::SetVerb(EVaRestRequestVerb Verb) -{ - RequestVerb = Verb; -} - -void UVaRestRequestJSON::SetCustomVerb(FString Verb) -{ - CustomVerb = Verb; -} - -void UVaRestRequestJSON::SetContentType(EVaRestRequestContentType ContentType) -{ - RequestContentType = ContentType; -} - -void UVaRestRequestJSON::SetBinaryContentType(const FString& ContentType) -{ - BinaryContentType = ContentType; -} - -void UVaRestRequestJSON::SetBinaryRequestContent(const TArray& Bytes) -{ - RequestBytes = Bytes; -} - -void UVaRestRequestJSON::SetStringRequestContent(const FString& Content) -{ - StringRequestContent = Content; -} - -void UVaRestRequestJSON::SetHeader(const FString& HeaderName, const FString& HeaderValue) -{ - RequestHeaders.Add(HeaderName, HeaderValue); -} - -////////////////////////////////////////////////////////////////////////// -// Destruction and reset - -void UVaRestRequestJSON::ResetData() -{ - ResetRequestData(); - ResetResponseData(); -} - -void UVaRestRequestJSON::ResetRequestData() -{ - if (RequestJsonObj != nullptr) - { - RequestJsonObj->Reset(); - } - else - { - RequestJsonObj = NewObject(); - } - - // See issue #90 - // HttpRequest = FHttpModule::Get().CreateRequest(); - - RequestBytes.Empty(); - StringRequestContent.Empty(); -} - -void UVaRestRequestJSON::ResetResponseData() -{ - if (ResponseJsonObj != nullptr) - { - ResponseJsonObj->Reset(); - } - else - { - ResponseJsonObj = NewObject(); - } - - if (ResponseJsonValue != nullptr) - { - ResponseJsonValue->Reset(); - } - else - { - ResponseJsonValue = NewObject(); - } - - ResponseHeaders.Empty(); - ResponseCode = -1; - ResponseSize = 0; - - bIsValidJsonResponse = false; - - // #127 Reset string to deprecated state - ResponseContent = DeprecatedResponseString; - - ResponseBytes.Empty(); - ResponseContentLength = 0; -} - -void UVaRestRequestJSON::Cancel() -{ - ContinueAction = nullptr; - - ResetResponseData(); -} - -////////////////////////////////////////////////////////////////////////// -// JSON data accessors - -UVaRestJsonObject* UVaRestRequestJSON::GetRequestObject() const -{ - check(RequestJsonObj); - return RequestJsonObj; -} - -void UVaRestRequestJSON::SetRequestObject(UVaRestJsonObject* JsonObject) -{ - if (JsonObject == nullptr) - { - UE_LOG(LogVaRest, Error, TEXT("%s: Provided JsonObject is nullptr"), *VA_FUNC_LINE); - return; - } - - RequestJsonObj = JsonObject; -} - -UVaRestJsonObject* UVaRestRequestJSON::GetResponseObject() const -{ - check(ResponseJsonObj); - return ResponseJsonObj; -} - -void UVaRestRequestJSON::SetResponseObject(UVaRestJsonObject* JsonObject) -{ - if (JsonObject == nullptr) - { - UE_LOG(LogVaRest, Error, TEXT("%s: Provided JsonObject is nullptr"), *VA_FUNC_LINE); - return; - } - - ResponseJsonObj = JsonObject; -} - -UVaRestJsonValue* UVaRestRequestJSON::GetResponseValue() const -{ - check(ResponseJsonValue); - return ResponseJsonValue; -} - -/////////////////////////////////////////////////////////////////////////// -// Response data access - -FString UVaRestRequestJSON::GetURL() const -{ - return HttpRequest->GetURL(); -} - -EVaRestRequestVerb UVaRestRequestJSON::GetVerb() const -{ - return RequestVerb; -} - -EVaRestRequestStatus UVaRestRequestJSON::GetStatus() const -{ - return EVaRestRequestStatus((uint8)HttpRequest->GetStatus()); -} - -int32 UVaRestRequestJSON::GetResponseCode() const -{ - return ResponseCode; -} - -FString UVaRestRequestJSON::GetResponseHeader(const FString& HeaderName) -{ - FString Result; - - FString* Header = ResponseHeaders.Find(HeaderName); - if (Header != nullptr) - { - Result = *Header; - } - - return Result; -} - -TArray UVaRestRequestJSON::GetAllResponseHeaders() const -{ - TArray Result; - for (TMap::TConstIterator It(ResponseHeaders); It; ++It) - { - Result.Add(It.Key() + TEXT(": ") + It.Value()); - } - return Result; -} - -int32 UVaRestRequestJSON::GetResponseContentLength() const -{ - return ResponseContentLength; -} - -const TArray& UVaRestRequestJSON::GetResponseContent() const -{ - return ResponseBytes; -} - -////////////////////////////////////////////////////////////////////////// -// URL processing - -void UVaRestRequestJSON::SetURL(const FString& Url) -{ - // Be sure to trim URL because it can break links on iOS - FString TrimmedUrl = Url; - - TrimmedUrl.TrimStartInline(); - TrimmedUrl.TrimEndInline(); - - HttpRequest->SetURL(TrimmedUrl); -} - -void UVaRestRequestJSON::ProcessURL(const FString& Url) -{ - SetURL(Url); - ProcessRequest(); -} - -void UVaRestRequestJSON::ApplyURL(const FString& Url, UVaRestJsonObject*& Result, UObject* WorldContextObject, FLatentActionInfo LatentInfo) -{ - // Be sure to trim URL because it can break links on iOS - FString TrimmedUrl = Url; - - TrimmedUrl.TrimStartInline(); - TrimmedUrl.TrimEndInline(); - - HttpRequest->SetURL(TrimmedUrl); - - // Prepare latent action - if (UWorld* World = GEngine->GetWorldFromContextObjectChecked(WorldContextObject)) - { - FLatentActionManager& LatentActionManager = World->GetLatentActionManager(); - FVaRestLatentAction* Kont = LatentActionManager.FindExistingAction>(LatentInfo.CallbackTarget, LatentInfo.UUID); - - if (Kont != nullptr) - { - Kont->Cancel(); - LatentActionManager.RemoveActionsForObject(LatentInfo.CallbackTarget); - } - - LatentActionManager.AddNewAction(LatentInfo.CallbackTarget, LatentInfo.UUID, ContinueAction = new FVaRestLatentAction(this, Result, LatentInfo)); - } - - ProcessRequest(); -} - -void UVaRestRequestJSON::ExecuteProcessRequest() -{ - if (HttpRequest->GetURL().Len() == 0) - { - UE_LOG(LogVaRest, Error, TEXT("Request execution attempt with empty URL")); - return; - } - - ProcessRequest(); -} - -void UVaRestRequestJSON::ProcessRequest() -{ - // Force add to root once request is launched - AddToRoot(); - - // Set verb - switch (RequestVerb) - { - case EVaRestRequestVerb::GET: - HttpRequest->SetVerb(TEXT("GET")); - break; - - case EVaRestRequestVerb::POST: - HttpRequest->SetVerb(TEXT("POST")); - break; - - case EVaRestRequestVerb::PUT: - HttpRequest->SetVerb(TEXT("PUT")); - break; - - case EVaRestRequestVerb::DEL: - HttpRequest->SetVerb(TEXT("DELETE")); - break; - - case EVaRestRequestVerb::CUSTOM: - HttpRequest->SetVerb(CustomVerb); - break; - - default: - break; - } - - // Set content-type - switch (RequestContentType) - { - case EVaRestRequestContentType::x_www_form_urlencoded_url: - { - HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/x-www-form-urlencoded")); - - FString UrlParams = ""; - uint16 ParamIdx = 0; - - // Loop through all the values and prepare additional url part - for (auto RequestIt = RequestJsonObj->GetRootObject()->Values.CreateIterator(); RequestIt; ++RequestIt) - { - FString Key = RequestIt.Key(); - FString Value = RequestIt.Value().Get()->AsString(); - - if (!Key.IsEmpty() && !Value.IsEmpty()) - { - UrlParams += ParamIdx == 0 ? "?" : "&"; - UrlParams += UVaRestLibrary::PercentEncode(Key) + "=" + UVaRestLibrary::PercentEncode(Value); - } - - ParamIdx++; - } - - // Apply params - HttpRequest->SetURL(HttpRequest->GetURL() + UrlParams); - - // Add optional string content - if (!StringRequestContent.IsEmpty()) - { - HttpRequest->SetContentAsString(StringRequestContent); - } - - // Check extended log to avoid security vulnerability (#133) - if (UVaRestLibrary::GetVaRestSettings()->bExtendedLog) - { - UE_LOG(LogVaRest, Log, TEXT("%s: Request (urlencoded): %s %s %s %s"), *VA_FUNC_LINE, *HttpRequest->GetVerb(), *HttpRequest->GetURL(), *UrlParams, *StringRequestContent); - } - else - { - UE_LOG(LogVaRest, Log, TEXT("%s: Request (urlencoded): %s %s (check bExtendedLog for additional data)"), *VA_FUNC_LINE, *HttpRequest->GetVerb(), *HttpRequest->GetURL()); - } - - break; - } - case EVaRestRequestContentType::x_www_form_urlencoded_body: - { - HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/x-www-form-urlencoded")); - - FString UrlParams = ""; - uint16 ParamIdx = 0; - - // Add optional string content - if (!StringRequestContent.IsEmpty()) - { - UrlParams = StringRequestContent; - } - else - { - // Loop through all the values and prepare additional url part - for (auto RequestIt = RequestJsonObj->GetRootObject()->Values.CreateIterator(); RequestIt; ++RequestIt) - { - FString Key = RequestIt.Key(); - FString Value = RequestIt.Value().Get()->AsString(); - - if (!Key.IsEmpty() && !Value.IsEmpty()) - { - UrlParams += ParamIdx == 0 ? "" : "&"; - UrlParams += UVaRestLibrary::PercentEncode(Key) + "=" + UVaRestLibrary::PercentEncode(Value); - } - - ParamIdx++; - } - } - - // Apply params - HttpRequest->SetContentAsString(UrlParams); - - // Check extended log to avoid security vulnerability (#133) - if (UVaRestLibrary::GetVaRestSettings()->bExtendedLog) - { - UE_LOG(LogVaRest, Log, TEXT("%s: Request (url body): %s %s %s"), *VA_FUNC_LINE, *HttpRequest->GetVerb(), *HttpRequest->GetURL(), *UrlParams); - } - else - { - UE_LOG(LogVaRest, Log, TEXT("%s: Request (url body): %s %s (check bExtendedLog for additional data)"), *VA_FUNC_LINE, *HttpRequest->GetVerb(), *HttpRequest->GetURL()); - } - - break; - } - case EVaRestRequestContentType::binary: - { - HttpRequest->SetHeader(TEXT("Content-Type"), BinaryContentType); - HttpRequest->SetContent(RequestBytes); - - UE_LOG(LogVaRest, Log, TEXT("Request (binary): %s %s"), *HttpRequest->GetVerb(), *HttpRequest->GetURL()); - - break; - } - case EVaRestRequestContentType::json: - { - HttpRequest->SetHeader(TEXT("Content-Type"), TEXT("application/json")); - - // Body is ignored for get requests, so we shouldn't place json into it even if it's empty - if (RequestVerb == EVaRestRequestVerb::GET) - { - break; - } - - // Serialize data to json string - FString OutputString; - TSharedRef> Writer = TJsonWriterFactory<>::Create(&OutputString); - FJsonSerializer::Serialize(RequestJsonObj->GetRootObject(), Writer); - - // Set Json content - HttpRequest->SetContentAsString(OutputString); - - if (UVaRestLibrary::GetVaRestSettings()->bExtendedLog) - { - UE_LOG(LogVaRest, Log, TEXT("Request (json): %s %s %sJSON(%s%s%s)JSON"), *HttpRequest->GetVerb(), *HttpRequest->GetURL(), LINE_TERMINATOR, LINE_TERMINATOR, *OutputString, LINE_TERMINATOR); - } - else - { - UE_LOG(LogVaRest, Log, TEXT("Request (json): %s %s (check bExtendedLog for additional data)"), *HttpRequest->GetVerb(), *HttpRequest->GetURL()); - } - - break; - } - - default: - break; - } - - // Apply additional headers - for (TMap::TConstIterator It(RequestHeaders); It; ++It) - { - HttpRequest->SetHeader(It.Key(), It.Value()); - } - - // Bind event - HttpRequest->OnProcessRequestComplete().BindUObject(this, &UVaRestRequestJSON::OnProcessRequestComplete); - - // Execute the request - HttpRequest->ProcessRequest(); -} - -////////////////////////////////////////////////////////////////////////// -// Request callbacks - -void UVaRestRequestJSON::OnProcessRequestComplete(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful) -{ - // Remove from root on completion - RemoveFromRoot(); - - // Be sure that we have no data from previous response - ResetResponseData(); - - // Check we have a response and save response code as int32 - if (Response.IsValid()) - { - ResponseCode = Response->GetResponseCode(); - } - - // Check we have result to process futher - if (!bWasSuccessful || !Response.IsValid()) - { - UE_LOG(LogVaRest, Error, TEXT("Request failed (%d): %s"), ResponseCode, *Request->GetURL()); - - // Broadcast the result event - OnRequestFail.Broadcast(this); - OnStaticRequestFail.Broadcast(this); - - return; - } - -#if PLATFORM_DESKTOP - // Log response state - UE_LOG(LogVaRest, Log, TEXT("Response (%d): %sJSON(%s%s%s)JSON"), ResponseCode, LINE_TERMINATOR, LINE_TERMINATOR, *Response->GetContentAsString(), LINE_TERMINATOR); -#endif - - // Process response headers - TArray Headers = Response->GetAllHeaders(); - for (FString Header : Headers) - { - FString Key; - FString Value; - if (Header.Split(TEXT(": "), &Key, &Value)) - { - ResponseHeaders.Add(Key, Value); - } - } - - if (UVaRestLibrary::GetVaRestSettings()->bUseChunkedParser) - { - // Try to deserialize data to JSON - const TArray& Bytes = Response->GetContent(); - ResponseSize = ResponseJsonObj->DeserializeFromUTF8Bytes((const ANSICHAR*)Bytes.GetData(), Bytes.Num()); - - // Log errors - if (ResponseSize == 0) - { - // As we assume it's recommended way to use current class, but not the only one, - // it will be the warning instead of error - UE_LOG(LogVaRest, Warning, TEXT("JSON could not be decoded!")); - } - } - else - { - // Use default unreal one - const TSharedRef> Reader = TJsonReaderFactory<>::Create(*Response->GetContentAsString()); - TSharedPtr OutJsonValue; - if (FJsonSerializer::Deserialize(Reader, OutJsonValue)) - { - ResponseJsonValue->SetRootValue(OutJsonValue); - - if (ResponseJsonValue->GetType() == EVaJson::Object) - { - ResponseJsonObj->SetRootObject(ResponseJsonValue->GetRootValue()->AsObject()); - ResponseSize = Response->GetContentLength(); - } - } - } - - // Decide whether the request was successful - bIsValidJsonResponse = bWasSuccessful && (ResponseSize > 0); - - if (!bIsValidJsonResponse) - { - // Save response data as a string - ResponseContent = Response->GetContentAsString(); - ResponseSize = ResponseContent.GetAllocatedSize(); - - ResponseBytes = Response->GetContent(); - ResponseContentLength = Response->GetContentLength(); - } - - // Broadcast the result events on next tick - OnRequestComplete.Broadcast(this); - OnStaticRequestComplete.Broadcast(this); - - // Finish the latent action - if (ContinueAction) - { - FVaRestLatentAction* K = ContinueAction; - ContinueAction = nullptr; - - K->Call(ResponseJsonObj); - } -} - -////////////////////////////////////////////////////////////////////////// -// Tags - -void UVaRestRequestJSON::AddTag(FName Tag) -{ - if (Tag != NAME_None) - { - Tags.AddUnique(Tag); - } -} - -int32 UVaRestRequestJSON::RemoveTag(FName Tag) -{ - return Tags.Remove(Tag); -} - -bool UVaRestRequestJSON::HasTag(FName Tag) const -{ - return (Tag != NAME_None) && Tags.Contains(Tag); -} - -////////////////////////////////////////////////////////////////////////// -// Data - -FString UVaRestRequestJSON::GetResponseContentAsString(bool bCacheResponseContent) -{ - // Check we have valid json response - if (!bIsValidJsonResponse) - { - // We've cached response content in OnProcessRequestComplete() - return ResponseContent; - } - - // Check we have valid response object - if (!ResponseJsonObj || !ResponseJsonObj->IsValidLowLevel()) - { - // Discard previous cached string if we had one - ResponseContent = DeprecatedResponseString; - - return TEXT("Invalid response"); - } - - // Check if we should re-genetate it in runtime - if (!bCacheResponseContent) - { - UE_LOG(LogVaRest, Warning, TEXT("%s: Use of uncashed getter could be slow"), *VA_FUNC_LINE); - return ResponseJsonObj->EncodeJson(); - } - - // Check that we haven't cached content yet - if (ResponseContent == DeprecatedResponseString) - { - UE_LOG(LogVaRest, Warning, TEXT("%s: Response content string is cached"), *VA_FUNC_LINE); - ResponseContent = ResponseJsonObj->EncodeJson(); - } - - // Return previously cached content now - return ResponseContent; -} diff --git a/Plugins/VaRestPlugin/Source/VaRest/Private/VaRestSettings.cpp b/Plugins/VaRestPlugin/Source/VaRest/Private/VaRestSettings.cpp deleted file mode 100644 index 06a9a0b9..00000000 --- a/Plugins/VaRestPlugin/Source/VaRest/Private/VaRestSettings.cpp +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright 2014-2019 Vladimir Alyamkin. All Rights Reserved. - -#include "VaRestSettings.h" - -UVaRestSettings::UVaRestSettings(const FObjectInitializer& ObjectInitializer) - : Super(ObjectInitializer) -{ - bExtendedLog = false; - bUseChunkedParser = false; -} diff --git a/Plugins/VaRestPlugin/Source/VaRest/Private/VaRestSubsystem.cpp b/Plugins/VaRestPlugin/Source/VaRest/Private/VaRestSubsystem.cpp deleted file mode 100644 index 97daab65..00000000 --- a/Plugins/VaRestPlugin/Source/VaRest/Private/VaRestSubsystem.cpp +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright 2014-2020 Vladimir Alyamkin. All Rights Reserved. - -#include "VaRestSubsystem.h" - -#include "VaRestDefines.h" -#include "VaRestJsonObject.h" -#include "VaRestJsonValue.h" - -#include "Misc/FileHelper.h" -#include "Misc/Paths.h" -#include "Serialization/JsonReader.h" -#include "Serialization/JsonSerializer.h" -#include "Subsystems/SubsystemBlueprintLibrary.h" - -UVaRestSubsystem::UVaRestSubsystem() - : UEngineSubsystem() -{ -} - -void UVaRestSubsystem::Initialize(FSubsystemCollectionBase& Collection) -{ - Super::Initialize(Collection); - - UE_LOG(LogVaRest, Log, TEXT("%s: VaRest subsystem initialized"), *VA_FUNC_LINE); -} - -void UVaRestSubsystem::Deinitialize() -{ - // Do nothing for now - Super::Deinitialize(); -} - -void UVaRestSubsystem::CallURL(const FString& URL, EVaRestRequestVerb Verb, EVaRestRequestContentType ContentType, UVaRestJsonObject* VaRestJson, const FVaRestCallDelegate& Callback) -{ - // Check we have valid data json - if (VaRestJson == nullptr) - { - VaRestJson = ConstructVaRestJsonObject(); - } - - UVaRestRequestJSON* Request = ConstructVaRestRequest(); - - Request->SetVerb(Verb); - Request->SetContentType(ContentType); - Request->SetRequestObject(VaRestJson); - - FVaRestCallResponse Response; - Response.Request = Request; - Response.Callback = Callback; - - Response.CompleteDelegateHandle = Request->OnStaticRequestComplete.AddUObject(this, &UVaRestSubsystem::OnCallComplete); - Response.FailDelegateHandle = Request->OnStaticRequestFail.AddUObject(this, &UVaRestSubsystem::OnCallComplete); - - RequestMap.Add(Request, Response); - - Request->ResetResponseData(); - Request->ProcessURL(URL); -} - -void UVaRestSubsystem::OnCallComplete(UVaRestRequestJSON* Request) -{ - if (!RequestMap.Contains(Request)) - { - return; - } - - const auto Response = RequestMap.Find(Request); - Request->OnStaticRequestComplete.Remove(Response->CompleteDelegateHandle); - Request->OnStaticRequestFail.Remove(Response->FailDelegateHandle); - - Response->Callback.ExecuteIfBound(Request); - Response->Request = nullptr; - RequestMap.Remove(Request); -} - -UVaRestRequestJSON* UVaRestSubsystem::ConstructVaRestRequest() -{ - return NewObject(this); -} - -UVaRestRequestJSON* UVaRestSubsystem::ConstructVaRestRequestExt(EVaRestRequestVerb Verb, EVaRestRequestContentType ContentType) -{ - UVaRestRequestJSON* Request = ConstructVaRestRequest(); - - Request->SetVerb(Verb); - Request->SetContentType(ContentType); - - return Request; -} - -UVaRestJsonObject* UVaRestSubsystem::ConstructVaRestJsonObject() -{ - return NewObject(this); -} - -UVaRestJsonObject* UVaRestSubsystem::StaticConstructVaRestJsonObject() -{ - auto SelfSystem = CastChecked(USubsystemBlueprintLibrary::GetEngineSubsystem(UVaRestSubsystem::StaticClass()), ECastCheckedType::NullChecked); - return SelfSystem->ConstructVaRestJsonObject(); -} - -UVaRestJsonValue* UVaRestSubsystem::ConstructJsonValueNumber(float Number) -{ - TSharedPtr NewVal = MakeShareable(new FJsonValueNumber(Number)); - - UVaRestJsonValue* NewValue = NewObject(this); - NewValue->SetRootValue(NewVal); - - return NewValue; -} - -UVaRestJsonValue* UVaRestSubsystem::ConstructJsonValueString(const FString& StringValue) -{ - TSharedPtr NewVal = MakeShareable(new FJsonValueString(StringValue)); - - UVaRestJsonValue* NewValue = NewObject(this); - NewValue->SetRootValue(NewVal); - - return NewValue; -} - -UVaRestJsonValue* UVaRestSubsystem::ConstructJsonValueBool(bool InValue) -{ - TSharedPtr NewVal = MakeShareable(new FJsonValueBoolean(InValue)); - - UVaRestJsonValue* NewValue = NewObject(this); - NewValue->SetRootValue(NewVal); - - return NewValue; -} - -UVaRestJsonValue* UVaRestSubsystem::ConstructJsonValueArray(const TArray& InArray) -{ - // Prepare data array to create new value - TArray> ValueArray; - for (auto InVal : InArray) - { - ValueArray.Add(InVal->GetRootValue()); - } - - TSharedPtr NewVal = MakeShareable(new FJsonValueArray(ValueArray)); - - UVaRestJsonValue* NewValue = NewObject(this); - NewValue->SetRootValue(NewVal); - - return NewValue; -} - -UVaRestJsonValue* UVaRestSubsystem::ConstructJsonValueObject(UVaRestJsonObject* JsonObject) -{ - TSharedPtr NewVal = MakeShareable(new FJsonValueObject(JsonObject->GetRootObject())); - - UVaRestJsonValue* NewValue = NewObject(this); - NewValue->SetRootValue(NewVal); - - return NewValue; -} - -UVaRestJsonValue* UVaRestSubsystem::ConstructJsonValue(const TSharedPtr& InValue) -{ - TSharedPtr NewVal = InValue; - - UVaRestJsonValue* NewValue = NewObject(this); - NewValue->SetRootValue(NewVal); - - return NewValue; -} - -UVaRestJsonValue* UVaRestSubsystem::DecodeJsonValue(const FString& JsonString) -{ - const TSharedRef> Reader = TJsonReaderFactory<>::Create(*JsonString); - TSharedPtr OutJsonValue; - if (FJsonSerializer::Deserialize(Reader, OutJsonValue)) - { - return ConstructJsonValue(OutJsonValue); - } - - return nullptr; -} - -UVaRestJsonObject* UVaRestSubsystem::DecodeJsonObject(const FString& JsonString) -{ - const TSharedRef> Reader = TJsonReaderFactory<>::Create(*JsonString); - TSharedPtr OutJsonObj; - if (FJsonSerializer::Deserialize(Reader, OutJsonObj)) - { - auto NewJsonObj = NewObject(this); - NewJsonObj->SetRootObject(OutJsonObj); - return NewJsonObj; - } - - return nullptr; -} - -class UVaRestJsonObject* UVaRestSubsystem::LoadJsonFromFile(const FString& Path, const bool bIsRelativeToContentDir) -{ - auto* Json = ConstructVaRestJsonObject(); - - FString JSONString; - if (FFileHelper::LoadFileToString(JSONString, *(bIsRelativeToContentDir ? FPaths::ProjectContentDir() / Path : Path))) - { - if (Json->DecodeJson(JSONString)) - { - return Json; - } - else - { - UE_LOG(LogVaRest, Error, TEXT("%s: Can't decode json from file %s"), *VA_FUNC_LINE, *Path); - } - } - else - { - UE_LOG(LogVaRest, Error, TEXT("%s: Can't open file %s"), *VA_FUNC_LINE, *Path); - } - - return nullptr; -} diff --git a/Plugins/VaRestPlugin/Source/VaRest/Public/VaRest.h b/Plugins/VaRestPlugin/Source/VaRest/Public/VaRest.h deleted file mode 100644 index 86dade53..00000000 --- a/Plugins/VaRestPlugin/Source/VaRest/Public/VaRest.h +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2014-2019 Vladimir Alyamkin. All Rights Reserved. - -#pragma once - -#include "Modules/ModuleManager.h" - -class UVaRestSettings; - -class FVaRestModule : public IModuleInterface -{ -public: - /** IModuleInterface implementation */ - virtual void StartupModule() override; - virtual void ShutdownModule() override; - - /** - * Singleton-like access to this module's interface. This is just for convenience! - * Beware of calling this during the shutdown phase, though. Your module might have been unloaded already. - * - * @return Returns singleton instance, loading the module on demand if needed - */ - static inline FVaRestModule& Get() - { - return FModuleManager::LoadModuleChecked("VaRest"); - } - - /** - * Checks to see if this module is loaded and ready. It is only valid to call Get() if IsAvailable() returns true. - * - * @return True if the module is loaded and ready to use - */ - static inline bool IsAvailable() - { - return FModuleManager::Get().IsModuleLoaded("VaRest"); - } - - /** Getter for internal settings object to support runtime configuration changes */ - UVaRestSettings* GetSettings() const; - -protected: - /** Module settings */ - UVaRestSettings* ModuleSettings; -}; diff --git a/Plugins/VaRestPlugin/Source/VaRest/Public/VaRestDefines.h b/Plugins/VaRestPlugin/Source/VaRest/Public/VaRestDefines.h deleted file mode 100644 index ec14ea47..00000000 --- a/Plugins/VaRestPlugin/Source/VaRest/Public/VaRestDefines.h +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2014-2019 Vladimir Alyamkin. All Rights Reserved. - -#pragma once - -#include "Runtime/Launch/Resources/Version.h" - -#include "CoreMinimal.h" - -#include "Logging/LogCategory.h" -#include "Logging/LogMacros.h" -#include "Logging/LogVerbosity.h" - -// You should place include statements to your module's private header files here. You only need to -// add includes for headers that are used in most of your module's source files though. - -DECLARE_LOG_CATEGORY_EXTERN(LogVaRest, Log, All); - -#define VA_FUNC (FString(__FUNCTION__)) // Current Class Name + Function Name where this is called -#define VA_LINE (FString::FromInt(__LINE__)) // Current Line Number in the code where this is called -#define VA_FUNC_LINE (VA_FUNC + "(" + VA_LINE + ")") // Current Class and Line Number where this is called! diff --git a/Plugins/VaRestPlugin/Source/VaRest/Public/VaRestJsonObject.h b/Plugins/VaRestPlugin/Source/VaRest/Public/VaRestJsonObject.h deleted file mode 100644 index 690a889e..00000000 --- a/Plugins/VaRestPlugin/Source/VaRest/Public/VaRestJsonObject.h +++ /dev/null @@ -1,289 +0,0 @@ -// Copyright 2014-2019 Vladimir Alyamkin. All Rights Reserved. - -#pragma once - -#include "VaRestDefines.h" - -#include "Dom/JsonObject.h" -#include "Templates/UnrealTypeTraits.h" - -#include "VaRestJsonObject.generated.h" - -class UVaRestJsonValue; - -/** - * Blueprintable FJsonObject wrapper - */ -UCLASS(BlueprintType, Blueprintable) -class VAREST_API UVaRestJsonObject : public UObject -{ - GENERATED_UCLASS_BODY() - -public: - /** Reset all internal data */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - void Reset(); - - /** Get the root Json object */ - TSharedRef& GetRootObject(); - - /** Set the root Json object */ - void SetRootObject(const TSharedPtr& JsonObject); - - ////////////////////////////////////////////////////////////////////////// - // Serialization - - /** Serialize Json to string (formatted with line breaks) */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - FString EncodeJson() const; - - /** Serialize Json to string (single string without line breaks) */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - FString EncodeJsonToSingleString() const; - - /** Construct Json object from string */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - bool DecodeJson(const FString& JsonString, bool bUseIncrementalParser = true); - - ////////////////////////////////////////////////////////////////////////// - // FJsonObject API - - /** Gets the type of value as string for a given field */ - UFUNCTION(BlueprintPure, Category = "VaRest|Json") - FString GetFieldTypeString(const FString& FieldName) const; - - /** Returns a list of field names that exist in the object */ - UFUNCTION(BlueprintPure, Category = "VaRest|Json") - TArray GetFieldNames() const; - - /** Checks to see if the FieldName exists in the object */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - bool HasField(const FString& FieldName) const; - - /** Remove field named FieldName */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - void RemoveField(const FString& FieldName); - - /** Get the field named FieldName as a JsonValue */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - UVaRestJsonValue* GetField(const FString& FieldName) const; - - /** Add a field named FieldName with a Value */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - void SetField(const FString& FieldName, UVaRestJsonValue* JsonValue); - - /** Get the field named FieldName as a Json Array */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - TArray GetArrayField(const FString& FieldName) const; - - /** Set an ObjectField named FieldName and value of Json Array */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - void SetArrayField(const FString& FieldName, const TArray& InArray); - - /** Adds all of the fields from one json object to this one */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - void MergeJsonObject(UVaRestJsonObject* InJsonObject, bool Overwrite); - - ////////////////////////////////////////////////////////////////////////// - // FJsonObject API Helpers (easy to use with simple Json objects) - - /** Get the field named FieldName as a number. Ensures that the field is present and is of type Json number. - * Attn.!! float used instead of double to make the function blueprintable! */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - float GetNumberField(const FString& FieldName) const; - - /** DEPRECATED Attn.!! float used instead of double to make the function blueprintable! */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - void SetNumberField(const FString& FieldName, float Number); - - /** Add a field named FieldName with Number as value */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - void SetNumberFieldDouble(const FString& FieldName, double Number); - - /** Get the field named FieldName as an Integer. Ensures that the field is present and is of type Json number. */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - int32 GetIntegerField(const FString& FieldName) const; - - /** Add a field named FieldName with Integer as value. */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - void SetIntegerField(const FString& FieldName, int32 Number); - - /** Get the field named FieldName as an Int64. Ensures that the field is present and is of type Json number. */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - int64 GetInt64Field(const FString& FieldName) const; - - /** Add a field named FieldName with Int64 as value. */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - void SetInt64Field(const FString& FieldName, int64 Number); - - /** Get the field named FieldName as a string. */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - FString GetStringField(const FString& FieldName) const; - - /** Add a field named FieldName with value of StringValue */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - void SetStringField(const FString& FieldName, const FString& StringValue); - - /** Get the field named FieldName as a boolean. */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - bool GetBoolField(const FString& FieldName) const; - - /** Set a boolean field named FieldName and value of InValue */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - void SetBoolField(const FString& FieldName, bool InValue); - - /** Get the field named FieldName as a Json object. */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - UVaRestJsonObject* GetObjectField(const FString& FieldName) const; - - /** Set an ObjectField named FieldName and value of JsonObject */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - void SetObjectField(const FString& FieldName, UVaRestJsonObject* JsonObject); - - /** Set a map of fields with String values */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - void SetMapFields_string(const TMap& Fields); - - /** Set a map of fields with uint8 values */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - void SetMapFields_uint8(const TMap& Fields); - - /** Set a map of fields with int32 values */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - void SetMapFields_int32(const TMap& Fields); - - /** Set a map of fields with int64 values */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - void SetMapFields_int64(const TMap& Fields); - - /** Set a map of fields with bool values */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - void SetMapFields_bool(const TMap& Fields); - -private: - /** Internal implementation for setting map fields. */ - template - void SetMapFields_Impl(const TMap& Fields) - { - for (auto& field : Fields) - { - // No need to support all int types as they're not supported by BP - if (std::is_same_v || std::is_same_v || std::is_same_v || std::is_same_v) - { - SetNumberField(field.Key, field.Value); - } - else if (std::is_same_v) - { - SetBoolField(field.Key, (bool)field.Value); - } - } - } - - /** Internal implementation to get number arrays of different types */ - template - TArray GetTypeArrayField(const FString& FieldName) const - { - TArray NumberArray; - if (!JsonObj->HasTypedField(FieldName) || FieldName.IsEmpty()) - { - UE_LOG(LogVaRest, Warning, TEXT("%s: No field with name %s of type Array"), *VA_FUNC_LINE, *FieldName); - return NumberArray; - } - - const TArray> JsonArrayValues = JsonObj->GetArrayField(FieldName); - for (TArray>::TConstIterator It(JsonArrayValues); It; ++It) - { - const auto Value = (*It).Get(); - if (Value->Type != EJson::Number) - { - UE_LOG(LogVaRest, Error, TEXT("Not Number element in array with field name %s"), *FieldName); - } - - NumberArray.Add((*It)->AsNumber()); - } - - return NumberArray; - } - - ////////////////////////////////////////////////////////////////////////// - // Array fields helpers (uniform arrays) - -public: - /** Get the field named FieldName as a Number Array. Use it only if you're sure that array is uniform! - * Attn.!! float used instead of double to make the function blueprintable! */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - TArray GetNumberArrayField(const FString& FieldName) const; - - /** Get the field named FieldName as a Number Array. Use it only if you're sure that array is uniform! */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - TArray GetIntegerArrayField(const FString& FieldName) const; - - /** DEPRECATED Attn.!! float used instead of double to make the function blueprintable! */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - void SetNumberArrayField(const FString& FieldName, const TArray& NumberArray); - - /** Set an ObjectField named FieldName and value of Number Array */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - void SetNumberArrayFieldDouble(const FString& FieldName, const TArray& NumberArray); - - /** Get the field named FieldName as a String Array. Use it only if you're sure that array is uniform! */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - TArray GetStringArrayField(const FString& FieldName) const; - - /** Set an ObjectField named FieldName and value of String Array */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - void SetStringArrayField(const FString& FieldName, const TArray& StringArray); - - /** Get the field named FieldName as a Bool Array. Use it only if you're sure that array is uniform! */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - TArray GetBoolArrayField(const FString& FieldName) const; - - /** Set an ObjectField named FieldName and value of Bool Array */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - void SetBoolArrayField(const FString& FieldName, const TArray& BoolArray); - - /** Get the field named FieldName as an Object Array. Use it only if you're sure that array is uniform! */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - TArray GetObjectArrayField(const FString& FieldName) const; - - /** Set an ObjectField named FieldName and value of Ob Array */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - void SetObjectArrayField(const FString& FieldName, const TArray& ObjectArray); - - ////////////////////////////////////////////////////////////////////////// - // Deserialize - -public: - /** Deserialize byte content to json */ - int32 DeserializeFromUTF8Bytes(const ANSICHAR* Bytes, int32 Size); - - /** Deserialize byte content to json */ - int32 DeserializeFromTCHARBytes(const TCHAR* Bytes, int32 Size); - - /** Deserialize byte stream from reader */ - void DecodeFromArchive(TUniquePtr& Reader); - - ////////////////////////////////////////////////////////////////////////// - // Serialize - -public: - /** Save json to file */ - bool WriteToFile(const FString& Path) const; - - /** - * Blueprint Save json to filepath - * - * @param bIsRelativeToProjectDir If set to 'false' path is treated as absolute - */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - bool WriteToFilePath(const FString& Path, const bool bIsRelativeToProjectDir = true); - - static bool WriteStringToArchive(FArchive& Ar, const TCHAR* StrPtr, int64 Len); - - ////////////////////////////////////////////////////////////////////////// - // Data - -private: - /** Internal JSON data */ - TSharedRef JsonObj; -}; diff --git a/Plugins/VaRestPlugin/Source/VaRest/Public/VaRestJsonValue.h b/Plugins/VaRestPlugin/Source/VaRest/Public/VaRestJsonValue.h deleted file mode 100644 index 45ba8b40..00000000 --- a/Plugins/VaRestPlugin/Source/VaRest/Public/VaRestJsonValue.h +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright 2014-2019 Vladimir Alyamkin. All Rights Reserved. - -#pragma once - -#include "VaRestJsonValue.generated.h" - -class UVaRestJsonObject; -class FJsonValue; - -/** - * Represents all the types a Json Value can be. - */ -UENUM(BlueprintType) -enum class EVaJson : uint8 -{ - None, - Null, - String, - Number, - Boolean, - Array, - Object, -}; - -/** - * Blueprintable FJsonValue wrapper - */ -UCLASS(BlueprintType, Blueprintable) -class VAREST_API UVaRestJsonValue : public UObject -{ - GENERATED_UCLASS_BODY() - -public: - /** Reset all internal data */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - void Reset(); - - /** Get the root Json value */ - TSharedPtr& GetRootValue(); - - /** Set the root Json value */ - void SetRootValue(TSharedPtr& JsonValue); - - ////////////////////////////////////////////////////////////////////////// - // FJsonValue API - - /** Get type of Json value (Enum) */ - UFUNCTION(BlueprintPure, Category = "VaRest|Json") - EVaJson GetType() const; - - /** Get type of Json value (String) */ - UFUNCTION(BlueprintPure, Category = "VaRest|Json") - FString GetTypeString() const; - - /** Returns true if this value is a 'null' */ - UFUNCTION(BlueprintPure, Category = "VaRest|Json") - bool IsNull() const; - - /** Returns this value as a double, throwing an error if this is not an Json Number - * Attn.!! float used instead of double to make the function blueprintable! */ - UFUNCTION(BlueprintPure, Category = "VaRest|Json") - float AsNumber() const; - - /** Returns this value as a int32, throwing an error if this is not an Json Number */ - UFUNCTION(BlueprintPure, Category = "VaRest|Json") - int32 AsInt32() const; - - /** Returns this value as a int64, throwing an error if this is not an Json Number */ - UFUNCTION(BlueprintPure, Category = "VaRest|Json") - int64 AsInt64() const; - - /** Returns this value as a string, throwing an error if this is not an Json String */ - UFUNCTION(BlueprintPure, Category = "VaRest|Json") - FString AsString() const; - - /** Returns this value as a boolean, throwing an error if this is not an Json Bool */ - UFUNCTION(BlueprintPure, Category = "VaRest|Json") - bool AsBool() const; - - /** Returns this value as an array, throwing an error if this is not an Json Array */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - TArray AsArray() const; - - /** Returns this value as an object, throwing an error if this is not an Json Object */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Json") - UVaRestJsonObject* AsObject(); - - ////////////////////////////////////////////////////////////////////////// - // Data - -private: - /** Internal JSON data */ - TSharedPtr JsonVal; - - ////////////////////////////////////////////////////////////////////////// - // Helpers - -protected: - /** Simple error logger */ - void ErrorMessage(const FString& InType) const; -}; diff --git a/Plugins/VaRestPlugin/Source/VaRest/Public/VaRestLibrary.h b/Plugins/VaRestPlugin/Source/VaRest/Public/VaRestLibrary.h deleted file mode 100644 index 6f52bbdf..00000000 --- a/Plugins/VaRestPlugin/Source/VaRest/Public/VaRestLibrary.h +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright 2014-2019 Vladimir Alyamkin. All Rights Reserved. - -#pragma once - -#include "Kismet/BlueprintFunctionLibrary.h" - -#include "VaRestTypes.h" - -#include "VaRestLibrary.generated.h" - -class UVaRestSettings; - -/** - * Useful tools for REST communications - */ -UCLASS() -class VAREST_API UVaRestLibrary : public UBlueprintFunctionLibrary -{ - GENERATED_BODY() - - ////////////////////////////////////////////////////////////////////////// - // Data Accessors -public: - /** Direct access to the plugin settings */ - UFUNCTION(BlueprintPure, Category = "VaRest|Common") - static UVaRestSettings* GetVaRestSettings(); - - ////////////////////////////////////////////////////////////////////////// - // Helpers - -public: - /** Applies percent-encoding to text */ - UFUNCTION(BlueprintPure, Category = "VaRest|Utility") - static FString PercentEncode(const FString& Source); - - /** - * Encodes a FString into a Base64 string - * - * @param Source The string data to convert - * @return A string that encodes the binary data in a way that can be safely transmitted via various Internet protocols - */ - UFUNCTION(BlueprintPure, Category = "VaRest|Utility", meta = (DisplayName = "Base64 Encode")) - static FString Base64Encode(const FString& Source); - - /** - * Decodes a Base64 string into a FString - * - * @param Source The stringified data to convert - * @param Dest The out buffer that will be filled with the decoded data - * @return True if the buffer was decoded, false if it failed to decode - */ - UFUNCTION(BlueprintPure, Category = "VaRest|Utility", meta = (DisplayName = "Base64 Decode")) - static bool Base64Decode(const FString& Source, FString& Dest); - - /** - * Encodes a byte array into a Base64 string - * - * @param Dara The data to convert - * @return A string that encodes the binary data in a way that can be safely transmitted via various Internet protocols - */ - UFUNCTION(BlueprintPure, Category = "VaRest|Utility", meta = (DisplayName = "Base64 Encode Data")) - static bool Base64EncodeData(const TArray& Data, FString& Dest); - - /** - * Decodes a Base64 string into a byte array - * - * @param Source The stringified data to convert - * @param Dest The out buffer that will be filled with the decoded data - * @return True if the buffer was decoded, false if it failed to decode - */ - UFUNCTION(BlueprintPure, Category = "VaRest|Utility", meta = (DisplayName = "Base64 Decode Data")) - static bool Base64DecodeData(const FString& Source, TArray& Dest); - - /** - * Helper to perform the very common case of hashing an ASCII string into a hex representation. - * - * @param String Hex representation of the hash (32 lower-case hex digits) - */ - UFUNCTION(BlueprintPure, Category = "VaRest|Utility", meta = (DisplayName = "String to MD5")) - static FString StringToMd5(const FString& StringToHash); - - /** - * Helper to perform the SHA1 hash operation on string. - */ - UFUNCTION(BlueprintPure, Category = "VaRest|Utility", meta = (DisplayName = "String to SHA1")) - static FString StringToSha1(const FString& StringToHash); - - /** - * Helper method to convert a status code from HTTP to an enum for easier readability - */ - UFUNCTION(BlueprintPure, Category = "VaRest|Utility", meta = (DisplayName = "HTTP Status Int To Enum")) - static FORCEINLINE EVaRestHttpStatusCode::Type HTTPStatusIntToEnum(int32 StatusCode) { return (EVaRestHttpStatusCode::Type)StatusCode; } - - /** - * Get the plugin's version - */ - UFUNCTION(BlueprintPure, Category = "VaRest|Utility", meta = (DisplayName = "Get VaRest Version")) - static FString GetVaRestVersion(); - - ////////////////////////////////////////////////////////////////////////// - // Common Network Helpers - -public: - /** - * Get the URL that was used when loading this World - */ - UFUNCTION(BlueprintPure, Category = "VaRest|Utility", meta = (WorldContext = "WorldContextObject")) - static FVaRestURL GetWorldURL(UObject* WorldContextObject); -}; diff --git a/Plugins/VaRestPlugin/Source/VaRest/Public/VaRestRequestJSON.h b/Plugins/VaRestPlugin/Source/VaRest/Public/VaRestRequestJSON.h deleted file mode 100644 index 49d05390..00000000 --- a/Plugins/VaRestPlugin/Source/VaRest/Public/VaRestRequestJSON.h +++ /dev/null @@ -1,358 +0,0 @@ -// Copyright 2014-2019 Vladimir Alyamkin. All Rights Reserved. - -#pragma once - -#include "Engine/LatentActionManager.h" -#include "Http.h" -#include "HttpModule.h" -#include "Interfaces/IHttpRequest.h" -#include "LatentActions.h" - -#include "VaRestTypes.h" - -#include "VaRestRequestJSON.generated.h" - -class UVaRestJsonValue; -class UVaRestJsonObject; -class UVaRestSettings; - -/** - * @author Original latent action class by https://github.com/unktomi - */ -template -class FVaRestLatentAction : public FPendingLatentAction -{ -public: - virtual void Call(const T& Value) - { - Result = Value; - Called = true; - } - - void operator()(const T& Value) - { - Call(Value); - } - - void Cancel(); - - FVaRestLatentAction(FWeakObjectPtr RequestObj, T& ResultParam, const FLatentActionInfo& LatentInfo) - : Called(false) - , Request(RequestObj) - , ExecutionFunction(LatentInfo.ExecutionFunction) - , OutputLink(LatentInfo.Linkage) - , CallbackTarget(LatentInfo.CallbackTarget) - , Result(ResultParam) - { - } - - virtual void UpdateOperation(FLatentResponse& Response) override - { - Response.FinishAndTriggerIf(Called, ExecutionFunction, OutputLink, CallbackTarget); - } - - virtual void NotifyObjectDestroyed() - { - Cancel(); - } - - virtual void NotifyActionAborted() - { - Cancel(); - } - -private: - bool Called; - FWeakObjectPtr Request; - -public: - const FName ExecutionFunction; - const int32 OutputLink; - const FWeakObjectPtr CallbackTarget; - T& Result; -}; - -/** Generate a delegates for callback events */ -DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnRequestComplete, class UVaRestRequestJSON*, Request); -DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnRequestFail, class UVaRestRequestJSON*, Request); - -DECLARE_MULTICAST_DELEGATE_OneParam(FOnStaticRequestComplete, class UVaRestRequestJSON*); -DECLARE_MULTICAST_DELEGATE_OneParam(FOnStaticRequestFail, class UVaRestRequestJSON*); - -/** - * General helper class http requests via blueprints - */ -UCLASS(BlueprintType, Blueprintable) -class VAREST_API UVaRestRequestJSON : public UObject -{ - GENERATED_UCLASS_BODY() - -public: - ////////////////////////////////////////////////////////////////////////// - // Construction - - /** Set verb to the request */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Request") - void SetVerb(EVaRestRequestVerb Verb); - - /** Set custom verb to the request */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Request") - void SetCustomVerb(FString Verb); - - /** Set content type to the request. If you're using the x-www-form-urlencoded, - * params/constaints should be defined as key=ValueString pairs from Json data */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Request") - void SetContentType(EVaRestRequestContentType ContentType); - - /** Set content type of the request for binary post data */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Request") - void SetBinaryContentType(const FString& ContentType); - - /** Set content of the request for binary post data */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Request") - void SetBinaryRequestContent(const TArray& Content); - - /** Set content of the request as a plain string */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Request") - void SetStringRequestContent(const FString& Content); - - /** Sets optional header info */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Request") - void SetHeader(const FString& HeaderName, const FString& HeaderValue); - - ////////////////////////////////////////////////////////////////////////// - // Destruction and reset - - /** Reset all internal saved data */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Utility") - void ResetData(); - - /** Reset saved request data */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Request") - void ResetRequestData(); - - /** Reset saved response data */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Response") - void ResetResponseData(); - - /** Cancel latent response waiting */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Response") - void Cancel(); - - ////////////////////////////////////////////////////////////////////////// - // JSON data accessors - - /** Get the Request Json object */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Request") - UVaRestJsonObject* GetRequestObject() const; - - /** Set the Request Json object */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Request") - void SetRequestObject(UVaRestJsonObject* JsonObject); - - /** Get the Response Json object */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Response") - UVaRestJsonObject* GetResponseObject() const; - - /** Set the Response Json object */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Response") - void SetResponseObject(UVaRestJsonObject* JsonObject); - - /** Get the Response Json value */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Response") - UVaRestJsonValue* GetResponseValue() const; - - /////////////////////////////////////////////////////////////////////////// - // Request/response data access - - /** Get url of http request */ - UFUNCTION(BlueprintPure, Category = "VaRest|Request") - FString GetURL() const; - - /** Get verb to the request */ - UFUNCTION(BlueprintPure, Category = "VaRest|Request") - EVaRestRequestVerb GetVerb() const; - - /** Get status of http request */ - UFUNCTION(BlueprintPure, Category = "VaRest|Request") - EVaRestRequestStatus GetStatus() const; - - /** Get the response code of the last query */ - UFUNCTION(BlueprintPure, Category = "VaRest|Response") - int32 GetResponseCode() const; - - /** Get value of desired response header */ - UFUNCTION(BlueprintPure, Category = "VaRest|Response") - FString GetResponseHeader(const FString& HeaderName); - - /** Get list of all response headers */ - UFUNCTION(BlueprintPure, Category = "VaRest|Response") - TArray GetAllResponseHeaders() const; - - /** - * Shortcut to get the Content-Length header value. Will not always return non-zero. - * If you want the real length of the payload, get the payload and check it's length. - * - * @return the content length (if available) - */ - UFUNCTION(BlueprintPure, Category = "VaRest|Response") - int32 GetResponseContentLength() const; - - /** - * Get the content payload of the request or response. - * - * @param Content - array that will be filled with the content. - */ - UFUNCTION(BlueprintPure, Category = "VaRest|Response") - const TArray& GetResponseContent() const; - - ////////////////////////////////////////////////////////////////////////// - // URL processing - -public: - /** Setting request URL */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Request") - void SetURL(const FString& Url = TEXT("http://alyamkin.com")); - - /** Open URL with current setup */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Request") - virtual void ProcessURL(const FString& Url = TEXT("http://alyamkin.com")); - - /** Open URL in latent mode */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Request", meta = (Latent, LatentInfo = "LatentInfo", HidePin = "WorldContextObject", DefaultToSelf = "WorldContextObject")) - virtual void ApplyURL(const FString& Url, UVaRestJsonObject*& Result, UObject* WorldContextObject, struct FLatentActionInfo LatentInfo); - - /** Check URL and execute process request */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Request") - virtual void ExecuteProcessRequest(); - -protected: - /** Apply current internal setup to request and process it */ - void ProcessRequest(); - - ////////////////////////////////////////////////////////////////////////// - // Request callbacks - -private: - /** Internal bind function for the IHTTPRequest::OnProcessRequestCompleted() event */ - void OnProcessRequestComplete(FHttpRequestPtr Request, FHttpResponsePtr Response, bool bWasSuccessful); - -public: - /** Event occured when the request has been completed */ - UPROPERTY(BlueprintAssignable, Category = "VaRest|Event") - FOnRequestComplete OnRequestComplete; - - /** Event occured when the request wasn't successfull */ - UPROPERTY(BlueprintAssignable, Category = "VaRest|Event") - FOnRequestFail OnRequestFail; - - /** Event occured when the request has been completed */ - FOnStaticRequestComplete OnStaticRequestComplete; - - /** Event occured when the request wasn't successfull */ - FOnStaticRequestFail OnStaticRequestFail; - - ////////////////////////////////////////////////////////////////////////// - // Tags - -public: - /** Add tag to this request */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Utility") - void AddTag(FName Tag); - - /** - * Remove tag from this request - * - * @return Number of removed elements - */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Utility") - int32 RemoveTag(FName Tag); - - /** See if this request contains the supplied tag */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Utility") - bool HasTag(FName Tag) const; - -protected: - /** Array of tags that can be used for grouping and categorizing */ - TArray Tags; - - ////////////////////////////////////////////////////////////////////////// - // Data - -public: - /** - * Get request response stored as a string - * @param bCacheResponseContent - Set true if you plan to use it few times to prevent deserialization each time - */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Response") - FString GetResponseContentAsString(bool bCacheResponseContent = true); - -public: - /** Response size */ - UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "VaRest|Response") - int32 ResponseSize; - - /** DEPRECATED: Please use GetResponseContentAsString() instead */ - UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "VaRest|Response") - FString ResponseContent; - - /** Is the response valid JSON? */ - UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "VaRest|Response") - bool bIsValidJsonResponse; - -protected: - /** Default value for deprecated ResponseContent variable */ - static FString DeprecatedResponseString; - -protected: - /** Latent action helper */ - FVaRestLatentAction* ContinueAction; - - /** Internal request data stored as JSON */ - UPROPERTY() - UVaRestJsonObject* RequestJsonObj; - - TArray RequestBytes; - FString BinaryContentType; - - /** Raw response storage */ - TArray ResponseBytes; - int32 ResponseContentLength; - - /** Used for special cases when used wants to have plain string data in request. - * Attn.! Content-type x-www-form-urlencoded only. */ - FString StringRequestContent; - - /** Response data stored as JSON */ - UPROPERTY() - UVaRestJsonObject* ResponseJsonObj; - - /** Response data stored as JSON value */ - UPROPERTY() - UVaRestJsonValue* ResponseJsonValue; - - /** Verb for making request (GET,POST,etc) */ - EVaRestRequestVerb RequestVerb; - - /** Content type to be applied for request */ - EVaRestRequestContentType RequestContentType; - - /** Mapping of header section to values. Used to generate final header string for request */ - TMap RequestHeaders; - - /** Cached key/value header pairs. Parsed once request completes */ - TMap ResponseHeaders; - - /** Http Response code */ - int32 ResponseCode; - - /** Custom verb that will be used with RequestContentType == CUSTOM */ - FString CustomVerb; - - /** Request we're currently processing */ - TSharedRef HttpRequest = FHttpModule::Get().CreateRequest(); - -public: - /** Returns reference to internal request object */ - TSharedRef GetHttpRequest() const { return HttpRequest; }; -}; diff --git a/Plugins/VaRestPlugin/Source/VaRest/Public/VaRestSettings.h b/Plugins/VaRestPlugin/Source/VaRest/Public/VaRestSettings.h deleted file mode 100644 index 1220c198..00000000 --- a/Plugins/VaRestPlugin/Source/VaRest/Public/VaRestSettings.h +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2014-2019 Vladimir Alyamkin. All Rights Reserved. - -#pragma once - -#include "VaRestSettings.generated.h" - -UCLASS(config = Engine, defaultconfig) -class VAREST_API UVaRestSettings : public UObject -{ - GENERATED_UCLASS_BODY() - -public: - /** You can disable request content logging to avoid security vulnerability */ - UPROPERTY(Config, EditAnywhere, Category = "VaRest") - bool bExtendedLog; - - /** Use custom chunked parses (best for memory, but has issues with hex-encoded utf-8) */ - UPROPERTY(Config, EditAnywhere, Category = "VaRest") - bool bUseChunkedParser; -}; diff --git a/Plugins/VaRestPlugin/Source/VaRest/Public/VaRestSubsystem.h b/Plugins/VaRestPlugin/Source/VaRest/Public/VaRestSubsystem.h deleted file mode 100644 index 6a438d65..00000000 --- a/Plugins/VaRestPlugin/Source/VaRest/Public/VaRestSubsystem.h +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright 2014-2020 Vladimir Alyamkin. All Rights Reserved. - -#pragma once - -#include "VaRestJsonObject.h" -#include "VaRestJsonValue.h" -#include "VaRestRequestJSON.h" - -#include "Subsystems/EngineSubsystem.h" - -#include "VaRestSubsystem.generated.h" - -DECLARE_DYNAMIC_DELEGATE_OneParam(FVaRestCallDelegate, UVaRestRequestJSON*, Request); - -USTRUCT() -struct FVaRestCallResponse -{ - GENERATED_BODY() - - UPROPERTY() - UVaRestRequestJSON* Request; - - UPROPERTY() - FVaRestCallDelegate Callback; - - FDelegateHandle CompleteDelegateHandle; - FDelegateHandle FailDelegateHandle; - - FVaRestCallResponse() - : Request(nullptr) - { - } -}; - -UCLASS() -class VAREST_API UVaRestSubsystem : public UEngineSubsystem -{ - GENERATED_BODY() - -public: - UVaRestSubsystem(); - - // Begin USubsystem - virtual void Initialize(FSubsystemCollectionBase& Collection) override; - virtual void Deinitialize() override; - // End USubsystem - - ////////////////////////////////////////////////////////////////////////// - // Easy URL processing - -public: - /** Easy way to process http requests */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Utility") - void CallURL(const FString& URL, EVaRestRequestVerb Verb, EVaRestRequestContentType ContentType, UVaRestJsonObject* VaRestJson, const FVaRestCallDelegate& Callback); - - /** Called when URL is processed (one for both success/unsuccess events)*/ - void OnCallComplete(UVaRestRequestJSON* Request); - -protected: - UPROPERTY() - TMap RequestMap; - - ////////////////////////////////////////////////////////////////////////// - // Construction helpers - -public: - /** Creates new request (totally empty) */ - UFUNCTION(BlueprintCallable, meta = (DisplayName = "Construct Json Request (Empty)"), Category = "VaRest|Subsystem") - UVaRestRequestJSON* ConstructVaRestRequest(); - - /** Creates new request with defined verb and content type */ - UFUNCTION(BlueprintCallable, meta = (DisplayName = "Construct Json Request"), Category = "VaRest|Subsystem") - UVaRestRequestJSON* ConstructVaRestRequestExt(EVaRestRequestVerb Verb, EVaRestRequestContentType ContentType); - - /** Create new Json object */ - UFUNCTION(BlueprintCallable, meta = (DisplayName = "Construct Json Object"), Category = "VaRest|Subsystem") - UVaRestJsonObject* ConstructVaRestJsonObject(); - - /** Create new Json object (static one for MakeJson node, hack for #293) */ - UFUNCTION() - static UVaRestJsonObject* StaticConstructVaRestJsonObject(); - - /** Create new Json Number value - * Attn.!! float used instead of double to make the function blueprintable! */ - UFUNCTION(BlueprintPure, meta = (DisplayName = "Construct Json Number Value"), Category = "VaRest|Subsystem") - UVaRestJsonValue* ConstructJsonValueNumber(float Number); - - /** Create new Json String value */ - UFUNCTION(BlueprintPure, meta = (DisplayName = "Construct Json String Value"), Category = "VaRest|Subsystem") - UVaRestJsonValue* ConstructJsonValueString(const FString& StringValue); - - /** Create new Json Bool value */ - UFUNCTION(BlueprintPure, meta = (DisplayName = "Construct Json Bool Value"), Category = "VaRest|Subsystem") - UVaRestJsonValue* ConstructJsonValueBool(bool InValue); - - /** Create new Json Array value */ - UFUNCTION(BlueprintPure, meta = (DisplayName = "Construct Json Array Value"), Category = "VaRest|Subsystem") - UVaRestJsonValue* ConstructJsonValueArray(const TArray& InArray); - - /** Create new Json Object value */ - UFUNCTION(BlueprintPure, meta = (DisplayName = "Construct Json Object Value"), Category = "VaRest|Subsystem") - UVaRestJsonValue* ConstructJsonValueObject(UVaRestJsonObject* JsonObject); - - /** Create new Json value from FJsonValue (to be used from VaRestJsonObject) */ - UVaRestJsonValue* ConstructJsonValue(const TSharedPtr& InValue); - - ////////////////////////////////////////////////////////////////////////// - // Serialization - -public: - /** Construct Json value from string */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Subsystem") - UVaRestJsonValue* DecodeJsonValue(const FString& JsonString); - - /** Construct Json object from string */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Subsystem") - UVaRestJsonObject* DecodeJsonObject(const FString& JsonString); - - ////////////////////////////////////////////////////////////////////////// - // File system integration - -public: - /** - * Load JSON from formatted text file - * @param bIsRelativeToContentDir if set to 'false' path is treated as absolute - */ - UFUNCTION(BlueprintCallable, Category = "VaRest|Utility") - UVaRestJsonObject* LoadJsonFromFile(const FString& Path, const bool bIsRelativeToContentDir = true); -}; diff --git a/Plugins/VaRestPlugin/Source/VaRest/Public/VaRestTypes.h b/Plugins/VaRestPlugin/Source/VaRest/Public/VaRestTypes.h deleted file mode 100644 index fbbf94ae..00000000 --- a/Plugins/VaRestPlugin/Source/VaRest/Public/VaRestTypes.h +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright 2014-2019 Vladimir Alyamkin. All Rights Reserved. - -#pragma once - -#include "Engine/EngineBaseTypes.h" - -#include "VaRestTypes.generated.h" - -/** Verb (GET, PUT, POST) used by the request */ -UENUM(BlueprintType) -enum class EVaRestRequestVerb : uint8 -{ - GET, - POST, - PUT, - DEL UMETA(DisplayName = "DELETE"), - /** Set CUSTOM verb by SetCustomVerb() function */ - CUSTOM -}; - -// clang-format off -/** Content type (json, urlencoded, etc.) used by the request */ -UENUM(BlueprintType) -enum class EVaRestRequestContentType : uint8 -{ - x_www_form_urlencoded_url UMETA(DisplayName = "x-www-form-urlencoded (URL)"), - x_www_form_urlencoded_body UMETA(DisplayName = "x-www-form-urlencoded (Request Body)"), - json, - binary -}; -// clang-format on - -/** Enumerates the current state of an Http request */ -UENUM(BlueprintType) -enum class EVaRestRequestStatus : uint8 -{ - /** Has not been started via ProcessRequest() */ - NotStarted, - /** Currently being ticked and processed */ - Processing, - /** Finished but failed */ - Failed, - /** Failed because it was unable to connect (safe to retry) */ - Failed_ConnectionError, - /** Finished and was successful */ - Succeeded -}; - -// Taken from Interfaces/IHttpResponse.h (had to make BlueprintType :/) -UENUM(BlueprintType) -namespace EVaRestHttpStatusCode -{ -/** - * Response codes that can come back from an Http request - */ -enum Type -{ - // status code not set yet - Unknown = 0 UMETA(DisplayName = "Unknown = 0"), - // the request can be continued. - Continue = 100 UMETA(DisplayName = "Continue = 100"), - // the server has switched protocols in an upgrade header. - SwitchProtocol = 101 UMETA(DisplayName = "SwitchProtocol = 101"), - // the request completed successfully. - Ok = 200 UMETA(DisplayName = "Ok = 200"), - // the request has been fulfilled and resulted in the creation of a new resource. - Created = 201 UMETA(DisplayName = "Created = 201"), - // the request has been accepted for processing, but the processing has not been completed. - Accepted = 202 UMETA(DisplayName = "Accepted = 202"), - // the returned meta information in the entity-header is not the definitive set available from the origin server. - Partial = 203 UMETA(DisplayName = "Partial = 203"), - // the server has fulfilled the request, but there is no new information to send back. - NoContent = 204 UMETA(DisplayName = "NoContent = 204"), - // the request has been completed, and the client program should reset the document view that caused the request to be sent to allow the user to easily initiate another input action. - ResetContent = 205 UMETA(DisplayName = "ResetContent = 205"), - // the server has fulfilled the partial get request for the resource. - PartialContent = 206 UMETA(DisplayName = "PartialContent = 206"), - // the server couldn't decide what to return. - Ambiguous = 300 UMETA(DisplayName = "Ambiguous = 300"), - // the requested resource has been assigned to a new permanent uri (uniform resource identifier), and any future references to this resource should be done using one of the returned uris. - Moved = 301 UMETA(DisplayName = "Moved = 301"), - // the requested resource resides temporarily under a different uri (uniform resource identifier). - Redirect = 302 UMETA(DisplayName = "Redirect = 302"), - // the response to the request can be found under a different uri (uniform resource identifier) and should be retrieved using a get http verb on that resource. - RedirectMethod = 303 UMETA(DisplayName = "RedirectMethod = 303"), - // the requested resource has not been modified. - NotModified = 304 UMETA(DisplayName = "NotModified = 304"), - // the requested resource must be accessed through the proxy given by the location field. - UseProxy = 305 UMETA(DisplayName = "UseProxy = 305"), - // the redirected request keeps the same http verb. http/1.1 behavior. - RedirectKeepVerb = 307 UMETA(DisplayName = "RedirectKeepVerb = 307"), - // the request could not be processed by the server due to invalid syntax. - BadRequest = 400 UMETA(DisplayName = "BadRequest = 400"), - // the requested resource requires user authentication. - Denied = 401 UMETA(DisplayName = "Denied = 401"), - // not currently implemented in the http protocol. - PaymentReq = 402 UMETA(DisplayName = "PaymentReq = 402"), - // the server understood the request, but is refusing to fulfill it. - Forbidden = 403 UMETA(DisplayName = "Forbidden = 403"), - // the server has not found anything matching the requested uri (uniform resource identifier). - NotFound = 404 UMETA(DisplayName = "NotFound = 404"), - // the http verb used is not allowed. - BadMethod = 405 UMETA(DisplayName = "BadMethod = 405"), - // no responses acceptable to the client were found. - NoneAcceptable = 406 UMETA(DisplayName = "NoneAcceptable = 406"), - // proxy authentication required. - ProxyAuthReq = 407 UMETA(DisplayName = "ProxyAuthReq = 407"), - // the server timed out waiting for the request. - RequestTimeout = 408 UMETA(DisplayName = "RequestTimeout = 408"), - // the request could not be completed due to a conflict with the current state of the resource. the user should resubmit with more information. - Conflict = 409 UMETA(DisplayName = "Conflict = 409"), - // the requested resource is no longer available at the server, and no forwarding address is known. - Gone = 410 UMETA(DisplayName = "Gone = 410"), - // the server refuses to accept the request without a defined content length. - LengthRequired = 411 UMETA(DisplayName = "LengthRequired = 411"), - // the precondition given in one or more of the request header fields evaluated to false when it was tested on the server. - PrecondFailed = 412 UMETA(DisplayName = "PrecondFailed = 412"), - // the server is refusing to process a request because the request entity is larger than the server is willing or able to process. - RequestTooLarge = 413 UMETA(DisplayName = "RequestTooLarge = 413"), - // the server is refusing to service the request because the request uri (uniform resource identifier) is longer than the server is willing to interpret. - UriTooLong = 414 UMETA(DisplayName = "UriTooLong = 414"), - // the server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for the requested method. - UnsupportedMedia = 415 UMETA(DisplayName = "UnsupportedMedia = 415"), - // too many requests, the server is throttling - TooManyRequests = 429 UMETA(DisplayName = "TooManyRequests = 429"), - // the request should be retried after doing the appropriate action. - RetryWith = 449 UMETA(DisplayName = "RetryWith = 449"), - // the server encountered an unexpected condition that prevented it from fulfilling the request. - ServerError = 500 UMETA(DisplayName = "ServerError = 500"), - // the server does not support the functionality required to fulfill the request. - NotSupported = 501 UMETA(DisplayName = "NotSupported = 501"), - // the server, while acting as a gateway or proxy, received an invalid response from the upstream server it accessed in attempting to fulfill the request. - BadGateway = 502 UMETA(DisplayName = "BadGateway = 502"), - // the service is temporarily overloaded. - ServiceUnavail = 503 UMETA(DisplayName = "ServiceUnavail = 503"), - // the request was timed out waiting for a gateway. - GatewayTimeout = 504 UMETA(DisplayName = "GatewayTimeout = 504"), - // the server does not support, or refuses to support, the http protocol version that was used in the request message. - VersionNotSup = 505 UMETA(DisplayName = "VersionNotSup = 505") -}; -} // namespace EVaRestHttpStatusCode - -/** - * FURL structure wrapper for BP access - */ -USTRUCT(BlueprintType) -struct VAREST_API FVaRestURL -{ - GENERATED_BODY() - - /** Protocol, i.e. "unreal" or "http" */ - UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "URL") - FString Protocol; - - /** Optional hostname, i.e. "204.157.115.40" or "unreal.epicgames.com", blank if local. */ - UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "URL") - FString Host; - - /** Optional host port */ - UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "URL") - int32 Port; - - UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "URL") - int32 Valid; - - /** Map name, i.e. "SkyCity", default is "Entry" */ - UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "URL") - FString Map; - - /** Optional place to download Map if client does not possess it */ - UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "URL") - FString RedirectURL; - - /** Options */ - UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "URL") - TArray Op; - - /** Portal to enter through, default is "" */ - UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "URL") - FString Portal; - - FVaRestURL() - : Port(0) - , Valid(0) - { - } - - FVaRestURL(FURL& InUrl) - : Protocol(InUrl.Protocol) - , Host(InUrl.Host) - , Port(InUrl.Port) - , Valid(InUrl.Valid) - , Map(InUrl.Map) - , RedirectURL(InUrl.RedirectURL) - , Op(InUrl.Op) - , Portal(InUrl.Portal) - { - } -}; diff --git a/Plugins/VaRestPlugin/Source/VaRest/VaRest.Build.cs b/Plugins/VaRestPlugin/Source/VaRest/VaRest.Build.cs deleted file mode 100644 index f26cec6c..00000000 --- a/Plugins/VaRestPlugin/Source/VaRest/VaRest.Build.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2014-2019 Vladimir Alyamkin. All Rights Reserved. - -using System.IO; - -namespace UnrealBuildTool.Rules -{ - public class VaRest : ModuleRules - { - public VaRest(ReadOnlyTargetRules Target) : base(Target) - { - PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; - PrecompileForTargets = PrecompileTargetsType.Any; - IncludeOrderVersion = EngineIncludeOrderVersion.Latest; - - PrivateIncludePaths.AddRange( - new string[] { - "VaRest/Private", - // ... add other private include paths required here ... - }); - - PublicDependencyModuleNames.AddRange( - new string[] - { - "Core", - "CoreUObject", - "Engine", - "HTTP", - "Json", - "Projects" // Required by IPluginManager etc (used to get plugin information) - // ... add other public dependencies that you statically link with here ... - }); - } - } -} diff --git a/Plugins/VaRestPlugin/Source/VaRestEditor/Private/VaRestEditor.cpp b/Plugins/VaRestPlugin/Source/VaRestEditor/Private/VaRestEditor.cpp deleted file mode 100644 index c3bb7d07..00000000 --- a/Plugins/VaRestPlugin/Source/VaRestEditor/Private/VaRestEditor.cpp +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2014-2019 Vladimir Alyamkin. All Rights Reserved. - -#include "VaRestEditor.h" - -#include "Modules/ModuleManager.h" - -#define LOCTEXT_NAMESPACE "FVaRestEditorModule" - -void FVaRestEditorModule::StartupModule() -{ - // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module -} - -void FVaRestEditorModule::ShutdownModule() -{ - // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading, - // we call this function before unloading the module. -} - -#undef LOCTEXT_NAMESPACE - -IMPLEMENT_MODULE(FVaRestEditorModule, VaRestEditor) diff --git a/Plugins/VaRestPlugin/Source/VaRestEditor/Private/VaRest_BreakJson.cpp b/Plugins/VaRestPlugin/Source/VaRestEditor/Private/VaRest_BreakJson.cpp deleted file mode 100644 index c328a8a6..00000000 --- a/Plugins/VaRestPlugin/Source/VaRestEditor/Private/VaRest_BreakJson.cpp +++ /dev/null @@ -1,561 +0,0 @@ -// Copyright 2014-2019 Vladimir Alyamkin. All Rights Reserved. -// Original code by https://github.com/unktomi - -#include "VaRest_BreakJson.h" - -#include "BlueprintActionDatabaseRegistrar.h" -#include "BlueprintNodeSpawner.h" -#include "EdGraph/EdGraph.h" -#include "EdGraph/EdGraphNodeUtils.h" // for FNodeTextCache -#include "EdGraphSchema_K2.h" -#include "EdGraphUtilities.h" -#include "EditorCategoryUtils.h" -#include "KismetCompiler.h" -#include "Runtime/Launch/Resources/Version.h" - -#define LOCTEXT_NAMESPACE "VaRest_BreakJson" - -class FKCHandler_BreakJson : public FNodeHandlingFunctor -{ - -public: - FKCHandler_BreakJson(FKismetCompilerContext& InCompilerContext) - : FNodeHandlingFunctor(InCompilerContext) - { - } - - virtual void Compile(FKismetFunctionContext& Context, UEdGraphNode* Node) override - { - UEdGraphPin* InputPin = nullptr; - - for (int32 PinIndex = 0; PinIndex < Node->Pins.Num(); ++PinIndex) - { - UEdGraphPin* Pin = Node->Pins[PinIndex]; - if (Pin && (EGPD_Input == Pin->Direction)) - { - InputPin = Pin; - break; - } - } - - UEdGraphPin* InNet = FEdGraphUtilities::GetNetFromPin(InputPin); - UClass* Class = Cast(StaticLoadObject(UClass::StaticClass(), nullptr, TEXT("class'VaRest.VaRestJsonObject'"))); - - FBPTerminal** SourceTerm = Context.NetMap.Find(InNet); - if (SourceTerm == nullptr) - { - return; - } - - for (int32 PinIndex = 0; PinIndex < Node->Pins.Num(); ++PinIndex) - { - UEdGraphPin* Pin = Node->Pins[PinIndex]; - if (Pin && (EGPD_Output == Pin->Direction)) - { - if (Pin->LinkedTo.Num() < 1) - { - continue; - } - - FBPTerminal** Target = Context.NetMap.Find(Pin); - - const FName& FieldName = Pin->PinName; - const FName& FieldType = Pin->PinType.PinCategory; - - FBPTerminal* FieldNameTerm = Context.CreateLocalTerminal(ETerminalSpecification::TS_Literal); - FieldNameTerm->Type.PinCategory = CompilerContext.GetSchema()->PC_String; - FieldNameTerm->SourcePin = Pin; - - FieldNameTerm->Name = FieldName.ToString(); - FieldNameTerm->TextLiteral = FText::FromName(FieldName); - - FBlueprintCompiledStatement& Statement = Context.AppendStatementForNode(Node); - FName FunctionName; - - const bool bIsArray = Pin->PinType.ContainerType == EPinContainerType::Array; - if (FieldType == CompilerContext.GetSchema()->PC_Boolean) - { - FunctionName = bIsArray ? TEXT("GetBoolArrayField") : TEXT("GetBoolField"); - } - else if (FieldType == CompilerContext.GetSchema()->PC_Real) - { - FunctionName = bIsArray ? TEXT("GetNumberArrayField") : TEXT("GetNumberField"); - } - else if (FieldType == CompilerContext.GetSchema()->PC_String) - { - FunctionName = bIsArray ? TEXT("GetStringArrayField") : TEXT("GetStringField"); - } - else if (FieldType == CompilerContext.GetSchema()->PC_Object) - { - FunctionName = bIsArray ? TEXT("GetObjectArrayField") : TEXT("GetObjectField"); - } - else - { - continue; - } - - UFunction* FunctionPtr = Class->FindFunctionByName(FunctionName); - Statement.Type = KCST_CallFunction; - Statement.FunctionToCall = FunctionPtr; - Statement.FunctionContext = *SourceTerm; - Statement.bIsParentContext = false; - Statement.LHS = *Target; - Statement.RHS.Add(FieldNameTerm); - } - } - } - - FBPTerminal* RegisterInputTerm(FKismetFunctionContext& Context, UVaRest_BreakJson* Node) - { - // Find input pin - UEdGraphPin* InputPin = nullptr; - for (int32 PinIndex = 0; PinIndex < Node->Pins.Num(); ++PinIndex) - { - UEdGraphPin* Pin = Node->Pins[PinIndex]; - if (Pin && (EGPD_Input == Pin->Direction)) - { - InputPin = Pin; - break; - } - } - check(NULL != InputPin); - - // Find structure source net - UEdGraphPin* Net = FEdGraphUtilities::GetNetFromPin(InputPin); - FBPTerminal** TermPtr = Context.NetMap.Find(Net); - - if (!TermPtr) - { - FBPTerminal* Term = Context.CreateLocalTerminalFromPinAutoChooseScope(Net, Context.NetNameMap->MakeValidName(Net)); - - Context.NetMap.Add(Net, Term); - - return Term; - } - - return *TermPtr; - } - - void RegisterOutputTerm(FKismetFunctionContext& Context, UEdGraphPin* OutputPin, FBPTerminal* ContextTerm) - { - FBPTerminal* Term = Context.CreateLocalTerminalFromPinAutoChooseScope(OutputPin, Context.NetNameMap->MakeValidName(OutputPin)); - Context.NetMap.Add(OutputPin, Term); - } - - virtual void RegisterNets(FKismetFunctionContext& Context, UEdGraphNode* InNode) override - { - UVaRest_BreakJson* Node = Cast(InNode); - FNodeHandlingFunctor::RegisterNets(Context, Node); - - check(NULL != Node); - - if (FBPTerminal* StructContextTerm = RegisterInputTerm(Context, Node)) - { - for (int32 PinIndex = 0; PinIndex < Node->Pins.Num(); ++PinIndex) - { - UEdGraphPin* Pin = Node->Pins[PinIndex]; - if (nullptr != Pin && EGPD_Output == Pin->Direction) - { - RegisterOutputTerm(Context, Pin, StructContextTerm); - } - } - } - } -}; - -/** - * Main node class - */ -UVaRest_BreakJson::UVaRest_BreakJson(const FObjectInitializer& ObjectInitializer) - : Super(ObjectInitializer) -{ -} - -FNodeHandlingFunctor* UVaRest_BreakJson::CreateNodeHandler(class FKismetCompilerContext& CompilerContext) const -{ - return new FKCHandler_BreakJson(CompilerContext); -} - -void UVaRest_BreakJson::AllocateDefaultPins() -{ - const UEdGraphSchema_K2* K2Schema = GetDefault(); - - UClass* Class = Cast(StaticLoadObject(UClass::StaticClass(), nullptr, TEXT("class'VaRest.VaRestJsonObject'"))); - UEdGraphPin* Pin = CreatePin(EGPD_Input, K2Schema->PC_Object, TEXT(""), Class, TEXT("Target")); - - K2Schema->SetPinAutogeneratedDefaultValueBasedOnType(Pin); - - CreateProjectionPins(Pin); -} - -FLinearColor UVaRest_BreakJson::GetNodeTitleColor() const -{ - return FLinearColor(255.0f, 255.0f, 0.0f); -} - -void UVaRest_BreakJson::PostEditChangeProperty(struct FPropertyChangedEvent& PropertyChangedEvent) -{ - const FName PropertyName = (PropertyChangedEvent.Property != nullptr) ? PropertyChangedEvent.Property->GetFName() : NAME_None; - if (PropertyName == GET_MEMBER_NAME_STRING_CHECKED(UVaRest_BreakJson, Outputs) || - PropertyName == GET_MEMBER_NAME_STRING_CHECKED(FVaRest_NamedType, Name) || - PropertyName == GET_MEMBER_NAME_STRING_CHECKED(FVaRest_NamedType, Type) || - PropertyName == GET_MEMBER_NAME_STRING_CHECKED(FVaRest_NamedType, bIsArray)) - { - ReconstructNode(); - GetGraph()->NotifyGraphChanged(); - } - - Super::PostEditChangeProperty(PropertyChangedEvent); -} - -void UVaRest_BreakJson::GetMenuActions(FBlueprintActionDatabaseRegistrar& ActionRegistrar) const -{ - // actions get registered under specific object-keys; the idea is that - // actions might have to be updated (or deleted) if their object-key is - // mutated (or removed)... here we use the node's class (so if the node - // type disappears, then the action should go with it) - UClass* ActionKey = GetClass(); - - // to keep from needlessly instantiating a UBlueprintNodeSpawner, first - // check to make sure that the registrar is looking for actions of this type - // (could be regenerating actions for a specific asset, and therefore the - // registrar would only accept actions corresponding to that asset) - if (ActionRegistrar.IsOpenForRegistration(ActionKey)) - { - UBlueprintNodeSpawner* NodeSpawner = UBlueprintNodeSpawner::Create(GetClass()); - check(NodeSpawner != nullptr); - - ActionRegistrar.AddBlueprintAction(ActionKey, NodeSpawner); - } -} - -FText UVaRest_BreakJson::GetMenuCategory() const -{ - static FNodeTextCache CachedCategory; - - if (CachedCategory.IsOutOfDate(this)) - { - // FText::Format() is slow, so we cache this to save on performance - CachedCategory.SetCachedText(FEditorCategoryUtils::BuildCategoryString(FCommonEditorCategory::Utilities, LOCTEXT("ActionMenuCategory", "VaRest")), this); - } - return CachedCategory; -} - -void UVaRest_BreakJson::CreateProjectionPins(UEdGraphPin* Source) -{ - const UEdGraphSchema_K2* K2Schema = GetDefault(); - UClass* Class = Cast(StaticLoadObject(UClass::StaticClass(), nullptr, TEXT("class'VaRest.VaRestJsonObject'"))); - - for (TArray::TIterator it(Outputs); it; ++it) - { - FName Type; - FName SubCategory; - - UObject* Subtype = nullptr; - - switch ((*it).Type) - { - case EVaRest_JsonType::JSON_Bool: - Type = K2Schema->PC_Boolean; - break; - - case EVaRest_JsonType::JSON_Number: - Type = K2Schema->PC_Real; - SubCategory = K2Schema->PC_Double; - break; - - case EVaRest_JsonType::JSON_String: - Type = K2Schema->PC_String; - break; - - case EVaRest_JsonType::JSON_Object: - Type = K2Schema->PC_Object; - Subtype = Class; - break; - } - - UEdGraphNode::FCreatePinParams OutputPinParams; - OutputPinParams.ContainerType = (*it).bIsArray ? EPinContainerType::Array : EPinContainerType::None; - UEdGraphPin* OutputPin = CreatePin(EGPD_Output, Type, SubCategory, Subtype, (*it).Name, OutputPinParams); - } -} - -FText UVaRest_BreakJson::GetNodeTitle(ENodeTitleType::Type TitleType) const -{ - return LOCTEXT("VaRest_Break_Json.NodeTitle", "Break Json"); -} - -class FKCHandler_MakeJson : public FNodeHandlingFunctor -{ - -public: - FKCHandler_MakeJson(FKismetCompilerContext& InCompilerContext) - : FNodeHandlingFunctor(InCompilerContext) - { - } - - virtual void Compile(FKismetFunctionContext& Context, UEdGraphNode* Node) override - { - UEdGraphPin* OutputPin = nullptr; - - for (int32 PinIndex = 0; PinIndex < Node->Pins.Num(); ++PinIndex) - { - UEdGraphPin* Pin = Node->Pins[PinIndex]; - if (Pin && (EGPD_Output == Pin->Direction)) - { - OutputPin = Pin; - break; - } - } - - UClass* Class = Cast(StaticLoadObject(UClass::StaticClass(), nullptr, TEXT("class'VaRest.VaRestJsonObject'"))); - - FBPTerminal** TargetTerm = Context.NetMap.Find(OutputPin); - if (TargetTerm == nullptr) - { - return; - } - - { - UClass* SubsystemClass = Cast(StaticLoadObject(UClass::StaticClass(), nullptr, TEXT("class'VaRest.VaRestSubsystem'"))); - - const FName FunctionName = TEXT("StaticConstructVaRestJsonObject"); - UFunction* FunctionPtr = SubsystemClass->FindFunctionByName(FunctionName); - FBlueprintCompiledStatement& Statement = Context.AppendStatementForNode(Node); - Statement.Type = KCST_CallFunction; - Statement.FunctionToCall = FunctionPtr; - Statement.FunctionContext = nullptr; - Statement.bIsParentContext = false; - Statement.LHS = *TargetTerm; - FBPTerminal* NullTerm = Context.CreateLocalTerminal(ETerminalSpecification::TS_Literal); - NullTerm->Type.PinCategory = CompilerContext.GetSchema()->PC_Object; - NullTerm->ObjectLiteral = nullptr; - NullTerm->SourcePin = OutputPin; - Statement.RHS.Add(NullTerm); - } - - for (int32 PinIndex = 0; PinIndex < Node->Pins.Num(); ++PinIndex) - { - UEdGraphPin* Pin = Node->Pins[PinIndex]; - if (Pin && (EGPD_Input == Pin->Direction)) - { - FBPTerminal** Source = Context.NetMap.Find(FEdGraphUtilities::GetNetFromPin(Pin)); - - const FName& FieldName = Pin->PinName; - const FName& FieldType = Pin->PinType.PinCategory; - - FBPTerminal* FieldNameTerm = Context.CreateLocalTerminal(ETerminalSpecification::TS_Literal); - FieldNameTerm->Type.PinCategory = CompilerContext.GetSchema()->PC_String; - FieldNameTerm->SourcePin = Pin; - - FieldNameTerm->Name = FieldName.ToString(); - FieldNameTerm->TextLiteral = FText::FromName(FieldName); - - FBlueprintCompiledStatement& Statement = Context.AppendStatementForNode(Node); - FName FunctionName; - - const bool bIsArray = Pin->PinType.ContainerType == EPinContainerType::Array; - if (FieldType == CompilerContext.GetSchema()->PC_Boolean) - { - FunctionName = bIsArray ? TEXT("SetBoolArrayField") : TEXT("SetBoolField"); - } - else if (FieldType == CompilerContext.GetSchema()->PC_Real) - { - FunctionName = bIsArray ? TEXT("SetNumberArrayFieldDouble") : TEXT("SetNumberFieldDouble"); - } - else if (FieldType == CompilerContext.GetSchema()->PC_String) - { - FunctionName = bIsArray ? TEXT("SetStringArrayField") : TEXT("SetStringField"); - } - else if (FieldType == CompilerContext.GetSchema()->PC_Object) - { - FunctionName = bIsArray ? TEXT("SetObjectArrayField") : TEXT("SetObjectField"); - } - else - { - continue; - } - - UFunction* FunctionPtr = Class->FindFunctionByName(FunctionName); - Statement.Type = KCST_CallFunction; - Statement.FunctionToCall = FunctionPtr; - Statement.FunctionContext = *TargetTerm; - Statement.bIsParentContext = false; - Statement.LHS = nullptr; - Statement.RHS.Add(FieldNameTerm); - Statement.RHS.Add(*Source); - } - } - } - - FBPTerminal* RegisterInputTerm(FKismetFunctionContext& Context, UEdGraphPin* InputPin) - { - // Find structure source net - UEdGraphPin* Net = FEdGraphUtilities::GetNetFromPin(InputPin); - FBPTerminal** TermPtr = Context.NetMap.Find(Net); - - if (!TermPtr) - { - FBPTerminal* Term = Context.CreateLocalTerminalFromPinAutoChooseScope(Net, Context.NetNameMap->MakeValidName(Net)); - - Context.NetMap.Add(Net, Term); - - return Term; - } - - return *TermPtr; - } - - void RegisterOutputTerm(FKismetFunctionContext& Context, UEdGraphPin* OutputPin) - { - FBPTerminal* Term = Context.CreateLocalTerminalFromPinAutoChooseScope(OutputPin, Context.NetNameMap->MakeValidName(OutputPin)); - Context.NetMap.Add(OutputPin, Term); - } - - virtual void RegisterNets(FKismetFunctionContext& Context, UEdGraphNode* InNode) override - { - UVaRest_MakeJson* Node = Cast(InNode); - FNodeHandlingFunctor::RegisterNets(Context, Node); - - check(NULL != Node); - { - for (int32 PinIndex = 0; PinIndex < Node->Pins.Num(); ++PinIndex) - { - UEdGraphPin* Pin = Node->Pins[PinIndex]; - if (EGPD_Output == Pin->Direction) - { - RegisterOutputTerm(Context, Pin); - } - else - { - RegisterInputTerm(Context, Pin); - } - } - } - } -}; - -/** - * Main node class - */ -UVaRest_MakeJson::UVaRest_MakeJson(const FObjectInitializer& ObjectInitializer) - : Super(ObjectInitializer) -{ -} - -FNodeHandlingFunctor* UVaRest_MakeJson::CreateNodeHandler(class FKismetCompilerContext& CompilerContext) const -{ - return new FKCHandler_MakeJson(CompilerContext); -} - -void UVaRest_MakeJson::AllocateDefaultPins() -{ - const UEdGraphSchema_K2* K2Schema = GetDefault(); - - UClass* Class = Cast(StaticLoadObject(UClass::StaticClass(), nullptr, TEXT("class'VaRest.VaRestJsonObject'"))); - UEdGraphPin* Pin = CreatePin(EGPD_Output, K2Schema->PC_Object, TEXT(""), Class, TEXT("Target")); - - K2Schema->SetPinAutogeneratedDefaultValueBasedOnType(Pin); - - CreateProjectionPins(Pin); -} - -FLinearColor UVaRest_MakeJson::GetNodeTitleColor() const -{ - return FLinearColor(255.0f, 255.0f, 0.0f); -} - -void UVaRest_MakeJson::PostEditChangeProperty(struct FPropertyChangedEvent& PropertyChangedEvent) -{ - const FName PropertyName = (PropertyChangedEvent.Property != nullptr) ? PropertyChangedEvent.Property->GetFName() : NAME_None; - if (PropertyName == GET_MEMBER_NAME_STRING_CHECKED(UVaRest_MakeJson, Inputs) || - PropertyName == GET_MEMBER_NAME_STRING_CHECKED(FVaRest_NamedType, Name) || - PropertyName == GET_MEMBER_NAME_STRING_CHECKED(FVaRest_NamedType, Type) || - PropertyName == GET_MEMBER_NAME_STRING_CHECKED(FVaRest_NamedType, bIsArray)) - { - ReconstructNode(); - GetGraph()->NotifyGraphChanged(); - } - - Super::PostEditChangeProperty(PropertyChangedEvent); -} - -void UVaRest_MakeJson::GetMenuActions(FBlueprintActionDatabaseRegistrar& ActionRegistrar) const -{ - // actions get registered under specific object-keys; the idea is that - // actions might have to be updated (or deleted) if their object-key is - // mutated (or removed)... here we use the node's class (so if the node - // type disappears, then the action should go with it) - UClass* ActionKey = GetClass(); - - // to keep from needlessly instantiating a UBlueprintNodeSpawner, first - // check to make sure that the registrar is looking for actions of this type - // (could be regenerating actions for a specific asset, and therefore the - // registrar would only accept actions corresponding to that asset) - if (ActionRegistrar.IsOpenForRegistration(ActionKey)) - { - UBlueprintNodeSpawner* NodeSpawner = UBlueprintNodeSpawner::Create(GetClass()); - check(NodeSpawner != nullptr); - - ActionRegistrar.AddBlueprintAction(ActionKey, NodeSpawner); - } -} - -FText UVaRest_MakeJson::GetMenuCategory() const -{ - static FNodeTextCache CachedCategory; - - if (CachedCategory.IsOutOfDate(this)) - { - // FText::Format() is slow, so we cache this to save on performance - CachedCategory.SetCachedText(FEditorCategoryUtils::BuildCategoryString(FCommonEditorCategory::Utilities, LOCTEXT("ActionMenuCategory", "VaRest")), this); - } - return CachedCategory; -} - -void UVaRest_MakeJson::CreateProjectionPins(UEdGraphPin* Source) -{ - const UEdGraphSchema_K2* K2Schema = GetDefault(); - UClass* Class = Cast(StaticLoadObject(UClass::StaticClass(), nullptr, TEXT("class'VaRest.VaRestJsonObject'"))); - - for (TArray::TIterator it(Inputs); it; ++it) - { - FName Type; - FName SubCategory; - UObject* Subtype = nullptr; - - switch ((*it).Type) - { - case EVaRest_JsonType::JSON_Bool: - Type = K2Schema->PC_Boolean; - break; - - case EVaRest_JsonType::JSON_Number: - Type = K2Schema->PC_Real; - SubCategory = K2Schema->PC_Double; - break; - - case EVaRest_JsonType::JSON_String: - Type = K2Schema->PC_String; - break; - - case EVaRest_JsonType::JSON_Object: - Type = K2Schema->PC_Object; - Subtype = Class; - break; - } - - UEdGraphNode::FCreatePinParams InputPinParams; - InputPinParams.ContainerType = (*it).bIsArray ? EPinContainerType::Array : EPinContainerType::None; - UEdGraphPin* InputPin = CreatePin(EGPD_Input, Type, SubCategory, Subtype, (*it).Name, InputPinParams); - - InputPin->SetSavePinIfOrphaned(false); - } -} - -FText UVaRest_MakeJson::GetNodeTitle(ENodeTitleType::Type TitleType) const -{ - return LOCTEXT("VaRest_Make_Json.NodeTitle", "Make Json"); -} - -#undef LOCTEXT_NAMESPACE diff --git a/Plugins/VaRestPlugin/Source/VaRestEditor/Public/VaRestEditor.h b/Plugins/VaRestPlugin/Source/VaRestEditor/Public/VaRestEditor.h deleted file mode 100644 index a5e0a8ae..00000000 --- a/Plugins/VaRestPlugin/Source/VaRestEditor/Public/VaRestEditor.h +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2014-2019 Vladimir Alyamkin. All Rights Reserved. - -#pragma once - -#include "Modules/ModuleInterface.h" - -class FVaRestEditorModule : public IModuleInterface -{ - -public: - /** IModuleInterface implementation */ - virtual void StartupModule() override; - virtual void ShutdownModule() override; -}; diff --git a/Plugins/VaRestPlugin/Source/VaRestEditor/Public/VaRest_BreakJson.h b/Plugins/VaRestPlugin/Source/VaRestEditor/Public/VaRest_BreakJson.h deleted file mode 100644 index 07d897f0..00000000 --- a/Plugins/VaRestPlugin/Source/VaRestEditor/Public/VaRest_BreakJson.h +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright 2014-2019 Vladimir Alyamkin. All Rights Reserved. -// Original code by https://github.com/unktomi - -#pragma once - -#include "Runtime/Launch/Resources/Version.h" - -#include "CoreMinimal.h" -#include "K2Node.h" - -#include "VaRest_BreakJson.generated.h" - -UENUM(BlueprintType) -enum class EVaRest_JsonType : uint8 -{ - // JSON_Null UMETA(DisplayName = "Null"), - JSON_Bool UMETA(DisplayName = "Boolean"), - JSON_Number UMETA(DisplayName = "Number"), - JSON_String UMETA(DisplayName = "String"), - JSON_Object UMETA(DisplayName = "Object") -}; - -USTRUCT(BlueprintType) -struct FVaRest_NamedType -{ - GENERATED_BODY() - - UPROPERTY(EditAnywhere, Category = NamedType) - FName Name; - - UPROPERTY(EditAnywhere, Category = NamedType) - EVaRest_JsonType Type; - - UPROPERTY(EditAnywhere, Category = NamedType) - bool bIsArray; - - FVaRest_NamedType() - : Type(EVaRest_JsonType::JSON_String) - , bIsArray(false) - { - } -}; - -UCLASS(BlueprintType, Blueprintable) -class VARESTEDITOR_API UVaRest_MakeJson : public UK2Node -{ - GENERATED_UCLASS_BODY() - -public: - // Begin UEdGraphNode interface. - virtual void AllocateDefaultPins() override; - virtual FLinearColor GetNodeTitleColor() const override; - virtual void PostEditChangeProperty(struct FPropertyChangedEvent& PropertyChangedEvent) override; - // End UEdGraphNode interface. - - // Begin UK2Node interface - virtual bool IsNodePure() const { return true; } - virtual bool ShouldShowNodeProperties() const { return true; } - void GetMenuActions(FBlueprintActionDatabaseRegistrar& ActionRegistrar) const override; - virtual FText GetMenuCategory() const override; - virtual FText GetNodeTitle(ENodeTitleType::Type TitleType) const override; - virtual class FNodeHandlingFunctor* CreateNodeHandler(class FKismetCompilerContext& CompilerContext) const override; - // End UK2Node interface. - -protected: - virtual void CreateProjectionPins(UEdGraphPin* Source); - -public: - UPROPERTY(EditAnywhere, Category = PinOptions) - TArray Inputs; -}; - -UCLASS(BlueprintType, Blueprintable) -class VARESTEDITOR_API UVaRest_BreakJson : public UK2Node -{ - GENERATED_UCLASS_BODY() - -public: - // Begin UEdGraphNode interface. - virtual void AllocateDefaultPins() override; - virtual FLinearColor GetNodeTitleColor() const override; - virtual void PostEditChangeProperty(struct FPropertyChangedEvent& PropertyChangedEvent) override; - // End UEdGraphNode interface. - - // Begin UK2Node interface - virtual bool IsNodePure() const { return true; } - virtual bool ShouldShowNodeProperties() const { return true; } - void GetMenuActions(FBlueprintActionDatabaseRegistrar& ActionRegistrar) const override; - virtual FText GetMenuCategory() const override; - virtual FText GetNodeTitle(ENodeTitleType::Type TitleType) const override; - virtual class FNodeHandlingFunctor* CreateNodeHandler(class FKismetCompilerContext& CompilerContext) const override; - // End UK2Node interface. - -protected: - virtual void CreateProjectionPins(UEdGraphPin* Source); - -public: - UPROPERTY(EditAnywhere, Category = PinOptions) - TArray Outputs; -}; diff --git a/Plugins/VaRestPlugin/Source/VaRestEditor/VaRestEditor.Build.cs b/Plugins/VaRestPlugin/Source/VaRestEditor/VaRestEditor.Build.cs deleted file mode 100644 index 5a683711..00000000 --- a/Plugins/VaRestPlugin/Source/VaRestEditor/VaRestEditor.Build.cs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2014-2019 Vladimir Alyamkin. All Rights Reserved. - -using UnrealBuildTool; - -public class VaRestEditor : ModuleRules -{ - public VaRestEditor(ReadOnlyTargetRules Target) : base(Target) - { - PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; - IncludeOrderVersion = EngineIncludeOrderVersion.Latest; - - PrivateIncludePaths.AddRange( - new string[] { - "VaRestEditor/Private", - - // ... add other private include paths required here ... - }); - - - PublicDependencyModuleNames.AddRange( - new string[] - { - "Core", - "VaRest" - - // ... add other public dependencies that you statically link with here ... - }); - - - PrivateDependencyModuleNames.AddRange( - new string[] - { - "CoreUObject", - "Engine", - "Slate", - "SlateCore", - "InputCore", - "AssetTools", - "UnrealEd", // for FAssetEditorManager - "KismetWidgets", - "KismetCompiler", - "BlueprintGraph", - "GraphEditor", - "Kismet", // for FWorkflowCentricApplication - "PropertyEditor", - "EditorStyle", - "Sequencer", - "DetailCustomizations", - "Settings", - "RenderCore" - }); - - - DynamicallyLoadedModuleNames.AddRange( - new string[] - { - // ... add any modules that your module loads dynamically here ... - }); - } -} diff --git a/Plugins/VaRestPlugin/VaRest.uplugin b/Plugins/VaRestPlugin/VaRest.uplugin deleted file mode 100644 index f16be998..00000000 --- a/Plugins/VaRestPlugin/VaRest.uplugin +++ /dev/null @@ -1,28 +0,0 @@ -{ - "FileVersion": 3, - "Version": 32, - "VersionName": "1.1-r32", - "FriendlyName": "VaRest", - "Description": "Plugin that makes REST (JSON) server communication easy to use", - "Category": "Network", - "CreatedBy": "Vladimir Alyamkin", - "CreatedByURL": "https://ufna.dev", - "DocsURL": "https://bit.ly/VaRest-Docs", - "MarketplaceURL": "com.epicgames.launcher://ue/marketplace/content/e47be161e7a24e928560290abd5dcc4f", - "SupportURL": "", - "EngineVersion": "5.5.0+", - "CanContainContent": false, - "Installed": true, - "Modules": [ - { - "Name": "VaRest", - "Type": "Runtime", - "LoadingPhase": "PreDefault" - }, - { - "Name": "VaRestEditor", - "Type": "UncookedOnly", - "LoadingPhase": "Default" - } - ] -} \ No newline at end of file diff --git a/Source/LuckyWorldV2/LuckyWorldV2.Build.cs b/Source/LuckyWorldV2/LuckyWorldV2.Build.cs index 7829bc2c..5e40f8f4 100644 --- a/Source/LuckyWorldV2/LuckyWorldV2.Build.cs +++ b/Source/LuckyWorldV2/LuckyWorldV2.Build.cs @@ -17,10 +17,9 @@ public class LuckyWorldV2 : ModuleRules "LuckyMujoco", "LuckyTextWrite", "SocketIOClient", - "VaRest", - "SIOJson", - "NavigationSystem" - }); + "SIOJson", + "NavigationSystem" + }); PrivateDependencyModuleNames.AddRange(new string[] { }); diff --git a/Source/LuckyWorldV2/Private/Core/LuckyRobotsGameInstance.cpp b/Source/LuckyWorldV2/Private/Core/LuckyRobotsGameInstance.cpp index c839810d..5305756e 100644 --- a/Source/LuckyWorldV2/Private/Core/LuckyRobotsGameInstance.cpp +++ b/Source/LuckyWorldV2/Private/Core/LuckyRobotsGameInstance.cpp @@ -9,9 +9,11 @@ #include "GameFramework/GameUserSettings.h" #include "Kismet/KismetMathLibrary.h" #include "FunctionLibraries/LuckyRobotsFunctionLibrary.h" -#include "VaRestSubsystem.h" #include "Subsystems/SubsystemBlueprintLibrary.h" #include "Gameplay/TargetSelector.h" +#include "Serialization/JsonSerializer.h" +#include "Dom/JsonObject.h" +#include "JsonObjectConverter.h" void ULuckyRobotsGameInstance::DoSendMessage(const FString& SendValue) { @@ -289,92 +291,143 @@ TArray ULuckyRobotsGameInstance::GetSelectableItemList(EIte void ULuckyRobotsGameInstance::GetMessageParse(FString Json) { - auto VaRestSubsystem = CastChecked(USubsystemBlueprintLibrary::GetEngineSubsystem(UVaRestSubsystem::StaticClass()), ECastCheckedType::NullChecked); - if (VaRestSubsystem) + TSharedPtr JsonObject; + TSharedRef> Reader = TJsonReaderFactory<>::Create(Json); + + if (FJsonSerializer::Deserialize(Reader, JsonObject) && JsonObject.IsValid()) { - UVaRestJsonObject* VaRestJsonObject = VaRestSubsystem->ConstructVaRestJsonObject(); - if (VaRestJsonObject) + const TArray>* LuckyCodeArray; + if (JsonObject->TryGetArrayField(TEXT("LuckyCode"), LuckyCodeArray)) { - if (VaRestJsonObject->DecodeJson(Json, true)) + LuckyCodeList.Empty(); + for (const TSharedPtr& Value : *LuckyCodeArray) { - TArray VaRestJsonValueList = VaRestJsonObject->GetArrayField("LuckyCode"); - if (VaRestJsonValueList.Num() > 0) + const TSharedPtr* TempObjectPtr; + if (Value->TryGetObject(TempObjectPtr)) { - LuckyCodeList.Empty(); - for (auto VaRestJsonValue : VaRestJsonValueList) + const TSharedPtr& TempObject = *TempObjectPtr; + if (TempObject.IsValid()) { - if (VaRestJsonValue) + FLuckyCode TempLuckyCode; + int32 TempID = 0; + FString IDString; + if (TempObject->TryGetStringField(TEXT("ID"), IDString)) { - UVaRestJsonObject* TempObject = VaRestJsonValue->AsObject(); - if (TempObject) - { - FLuckyCode TempLuckyCode; - TempLuckyCode.ID = FCString::Atoi(*(TempObject->GetStringField("ID"))); - TempLuckyCode.Code = TempObject->GetStringField("code"); - TempLuckyCode.Time = FCString::Atof(*(TempObject->GetStringField("time"))); - TempLuckyCode.bCallback = (TempObject->GetStringField("callback") == "on"); - LuckyCodeList.Add(TempLuckyCode); - } + TempID = FCString::Atoi(*IDString); } - } - } - else - { - UVaRestJsonValue* VaRestJsonValue = VaRestJsonObject->GetField("LuckyCapture"); - if (VaRestJsonValue) - { - UVaRestJsonObject* TempObject = VaRestJsonValue->AsObject(); - if (TempObject) + TempLuckyCode.ID = TempID; + + FString CodeString; + TempObject->TryGetStringField(TEXT("code"), CodeString); + TempLuckyCode.Code = CodeString; + + double TempTime = 0.0; + FString TimeString; + if (TempObject->TryGetStringField(TEXT("time"), TimeString)) { - bIsCapture = (TempObject->GetStringField("capture") == "on"); - bIsCaptureHand = (TempObject->GetStringField("is_capture_hand") == "on"); - bIsCaptureHead = (TempObject->GetStringField("is_capture_head") == "on"); - bScenarioCapture = (TempObject->GetStringField("scenario_capture") == "on"); - TargetPosition = FTransform(); - SetCurrentFileName(TempObject->GetStringField("file_name")); - SetCurrentFolderName(TempObject->GetStringField("folder_name")); - SetCurrentCaptureNumber(FCString::Atoi(*TempObject->GetStringField("capture_name"))); - SetCurrentIsInfiniteCapture(TempObject->GetStringField("infinite_capture") == "on"); - SetCurrentWritesPerSec(FCString::Atoi(*TempObject->GetStringField("per_second"))); - SetCurrentIsRandomPeople(TempObject->GetStringField("random_people") == "on"); + TempTime = FCString::Atod(*TimeString); } + TempLuckyCode.Time = static_cast(TempTime); + + FString CallbackString; + TempObject->TryGetStringField(TEXT("callback"), CallbackString); + TempLuckyCode.bCallback = (CallbackString.Equals(TEXT("on"), ESearchCase::IgnoreCase)); + + LuckyCodeList.Add(TempLuckyCode); } } } } + else + { + const TSharedPtr* LuckyCaptureObject; + if (JsonObject->TryGetObjectField(TEXT("LuckyCapture"), LuckyCaptureObject)) + { + const TSharedPtr& TempObject = *LuckyCaptureObject; + if (TempObject.IsValid()) + { + FString CaptureString; + TempObject->TryGetStringField(TEXT("capture"), CaptureString); + bIsCapture = (CaptureString.Equals(TEXT("on"), ESearchCase::IgnoreCase)); + + FString CaptureHandString; + TempObject->TryGetStringField(TEXT("is_capture_hand"), CaptureHandString); + bIsCaptureHand = (CaptureHandString.Equals(TEXT("on"), ESearchCase::IgnoreCase)); + + FString CaptureHeadString; + TempObject->TryGetStringField(TEXT("is_capture_head"), CaptureHeadString); + bIsCaptureHead = (CaptureHeadString.Equals(TEXT("on"), ESearchCase::IgnoreCase)); + + FString ScenarioCaptureString; + TempObject->TryGetStringField(TEXT("scenario_capture"), ScenarioCaptureString); + bScenarioCapture = (ScenarioCaptureString.Equals(TEXT("on"), ESearchCase::IgnoreCase)); + + TargetPosition = FTransform(); + + FString FileNameString; + TempObject->TryGetStringField(TEXT("file_name"), FileNameString); + SetCurrentFileName(FileNameString); + + FString FolderNameString; + TempObject->TryGetStringField(TEXT("folder_name"), FolderNameString); + SetCurrentFolderName(FolderNameString); + + int32 CaptureNumberInt = 0; + FString CaptureNumberString; + if(TempObject->TryGetStringField(TEXT("capture_name"), CaptureNumberString)) + { + CaptureNumberInt = FCString::Atoi(*CaptureNumberString); + } + SetCurrentCaptureNumber(CaptureNumberInt); + + FString InfiniteCaptureString; + TempObject->TryGetStringField(TEXT("infinite_capture"), InfiniteCaptureString); + SetCurrentIsInfiniteCapture(InfiniteCaptureString.Equals(TEXT("on"), ESearchCase::IgnoreCase)); + + int32 WritesPerSecInt = 0; + FString WritesPerSecString; + if(TempObject->TryGetStringField(TEXT("per_second"), WritesPerSecString)) + { + WritesPerSecInt = FCString::Atoi(*WritesPerSecString); + } + SetCurrentWritesPerSec(WritesPerSecInt); + + FString RandomPeopleString; + TempObject->TryGetStringField(TEXT("random_people"), RandomPeopleString); + SetCurrentIsRandomPeople(RandomPeopleString.Equals(TEXT("on"), ESearchCase::IgnoreCase)); + } + } + } + } + else + { + UE_LOG(LogTemp, Error, TEXT("Failed to deserialize JSON in GetMessageParse: %s"), *Json); } } FParsedData ULuckyRobotsGameInstance::DoJsonParse(const FString& JsonString) { FParsedData ParsedData; + TSharedPtr JsonObject; + TSharedRef> Reader = TJsonReaderFactory<>::Create(JsonString); - auto VaRestSubsystem = CastChecked(USubsystemBlueprintLibrary::GetEngineSubsystem(UVaRestSubsystem::StaticClass()), ECastCheckedType::NullChecked); - - if (!VaRestSubsystem) + if (FJsonSerializer::Deserialize(Reader, JsonObject) && JsonObject.IsValid()) { - return ParsedData; - } - - UVaRestJsonObject* VaRestJsonObject = VaRestSubsystem->ConstructVaRestJsonObject(); - if (!VaRestJsonObject) - { - return ParsedData; - } - - if (VaRestJsonObject->DecodeJson(JsonString, true)) - { - UVaRestJsonObject* TempJsonObject = VaRestJsonObject->GetObjectField("startup_instructions"); - if (TempJsonObject) + const TSharedPtr* StartupInstructionsObject; + if (JsonObject->TryGetObjectField(TEXT("startup_instructions"), StartupInstructionsObject)) { - ParsedData.LevelName = TempJsonObject->GetStringField("level"); - ParsedData.CharacterName = TempJsonObject->GetStringField("character"); - ParsedData.Quality = TempJsonObject->GetStringField("quality"); + const TSharedPtr& TempObject = *StartupInstructionsObject; + if (TempObject.IsValid()) + { + TempObject->TryGetStringField(TEXT("level"), ParsedData.LevelName); + TempObject->TryGetStringField(TEXT("character"), ParsedData.CharacterName); + TempObject->TryGetStringField(TEXT("quality"), ParsedData.Quality); + } } } else { - UE_LOG(LogTemp, Error, TEXT("Parse Problem")); + UE_LOG(LogTemp, Error, TEXT("Failed to deserialize JSON in DoJsonParse: %s"), *JsonString); } return ParsedData; diff --git a/Source/LuckyWorldV2/Private/Menus/MainScreenUserWidget.cpp b/Source/LuckyWorldV2/Private/Menus/MainScreenUserWidget.cpp index 912ae99e..27f114da 100644 --- a/Source/LuckyWorldV2/Private/Menus/MainScreenUserWidget.cpp +++ b/Source/LuckyWorldV2/Private/Menus/MainScreenUserWidget.cpp @@ -6,8 +6,9 @@ #include "Core/LuckyRobotsGameInstance.h" #include "FunctionLibraries/LuckyRobotsFunctionLibrary.h" #include "Subsystems/SubsystemBlueprintLibrary.h" -#include "VaRestSubsystem.h" #include "Kismet/GameplayStatics.h" +#include "Dom/JsonObject.h" +#include "Serialization/JsonSerializer.h" void UMainScreenUserWidget::NativeConstruct() { @@ -219,25 +220,22 @@ void UMainScreenUserWidget::OnMessageDispatchedHandler(const FString& Message) void UMainScreenUserWidget::DoSendReadyJson() { - auto VaRestSubsystem = CastChecked(USubsystemBlueprintLibrary::GetEngineSubsystem(UVaRestSubsystem::StaticClass()), ECastCheckedType::NullChecked); + TSharedPtr JsonObject = MakeShareable(new FJsonObject()); + JsonObject->SetStringField(TEXT("name"), TEXT("game_is_loaded")); - if (!VaRestSubsystem) + FString SendedString; + TSharedRef> Writer = TJsonWriterFactory<>::Create(&SendedString); + if (FJsonSerializer::Serialize(JsonObject.ToSharedRef(), Writer)) { - return; + ULuckyRobotsGameInstance* GameInstance = Cast(GetGameInstance()); + if (GameInstance) + { + GameInstance->DoSendMessage(SendedString); + UE_LOG(LogTemp, Log, TEXT("Sended: %s"), *SendedString); + } } - - UVaRestJsonObject* VaRestJsonObject = VaRestSubsystem->ConstructVaRestJsonObject(); - if (!VaRestJsonObject) + else { - return; - } - - VaRestJsonObject->SetStringField("name", "game_is_loaded"); - ULuckyRobotsGameInstance* GameInstance = Cast(GetGameInstance()); - if (GameInstance) - { - FString SendedString = VaRestJsonObject->EncodeJsonToSingleString(); - GameInstance->DoSendMessage(SendedString); - UE_LOG(LogTemp, Log, TEXT("Sended: %s"), *SendedString); + UE_LOG(LogTemp, Error, TEXT("Failed to serialize JSON in DoSendReadyJson")); } } \ No newline at end of file