From 70ff6b69a5b35049d767056555c0bf7a54e8ad4e Mon Sep 17 00:00:00 2001 From: Simon Krajewski Date: Fri, 17 Nov 2023 22:21:08 +0100 Subject: [PATCH] add Remoting_SiteApi manually for legacyhaxelib I can't get it to work with the macro because everything is in one file and that leads to problems. Having a pre-expanded version for the legacy code should be fine. --- hx4compat | 2 +- src/legacyhaxelib/Main.hx | 2 +- src/legacyhaxelib/Remoting_SiteApi.hx | 18 ++++++++++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 src/legacyhaxelib/Remoting_SiteApi.hx diff --git a/hx4compat b/hx4compat index b414201e0..f80668e2b 160000 --- a/hx4compat +++ b/hx4compat @@ -1 +1 @@ -Subproject commit b414201e0b8c49ac7163e9e055c924e73c94aaf2 +Subproject commit f80668e2bb73a4c88c6a82c455181c554a5b97d4 diff --git a/src/legacyhaxelib/Main.hx b/src/legacyhaxelib/Main.hx index 5286c605c..4d1ed85f7 100644 --- a/src/legacyhaxelib/Main.hx +++ b/src/legacyhaxelib/Main.hx @@ -28,7 +28,7 @@ enum Answer { Always; } -class SiteProxy extends haxe.remoting.Proxy { +class SiteProxy extends legacyhaxelib.Remoting_SiteApi { } class Progress extends haxe.io.Output { diff --git a/src/legacyhaxelib/Remoting_SiteApi.hx b/src/legacyhaxelib/Remoting_SiteApi.hx new file mode 100644 index 000000000..3fa2a4bca --- /dev/null +++ b/src/legacyhaxelib/Remoting_SiteApi.hx @@ -0,0 +1,18 @@ +package legacyhaxelib; + +class Remoting_SiteApi { + public function new(c:haxe.remoting.Connection) { + this.__cnx = c; + } + var __cnx : haxe.remoting.Connection; + public function search(word:String):List<{ public var name(default, default) : String; public var id(default, default) : StdTypes.Int; }> return __cnx.resolve("search").call([word]); + public function infos(project:String):legacyhaxelib.Data.ProjectInfos return __cnx.resolve("infos").call([project]); + public function user(name:String):legacyhaxelib.Data.UserInfos return __cnx.resolve("user").call([name]); + public function register(name:String, pass:String, mail:String, fullname:String):StdTypes.Bool return __cnx.resolve("register").call([name, pass, mail, fullname]); + public function isNewUser(name:String):StdTypes.Bool return __cnx.resolve("isNewUser").call([name]); + public function checkDeveloper(prj:String, user:String):StdTypes.Void __cnx.resolve("checkDeveloper").call([prj, user]); + public function checkPassword(user:String, pass:String):StdTypes.Bool return __cnx.resolve("checkPassword").call([user, pass]); + public function getSubmitId():String return __cnx.resolve("getSubmitId").call([]); + public function processSubmit(id:String, user:String, pass:String):String return __cnx.resolve("processSubmit").call([id, user, pass]); + public function postInstall(project:String, version:String):StdTypes.Void __cnx.resolve("postInstall").call([project, version]); +} \ No newline at end of file