diff options
Diffstat (limited to 'src/main/java/kr/syeyoung/dungeonsguide')
82 files changed, 4102 insertions, 76 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/RichPresenceManager.java b/src/main/java/kr/syeyoung/dungeonsguide/RichPresenceManager.java index d1175563..abecd8a7 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/RichPresenceManager.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/RichPresenceManager.java @@ -27,8 +27,6 @@ import kr.syeyoung.dungeonsguide.party.PartyJoinRequest; import kr.syeyoung.dungeonsguide.party.PartyManager; import kr.syeyoung.dungeonsguide.stomp.StompHeader; import kr.syeyoung.dungeonsguide.stomp.StompPayload; -import net.arikia.dev.drpc.*; -import net.arikia.dev.drpc.callbacks.*; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; import org.json.JSONObject; @@ -40,65 +38,65 @@ public class RichPresenceManager implements Runnable { public RichPresenceManager() { t.start(); - Runtime.getRuntime().addShutdownHook(new Thread(DiscordRPC::discordShutdown)); +// Runtime.getRuntime().addShutdownHook(new Thread(DiscordRPC::discordShutdown)); } public void setup() { - DiscordRPC.discordInitialize("816298079732498473", new DiscordEventHandlers.Builder() - .setReadyEventHandler(new ReadyCallback() { - @Override - public void apply(DiscordUser user) { - updatePresence(); - } - }).setJoinRequestEventHandler(request -> { - PartyJoinRequest partyJoinRequest = new PartyJoinRequest(); - partyJoinRequest.setDiscordUser(request); - partyJoinRequest.setExpire(System.currentTimeMillis() + 30000); - - PartyInviteViewer.INSTANCE.joinRequests.add(partyJoinRequest); - }).setJoinGameEventHandler(joinSecret -> { - DungeonsGuide.getDungeonsGuide().getStompConnection().send(new StompPayload().method(StompHeader.SEND) - .header("destination", "/app/party.askedtojoin") - .payload(new JSONObject().put("token", joinSecret).toString())); - }).setErroredEventHandler((errorCode, message) -> { - System.out.println("ERROR! "+errorCode+ " - "+message); - t.interrupt(); - (t = new Thread(this)).start(); - }).setDisconnectedEventHandler((errorCode, message) -> { - System.out.println("ERROR! "+errorCode+ " - "+message); - t.interrupt(); - (t = new Thread(this)).start(); - }).build(), true); +// DiscordRPC.discordInitialize("816298079732498473", new DiscordEventHandlers.Builder() +// .setReadyEventHandler(new ReadyCallback() { +// @Override +// public void apply(DiscordUser user) { +// updatePresence(); +// } +// }).setJoinRequestEventHandler(request -> { +// PartyJoinRequest partyJoinRequest = new PartyJoinRequest(); +// partyJoinRequest.setDiscordUser(request); +// partyJoinRequest.setExpire(System.currentTimeMillis() + 30000); +// +// PartyInviteViewer.INSTANCE.joinRequests.add(partyJoinRequest); +// }).setJoinGameEventHandler(joinSecret -> { +// DungeonsGuide.getDungeonsGuide().getStompConnection().send(new StompPayload().method(StompHeader.SEND) +// .header("destination", "/app/party.askedtojoin") +// .payload(new JSONObject().put("token", joinSecret).toString())); +// }).setErroredEventHandler((errorCode, message) -> { +// System.out.println("ERROR! "+errorCode+ " - "+message); +// t.interrupt(); +// (t = new Thread(this)).start(); +// }).setDisconnectedEventHandler((errorCode, message) -> { +// System.out.println("ERROR! "+errorCode+ " - "+message); +// t.interrupt(); +// (t = new Thread(this)).start(); +// }).build(), true); } private final SkyblockStatus skyblockStatus = DungeonsGuide.getDungeonsGuide().getSkyblockStatus(); public void updatePresence() { - if (!skyblockStatus.isOnHypixel() || !FeatureRegistry.ADVANCED_RICHPRESENCE.isEnabled() || (!skyblockStatus.isOnSkyblock() && FeatureRegistry.ADVANCED_RICHPRESENCE.<Boolean>getParameter("disablenotskyblock").getValue())) { - DiscordRPC.discordClearPresence(); - } else { - String name = skyblockStatus.getDungeonName(); - if (name.trim().equals("Your Island")) name = "Private Island"; - DiscordRichPresence.Builder richPresenceBuilder = new DiscordRichPresence.Builder(name); - richPresenceBuilder.setBigImage("mort", "mort") - .setParty(PartyManager.INSTANCE.getPartyID(), PartyManager.INSTANCE.getMemberCount(), PartyManager.INSTANCE.getMaxParty()); - - if (skyblockStatus.getContext() != null) { - DungeonContext dungeonContext = skyblockStatus.getContext(); - long init = dungeonContext.getInit(); - richPresenceBuilder.setStartTimestamps(init); - - if (dungeonContext.getBossfightProcessor() != null) { - richPresenceBuilder.setDetails("Fighting "+dungeonContext.getBossfightProcessor().getBossName()+": "+dungeonContext.getBossfightProcessor().getCurrentPhase()); - } else { - richPresenceBuilder.setDetails("Clearing rooms"); - } - } - if (PartyManager.INSTANCE.isAllowAskToJoin()) - richPresenceBuilder.setSecrets(PartyManager.INSTANCE.getAskToJoinSecret(), null); - richPresenceBuilder.setDetails("Dungeons Guide"); - DiscordRPC.discordUpdatePresence(richPresenceBuilder.build()); - } +// if (!skyblockStatus.isOnHypixel() || !FeatureRegistry.ADVANCED_RICHPRESENCE.isEnabled() || (!skyblockStatus.isOnSkyblock() && FeatureRegistry.ADVANCED_RICHPRESENCE.<Boolean>getParameter("disablenotskyblock").getValue())) { +// DiscordRPC.discordClearPresence(); +// } else { +// String name = skyblockStatus.getDungeonName(); +// if (name.trim().equals("Your Island")) name = "Private Island"; +// DiscordRichPresence.Builder richPresenceBuilder = new DiscordRichPresence.Builder(name); +// richPresenceBuilder.setBigImage("mort", "mort") +// .setParty(PartyManager.INSTANCE.getPartyID(), PartyManager.INSTANCE.getMemberCount(), PartyManager.INSTANCE.getMaxParty()); +// +// if (skyblockStatus.getContext() != null) { +// DungeonContext dungeonContext = skyblockStatus.getContext(); +// long init = dungeonContext.getInit(); +// richPresenceBuilder.setStartTimestamps(init); +// +// if (dungeonContext.getBossfightProcessor() != null) { +// richPresenceBuilder.setDetails("Fighting "+dungeonContext.getBossfightProcessor().getBossName()+": "+dungeonContext.getBossfightProcessor().getCurrentPhase()); +// } else { +// richPresenceBuilder.setDetails("Clearing rooms"); +// } +// } +// if (PartyManager.INSTANCE.isAllowAskToJoin()) +// richPresenceBuilder.setSecrets(PartyManager.INSTANCE.getAskToJoinSecret(), null); +// richPresenceBuilder.setDetails("Dungeons Guide"); +// DiscordRPC.discordUpdatePresence(richPresenceBuilder.build()); +// } } @@ -119,17 +117,17 @@ public class RichPresenceManager implements Runnable { @Override public void run() { - try { - Thread.sleep(300L); - setup(); - while(!Thread.interrupted()) { - DiscordRPC.discordRunCallbacks(); - if (skyblockStatus.isOnSkyblock() && !lastLoc.equalsIgnoreCase(skyblockStatus.getDungeonName())) { - lastLoc = skyblockStatus.getDungeonName()+""; - } - updatePresence(); - Thread.sleep(300L); - } - } catch (Exception e) {e.printStackTrace();} +// try { +// Thread.sleep(300L); +// setup(); +// while(!Thread.interrupted()) { +// DiscordRPC.discordRunCallbacks(); +// if (skyblockStatus.isOnSkyblock() && !lastLoc.equalsIgnoreCase(skyblockStatus.getDungeonName())) { +// lastLoc = skyblockStatus.getDungeonName()+""; +// } +// updatePresence(); +// Thread.sleep(300L); +// } +// } catch (Exception e) {e.printStackTrace();} } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/GameSDK.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/GameSDK.java new file mode 100644 index 00000000..973e5fca --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/GameSDK.java @@ -0,0 +1,176 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk; + +import com.sun.jna.Library; +import com.sun.jna.Native; +import com.sun.jna.Platform; +import com.sun.jna.Pointer; +import com.sun.jna.ptr.PointerByReference; +import kr.syeyoung.dungeonsguide.gamesdk.jna.GameSDKTypeMapper; +import kr.syeyoung.dungeonsguide.gamesdk.jna.NativeGameSDK; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.*; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.*; +import kr.syeyoung.dungeonsguide.gamesdk.jna.interfacestruct.IDiscordActivityEvents; +import kr.syeyoung.dungeonsguide.gamesdk.jna.interfacestruct.IDiscordActivityManager; +import kr.syeyoung.dungeonsguide.gamesdk.jna.interfacestruct.IDiscordCore; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.*; +import lombok.Getter; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.nio.file.Files; +import java.nio.file.StandardCopyOption; +import java.util.Collections; + +public class GameSDK { + @Getter + private static NativeGameSDK nativeGameSDK; + + static { + try { + extractLibrary(); + } catch (IOException e) { + e.printStackTrace(); + } + } + public static void extractLibrary() throws IOException { + String libName = System.mapLibraryName("discord_game_sdk"); + String dir = ""; + switch(Platform.getOSType()) { + case Platform.MAC: + dir = "darwin"; + break; + case Platform.LINUX: + dir = "linux"; + break; + case Platform.WINDOWS: + if (Platform.is64Bit()) dir = "win-x64"; + else dir = "win-x86"; + break; + default: + throw new IllegalStateException("Unsupported OS Type"); + } + + String resourceLoc = "/gamesdk/"+dir+"/"+libName; + File targetExtractionPath = new File("native/"+libName); + targetExtractionPath.getParentFile().mkdirs(); + try (InputStream is = GameSDK.class.getResourceAsStream(resourceLoc)) { + Files.copy(is, targetExtractionPath.toPath(), StandardCopyOption.REPLACE_EXISTING); + targetExtractionPath.deleteOnExit(); + } + + nativeGameSDK = (NativeGameSDK) Native.loadLibrary(targetExtractionPath.getAbsolutePath(), NativeGameSDK.class, + Collections.singletonMap(Library.OPTION_TYPE_MAPPER, GameSDKTypeMapper.INSTANCE)); + } + + public static void writeString(byte[] bts, String str) { + System.arraycopy(str.getBytes(), 0, bts, 0, str.getBytes().length); + } + public static String readString(byte[] bts) { + int i; + for (i = 0; i < bts.length && bts[i] != 0; i++); + byte[] asdasd = new byte[i+1]; + System.arraycopy(bts, 0, asdasd, 0, i); + return new String(asdasd); + } + + public static void main(String args[]) throws InterruptedException { + NativeGameSDK nativeGameSDK = getNativeGameSDK(); + DiscordCreateParams discordCreateParams = new DiscordCreateParams(); + discordCreateParams.client_id = new DiscordClientID(816298079732498473L); + + IDiscordActivityEvents activityEvents = new IDiscordActivityEvents(); + activityEvents.OnActivityInvite = new IDiscordActivityEvents.OnActivityInviteCallback() { + @Override + public void onActivityInvite(Pointer eventData, EDiscordActivityActionType type, DiscordUser user, DiscordActivity activity) { + + } + }; + activityEvents.OnActivityJoin = new IDiscordActivityEvents.OnActivityJoinCallback() { + @Override + public void onActivityJoin(Pointer eventData, String secret) { + + } + }; + activityEvents.OnActivityJoinRequest = new IDiscordActivityEvents.OnActivityJoinRequestCallback() { + @Override + public void onActivityJoinRequest(Pointer eventData, DiscordUser user) { + + } + }; + activityEvents.OnActivitySpectate = new IDiscordActivityEvents.OnActivitySpectateCallback() { + @Override + public void onActivitySpectate(Pointer eventData, String secret) { + + } + }; + activityEvents.write(); + discordCreateParams.activity_events = new IDiscordActivityEvents.ByReference(activityEvents.getPointer()); + + + PointerByReference pointerByReference = new PointerByReference(); + nativeGameSDK.DiscordCreate(new DiscordVersion(NativeGameSDK.DISCORD_VERSION), discordCreateParams, pointerByReference); + IDiscordCore iDiscordCore = new IDiscordCore(pointerByReference.getValue()); + + iDiscordCore.SetLogHook.setLogHook(iDiscordCore, EDiscordLogLevel.DiscordLogLevel_Debug, Pointer.NULL, new IDiscordCore.LogHook() { + @Override + public void hook(Pointer hookData, EDiscordLogLevel level, String message) { + System.out.println(message+" - "+level+" - "+hookData); + } + }); + + DiscordActivity discordActivity = new DiscordActivity(); + discordActivity.activityType = EDiscordActivityType.DiscordActivityType_Playing; + writeString(discordActivity.details, "Dungeons Guide RPC Test Det"); + writeString(discordActivity.state, "Dungeons Guide RPC Test Sta"); + discordActivity.party = new DiscordActivityParty(); + writeString(discordActivity.party.id, "partyid"); + discordActivity.party.discordActivityParty = new DiscordPartySize(); + discordActivity.party.discordActivityParty.current_size = new Int32(4); + discordActivity.party.discordActivityParty.max_size = new Int32(10); + discordActivity.instance = false; + discordActivity.timestamps = new DiscordActivityTimestamps(); + discordActivity.timestamps.start = new DiscordTimestamp(System.currentTimeMillis()); + discordActivity.timestamps.end = new DiscordTimestamp(System.currentTimeMillis()+1000*60*60); + discordActivity.secrets = new DiscordActivitySecrets(); + writeString(discordActivity.secrets.join, "thisisjoinsecret"); + writeString(discordActivity.secrets.spectate, "thisisspectatesecret"); + writeString(discordActivity.secrets.match, "thisismatchsecret"); + discordActivity.assets = new DiscordActivityAssets(); + writeString(discordActivity.assets.large_text, "thisislargetext"); + writeString(discordActivity.assets.large_image, "mort"); + + + + IDiscordActivityManager iDiscordActivityManager = iDiscordCore.GetActivityManager.getActivityManager(iDiscordCore); + iDiscordActivityManager.UpdateActivity.updateActivity(iDiscordActivityManager, discordActivity, Pointer.NULL, new NativeGameSDK.DiscordCallback() { + @Override + public void callback(Pointer callbackData, EDiscordResult result) { + System.out.println("Callback: "+callbackData+" - "+result); + } + }); + + while(true) { + iDiscordCore.RunCallbacks.runCallbacks(iDiscordCore); + Thread.sleep(100); + } + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/GameSDKTypeMapper.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/GameSDKTypeMapper.java new file mode 100644 index 00000000..1d8a4ef8 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/GameSDKTypeMapper.java @@ -0,0 +1,46 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna; + +import com.sun.jna.DefaultTypeMapper; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.*; + +public class GameSDKTypeMapper extends DefaultTypeMapper { + public static final GameSDKTypeMapper INSTANCE = new GameSDKTypeMapper(); + private GameSDKTypeMapper() { + addTypeConverter(EDiscordResult.class, new EDiscordResult.EDiscordResultTypeConverter()); + addTypeConverter(EDiscordCreateFlags.class, new EDiscordCreateFlags.EDiscordCreateFlagsTypeConverter()); + addTypeConverter(EDiscordLogLevel.class, new EDiscordLogLevel.EDiscordLogLevelTypeConverter()); + addTypeConverter(EDiscordUserFlag.class, new EDiscordUserFlag.EDiscordUserFlagTypeConverter()); + addTypeConverter(EDiscordPremiumType.class, new EDiscordPremiumType.EDiscordPremiumTypeTypeConverter()); + addTypeConverter(EDiscordImageType.class, new EDiscordImageType.EDiscordImageTypeTypeConverter()); + addTypeConverter(EDiscordActivityType.class, new EDiscordActivityType.EDiscordActivityTypeTypeConverter()); + addTypeConverter(EDiscordActivityActionType.class, new EDiscordActivityActionType.EDiscordActivityActionTypeTypeConverter()); + addTypeConverter(EDiscordActivityJoinRequestReply.class, new EDiscordActivityJoinRequestReply.EDiscordActivityJoinRequestReplyTypeConverter()); + addTypeConverter(EDiscordStatus.class, new EDiscordStatus.EDiscordStatusTypeConverter()); + addTypeConverter(EDiscordRelationshipType.class, new EDiscordRelationshipType.EDiscordRelationshipTypeTypeConverter()); + addTypeConverter(EDiscordLobbyType.class, new EDiscordLobbyType.EDiscordLobbyTypeTypeConverter()); + addTypeConverter(EDiscordLobbySearchComparison.class, new EDiscordLobbySearchComparison.EDiscordLobbySearchComparisonTypeConverter()); + addTypeConverter(EDiscordLobbySearchCast.class, new EDiscordLobbySearchCast.EDiscordLobbySearchCastTypeConverter()); + addTypeConverter(EDiscordLobbySearchDistance.class, new EDiscordLobbySearchDistance.EDiscordLobbySearchDistanceTypeConverter()); + addTypeConverter(EDiscordEntitlementType.class, new EDiscordEntitlementType.EDiscordEntitlementTypeTypeConverter()); + addTypeConverter(EDiscordSkuType.class, new EDiscordSkuType.EDiscordSkuTypeTypeConverter()); + addTypeConverter(EDiscordInputModeType.class, new EDiscordInputModeType.EDiscordInputModeTypeTypeConverter()); + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/NativeGameSDK.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/NativeGameSDK.java new file mode 100644 index 00000000..59fc0339 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/NativeGameSDK.java @@ -0,0 +1,50 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna; + +import com.sun.jna.Callback; +import com.sun.jna.Library; +import com.sun.jna.Pointer; +import com.sun.jna.ptr.PointerByReference; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordCreateParams; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.EDiscordResult; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.DiscordVersion; + +public interface NativeGameSDK extends Library { + + public static final int DISCORD_VERSION = 2; + public static final int DISCORD_APPLICATION_MANAGER_VERSION = 1; + public static final int DISCORD_USER_MANAGER_VERSION = 1; + public static final int DISCORD_IMAGE_MANAGER_VERSION = 1; + public static final int DISCORD_ACTIVITY_MANAGER_VERSION = 1; + public static final int DISCORD_RELATIONSHIP_MANAGER_VERSION = 1; + public static final int DISCORD_LOBBY_MANAGER_VERSION = 1; + public static final int DISCORD_NETWORK_MANAGER_VERSION = 1; + public static final int DISCORD_OVERLAY_MANAGER_VERSION = 1; + public static final int DISCORD_STORAGE_MANAGER_VERSION = 1; + public static final int DISCORD_STORE_MANAGER_VERSION = 1; + public static final int DISCORD_VOICE_MANAGER_VERSION = 1; + public static final int DISCORD_ACHIEVEMENT_MANAGER_VERSION = 1; + + EDiscordResult DiscordCreate(DiscordVersion version, DiscordCreateParams params, PointerByReference result); // result is double pointer of IDiscordCore + + interface DiscordCallback extends Callback { + void callback(Pointer callbackData, EDiscordResult result); + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordActivity.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordActivity.java new file mode 100644 index 00000000..3b6951a2 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordActivity.java @@ -0,0 +1,42 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct; + +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.EDiscordActivityType; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.Int64; + + +public class DiscordActivity extends DiscordStruct { + public EDiscordActivityType activityType = EDiscordActivityType.DiscordActivityType_Playing; + public Int64 applicationId = new Int64(); + public byte[] name = new byte[128]; + public byte[] state = new byte[128]; + public byte[] details = new byte[128]; + public DiscordActivityTimestamps timestamps; + public DiscordActivityAssets assets; + public DiscordActivityParty party; + public DiscordActivitySecrets secrets; + public boolean instance; + public DiscordActivity() {super();} public DiscordActivity(Pointer pointer) {super(pointer);} + + public static class ByReference extends DiscordActivity implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends DiscordActivity implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordActivityAssets.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordActivityAssets.java new file mode 100644 index 00000000..5908fb1d --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordActivityAssets.java @@ -0,0 +1,34 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct; + +import com.sun.jna.Pointer; +import com.sun.jna.Structure; + + +public class DiscordActivityAssets extends DiscordStruct{ + public byte[] large_image = new byte[128]; + public byte[] large_text = new byte[128]; + public byte[] small_image = new byte[128]; + public byte[] small_text = new byte[128]; + public DiscordActivityAssets() {super();}public DiscordActivityAssets(Pointer pointer) {super(pointer);} + + public static class ByReference extends DiscordActivityAssets implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends DiscordActivityAssets implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordActivityParty.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordActivityParty.java new file mode 100644 index 00000000..697cb6b8 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordActivityParty.java @@ -0,0 +1,32 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct; + +import com.sun.jna.Pointer; +import com.sun.jna.Structure; + + +public class DiscordActivityParty extends DiscordStruct { + public byte[] id = new byte[128]; + public DiscordPartySize discordActivityParty; + public DiscordActivityParty() {super();} public DiscordActivityParty(Pointer pointer) {super(pointer);} + + public static class ByReference extends DiscordActivityParty implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends DiscordActivityParty implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordActivitySecrets.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordActivitySecrets.java new file mode 100644 index 00000000..db8f42e9 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordActivitySecrets.java @@ -0,0 +1,33 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct; + +import com.sun.jna.Pointer; +import com.sun.jna.Structure; + + +public class DiscordActivitySecrets extends DiscordStruct { + public byte[] match = new byte[128]; + public byte[] join = new byte[128]; + public byte[] spectate = new byte[128]; + public DiscordActivitySecrets() {super();} public DiscordActivitySecrets(Pointer pointer) {super(pointer);} + + public static class ByReference extends DiscordActivitySecrets implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends DiscordActivitySecrets implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordActivityTimestamps.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordActivityTimestamps.java new file mode 100644 index 00000000..6f0c5f04 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordActivityTimestamps.java @@ -0,0 +1,32 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct; + +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.DiscordTimestamp; + +public class DiscordActivityTimestamps extends DiscordStruct { + public DiscordTimestamp start = new DiscordTimestamp(); + public DiscordTimestamp end = new DiscordTimestamp(); + public DiscordActivityTimestamps() {super();} public DiscordActivityTimestamps(Pointer pointer) {super(pointer);} + + public static class ByReference extends DiscordActivityTimestamps implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends DiscordActivityTimestamps implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordCreateParams.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordCreateParams.java new file mode 100644 index 00000000..edb29844 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordCreateParams.java @@ -0,0 +1,60 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct; + +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import kr.syeyoung.dungeonsguide.gamesdk.jna.interfacestruct.*; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.DiscordClientID; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.DiscordVersion; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.UInt64; + +public class DiscordCreateParams extends DiscordStruct { public DiscordCreateParams() {super();} public DiscordCreateParams(Pointer pointer) {super(pointer);} + public DiscordClientID client_id = new DiscordClientID(); + public UInt64 flags = new UInt64(); + public Pointer events; // void* + public Pointer event_data; // void* + public Pointer application_events; + public DiscordVersion application_version = new DiscordVersion(); + public IDiscordUserEvents.ByReference user_events; + public DiscordVersion user_version= new DiscordVersion(); + public Pointer image_events;// void* + public DiscordVersion image_version= new DiscordVersion(); + public IDiscordActivityEvents.ByReference activity_events; + public DiscordVersion activity_version= new DiscordVersion(); + public IDiscordRelationshipEvents.ByReference relationship_events; + public DiscordVersion relationship_version= new DiscordVersion(); + public IDiscordLobbyEvents.ByReference lobby_events; + public DiscordVersion lobby_version= new DiscordVersion(); + public IDiscordNetworkEvents.ByReference network_events; + public DiscordVersion network_version= new DiscordVersion(); + public IDiscordOverlayEvents.ByReference overlay_events; + public DiscordVersion overlay_version= new DiscordVersion(); + public Pointer storage_events;// void* + public DiscordVersion storage_version= new DiscordVersion(); + public IDiscordStoreEvents.ByReference store_events; + public DiscordVersion store_version= new DiscordVersion(); + public IDiscordVoiceEvents.ByReference voice_events; + public DiscordVersion voice_version= new DiscordVersion(); + public IDiscordAchievementEvents.ByReference achievement_events; + public DiscordVersion achievement_version= new DiscordVersion(); + + public static class ByReference extends DiscordCreateParams implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends DiscordCreateParams implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordEntitlement.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordEntitlement.java new file mode 100644 index 00000000..d3d4361e --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordEntitlement.java @@ -0,0 +1,34 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct; + +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.EDiscordEntitlementType; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.DiscordSnowflake; + +public class DiscordEntitlement extends DiscordStruct { + public DiscordSnowflake id = new DiscordSnowflake(); + public EDiscordEntitlementType type = EDiscordEntitlementType.DiscordEntitlementType_Purchase; + public DiscordSnowflake sku_id = new DiscordSnowflake(); + public DiscordEntitlement() {super();} public DiscordEntitlement(Pointer pointer) {super(pointer);} + + public static class ByReference extends DiscordEntitlement implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends DiscordEntitlement implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordFileStat.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordFileStat.java new file mode 100644 index 00000000..200ac74a --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordFileStat.java @@ -0,0 +1,34 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct; + +import com.sun.jna.Pointer; +import com.sun.jna.Structure; + +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.UInt64; + +public class DiscordFileStat extends DiscordStruct { + public byte[] filename = new byte[260]; + public UInt64 size = new UInt64(); + public UInt64 last_modified = new UInt64(); + public DiscordFileStat() {super();} public DiscordFileStat(Pointer pointer) {super(pointer);} + + public static class ByReference extends DiscordFileStat implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends DiscordFileStat implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordImageDimensions.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordImageDimensions.java new file mode 100644 index 00000000..6d569993 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordImageDimensions.java @@ -0,0 +1,32 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct; + +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.UInt32; + +public class DiscordImageDimensions extends DiscordStruct { + public UInt32 width = new UInt32(); + public UInt32 height = new UInt32(); + public DiscordImageDimensions() {super();} public DiscordImageDimensions(Pointer pointer) {super(pointer);} + + public static class ByReference extends DiscordImageDimensions implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) { super(pointer);}} + public static class ByValue extends DiscordImageDimensions implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) { super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordImageHandle.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordImageHandle.java new file mode 100644 index 00000000..1eafce70 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordImageHandle.java @@ -0,0 +1,35 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct; + +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.EDiscordImageType; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.Int64; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.UInt32; + +public class DiscordImageHandle extends DiscordStruct { + public EDiscordImageType type = EDiscordImageType.DiscordImageType_User; + public Int64 integerType = new Int64(); + public UInt32 size = new UInt32(); + public DiscordImageHandle() {super();} public DiscordImageHandle(Pointer pointer) {super(pointer);} + + public static class ByReference extends DiscordImageHandle implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends DiscordImageHandle implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordInputMode.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordInputMode.java new file mode 100644 index 00000000..45084b56 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordInputMode.java @@ -0,0 +1,33 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct; + +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.EDiscordInputModeType; + + +public class DiscordInputMode extends DiscordStruct { + public EDiscordInputModeType type = EDiscordInputModeType.DiscordInputModeType_PushToTalk; + public byte[] shortcut = new byte[256]; + public DiscordInputMode() {super();} public DiscordInputMode(Pointer pointer) {super(pointer);} + + public static class ByReference extends DiscordInputMode implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends DiscordInputMode implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordLobby.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordLobby.java new file mode 100644 index 00000000..514ddadf --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordLobby.java @@ -0,0 +1,39 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct; + +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.EDiscordLobbyType; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.DiscordSnowflake; + +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.UInt32; + +public class DiscordLobby extends DiscordStruct { + public DiscordSnowflake id = new DiscordSnowflake(); + public EDiscordLobbyType type = EDiscordLobbyType.DiscordLobbyType_Private; + public DiscordSnowflake owner_id = new DiscordSnowflake(); + public byte[] secret = new byte[128]; + public UInt32 capacity = new UInt32(); + public boolean locked; + public DiscordLobby() {super();} public DiscordLobby(Pointer pointer) {super(pointer);} + + public static class ByReference extends DiscordLobby implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends DiscordLobby implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordOAuth2Token.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordOAuth2Token.java new file mode 100644 index 00000000..f03a0aa3 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordOAuth2Token.java @@ -0,0 +1,34 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct; + +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.DiscordTimestamp; + + +public class DiscordOAuth2Token extends DiscordStruct { + public byte[] access_token = new byte[128]; + public byte[] scopes = new byte[1024]; + public DiscordTimestamp expires = new DiscordTimestamp(); + public DiscordOAuth2Token() {super();} public DiscordOAuth2Token(Pointer pointer) {super(pointer);} + + public static class ByReference extends DiscordOAuth2Token implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends DiscordOAuth2Token implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordPartySize.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordPartySize.java new file mode 100644 index 00000000..a890d235 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordPartySize.java @@ -0,0 +1,32 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct; + +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.Int32; + +public class DiscordPartySize extends DiscordStruct{ + public Int32 current_size = new Int32(); + public Int32 max_size = new Int32(); + public DiscordPartySize() {super();} public DiscordPartySize(Pointer pointer) {super(pointer);} + + public static class ByReference extends DiscordPartySize implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends DiscordPartySize implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordPresence.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordPresence.java new file mode 100644 index 00000000..1c17bdac --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordPresence.java @@ -0,0 +1,32 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct; + +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.EDiscordStatus; + +public class DiscordPresence extends DiscordStruct { + public EDiscordStatus status = EDiscordStatus.DiscordStatus_Offline; + public DiscordActivity activity; + public DiscordPresence() {super();} public DiscordPresence(Pointer pointer) {super(pointer);} + + public static class ByReference extends DiscordPresence implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends DiscordPresence implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordRelationship.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordRelationship.java new file mode 100644 index 00000000..3b22d0d2 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordRelationship.java @@ -0,0 +1,33 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct; + +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.EDiscordRelationshipType; + +public class DiscordRelationship extends DiscordStruct { + public EDiscordRelationshipType type = EDiscordRelationshipType.DiscordRelationshipType_None; + public DiscordUser user; + public DiscordPresence presence; + public DiscordRelationship() {super();} public DiscordRelationship(Pointer pointer) {super(pointer);} + + public static class ByReference extends DiscordRelationship implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends DiscordRelationship implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordSku.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordSku.java new file mode 100644 index 00000000..51693fa0 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordSku.java @@ -0,0 +1,36 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct; + +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.EDiscordSkuType; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.DiscordSnowflake; + + +public class DiscordSku extends DiscordStruct { + public DiscordSnowflake id = new DiscordSnowflake(); + public EDiscordSkuType type = EDiscordSkuType.DiscordSkuType_Application; + public byte[] name = new byte[256]; + public DiscordSkuPrice discordSkuPrice; + public DiscordSku() {super();} public DiscordSku(Pointer pointer) {super(pointer);} + + public static class ByReference extends DiscordSku implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends DiscordSku implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordSkuPrice.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordSkuPrice.java new file mode 100644 index 00000000..74be946a --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordSkuPrice.java @@ -0,0 +1,33 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct; + +import com.sun.jna.Pointer; +import com.sun.jna.Structure; + +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.UInt32; + +public class DiscordSkuPrice extends DiscordStruct { + public UInt32 amount = new UInt32(); + public byte[] currency = new byte[16]; + public DiscordSkuPrice() {super();} public DiscordSkuPrice(Pointer pointer) {super(pointer);} + + public static class ByReference extends DiscordSkuPrice implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends DiscordSkuPrice implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordStruct.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordStruct.java new file mode 100644 index 00000000..f6a19d82 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordStruct.java @@ -0,0 +1,36 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct; + +import com.sun.jna.Library; +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import com.sun.jna.TypeMapper; +import kr.syeyoung.dungeonsguide.gamesdk.jna.GameSDKTypeMapper; + +import java.util.Collections; +import java.util.Map; + +public abstract class DiscordStruct extends Structure { + public static final Map<String, Object> OPTIONS = Collections.singletonMap(Library.OPTION_TYPE_MAPPER, GameSDKTypeMapper.INSTANCE); + protected DiscordStruct() { + super(GameSDKTypeMapper.INSTANCE); + } + protected DiscordStruct(Pointer p) {super(p); read();} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordUser.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordUser.java new file mode 100644 index 00000000..7abd0c71 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordUser.java @@ -0,0 +1,38 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct; + +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.DiscordSnowflake; + +import lombok.Getter; +import lombok.Setter; + +public class DiscordUser extends DiscordStruct { + public DiscordSnowflake id = new DiscordSnowflake(); + public byte[] username = new byte[256]; + public byte[] discriminator = new byte[8]; + public byte[] avatar = new byte[128]; + public boolean bot; + public DiscordUser() {super();} public DiscordUser(Pointer pointer) {super(pointer);} + + public static class ByReference extends DiscordUser implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends DiscordUser implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordUserAchievement.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordUserAchievement.java new file mode 100644 index 00000000..1f2b4cb8 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/datastruct/DiscordUserAchievement.java @@ -0,0 +1,36 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct; + +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.DiscordSnowflake; + +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.UInt32; + +public class DiscordUserAchievement extends DiscordStruct { + public DiscordSnowflake user_id = new DiscordSnowflake(); + public DiscordSnowflake achievement_id = new DiscordSnowflake(); + public UInt32 percent_complete = new UInt32(); + public byte[] unlocked_at = new byte[64]; + public DiscordUserAchievement() {super();} public DiscordUserAchievement(Pointer pointer) {super(pointer);} + + public static class ByReference extends DiscordUserAchievement implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends DiscordUserAchievement implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordActivityActionType.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordActivityActionType.java new file mode 100644 index 00000000..d46fdfc6 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordActivityActionType.java @@ -0,0 +1,67 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration; + +import com.sun.jna.FromNativeContext; +import com.sun.jna.ToNativeContext; +import com.sun.jna.TypeConverter; +import lombok.Getter; + +import java.util.HashMap; +import java.util.Map; + +public enum EDiscordActivityActionType { + DiscordActivityActionType_Join(1), + DiscordActivityActionType_Spectate(2); + + @Getter + private final int value; + private EDiscordActivityActionType(int value) { + this.value = value; + } + + private static final Map<Integer,EDiscordActivityActionType> valueMap = new HashMap<>(); + static { + for (EDiscordActivityActionType value : values()) { + valueMap.put(value.value, value); + } + } + + public static EDiscordActivityActionType fromValue(int value) { + return valueMap.get(value); + } + + public static class EDiscordActivityActionTypeTypeConverter implements TypeConverter { + @Override + public Object fromNative(Object nativeValue, FromNativeContext context) { + return EDiscordActivityActionType.fromValue((Integer)nativeValue); + } + + @Override + public Object toNative(Object value, ToNativeContext context) { + if (value == null) return 0; + return ((EDiscordActivityActionType)value).getValue(); + } + + @Override + public Class nativeType() { + return Integer.class; + } + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordActivityJoinRequestReply.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordActivityJoinRequestReply.java new file mode 100644 index 00000000..a8deda60 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordActivityJoinRequestReply.java @@ -0,0 +1,68 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration; + +import com.sun.jna.FromNativeContext; +import com.sun.jna.ToNativeContext; +import com.sun.jna.TypeConverter; +import lombok.Getter; + +import java.util.HashMap; +import java.util.Map; + +public enum EDiscordActivityJoinRequestReply { + DiscordActivityJoinRequestReply_No(0), + DiscordActivityJoinRequestReply_Yes(1), + DiscordActivityJoinRequestReply_Ignore(2); + + @Getter + private final int value; + private EDiscordActivityJoinRequestReply(int value) { + this.value = value; + } + + private static final Map<Integer,EDiscordActivityJoinRequestReply> valueMap = new HashMap<>(); + static { + for (EDiscordActivityJoinRequestReply value : values()) { + valueMap.put(value.value, value); + } + } + + public static EDiscordActivityJoinRequestReply fromValue(int value) { + return valueMap.get(value); + } + + public static class EDiscordActivityJoinRequestReplyTypeConverter implements TypeConverter { + @Override + public Object fromNative(Object nativeValue, FromNativeContext context) { + return EDiscordActivityJoinRequestReply.fromValue((Integer)nativeValue); + } + + @Override + public Object toNative(Object value, ToNativeContext context) { + if (value == null) return 0; + return ((EDiscordActivityJoinRequestReply)value).getValue(); + } + + @Override + public Class nativeType() { + return Integer.class; + } + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordActivityType.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordActivityType.java new file mode 100644 index 00000000..9328758a --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordActivityType.java @@ -0,0 +1,69 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration; + +import com.sun.jna.FromNativeContext; +import com.sun.jna.ToNativeContext; +import com.sun.jna.TypeConverter; +import lombok.Getter; + +import java.util.HashMap; +import java.util.Map; + +public enum EDiscordActivityType { + DiscordActivityType_Playing(0), + DiscordActivityType_Streaming(1), + DiscordActivityType_Listening(2), + DiscordActivityType_Watching(3); + + @Getter + private final int value; + private EDiscordActivityType(int value) { + this.value = value; + } + + private static final Map<Integer,EDiscordActivityType> valueMap = new HashMap<>(); + static { + for (EDiscordActivityType value : values()) { + valueMap.put(value.value, value); + } + } + + public static EDiscordActivityType fromValue(int value) { + return valueMap.get(value); + } + + public static class EDiscordActivityTypeTypeConverter implements TypeConverter { + @Override + public Object fromNative(Object nativeValue, FromNativeContext context) { + return EDiscordActivityType.fromValue((Integer)nativeValue); + } + + @Override + public Object toNative(Object value, ToNativeContext context) { + if (value == null) return 0; + return ((EDiscordActivityType)value).getValue(); + } + + @Override + public Class nativeType() { + return Integer.class; + } + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordCreateFlags.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordCreateFlags.java new file mode 100644 index 00000000..29598b47 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordCreateFlags.java @@ -0,0 +1,67 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration; + +import com.sun.jna.FromNativeContext; +import com.sun.jna.ToNativeContext; +import com.sun.jna.TypeConverter; +import lombok.Getter; + +import java.util.HashMap; +import java.util.Map; + +public enum EDiscordCreateFlags { + DiscordCreateFlags_Default(0), + DiscordCreateFlags_NoRequireDiscord(1); + + @Getter + private final int value; + private EDiscordCreateFlags(int value) { + this.value = value; + } + + private static final Map<Integer,EDiscordCreateFlags> valueMap = new HashMap<>(); + static { + for (EDiscordCreateFlags value : values()) { + valueMap.put(value.value, value); + } + } + + public static EDiscordCreateFlags fromValue(int value) { + return valueMap.get(value); + } + + public static class EDiscordCreateFlagsTypeConverter implements TypeConverter { + @Override + public Object fromNative(Object nativeValue, FromNativeContext context) { + return EDiscordCreateFlags.fromValue((Integer)nativeValue); + } + + @Override + public Object toNative(Object value, ToNativeContext context) { + if (value == null) return 0; + return ((EDiscordCreateFlags)value).getValue(); + } + + @Override + public Class nativeType() { + return Integer.class; + } + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordEntitlementType.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordEntitlementType.java new file mode 100644 index 00000000..d155fbc6 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordEntitlementType.java @@ -0,0 +1,72 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration; + +import com.sun.jna.FromNativeContext; +import com.sun.jna.ToNativeContext; +import com.sun.jna.TypeConverter; +import lombok.Getter; + +import java.util.HashMap; +import java.util.Map; + +public enum EDiscordEntitlementType { + DiscordEntitlementType_Purchase(1), + DiscordEntitlementType_PremiumSubscription(2), + DiscordEntitlementType_DeveloperGift(3), + DiscordEntitlementType_TestModePurchase(4), + DiscordEntitlementType_FreePurchase(5), + DiscordEntitlementType_UserGift(6), + DiscordEntitlementType_PremiumPurchase(7); + + @Getter + private final int value; + private EDiscordEntitlementType(int value) { + this.value = value; + } + + private static final Map<Integer,EDiscordEntitlementType> valueMap = new HashMap<>(); + static { + for (EDiscordEntitlementType value : values()) { + valueMap.put(value.value, value); + } + } + + public static EDiscordEntitlementType fromValue(int value) { + return valueMap.get(value); + } + + public static class EDiscordEntitlementTypeTypeConverter implements TypeConverter { + @Override + public Object fromNative(Object nativeValue, FromNativeContext context) { + return EDiscordEntitlementType.fromValue((Integer)nativeValue); + } + + @Override + public Object toNative(Object value, ToNativeContext context) { + if (value == null) return 0; + return ((EDiscordEntitlementType)value).getValue(); + } + + @Override + public Class nativeType() { + return Integer.class; + } + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordImageType.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordImageType.java new file mode 100644 index 00000000..db4258db --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordImageType.java @@ -0,0 +1,66 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration; + +import com.sun.jna.FromNativeContext; +import com.sun.jna.ToNativeContext; +import com.sun.jna.TypeConverter; +import lombok.Getter; + +import java.util.HashMap; +import java.util.Map; + +public enum EDiscordImageType { + DiscordImageType_User(0); + + @Getter + private final int value; + private EDiscordImageType(int value) { + this.value = value; + } + + private static final Map<Integer,EDiscordImageType> valueMap = new HashMap<>(); + static { + for (EDiscordImageType value : values()) { + valueMap.put(value.value, value); + } + } + + public static EDiscordImageType fromValue(int value) { + return valueMap.get(value); + } + + public static class EDiscordImageTypeTypeConverter implements TypeConverter { + @Override + public Object fromNative(Object nativeValue, FromNativeContext context) { + return EDiscordImageType.fromValue((Integer)nativeValue); + } + + @Override + public Object toNative(Object value, ToNativeContext context) { + + if (value == null) return 0;return ((EDiscordImageType)value).getValue(); + } + + @Override + public Class nativeType() { + return Integer.class; + } + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordInputModeType.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordInputModeType.java new file mode 100644 index 00000000..1cc49b7e --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordInputModeType.java @@ -0,0 +1,67 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration; + +import com.sun.jna.FromNativeContext; +import com.sun.jna.ToNativeContext; +import com.sun.jna.TypeConverter; +import lombok.Getter; + +import java.util.HashMap; +import java.util.Map; + +public enum EDiscordInputModeType { + DiscordInputModeType_VoiceActivity(0), + DiscordInputModeType_PushToTalk(1); + + @Getter + private final int value; + private EDiscordInputModeType(int value) { + this.value = value; + } + + private static final Map<Integer,EDiscordInputModeType> valueMap = new HashMap<>(); + static { + for (EDiscordInputModeType value : values()) { + valueMap.put(value.value, value); + } + } + + public static EDiscordInputModeType fromValue(int value) { + return valueMap.get(value); + } + + public static class EDiscordInputModeTypeTypeConverter implements TypeConverter { + @Override + public Object fromNative(Object nativeValue, FromNativeContext context) { + return EDiscordInputModeType.fromValue((Integer)nativeValue); + } + + @Override + public Object toNative(Object value, ToNativeContext context) { + if (value == null) return 0; + return ((EDiscordInputModeType)value).getValue(); + } + + @Override + public Class nativeType() { + return Integer.class; + } + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordLobbySearchCast.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordLobbySearchCast.java new file mode 100644 index 00000000..5bd97267 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordLobbySearchCast.java @@ -0,0 +1,67 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration; + +import com.sun.jna.FromNativeContext; +import com.sun.jna.ToNativeContext; +import com.sun.jna.TypeConverter; +import lombok.Getter; + +import java.util.HashMap; +import java.util.Map; + +public enum EDiscordLobbySearchCast { + DiscordLobbySearchCast_String(1), + DiscordLobbySearchCast_Number(2); + + @Getter + private final int value; + private EDiscordLobbySearchCast(int value) { + this.value = value; + } + + private static final Map<Integer,EDiscordLobbySearchCast> valueMap = new HashMap<>(); + static { + for (EDiscordLobbySearchCast value : values()) { + valueMap.put(value.value, value); + } + } + + public static EDiscordLobbySearchCast fromValue(int value) { + return valueMap.get(value); + } + + public static class EDiscordLobbySearchCastTypeConverter implements TypeConverter { + @Override + public Object fromNative(Object nativeValue, FromNativeContext context) { + return EDiscordLobbySearchCast.fromValue((Integer)nativeValue); + } + + @Override + public Object toNative(Object value, ToNativeContext context) { + if (value == null) return 0; + return ((EDiscordLobbySearchCast)value).getValue(); + } + + @Override + public Class nativeType() { + return Integer.class; + } + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordLobbySearchComparison.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordLobbySearchComparison.java new file mode 100644 index 00000000..5cc8f934 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordLobbySearchComparison.java @@ -0,0 +1,71 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration; + +import com.sun.jna.FromNativeContext; +import com.sun.jna.ToNativeContext; +import com.sun.jna.TypeConverter; +import lombok.Getter; + +import java.util.HashMap; +import java.util.Map; + +public enum EDiscordLobbySearchComparison { + DiscordLobbySearchComparison_LessThanOrEqual(-2), + DiscordLobbySearchComparison_LessThan(-1), + DiscordLobbySearchComparison_Equal(0), + DiscordLobbySearchComparison_GreaterThan(1), + DiscordLobbySearchComparison_GreaterThanOrEqual(2), + DiscordLobbySearchComparison_NotEqual(3); + + @Getter + private final int value; + private EDiscordLobbySearchComparison(int value) { + this.value = value; + } + + private static final Map<Integer,EDiscordLobbySearchComparison> valueMap = new HashMap<>(); + static { + for (EDiscordLobbySearchComparison value : values()) { + valueMap.put(value.value, value); + } + } + + public static EDiscordLobbySearchComparison fromValue(int value) { + return valueMap.get(value); + } + + public static class EDiscordLobbySearchComparisonTypeConverter implements TypeConverter { + @Override + public Object fromNative(Object nativeValue, FromNativeContext context) { + return EDiscordLobbySearchComparison.fromValue((Integer)nativeValue); + } + + @Override + public Object toNative(Object value, ToNativeContext context) { + if (value == null) return 0; + return ((EDiscordLobbySearchComparison)value).getValue(); + } + + @Override + public Class nativeType() { + return Integer.class; + } + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordLobbySearchDistance.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordLobbySearchDistance.java new file mode 100644 index 00000000..e8a920ea --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordLobbySearchDistance.java @@ -0,0 +1,69 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration; + +import com.sun.jna.FromNativeContext; +import com.sun.jna.ToNativeContext; +import com.sun.jna.TypeConverter; +import lombok.Getter; + +import java.util.HashMap; +import java.util.Map; + +public enum EDiscordLobbySearchDistance { + DiscordLobbySearchDistance_Local(0), + DiscordLobbySearchDistance_Default(1), + DiscordLobbySearchDistance_Extended(2), + DiscordLobbySearchDistance_Global(3); + + @Getter + private final int value; + private EDiscordLobbySearchDistance(int value) { + this.value = value; + } + + private static final Map<Integer,EDiscordLobbySearchDistance> valueMap = new HashMap<>(); + static { + for (EDiscordLobbySearchDistance value : values()) { + valueMap.put(value.value, value); + } + } + + public static EDiscordLobbySearchDistance fromValue(int value) { + return valueMap.get(value); + } + + public static class EDiscordLobbySearchDistanceTypeConverter implements TypeConverter { + @Override + public Object fromNative(Object nativeValue, FromNativeContext context) { + return EDiscordLobbySearchDistance.fromValue((Integer)nativeValue); + } + + @Override + public Object toNative(Object value, ToNativeContext context) { + if (value == null) return 0; + return ((EDiscordLobbySearchDistance)value).getValue(); + } + + @Override + public Class nativeType() { + return Integer.class; + } + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordLobbyType.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordLobbyType.java new file mode 100644 index 00000000..d8353d59 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordLobbyType.java @@ -0,0 +1,67 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration; + +import com.sun.jna.FromNativeContext; +import com.sun.jna.ToNativeContext; +import com.sun.jna.TypeConverter; +import lombok.Getter; + +import java.util.HashMap; +import java.util.Map; + +public enum EDiscordLobbyType { + DiscordLobbyType_Private(1), + DiscordLobbyType_Public(2); + + @Getter + private final int value; + private EDiscordLobbyType(int value) { + this.value = value; + } + + private static final Map<Integer,EDiscordLobbyType> valueMap = new HashMap<>(); + static { + for (EDiscordLobbyType value : values()) { + valueMap.put(value.value, value); + } + } + + public static EDiscordLobbyType fromValue(int value) { + return valueMap.get(value); + } + + public static class EDiscordLobbyTypeTypeConverter implements TypeConverter { + @Override + public Object fromNative(Object nativeValue, FromNativeContext context) { + return EDiscordLobbyType.fromValue((Integer)nativeValue); + } + + @Override + public Object toNative(Object value, ToNativeContext context) { + + if (value == null) return 0;return ((EDiscordLobbyType)value).getValue(); + } + + @Override + public Class nativeType() { + return Integer.class; + } + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordLogLevel.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordLogLevel.java new file mode 100644 index 00000000..0fa0f3ab --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordLogLevel.java @@ -0,0 +1,69 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration; + +import com.sun.jna.FromNativeContext; +import com.sun.jna.ToNativeContext; +import com.sun.jna.TypeConverter; +import lombok.Getter; + +import java.util.HashMap; +import java.util.Map; + +public enum EDiscordLogLevel { + DiscordLogLevel_Error(1), + DiscordLogLevel_Warn(2), + DiscordLogLevel_Info(3), + DiscordLogLevel_Debug(4); + + @Getter + private final int value; + private EDiscordLogLevel(int value) { + this.value = value; + } + + private static final Map<Integer,EDiscordLogLevel> valueMap = new HashMap<>(); + static { + for (EDiscordLogLevel value : values()) { + valueMap.put(value.value, value); + } + } + + public static EDiscordLogLevel fromValue(int value) { + return valueMap.get(value); + } + + public static class EDiscordLogLevelTypeConverter implements TypeConverter { + @Override + public Object fromNative(Object nativeValue, FromNativeContext context) { + return EDiscordLogLevel.fromValue((Integer)nativeValue); + } + + @Override + public Object toNative(Object value, ToNativeContext context) { + + if (value == null) return 0;return ((EDiscordLogLevel)value).getValue(); + } + + @Override + public Class nativeType() { + return Integer.class; + } + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordPremiumType.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordPremiumType.java new file mode 100644 index 00000000..4ca426d5 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordPremiumType.java @@ -0,0 +1,68 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration; + +import com.sun.jna.FromNativeContext; +import com.sun.jna.ToNativeContext; +import com.sun.jna.TypeConverter; +import lombok.Getter; + +import java.util.HashMap; +import java.util.Map; + +public enum EDiscordPremiumType { + DiscordPremiumType_None(0), + DiscordPremiumType_Tier1(1), + DiscordPremiumType_Tier2(2); + + @Getter + private final int value; + private EDiscordPremiumType(int value) { + this.value = value; + } + + private static final Map<Integer,EDiscordPremiumType> valueMap = new HashMap<>(); + static { + for (EDiscordPremiumType value : values()) { + valueMap.put(value.value, value); + } + } + + public static EDiscordPremiumType fromValue(int value) { + return valueMap.get(value); + } + + public static class EDiscordPremiumTypeTypeConverter implements TypeConverter { + @Override + public Object fromNative(Object nativeValue, FromNativeContext context) { + return EDiscordPremiumType.fromValue((Integer)nativeValue); + } + + @Override + public Object toNative(Object value, ToNativeContext context) { + if (value == null) return 0; + return ((EDiscordPremiumType)value).getValue(); + } + + @Override + public Class nativeType() { + return Integer.class; + } + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordRelationshipType.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordRelationshipType.java new file mode 100644 index 00000000..b2edb714 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordRelationshipType.java @@ -0,0 +1,71 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration; + +import com.sun.jna.FromNativeContext; +import com.sun.jna.ToNativeContext; +import com.sun.jna.TypeConverter; +import lombok.Getter; + +import java.util.HashMap; +import java.util.Map; + +public enum EDiscordRelationshipType { + DiscordRelationshipType_None(0), + DiscordRelationshipType_Friend(1), + DiscordRelationshipType_Blocked(2), + DiscordRelationshipType_PendingIncoming(3), + DiscordRelationshipType_PendingOutgoing(4), + DiscordRelationshipType_Implicit(5); + + @Getter + private final int value; + private EDiscordRelationshipType(int value) { + this.value = value; + } + + private static final Map<Integer,EDiscordRelationshipType> valueMap = new HashMap<>(); + static { + for (EDiscordRelationshipType value : values()) { + valueMap.put(value.value, value); + } + } + + public static EDiscordRelationshipType fromValue(int value) { + return valueMap.get(value); + } + + public static class EDiscordRelationshipTypeTypeConverter implements TypeConverter { + @Override + public Object fromNative(Object nativeValue, FromNativeContext context) { + return EDiscordRelationshipType.fromValue((Integer)nativeValue); + } + + @Override + public Object toNative(Object value, ToNativeContext context) { + if (value == null) return 0; + return ((EDiscordRelationshipType)value).getValue(); + } + + @Override + public Class nativeType() { + return Integer.class; + } + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordResult.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordResult.java new file mode 100644 index 00000000..cb0541bf --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordResult.java @@ -0,0 +1,109 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration; + +import com.sun.jna.FromNativeContext; +import com.sun.jna.ToNativeContext; +import com.sun.jna.TypeConverter; +import lombok.Getter; + +import java.util.HashMap; +import java.util.Map; + +public enum EDiscordResult { + DiscordResult_Ok(0), + DiscordResult_ServiceUnavailable(1), + DiscordResult_InvalidVersion(2), + DiscordResult_LockFailed(3), + DiscordResult_InternalError(4), + DiscordResult_InvalidPayload(5), + DiscordResult_InvalidCommand(6), + DiscordResult_InvalidPermissions(7), + DiscordResult_NotFetched(8), + DiscordResult_NotFound(9), + DiscordResult_Conflict(10), + DiscordResult_InvalidSecret(11), + DiscordResult_InvalidJoinSecret(12), + DiscordResult_NoEligibleActivity(13), + DiscordResult_InvalidInvite(14), + DiscordResult_NotAuthenticated(15), + DiscordResult_InvalidAccessToken(16), + DiscordResult_ApplicationMismatch(17), + DiscordResult_InvalidDataUrl(18), + DiscordResult_InvalidBase64(19), + DiscordResult_NotFiltered(20), + DiscordResult_LobbyFull(21), + DiscordResult_InvalidLobbySecret(22), + DiscordResult_InvalidFilename(23), + DiscordResult_InvalidFileSize(24), + DiscordResult_InvalidEntitlement(25), + DiscordResult_NotInstalled(26), + DiscordResult_NotRunning(27), + DiscordResult_InsufficientBuffer(28), + DiscordResult_PurchaseCanceled(29), + DiscordResult_InvalidGuild(30), + DiscordResult_InvalidEvent(31), + DiscordResult_InvalidChannel(32), + DiscordResult_InvalidOrigin(33), + DiscordResult_RateLimited(34), + DiscordResult_OAuth2Error(35), + DiscordResult_SelectChannelTimeout(36), + DiscordResult_GetGuildTimeout(37), + DiscordResult_SelectVoiceForceRequired(38), + DiscordResult_CaptureShortcutAlreadyListening(39), + DiscordResult_UnauthorizedForAchievement(40), + DiscordResult_InvalidGiftCode(41), + DiscordResult_PurchaseError(42), + DiscordResult_TransactionAborted(43); + + @Getter + private final int value; + private EDiscordResult(int value) { + this.value = value; + } + + private static final Map<Integer,EDiscordResult> valueMap = new HashMap<>(); + static { + for (EDiscordResult value : values()) { + valueMap.put(value.value, value); + } + } + + public static EDiscordResult fromValue(int value) { + return valueMap.get(value); + } + + public static class EDiscordResultTypeConverter implements TypeConverter { + @Override + public Object fromNative(Object nativeValue, FromNativeContext context) { + return EDiscordResult.fromValue((Integer)nativeValue); + } + + @Override + public Object toNative(Object value, ToNativeContext context) { + if (value == null) return 0; + return ((EDiscordResult)value).getValue(); + } + + @Override + public Class nativeType() { + return Integer.class; + } + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordSkuType.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordSkuType.java new file mode 100644 index 00000000..ba174a17 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordSkuType.java @@ -0,0 +1,69 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration; + +import com.sun.jna.FromNativeContext; +import com.sun.jna.ToNativeContext; +import com.sun.jna.TypeConverter; +import lombok.Getter; + +import java.util.HashMap; +import java.util.Map; + +public enum EDiscordSkuType { + DiscordSkuType_Application(1), + DiscordSkuType_DLC(2), + DiscordSkuType_Consumable(3), + DiscordSkuType_Bundle(4); + + @Getter + private final int value; + private EDiscordSkuType(int value) { + this.value = value; + } + + private static final Map<Integer,EDiscordSkuType> valueMap = new HashMap<>(); + static { + for (EDiscordSkuType value : values()) { + valueMap.put(value.value, value); + } + } + + public static EDiscordSkuType fromValue(int value) { + return valueMap.get(value); + } + + public static class EDiscordSkuTypeTypeConverter implements TypeConverter { + @Override + public Object fromNative(Object nativeValue, FromNativeContext context) { + return EDiscordSkuType.fromValue((Integer)nativeValue); + } + + @Override + public Object toNative(Object value, ToNativeContext context) { + + if (value == null) return 0;return ((EDiscordSkuType)value).getValue(); + } + + @Override + public Class nativeType() { + return Integer.class; + } + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordStatus.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordStatus.java new file mode 100644 index 00000000..b788aa62 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordStatus.java @@ -0,0 +1,69 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration; + +import com.sun.jna.FromNativeContext; +import com.sun.jna.ToNativeContext; +import com.sun.jna.TypeConverter; +import lombok.Getter; + +import java.util.HashMap; +import java.util.Map; + +public enum EDiscordStatus { + DiscordStatus_Offline(0), + DiscordStatus_Online(1), + DiscordStatus_Idle(2), + DiscordStatus_DoNotDisturb(3); + + @Getter + private final int value; + private EDiscordStatus(int value) { + this.value = value; + } + + private static final Map<Integer,EDiscordStatus> valueMap = new HashMap<>(); + static { + for (EDiscordStatus value : values()) { + valueMap.put(value.value, value); + } + } + + public static EDiscordStatus fromValue(int value) { + return valueMap.get(value); + } + + public static class EDiscordStatusTypeConverter implements TypeConverter { + @Override + public Object fromNative(Object nativeValue, FromNativeContext context) { + return EDiscordStatus.fromValue((Integer)nativeValue); + } + + @Override + public Object toNative(Object value, ToNativeContext context) { + + if (value == null) return 0;return ((EDiscordStatus)value).getValue(); + } + + @Override + public Class nativeType() { + return Integer.class; + } + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordUserFlag.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordUserFlag.java new file mode 100644 index 00000000..242e5f1e --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/enumuration/EDiscordUserFlag.java @@ -0,0 +1,70 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration; + +import com.sun.jna.FromNativeContext; +import com.sun.jna.ToNativeContext; +import com.sun.jna.TypeConverter; +import lombok.Getter; + +import java.util.HashMap; +import java.util.Map; + +public enum EDiscordUserFlag { + DiscordUserFlag_Partner(2), + DiscordUserFlag_HypeSquadEvents(4), + DiscordUserFlag_HypeSquadHouse1(64), + DiscordUserFlag_HypeSquadHouse2(128), + DiscordUserFlag_HypeSquadHouse3(256); + + @Getter + private final int value; + private EDiscordUserFlag(int value) { + this.value = value; + } + + private static final Map<Integer,EDiscordUserFlag> valueMap = new HashMap<>(); + static { + for (EDiscordUserFlag value : values()) { + valueMap.put(value.value, value); + } + } + + public static EDiscordUserFlag fromValue(int value) { + return valueMap.get(value); + } + + public static class EDiscordUserFlagTypeConverter implements TypeConverter { + @Override + public Object fromNative(Object nativeValue, FromNativeContext context) { + return EDiscordUserFlag.fromValue((Integer)nativeValue); + } + + @Override + public Object toNative(Object value, ToNativeContext context) { + if (value == null) return 0; + return ((EDiscordUserFlag)value).getValue(); + } + + @Override + public Class nativeType() { + return Integer.class; + } + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/GameSDKCallback.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/GameSDKCallback.java new file mode 100644 index 00000000..6f139163 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/GameSDKCallback.java @@ -0,0 +1,30 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.interfacestruct; + +import com.sun.jna.Callback; +import com.sun.jna.Library; +import kr.syeyoung.dungeonsguide.gamesdk.jna.GameSDKTypeMapper; + +import java.util.Collections; +import java.util.Map; + +public interface GameSDKCallback extends Callback { + public static final Map<String, Object> OPTIONS = Collections.singletonMap(Library.OPTION_TYPE_MAPPER, GameSDKTypeMapper.INSTANCE); +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordAchievementEvents.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordAchievementEvents.java new file mode 100644 index 00000000..6cfd19cd --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordAchievementEvents.java @@ -0,0 +1,35 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.interfacestruct; + +import com.sun.jna.Callback; +import com.sun.jna.Structure; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordStruct; +import com.sun.jna.Pointer; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordUserAchievement; + +public class IDiscordAchievementEvents extends DiscordStruct { public IDiscordAchievementEvents() {super();} public IDiscordAchievementEvents(Pointer pointer) {super(pointer);} + public interface OnUserAchievementUpdateCallback extends GameSDKCallback { void onUserAchievementUpdate(Pointer eventData, DiscordUserAchievement userAchievement); } + public OnUserAchievementUpdateCallback OnUserAchievementUpdate; + + + + public static class ByReference extends IDiscordAchievementEvents implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends IDiscordAchievementEvents implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordAchievementManager.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordAchievementManager.java new file mode 100644 index 00000000..2103cf67 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordAchievementManager.java @@ -0,0 +1,53 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.interfacestruct; + +import com.sun.jna.Callback; +import com.sun.jna.Structure; +import com.sun.jna.ptr.IntByReference; +import kr.syeyoung.dungeonsguide.gamesdk.jna.NativeGameSDK; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordStruct; +import com.sun.jna.Pointer; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.EDiscordResult; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.Int32; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.UInt8; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.DiscordSnowflake; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordUserAchievement; + +public class IDiscordAchievementManager extends DiscordStruct { public IDiscordAchievementManager() {super();} public IDiscordAchievementManager(Pointer pointer) {super(pointer);} + public interface SetUserAchievementCallback extends GameSDKCallback { void setUserAchievement(IDiscordAchievementManager manager, DiscordSnowflake achievementId, UInt8 percentComplete, Pointer callbackData, NativeGameSDK.DiscordCallback callback); } + public SetUserAchievementCallback SetUserAchievement; + + public interface FetchUserAchievementsCallback extends GameSDKCallback { void fetchUserAchievements(IDiscordAchievementManager manager, Pointer callbackData, NativeGameSDK.DiscordCallback callback); } + public FetchUserAchievementsCallback FetchUserAchievements; + + public interface CountUserAchievementsCallback extends GameSDKCallback { void countUserAchievements(IDiscordAchievementManager manager, IntByReference count); } + public CountUserAchievementsCallback CountUserAchievements; + + public interface GetUserAchievementCallback extends GameSDKCallback { EDiscordResult getUserAchievement(IDiscordAchievementManager manager, DiscordSnowflake userAchievementId, DiscordUserAchievement userAchievement); } + public GetUserAchievementCallback GetUserAchievement; + + public interface GetUserAchievementAtCallback extends GameSDKCallback { EDiscordResult getUserAchievementAt(IDiscordAchievementManager manager, Int32 index, DiscordUserAchievement userAchievement); } + public GetUserAchievementAtCallback GetUserAchievementAt; + + + + public static class ByReference extends IDiscordAchievementManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends IDiscordAchievementManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordActivityEvents.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordActivityEvents.java new file mode 100644 index 00000000..26819edd --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordActivityEvents.java @@ -0,0 +1,46 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.interfacestruct; + +import com.sun.jna.Callback; +import com.sun.jna.Structure; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordStruct; +import com.sun.jna.Pointer; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.EDiscordActivityActionType; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordActivity; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordUser; + +public class IDiscordActivityEvents extends DiscordStruct { public IDiscordActivityEvents() {super();} public IDiscordActivityEvents(Pointer pointer) {super(pointer);} + public interface OnActivityJoinCallback extends GameSDKCallback { void onActivityJoin(Pointer eventData, String secret); } + public OnActivityJoinCallback OnActivityJoin; + + public interface OnActivitySpectateCallback extends GameSDKCallback { void onActivitySpectate(Pointer eventData, String secret); } + public OnActivitySpectateCallback OnActivitySpectate; + + public interface OnActivityJoinRequestCallback extends GameSDKCallback { void onActivityJoinRequest(Pointer eventData, DiscordUser user); } + public OnActivityJoinRequestCallback OnActivityJoinRequest; + + public interface OnActivityInviteCallback extends GameSDKCallback { void onActivityInvite(Pointer eventData, EDiscordActivityActionType type, DiscordUser user, DiscordActivity activity); } + public OnActivityInviteCallback OnActivityInvite; + + + + public static class ByReference extends IDiscordActivityEvents implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends IDiscordActivityEvents implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordActivityManager.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordActivityManager.java new file mode 100644 index 00000000..3c1f3c34 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordActivityManager.java @@ -0,0 +1,59 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.interfacestruct; + +import com.sun.jna.Callback; +import com.sun.jna.Structure; +import kr.syeyoung.dungeonsguide.gamesdk.jna.NativeGameSDK; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordStruct; +import com.sun.jna.Pointer; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.EDiscordActivityActionType; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.EDiscordResult; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.UInt32; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordActivity; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.DiscordSnowflake; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.EDiscordActivityJoinRequestReply; + +public class IDiscordActivityManager extends DiscordStruct { public IDiscordActivityManager() {super();} public IDiscordActivityManager(Pointer pointer) {super(pointer);} + public interface RegisterCommandCallback extends GameSDKCallback { EDiscordResult registerCommand(IDiscordActivityManager manager, String command); } + public RegisterCommandCallback RegisterCommand; + + public interface RegisterSteamCallback extends GameSDKCallback { EDiscordResult registerSteam(IDiscordActivityManager manager, UInt32 steamId); } + public RegisterSteamCallback RegisterSteam; + + public interface UpdateActivityCallback extends GameSDKCallback { void updateActivity(IDiscordActivityManager manager, DiscordActivity activity, Pointer callbackData, NativeGameSDK.DiscordCallback callback); } + public UpdateActivityCallback UpdateActivity; + + public interface ClearActivityCallback extends GameSDKCallback { void clearActivity(IDiscordActivityManager manager, Pointer callbackData, NativeGameSDK.DiscordCallback callback); } + public ClearActivityCallback ClearActivity; + + public interface SendRequestReplyCallback extends GameSDKCallback { void sendRequestReply(IDiscordActivityManager manager, DiscordSnowflake userId, EDiscordActivityJoinRequestReply reply, Pointer callbackData, NativeGameSDK.DiscordCallback callback); } + public SendRequestReplyCallback SendRequestReply; + + public interface SendInviteCallback extends GameSDKCallback { void sendInvite(IDiscordActivityManager manager, DiscordSnowflake userId, EDiscordActivityActionType type, String content, Pointer callbackData, NativeGameSDK.DiscordCallback callback); } + public SendInviteCallback SendInvite; + + public interface AcceptInviteCallback extends GameSDKCallback { void acceptInvite(IDiscordActivityManager manager, DiscordSnowflake userId, Pointer callbackData, NativeGameSDK.DiscordCallback callback); } + public AcceptInviteCallback AcceptInvite; + + + + public static class ByReference extends IDiscordActivityManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends IDiscordActivityManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordApplicationManager.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordApplicationManager.java new file mode 100644 index 00000000..294c2161 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordApplicationManager.java @@ -0,0 +1,56 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.interfacestruct; + +import com.sun.jna.Callback; +import com.sun.jna.Structure; +import kr.syeyoung.dungeonsguide.gamesdk.jna.NativeGameSDK; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordStruct; +import com.sun.jna.Pointer; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.EDiscordResult; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordOAuth2Token; + +public class IDiscordApplicationManager extends DiscordStruct { public IDiscordApplicationManager() {super();} public IDiscordApplicationManager(Pointer pointer) {super(pointer);} + public interface ValidateOrExitCallback extends GameSDKCallback { void validateOrExit(IDiscordApplicationManager manager, Pointer callbackData, NativeGameSDK.DiscordCallback callback); } + public ValidateOrExitCallback ValidateOrExit; + + public interface GetCurrentLocaleCallback extends GameSDKCallback { void getCurrentLocale(IDiscordApplicationManager manager, Pointer locale); } // len 128 memory + public GetCurrentLocaleCallback GetCurrentLocale; + + public interface GetCurrentBranchCallback extends GameSDKCallback { void getCurrentBranch(IDiscordApplicationManager manager, Pointer branch); } // len 4096 mem + public GetCurrentBranchCallback GetCurrentBranch; + + public interface GetOauth2TokenCallback extends GameSDKCallback { void getOauth2Token(IDiscordApplicationManager manager, Pointer callbackData, GetOauth2TokenCallback_Callback callback); } + public interface GetOauth2TokenCallback_Callback extends GameSDKCallback { + void callback(Pointer callbackData, EDiscordResult result, DiscordOAuth2Token oauthToken); + } + + public GetOauth2TokenCallback GetOauth2Token; + + public interface GetTicketCallback extends GameSDKCallback { void getTicket(IDiscordApplicationManager manager, Pointer callbackData, GetTicketCallback_Callback callback); } + public interface GetTicketCallback_Callback extends GameSDKCallback { + void callback(Pointer callbackData, EDiscordResult result, String data); + } + public GetTicketCallback GetTicket; + + + + public static class ByReference extends IDiscordApplicationManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends IDiscordApplicationManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordCore.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordCore.java new file mode 100644 index 00000000..ccc4abdf --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordCore.java @@ -0,0 +1,87 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.interfacestruct; + +import com.sun.jna.Callback; +import com.sun.jna.Structure; +import com.sun.jna.TypeMapper; +import kr.syeyoung.dungeonsguide.gamesdk.jna.GameSDKTypeMapper; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordStruct; +import com.sun.jna.Pointer; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.EDiscordLogLevel; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.EDiscordResult; + +public class IDiscordCore extends DiscordStruct { public IDiscordCore() {super();} public IDiscordCore(Pointer pointer) {super(pointer);} + + public static final TypeMapper TYPE_MAPPER = GameSDKTypeMapper.INSTANCE; + public interface DestroyCallback extends GameSDKCallback { void destroy(IDiscordCore core); } + public DestroyCallback Destroy; + + public interface RunCallbacksCallback extends GameSDKCallback { EDiscordResult runCallbacks(IDiscordCore core); } + public RunCallbacksCallback RunCallbacks; + + public interface SetLogHookCallback extends GameSDKCallback { void setLogHook(IDiscordCore core, EDiscordLogLevel minLevel, Pointer hookData, LogHook hook); } + public interface LogHook extends GameSDKCallback { + void hook(Pointer hookData, EDiscordLogLevel level, String message); + } + public SetLogHookCallback SetLogHook; + + public interface GetApplicationManagerCallback extends GameSDKCallback { IDiscordApplicationManager getApplicationManager(IDiscordCore core); } + public GetApplicationManagerCallback GetApplicationManager; + + public interface GetUserManagerCallback extends GameSDKCallback { IDiscordUserManager getUserManager(IDiscordCore core); } + public GetUserManagerCallback GetUserManager; + + public interface GetImageManagerCallback extends GameSDKCallback { IDiscordImageManager getImageManager(IDiscordCore core); } + public GetImageManagerCallback GetImageManager; + + public interface GetActivityManagerCallback extends GameSDKCallback { IDiscordActivityManager getActivityManager(IDiscordCore core); } + public GetActivityManagerCallback GetActivityManager; + + public interface GetRelationshipManagerCallback extends GameSDKCallback { IDiscordRelationshipManager getRelationshipManager(IDiscordCore core); } + public GetRelationshipManagerCallback GetRelationshipManager; + + public interface GetLobbyManagerCallback extends GameSDKCallback { IDiscordLobbyManager getLobbyManager(IDiscordCore core); } + public GetLobbyManagerCallback GetLobbyManager; + + public interface GetNetworkManagerCallback extends GameSDKCallback { IDiscordNetworkManager getNetworkManager(IDiscordCore core); } + public GetNetworkManagerCallback GetNetworkManager; + + public interface GetOverlayManagerCallback extends GameSDKCallback { IDiscordOverlayManager getOverlayManager(IDiscordCore core); } + public GetOverlayManagerCallback GetOverlayManager; + + public interface GetStorageManagerCallback extends GameSDKCallback { IDiscordStorageManager getStorageManager(IDiscordCore core); } + public GetStorageManagerCallback GetStorageManager; + + public interface GetStoreManagerCallback extends GameSDKCallback { IDiscordStoreManager getStoreManager(IDiscordCore core); } + public GetStoreManagerCallback GetStoreManager; + + public interface GetVoiceManagerCallback extends GameSDKCallback { IDiscordVoiceManager getVoiceManager(IDiscordCore core); } + public GetVoiceManagerCallback GetVoiceManager; + + public interface GetAchievementManagerCallback extends GameSDKCallback { IDiscordAchievementManager getAchievementManager(IDiscordCore core); } + public GetAchievementManagerCallback GetAchievementManager; + + + + public static class ByReference extends IDiscordCore implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);} + } + public static class ByValue extends IDiscordCore implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);} + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordImageManager.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordImageManager.java new file mode 100644 index 00000000..f400724f --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordImageManager.java @@ -0,0 +1,48 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.interfacestruct; + +import com.sun.jna.Callback; +import com.sun.jna.Structure; +import com.sun.jna.ptr.ByteByReference; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordStruct; +import com.sun.jna.Pointer; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.EDiscordResult; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordImageDimensions; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.UInt32; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordImageHandle; + +public class IDiscordImageManager extends DiscordStruct { public IDiscordImageManager() {super();} public IDiscordImageManager(Pointer pointer) {super(pointer);} + public interface FetchCallback_Callback extends GameSDKCallback { + void callback(Pointer callbackData, EDiscordResult result, DiscordImageHandle.ByValue handleResult); + } + public interface FetchCallback extends GameSDKCallback { void fetch(IDiscordImageManager manager, DiscordImageHandle.ByValue handle, boolean refresh, Pointer callbackData, FetchCallback_Callback callback); } + public FetchCallback Fetch; + + public interface GetDimensionsCallback extends GameSDKCallback { EDiscordResult getDimensions(IDiscordImageManager manager, DiscordImageHandle.ByValue handle, DiscordImageDimensions dimensions); } + public GetDimensionsCallback GetDimensions; + + public interface GetDataCallback extends GameSDKCallback { EDiscordResult getData(IDiscordImageManager manager, DiscordImageHandle.ByValue handle, ByteByReference data, UInt32 dataLength); } + public GetDataCallback GetData; + + + + public static class ByReference extends IDiscordImageManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends IDiscordImageManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordLobbyEvents.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordLobbyEvents.java new file mode 100644 index 00000000..879f89bc --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordLobbyEvents.java @@ -0,0 +1,59 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.interfacestruct; + +import com.sun.jna.Callback; +import com.sun.jna.Structure; +import com.sun.jna.ptr.ByteByReference; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordStruct; +import com.sun.jna.Pointer; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.UInt8; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.UInt32; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.Int64; + +public class IDiscordLobbyEvents extends DiscordStruct { public IDiscordLobbyEvents() {super();} public IDiscordLobbyEvents(Pointer pointer) {super(pointer);} + public interface OnLobbyUpdateCallback extends GameSDKCallback { void onLobbyUpdate(Pointer eventData, Int64 lobbyId); } + public OnLobbyUpdateCallback OnLobbyUpdate; + + public interface OnLobbyDeleteCallback extends GameSDKCallback { void onLobbyDelete(Pointer eventData, Int64 lobbyId, UInt32 reason); } + public OnLobbyDeleteCallback OnLobbyDelete; + + public interface OnMemberConnectCallback extends GameSDKCallback { void onMemberConnect(Pointer eventData, Int64 lobbyId, Int64 userId); } + public OnMemberConnectCallback OnMemberConnect; + + public interface OnMemberUpdateCallback extends GameSDKCallback { void onMemberUpdate(Pointer eventData, Int64 lobbyId, Int64 userId); } + public OnMemberUpdateCallback OnMemberUpdate; + + public interface OnMemberDisconnectCallback extends GameSDKCallback { void onMemberDisconnect(Pointer eventData, Int64 lobbyId, Int64 userId); } + public OnMemberDisconnectCallback OnMemberDisconnect; + + public interface OnLobbyMessageCallback extends GameSDKCallback { void onLobbyMessage(Pointer eventData, Int64 lobbyId, Int64 userId, ByteByReference data, UInt32 dataLength); } + public OnLobbyMessageCallback OnLobbyMessage; + + public interface OnSpeakingCallback extends GameSDKCallback { void onSpeaking(Pointer eventData, Int64 lobbyId, Int64 userId, boolean speaking); } + public OnSpeakingCallback OnSpeaking; + + public interface OnNetworkMessageCallback extends GameSDKCallback { void onNetworkMessage(Pointer eventData, Int64 lobbyId, Int64 userId, UInt8 channelId, ByteByReference data, UInt32 dataLength); } + public OnNetworkMessageCallback OnNetworkMessage; + + + + public static class ByReference extends IDiscordLobbyEvents implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends IDiscordLobbyEvents implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordLobbyManager.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordLobbyManager.java new file mode 100644 index 00000000..cbaac01b --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordLobbyManager.java @@ -0,0 +1,144 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.interfacestruct; + +import com.sun.jna.Callback; +import com.sun.jna.Structure; +import com.sun.jna.ptr.ByteByReference; +import com.sun.jna.ptr.IntByReference; +import kr.syeyoung.dungeonsguide.gamesdk.jna.NativeGameSDK; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordStruct; +import com.sun.jna.Pointer; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.EDiscordResult; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordLobby; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.Int32; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.UInt8; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.UInt32; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.DiscordSnowflake; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordUser; + +public class IDiscordLobbyManager extends DiscordStruct { public IDiscordLobbyManager() {super();} public IDiscordLobbyManager(Pointer pointer) {super(pointer);} + public interface GetLobbyCreateTransactionCallback extends GameSDKCallback { EDiscordResult getLobbyCreateTransaction(IDiscordLobbyManager manager, IDiscordLobbyTransaction transaction); } + public GetLobbyCreateTransactionCallback GetLobbyCreateTransaction; + + public interface GetLobbyUpdateTransactionCallback extends GameSDKCallback { EDiscordResult getLobbyUpdateTransaction(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, IDiscordLobbyTransaction transaction); } + public GetLobbyUpdateTransactionCallback GetLobbyUpdateTransaction; + + public interface GetMemberUpdateTransactionCallback extends GameSDKCallback { EDiscordResult getMemberUpdateTransaction(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, DiscordSnowflake userId, IDiscordLobbyMemberTransaction transaction); } + public GetMemberUpdateTransactionCallback GetMemberUpdateTransaction; + + public interface DiscordLobbyManagerCallback extends GameSDKCallback { + void callback(Pointer callbackData, EDiscordResult result, DiscordLobby lobby); + } + + public interface CreateLobbyCallback extends GameSDKCallback { void createLobby(IDiscordLobbyManager manager, IDiscordLobbyTransaction transaction, Pointer callbackData,DiscordLobbyManagerCallback callback); } + public CreateLobbyCallback CreateLobby; + + public interface UpdateLobbyCallback extends GameSDKCallback { void updateLobby(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, IDiscordLobbyTransaction transaction, Pointer callbackData, NativeGameSDK.DiscordCallback callback); } + public UpdateLobbyCallback UpdateLobby; + + public interface DeleteLobbyCallback extends GameSDKCallback { void deleteLobby(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, Pointer callbackData, NativeGameSDK.DiscordCallback callback); } + public DeleteLobbyCallback DeleteLobby; + + public interface ConnectLobbyCallback extends GameSDKCallback { void connectLobby(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, Pointer secret, Pointer callbackData, DiscordLobbyManagerCallback callback); }// secret 128 byte long str + public ConnectLobbyCallback ConnectLobby; + + public interface ConnectLobbyWithActivitySecretCallback extends GameSDKCallback { void connectLobbyWithActivitySecret(IDiscordLobbyManager manager, Pointer activitySecret, Pointer callbackData, DiscordLobbyManagerCallback callback); } // secret 128 byte long str + public ConnectLobbyWithActivitySecretCallback ConnectLobbyWithActivitySecret; + + public interface DisconnectLobbyCallback extends GameSDKCallback { void disconnectLobby(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, Pointer callbackData, NativeGameSDK.DiscordCallback callback); } + public DisconnectLobbyCallback DisconnectLobby; + + public interface GetLobbyCallback extends GameSDKCallback { EDiscordResult getLobby(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, DiscordLobby lobby); } + public GetLobbyCallback GetLobby; + + public interface GetLobbyActivitySecretCallback extends GameSDKCallback { EDiscordResult getLobbyActivitySecret(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, Pointer secret); } // pointer to char[128] + public GetLobbyActivitySecretCallback GetLobbyActivitySecret; + + public interface GetLobbyMetadataValueCallback extends GameSDKCallback { EDiscordResult getLobbyMetadataValue(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, Pointer key, Pointer value); } // key: char[256] value: pointer to char[4096] + public GetLobbyMetadataValueCallback GetLobbyMetadataValue; + + public interface GetLobbyMetadataKeyCallback extends GameSDKCallback { EDiscordResult getLobbyMetadataKey(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, Int32 index, Pointer key); }// key: pointer to char[256] + public GetLobbyMetadataKeyCallback GetLobbyMetadataKey; + + public interface LobbyMetadataCountCallback extends GameSDKCallback { EDiscordResult lobbyMetadataCount(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, IntByReference count); } + public LobbyMetadataCountCallback LobbyMetadataCount; + + public interface MemberCountCallback extends GameSDKCallback { EDiscordResult memberCount(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, IntByReference count); } + public MemberCountCallback MemberCount; + + public interface GetMemberUserIdCallback extends GameSDKCallback { EDiscordResult getMemberUserId(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, Int32 index, Pointer userId); } // userID: pointer to DiscordUserID + public GetMemberUserIdCallback GetMemberUserId; + + public interface GetMemberUserCallback extends GameSDKCallback { EDiscordResult getMemberUser(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, DiscordSnowflake userId, DiscordUser user); } + public GetMemberUserCallback GetMemberUser; + + public interface GetMemberMetadataValueCallback extends GameSDKCallback { EDiscordResult getMemberMetadataValue(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, DiscordSnowflake userId, Pointer key, Pointer value); }// key: char[256] value: pointer to char[4096] + public GetMemberMetadataValueCallback GetMemberMetadataValue; + + public interface GetMemberMetadataKeyCallback extends GameSDKCallback { EDiscordResult getMemberMetadataKey(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, DiscordSnowflake userId, Int32 index, Pointer key); }// key: pointer to char[256] + public GetMemberMetadataKeyCallback GetMemberMetadataKey; + + public interface MemberMetadataCountCallback extends GameSDKCallback { EDiscordResult memberMetadataCount(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, DiscordSnowflake userId, IntByReference count); } + public MemberMetadataCountCallback MemberMetadataCount; + + public interface UpdateMemberCallback extends GameSDKCallback { void updateMember(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, DiscordSnowflake userId, IDiscordLobbyMemberTransaction transaction, Pointer callbackData, NativeGameSDK.DiscordCallback callback); } + public UpdateMemberCallback UpdateMember; + + public interface SendLobbyMessageCallback extends GameSDKCallback { void sendLobbyMessage(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, ByteByReference data, UInt32 dataLength, Pointer callbackData, NativeGameSDK.DiscordCallback callback); } + public SendLobbyMessageCallback SendLobbyMessage; + + public interface GetSearchQueryCallback extends GameSDKCallback { EDiscordResult getSearchQuery(IDiscordLobbyManager manager, IDiscordLobbySearchQuery query); } + public GetSearchQueryCallback GetSearchQuery; + + public interface SearchCallback extends GameSDKCallback { void search(IDiscordLobbyManager manager, IDiscordLobbySearchQuery query, Pointer callbackData, NativeGameSDK.DiscordCallback callback); } + public SearchCallback Search; + + public interface LobbyCountCallback extends GameSDKCallback { void lobbyCount(IDiscordLobbyManager manager, IntByReference count); } + public LobbyCountCallback LobbyCount; + + public interface GetLobbyIdCallback extends GameSDKCallback { EDiscordResult getLobbyId(IDiscordLobbyManager manager, Int32 index, Pointer lobbyId); } // lobbyID: Pointer to DiscordSnowflake + public GetLobbyIdCallback GetLobbyId; + + public interface ConnectVoiceCallback extends GameSDKCallback { void connectVoice(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, Pointer callbackData, NativeGameSDK.DiscordCallback callback); } + public ConnectVoiceCallback ConnectVoice; + + public interface DisconnectVoiceCallback extends GameSDKCallback { void disconnectVoice(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, Pointer callbackData, NativeGameSDK.DiscordCallback callback); } + public DisconnectVoiceCallback DisconnectVoice; + + public interface ConnectNetworkCallback extends GameSDKCallback { EDiscordResult connectNetwork(IDiscordLobbyManager manager, DiscordSnowflake lobbyId); } + public ConnectNetworkCallback ConnectNetwork; + + public interface DisconnectNetworkCallback extends GameSDKCallback { EDiscordResult disconnectNetwork(IDiscordLobbyManager manager, DiscordSnowflake lobbyId); } + public DisconnectNetworkCallback DisconnectNetwork; + + public interface FlushNetworkCallback extends GameSDKCallback { EDiscordResult flushNetwork(IDiscordLobbyManager manager); } + public FlushNetworkCallback FlushNetwork; + + public interface OpenNetworkChannelCallback extends GameSDKCallback { EDiscordResult openNetworkChannel(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, UInt8 channelId, boolean reliable); } + public OpenNetworkChannelCallback OpenNetworkChannel; + + public interface SendNetworkMessageCallback extends GameSDKCallback { EDiscordResult sendNetworkMessage(IDiscordLobbyManager manager, DiscordSnowflake lobbyId, DiscordSnowflake userId, UInt8 channelId, ByteByReference data, UInt32 dataLength); } + public SendNetworkMessageCallback SendNetworkMessage; + + + + public static class ByReference extends IDiscordLobbyManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends IDiscordLobbyManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordLobbyMemberTransaction.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordLobbyMemberTransaction.java new file mode 100644 index 00000000..1b79a900 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordLobbyMemberTransaction.java @@ -0,0 +1,38 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.interfacestruct; + +import com.sun.jna.Callback; +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordStruct; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.EDiscordResult; + +public class IDiscordLobbyMemberTransaction extends DiscordStruct { public IDiscordLobbyMemberTransaction() {super();} public IDiscordLobbyMemberTransaction(Pointer pointer) {super(pointer);} + public interface SetMetadataCallback extends GameSDKCallback { EDiscordResult setMetadata(IDiscordLobbyMemberTransaction lobbyMemberTransaction, Pointer key, Pointer value); } // key is 256 bytes, value is 4096 + public SetMetadataCallback SetMetadata; + + public interface DeleteMetadataCallback extends GameSDKCallback { EDiscordResult deleteMetadata(IDiscordLobbyMemberTransaction lobbyMemberTransaction, Pointer key); } // key is 256 bytes, passed by reference + public DeleteMetadataCallback DeleteMetadata; + + + + public static class ByReference extends IDiscordLobbyMemberTransaction implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends IDiscordLobbyMemberTransaction implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordLobbySearchQuery.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordLobbySearchQuery.java new file mode 100644 index 00000000..e2061b13 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordLobbySearchQuery.java @@ -0,0 +1,48 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.interfacestruct; + +import com.sun.jna.Callback; +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordStruct; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.EDiscordLobbySearchComparison; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.EDiscordResult; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.EDiscordLobbySearchDistance; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.UInt32; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.EDiscordLobbySearchCast; + +public class IDiscordLobbySearchQuery extends DiscordStruct { public IDiscordLobbySearchQuery() {super();} public IDiscordLobbySearchQuery(Pointer pointer) {super(pointer);} + public interface FilterCallback extends GameSDKCallback { EDiscordResult filter(IDiscordLobbySearchQuery lobbySearchQuery, Pointer key, EDiscordLobbySearchComparison comparison, EDiscordLobbySearchCast cast, Pointer value); } + public FilterCallback Filter; + + public interface SortCallback extends GameSDKCallback { EDiscordResult sort(IDiscordLobbySearchQuery lobbySearchQuery, Pointer key, EDiscordLobbySearchCast cast, Pointer value); } + public SortCallback Sort; + + public interface LimitCallback extends GameSDKCallback { EDiscordResult limit(IDiscordLobbySearchQuery lobbySearchQuery, UInt32 limit); } + public LimitCallback Limit; + + public interface DistanceCallback extends GameSDKCallback { EDiscordResult distance(IDiscordLobbySearchQuery lobbySearchQuery, EDiscordLobbySearchDistance distance); } + public DistanceCallback Distance; + + + + public static class ByReference extends IDiscordLobbySearchQuery implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends IDiscordLobbySearchQuery implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordLobbyTransaction.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordLobbyTransaction.java new file mode 100644 index 00000000..2a49e516 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordLobbyTransaction.java @@ -0,0 +1,53 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.interfacestruct; + +import com.sun.jna.Callback; +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordStruct; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.EDiscordLobbyType; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.EDiscordResult; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.UInt32; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.DiscordSnowflake; + +public class IDiscordLobbyTransaction extends DiscordStruct { public IDiscordLobbyTransaction() {super();} public IDiscordLobbyTransaction(Pointer pointer) {super(pointer);} + public interface SetTypeCallback extends GameSDKCallback { EDiscordResult setType(IDiscordLobbyTransaction lobbyTransaction, EDiscordLobbyType type); } + public SetTypeCallback SetType; + + public interface SetOwnerCallback extends GameSDKCallback { EDiscordResult setOwner(IDiscordLobbyTransaction lobbyTransaction, DiscordSnowflake ownerId); } + public SetOwnerCallback SetOwner; + + public interface SetCapacityCallback extends GameSDKCallback { EDiscordResult setCapacity(IDiscordLobbyTransaction lobbyTransaction, UInt32 capacity); } + public SetCapacityCallback SetCapacity; + + public interface SetMetadataCallback extends GameSDKCallback { EDiscordResult setMetadata(IDiscordLobbyTransaction lobbyTransaction, Pointer key, Pointer value); } + public SetMetadataCallback SetMetadata; + + public interface DeleteMetadataCallback extends GameSDKCallback { EDiscordResult deleteMetadata(IDiscordLobbyTransaction lobbyTransaction, Pointer key); } + public DeleteMetadataCallback DeleteMetadata; + + public interface SetLockedCallback extends GameSDKCallback { EDiscordResult setLocked(IDiscordLobbyTransaction lobbyTransaction, boolean locked); } + public SetLockedCallback SetLocked; + + + + public static class ByReference extends IDiscordLobbyTransaction implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends IDiscordLobbyTransaction implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordNetworkEvents.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordNetworkEvents.java new file mode 100644 index 00000000..b17064d1 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordNetworkEvents.java @@ -0,0 +1,41 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.interfacestruct; + +import com.sun.jna.Callback; +import com.sun.jna.Structure; +import com.sun.jna.ptr.ByteByReference; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordStruct; +import com.sun.jna.Pointer; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.DiscordNetworkChannelId; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.DiscordNetworkPeerId; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.UInt32; + +public class IDiscordNetworkEvents extends DiscordStruct { public IDiscordNetworkEvents() {super();} public IDiscordNetworkEvents(Pointer pointer) {super(pointer);} + public interface OnMessageCallback extends GameSDKCallback { void onMessage(Pointer eventData, DiscordNetworkPeerId peerId, DiscordNetworkChannelId channelId, ByteByReference data, UInt32 dataLength); } + public OnMessageCallback OnMessage; + + public interface OnRouteUpdateCallback extends GameSDKCallback { void onRouteUpdate(Pointer eventData, String route_data); } + public OnRouteUpdateCallback OnRouteUpdate; + + + + public static class ByReference extends IDiscordNetworkEvents implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends IDiscordNetworkEvents implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordNetworkManager.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordNetworkManager.java new file mode 100644 index 00000000..fbc2edee --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordNetworkManager.java @@ -0,0 +1,61 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.interfacestruct; + +import com.sun.jna.Callback; +import com.sun.jna.Pointer; +import com.sun.jna.Structure; +import com.sun.jna.ptr.ByteByReference; +import com.sun.jna.ptr.LongByReference; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordStruct; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.EDiscordResult; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.DiscordNetworkChannelId; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.DiscordNetworkPeerId; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.UInt32; + +public class IDiscordNetworkManager extends DiscordStruct { public IDiscordNetworkManager() {super();} public IDiscordNetworkManager(Pointer pointer) {super(pointer);} + public interface GetPeerIdCallback extends GameSDKCallback { void getPeerId(IDiscordNetworkManager manager, LongByReference peerId); } + public GetPeerIdCallback GetPeerId; + + public interface FlushCallback extends GameSDKCallback { EDiscordResult flush(IDiscordNetworkManager manager); } + public FlushCallback Flush; + + public interface OpenPeerCallback extends GameSDKCallback { EDiscordResult openPeer(IDiscordNetworkManager manager, DiscordNetworkPeerId peerId, String routeData); } + public OpenPeerCallback OpenPeer; + + public interface UpdatePeerCallback extends GameSDKCallback { EDiscordResult updatePeer(IDiscordNetworkManager manager, DiscordNetworkPeerId peerId, String routeData); } + public UpdatePeerCallback UpdatePeer; + + public interface ClosePeerCallback extends GameSDKCallback { EDiscordResult closePeer(IDiscordNetworkManager manager, DiscordNetworkPeerId peerId); } + public ClosePeerCallback ClosePeer; + + public interface OpenChannelCallback extends GameSDKCallback { EDiscordResult openChannel(IDiscordNetworkManager manager, DiscordNetworkPeerId peerId, DiscordNetworkChannelId channelId, boolean reliable); } + public OpenChannelCallback OpenChannel; + + public interface CloseChannelCallback extends GameSDKCallback { EDiscordResult closeChannel(IDiscordNetworkManager manager, DiscordNetworkPeerId peerId, DiscordNetworkChannelId channelId); } + public CloseChannelCallback CloseChannel; + + public interface SendMessageCallback extends GameSDKCallback { EDiscordResult sendMessage(IDiscordNetworkManager manager, DiscordNetworkPeerId peerId, DiscordNetworkChannelId channelId, ByteByReference data, UInt32 dataLength); } + public SendMessageCallback SendMessage; + + + + public static class ByReference extends IDiscordNetworkManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends IDiscordNetworkManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordOverlayEvents.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordOverlayEvents.java new file mode 100644 index 00000000..ca1681ed --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordOverlayEvents.java @@ -0,0 +1,34 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.interfacestruct; + +import com.sun.jna.Callback; +import com.sun.jna.Structure; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordStruct; +import com.sun.jna.Pointer; + +public class IDiscordOverlayEvents extends DiscordStruct { public IDiscordOverlayEvents() {super();} public IDiscordOverlayEvents(Pointer pointer) {super(pointer);} + public interface OnToggleCallback extends GameSDKCallback { void onToggle(Pointer eventData, boolean locked); } + public OnToggleCallback OnToggle; + + + + public static class ByReference extends IDiscordOverlayEvents implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends IDiscordOverlayEvents implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordOverlayManager.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordOverlayManager.java new file mode 100644 index 00000000..2207f0ff --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordOverlayManager.java @@ -0,0 +1,52 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.interfacestruct; + +import com.sun.jna.Callback; +import com.sun.jna.Structure; +import com.sun.jna.ptr.ByteByReference; +import kr.syeyoung.dungeonsguide.gamesdk.jna.NativeGameSDK; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordStruct; +import com.sun.jna.Pointer; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.EDiscordActivityActionType; + +public class IDiscordOverlayManager extends DiscordStruct { public IDiscordOverlayManager() {super();} public IDiscordOverlayManager(Pointer pointer) {super(pointer);} + public interface IsEnabledCallback extends GameSDKCallback { void isEnabled(IDiscordOverlayManager manager, ByteByReference enabled); } + public IsEnabledCallback IsEnabled; + + public interface IsLockedCallback extends GameSDKCallback { void isLocked(IDiscordOverlayManager manager, ByteByReference locked); } + public IsLockedCallback IsLocked; + + public interface SetLockedCallback extends GameSDKCallback { void setLocked(IDiscordOverlayManager manager, boolean locked, Pointer callbackData, NativeGameSDK.DiscordCallback callback); } + public SetLockedCallback SetLocked; + + public interface OpenActivityInviteCallback extends GameSDKCallback { void openActivityInvite(IDiscordOverlayManager manager, EDiscordActivityActionType type, Pointer callbackData, NativeGameSDK.DiscordCallback callback); } + public OpenActivityInviteCallback OpenActivityInvite; + + public interface OpenGuildInviteCallback extends GameSDKCallback { void openGuildInvite(IDiscordOverlayManager manager, String code, Pointer callbackData, NativeGameSDK.DiscordCallback callback); } + public OpenGuildInviteCallback OpenGuildInvite; + + public interface OpenVoiceSettingsCallback extends GameSDKCallback { void openVoiceSettings(IDiscordOverlayManager manager, Pointer callbackData, NativeGameSDK.DiscordCallback callback); } + public OpenVoiceSettingsCallback OpenVoiceSettings; + + + + public static class ByReference extends IDiscordOverlayManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends IDiscordOverlayManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordRelationshipEvents.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordRelationshipEvents.java new file mode 100644 index 00000000..50ff21f4 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordRelationshipEvents.java @@ -0,0 +1,38 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.interfacestruct; + +import com.sun.jna.Callback; +import com.sun.jna.Structure; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordStruct; +import com.sun.jna.Pointer; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordRelationship; + +public class IDiscordRelationshipEvents extends DiscordStruct { public IDiscordRelationshipEvents() {super();} public IDiscordRelationshipEvents(Pointer pointer) {super(pointer);} + public interface OnRefreshCallback extends GameSDKCallback { void onRefresh(Pointer eventData); } + public OnRefreshCallback OnRefresh; + + public interface OnRelationshipUpdateCallback extends GameSDKCallback { void onRelationshipUpdate(Pointer eventData, DiscordRelationship relationship); } + public OnRelationshipUpdateCallback OnRelationshipUpdate; + + + + public static class ByReference extends IDiscordRelationshipEvents implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends IDiscordRelationshipEvents implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordRelationshipManager.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordRelationshipManager.java new file mode 100644 index 00000000..406978cd --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordRelationshipManager.java @@ -0,0 +1,49 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.interfacestruct; + +import com.sun.jna.Callback; +import com.sun.jna.Structure; +import com.sun.jna.ptr.IntByReference; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordStruct; +import com.sun.jna.Pointer; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordRelationship; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.EDiscordResult; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.UInt32; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.DiscordSnowflake; + +public class IDiscordRelationshipManager extends DiscordStruct { public IDiscordRelationshipManager() {super();} public IDiscordRelationshipManager(Pointer pointer) {super(pointer);} + public interface FilterCallback extends GameSDKCallback { void filter(IDiscordRelationshipManager manager, Pointer filterData, FilterCallback_Callback filter); } + public interface FilterCallback_Callback extends GameSDKCallback { boolean filter(Pointer filterData, Structure relationShip);} + public FilterCallback Filter; + + public interface CountCallback extends GameSDKCallback { EDiscordResult count(IDiscordRelationshipManager manager, IntByReference count); } + public CountCallback Count; + + public interface GetCallback extends GameSDKCallback { EDiscordResult get(IDiscordRelationshipManager manager, DiscordSnowflake userId, DiscordRelationship relationship); } + public GetCallback Get; + + public interface GetAtCallback extends GameSDKCallback { EDiscordResult getAt(IDiscordRelationshipManager manager, UInt32 index, DiscordRelationship relationship); } + public GetAtCallback GetAt; + + + + public static class ByReference extends IDiscordRelationshipManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends IDiscordRelationshipManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordStorageManager.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordStorageManager.java new file mode 100644 index 00000000..8e77bef2 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordStorageManager.java @@ -0,0 +1,76 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.interfacestruct; + +import com.sun.jna.Callback; +import com.sun.jna.Structure; +import com.sun.jna.ptr.ByteByReference; +import com.sun.jna.ptr.IntByReference; +import kr.syeyoung.dungeonsguide.gamesdk.jna.NativeGameSDK; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordStruct; +import com.sun.jna.Pointer; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.EDiscordResult; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.Int32; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordFileStat; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.UInt32; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.UInt64; + +public class IDiscordStorageManager extends DiscordStruct { public IDiscordStorageManager() {super();} public IDiscordStorageManager(Pointer pointer) {super(pointer);} + public interface ReadCallback extends GameSDKCallback { EDiscordResult read(IDiscordStorageManager manager, String name, ByteByReference data, UInt32 dataLength, IntByReference read); } + public ReadCallback Read; + + public interface DiscordStorageManagerCallback extends GameSDKCallback { + void callback(Pointer callbackData, EDiscordResult result, ByteByReference data, IntByReference data_length); + } + + public interface ReadAsyncCallback extends GameSDKCallback { void readAsync(IDiscordStorageManager manager, String name, Pointer callbackData, DiscordStorageManagerCallback callback); } + public ReadAsyncCallback ReadAsync; + + public interface ReadAsyncPartialCallback extends GameSDKCallback { void readAsyncPartial(IDiscordStorageManager manager, String name, UInt64 offset, UInt64 length, Pointer callbackData, DiscordStorageManagerCallback callback); } + public ReadAsyncPartialCallback ReadAsyncPartial; + + public interface WriteCallback extends GameSDKCallback { EDiscordResult write(IDiscordStorageManager manager, String name, ByteByReference data, UInt32 dataLength); } + public WriteCallback Write; + + public interface WriteAsyncCallback extends GameSDKCallback { void writeAsync(IDiscordStorageManager manager, String name, ByteByReference data, UInt32 dataLength, Pointer callbackData, NativeGameSDK.DiscordCallback callback); } + public WriteAsyncCallback WriteAsync; + + public interface DeleteCallback extends GameSDKCallback { EDiscordResult delete(IDiscordStorageManager manager, String name); } + public DeleteCallback Delete; + + public interface ExistsCallback extends GameSDKCallback { EDiscordResult exists(IDiscordStorageManager manager, String name, ByteByReference exists); } // exists actually boolean + public ExistsCallback Exists; + + public interface CountCallback extends GameSDKCallback { void count(IDiscordStorageManager manager, IntByReference count); } + public CountCallback Count; + + public interface StatCallback extends GameSDKCallback { EDiscordResult stat(IDiscordStorageManager manager, String name, DiscordFileStat stat); } + public StatCallback Stat; + + public interface StatAtCallback extends GameSDKCallback { EDiscordResult statAt(IDiscordStorageManager manager, Int32 index, DiscordFileStat stat); } + public StatAtCallback StatAt; + + public interface GetPathCallback extends GameSDKCallback { EDiscordResult getPath(IDiscordStorageManager manager, Pointer path); } // path str len 4096 + public GetPathCallback GetPath; + + + + public static class ByReference extends IDiscordStorageManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends IDiscordStorageManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordStoreEvents.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordStoreEvents.java new file mode 100644 index 00000000..55e4ed92 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordStoreEvents.java @@ -0,0 +1,38 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.interfacestruct; + +import com.sun.jna.Callback; +import com.sun.jna.Structure; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordStruct; +import com.sun.jna.Pointer; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordEntitlement; + +public class IDiscordStoreEvents extends DiscordStruct { public IDiscordStoreEvents() {super();} public IDiscordStoreEvents(Pointer pointer) {super(pointer);} + public interface OnEntitlementCreateCallback extends GameSDKCallback { void onEntitlementCreate(Pointer eventData, DiscordEntitlement entitlement); } + public OnEntitlementCreateCallback OnEntitlementCreate; + + public interface OnEntitlementDeleteCallback extends GameSDKCallback { void onEntitlementDelete(Pointer eventData, DiscordEntitlement entitlement); } + public OnEntitlementDeleteCallback OnEntitlementDelete; + + + + public static class ByReference extends IDiscordStoreEvents implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends IDiscordStoreEvents implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordStoreManager.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordStoreManager.java new file mode 100644 index 00000000..b951ef9a --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordStoreManager.java @@ -0,0 +1,69 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.interfacestruct; + +import com.sun.jna.Callback; +import com.sun.jna.Structure; +import com.sun.jna.ptr.ByteByReference; +import com.sun.jna.ptr.IntByReference; +import kr.syeyoung.dungeonsguide.gamesdk.jna.NativeGameSDK; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordStruct; +import com.sun.jna.Pointer; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordSku; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordEntitlement; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.EDiscordResult; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.Int32; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.DiscordSnowflake; + +public class IDiscordStoreManager extends DiscordStruct { public IDiscordStoreManager() {super();} public IDiscordStoreManager(Pointer pointer) {super(pointer);} + public interface FetchSkusCallback extends GameSDKCallback { void fetchSkus(IDiscordStoreManager manager, Pointer callbackData, NativeGameSDK.DiscordCallback callback); } + public FetchSkusCallback FetchSkus; + + public interface CountSkusCallback extends GameSDKCallback { void countSkus(IDiscordStoreManager manager, IntByReference count); } + public CountSkusCallback CountSkus; + + public interface GetSkuCallback extends GameSDKCallback { EDiscordResult getSku(IDiscordStoreManager manager, DiscordSnowflake skuId, DiscordSku sku); } + public GetSkuCallback GetSku; + + public interface GetSkuAtCallback extends GameSDKCallback { EDiscordResult getSkuAt(IDiscordStoreManager manager, Int32 index, DiscordSku sku); } + public GetSkuAtCallback GetSkuAt; + + public interface FetchEntitlementsCallback extends GameSDKCallback { void fetchEntitlements(IDiscordStoreManager manager, Pointer callbackData, NativeGameSDK.DiscordCallback callback); } + public FetchEntitlementsCallback FetchEntitlements; + + public interface CountEntitlementsCallback extends GameSDKCallback { void countEntitlements(IDiscordStoreManager manager, IntByReference count); } + public CountEntitlementsCallback CountEntitlements; + + public interface GetEntitlementCallback extends GameSDKCallback { EDiscordResult getEntitlement(IDiscordStoreManager manager, DiscordSnowflake entitlementId, DiscordEntitlement entitlement); } + public GetEntitlementCallback GetEntitlement; + + public interface GetEntitlementAtCallback extends GameSDKCallback { EDiscordResult getEntitlementAt(IDiscordStoreManager manager, Int32 index, DiscordEntitlement entitlement); } + public GetEntitlementAtCallback GetEntitlementAt; + + public interface HasSkuEntitlementCallback extends GameSDKCallback { EDiscordResult hasSkuEntitlement(IDiscordStoreManager manager, DiscordSnowflake skuId, ByteByReference hasEntitlement); } // hasEntitlement bool ptr + public HasSkuEntitlementCallback HasSkuEntitlement; + + public interface StartPurchaseCallback extends GameSDKCallback { void startPurchase(IDiscordStoreManager manager, DiscordSnowflake skuId, Pointer callbackData, NativeGameSDK.DiscordCallback callback); } + public StartPurchaseCallback StartPurchase; + + + + public static class ByReference extends IDiscordStoreManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends IDiscordStoreManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordUserEvents.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordUserEvents.java new file mode 100644 index 00000000..66b6379f --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordUserEvents.java @@ -0,0 +1,34 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.interfacestruct; + +import com.sun.jna.Callback; +import com.sun.jna.Structure; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordStruct; +import com.sun.jna.Pointer; + +public class IDiscordUserEvents extends DiscordStruct { public IDiscordUserEvents() {super();} public IDiscordUserEvents(Pointer pointer) {super(pointer);} + public interface OnCurrentUserUpdateCallback extends GameSDKCallback { void onCurrentUserUpdate(Pointer eventData); } + public OnCurrentUserUpdateCallback OnCurrentUserUpdate; + + + + public static class ByReference extends IDiscordUserEvents implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends IDiscordUserEvents implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordUserManager.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordUserManager.java new file mode 100644 index 00000000..e7e04029 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordUserManager.java @@ -0,0 +1,50 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.interfacestruct; + +import com.sun.jna.Callback; +import com.sun.jna.Structure; +import com.sun.jna.ptr.ByteByReference; +import com.sun.jna.ptr.IntByReference; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordStruct; +import com.sun.jna.Pointer; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.EDiscordResult; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.EDiscordUserFlag; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.DiscordSnowflake; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordUser; + +public class IDiscordUserManager extends DiscordStruct { public IDiscordUserManager() {super();} public IDiscordUserManager(Pointer pointer) {super(pointer);} + public interface GetCurrentUserCallback extends GameSDKCallback { EDiscordResult getCurrentUser(IDiscordUserManager manager, DiscordUser currentUser); } + public GetCurrentUserCallback GetCurrentUser; + + public interface GetUserCallback extends GameSDKCallback { void getUser(IDiscordUserManager manager, DiscordSnowflake userId, Pointer callbackData, GetUserCallback_Callback callback); } + public interface GetUserCallback_Callback extends GameSDKCallback { void callback(Pointer callbackData, EDiscordResult result, DiscordUser user);} + public GetUserCallback GetUser; + + public interface GetCurrentUserPremiumTypeCallback extends GameSDKCallback { EDiscordResult getCurrentUserPremiumType(IDiscordUserManager manager, IntByReference premiumType); } // EDiscordPremiumType ptr + public GetCurrentUserPremiumTypeCallback GetCurrentUserPremiumType; + + public interface CurrentUserHasFlagCallback extends GameSDKCallback { EDiscordResult currentUserHasFlag(IDiscordUserManager manager, EDiscordUserFlag flag, ByteByReference hasFlag); } // hasFlag bool ptr + public CurrentUserHasFlagCallback CurrentUserHasFlag; + + + + public static class ByReference extends IDiscordUserManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends IDiscordUserManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordVoiceEvents.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordVoiceEvents.java new file mode 100644 index 00000000..59fedd08 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordVoiceEvents.java @@ -0,0 +1,34 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.interfacestruct; + +import com.sun.jna.Callback; +import com.sun.jna.Structure; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordStruct; +import com.sun.jna.Pointer; + +public class IDiscordVoiceEvents extends DiscordStruct { public IDiscordVoiceEvents() {super();} public IDiscordVoiceEvents(Pointer pointer) {super(pointer);} + public interface OnSettingsUpdateCallback extends GameSDKCallback { void onSettingsUpdate(Pointer eventData); } + public OnSettingsUpdateCallback OnSettingsUpdate; + + + + public static class ByReference extends IDiscordVoiceEvents implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends IDiscordVoiceEvents implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordVoiceManager.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordVoiceManager.java new file mode 100644 index 00000000..b9239707 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/interfacestruct/IDiscordVoiceManager.java @@ -0,0 +1,67 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.interfacestruct; + +import com.sun.jna.Callback; +import com.sun.jna.Structure; +import com.sun.jna.ptr.ByteByReference; +import kr.syeyoung.dungeonsguide.gamesdk.jna.NativeGameSDK; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordStruct; +import com.sun.jna.Pointer; +import kr.syeyoung.dungeonsguide.gamesdk.jna.enumuration.EDiscordResult; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.UInt8; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordInputMode; +import kr.syeyoung.dungeonsguide.gamesdk.jna.typedef.DiscordSnowflake; + +public class IDiscordVoiceManager extends DiscordStruct { public IDiscordVoiceManager() {super();} public IDiscordVoiceManager(Pointer pointer) {super(pointer);} + public interface GetInputModeCallback extends GameSDKCallback { EDiscordResult getInputMode(IDiscordVoiceManager manager, DiscordInputMode inputMode); } + public GetInputModeCallback GetInputMode; + + public interface SetInputModeCallback extends GameSDKCallback { void setInputMode(IDiscordVoiceManager manager, DiscordInputMode.ByValue inputMode, Pointer callbackData, NativeGameSDK.DiscordCallback callback); } + public SetInputModeCallback SetInputMode; + + public interface IsSelfMuteCallback extends GameSDKCallback { EDiscordResult isSelfMute(IDiscordVoiceManager manager, ByteByReference mute); } + public IsSelfMuteCallback IsSelfMute; + + public interface SetSelfMuteCallback extends GameSDKCallback { EDiscordResult setSelfMute(IDiscordVoiceManager manager, boolean mute); } + public SetSelfMuteCallback SetSelfMute; + + public interface IsSelfDeafCallback extends GameSDKCallback { EDiscordResult isSelfDeaf(IDiscordVoiceManager manager, ByteByReference deaf); } + public IsSelfDeafCallback IsSelfDeaf; + + public interface SetSelfDeafCallback extends GameSDKCallback { EDiscordResult setSelfDeaf(IDiscordVoiceManager manager, boolean deaf); } + public SetSelfDeafCallback SetSelfDeaf; + + public interface IsLocalMuteCallback extends GameSDKCallback { EDiscordResult isLocalMute(IDiscordVoiceManager manager, DiscordSnowflake userId, ByteByReference mute); } + public IsLocalMuteCallback IsLocalMute; + + public interface SetLocalMuteCallback extends GameSDKCallback { EDiscordResult setLocalMute(IDiscordVoiceManager manager, DiscordSnowflake userId, boolean mute); } + public SetLocalMuteCallback SetLocalMute; + + public interface GetLocalVolumeCallback extends GameSDKCallback { EDiscordResult getLocalVolume(IDiscordVoiceManager manager, DiscordSnowflake userId, ByteByReference volume); } + public GetLocalVolumeCallback GetLocalVolume; + + public interface SetLocalVolumeCallback extends GameSDKCallback { EDiscordResult setLocalVolume(IDiscordVoiceManager manager, DiscordSnowflake userId, UInt8 volume); } + public SetLocalVolumeCallback SetLocalVolume; + + + + public static class ByReference extends IDiscordVoiceManager implements Structure.ByReference { public ByReference() {super();} public ByReference(Pointer pointer) {super(pointer);}} + public static class ByValue extends IDiscordVoiceManager implements Structure.ByValue { public ByValue() {super();} public ByValue(Pointer pointer) {super(pointer);}} +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/typedef/DiscordClientID.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/typedef/DiscordClientID.java new file mode 100644 index 00000000..df6c4628 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/typedef/DiscordClientID.java @@ -0,0 +1,30 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.typedef; + +import com.sun.jna.IntegerType; + +public class DiscordClientID extends Int64 { + public DiscordClientID() { + this(0); + } + public DiscordClientID(long value) { + super(value); + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/typedef/DiscordNetworkChannelId.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/typedef/DiscordNetworkChannelId.java new file mode 100644 index 00000000..82b34ee7 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/typedef/DiscordNetworkChannelId.java @@ -0,0 +1,30 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.typedef; + +import com.sun.jna.IntegerType; + +public class DiscordNetworkChannelId extends UInt8 { + public DiscordNetworkChannelId() { + this(0); + } + public DiscordNetworkChannelId(long value) { + super(value); + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/typedef/DiscordNetworkPeerId.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/typedef/DiscordNetworkPeerId.java new file mode 100644 index 00000000..49d73e3f --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/typedef/DiscordNetworkPeerId.java @@ -0,0 +1,30 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.typedef; + +import com.sun.jna.IntegerType; + +public class DiscordNetworkPeerId extends UInt64 { + public DiscordNetworkPeerId() { + this(0); + } + public DiscordNetworkPeerId(long value) { + super(value); + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/typedef/DiscordSnowflake.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/typedef/DiscordSnowflake.java new file mode 100644 index 00000000..3a86f73d --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/typedef/DiscordSnowflake.java @@ -0,0 +1,30 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.typedef; + +import com.sun.jna.IntegerType; + +public class DiscordSnowflake extends Int64 { + public DiscordSnowflake() { + this(0); + } + public DiscordSnowflake(long value) { + super(value); + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/typedef/DiscordTimestamp.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/typedef/DiscordTimestamp.java new file mode 100644 index 00000000..c8f73da5 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/typedef/DiscordTimestamp.java @@ -0,0 +1,30 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.typedef; + +import com.sun.jna.IntegerType; + +public class DiscordTimestamp extends Int64 { + public DiscordTimestamp() { + this(0); + } + public DiscordTimestamp(long value) { + super(value); + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/typedef/DiscordVersion.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/typedef/DiscordVersion.java new file mode 100644 index 00000000..ed5fda42 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/typedef/DiscordVersion.java @@ -0,0 +1,30 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.typedef; + +import com.sun.jna.IntegerType; + +public class DiscordVersion extends Int32 { + public DiscordVersion() { + this(0); + } + public DiscordVersion(long value) { + super(value); + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/typedef/Int32.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/typedef/Int32.java new file mode 100644 index 00000000..581aed96 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/typedef/Int32.java @@ -0,0 +1,31 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.typedef; + +import com.sun.jna.IntegerType; + +public class Int32 extends IntegerType { + public static final int SIZE = 4; + public Int32() { + this(0); + } + public Int32(long value) { + super(SIZE, value, false); + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/typedef/Int64.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/typedef/Int64.java new file mode 100644 index 00000000..a8dff873 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/typedef/Int64.java @@ -0,0 +1,31 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.typedef; + +import com.sun.jna.IntegerType; + +public class Int64 extends IntegerType { + public static final int SIZE = 8; + public Int64() { + this(0); + } + public Int64(long value) { + super(SIZE, value, false); + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/typedef/UInt32.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/typedef/UInt32.java new file mode 100644 index 00000000..98a903c6 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/typedef/UInt32.java @@ -0,0 +1,31 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.typedef; + +import com.sun.jna.IntegerType; + +public class UInt32 extends IntegerType { + public static final int SIZE = 4; + public UInt32() { + this(0); + } + public UInt32(long value) { + super(SIZE, value, true); + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/typedef/UInt64.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/typedef/UInt64.java new file mode 100644 index 00000000..a0265b34 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/typedef/UInt64.java @@ -0,0 +1,31 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.typedef; + +import com.sun.jna.IntegerType; + +public class UInt64 extends IntegerType { + public static final int SIZE = 8; + public UInt64() { + this(0); + } + public UInt64(long value) { + super(SIZE, value, true); + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/typedef/UInt8.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/typedef/UInt8.java new file mode 100644 index 00000000..1b10c5a2 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/jna/typedef/UInt8.java @@ -0,0 +1,31 @@ +/* + * Dungeons Guide - The most intelligent Hypixel Skyblock Dungeons Mod + * Copyright (C) 2021 cyoung06 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + */ + +package kr.syeyoung.dungeonsguide.gamesdk.jna.typedef; + +import com.sun.jna.IntegerType; + +public class UInt8 extends IntegerType { + public static final int SIZE = 1; + public UInt8() { + this(0); + } + public UInt8(long value) { + super(SIZE, value, true); + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/party/PartyInviteViewer.java b/src/main/java/kr/syeyoung/dungeonsguide/party/PartyInviteViewer.java index 2e8c8702..a045ea22 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/party/PartyInviteViewer.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/party/PartyInviteViewer.java @@ -20,7 +20,6 @@ package kr.syeyoung.dungeonsguide.party; import kr.syeyoung.dungeonsguide.DungeonsGuide; import kr.syeyoung.dungeonsguide.utils.TextUtils; -import net.arikia.dev.drpc.DiscordRPC; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.Gui; @@ -77,7 +76,7 @@ public class PartyInviteViewer { partyJoinRequestList.add(joinRequest); } } else if (!isOnHypixel){ - DiscordRPC.discordRespond(joinRequest.getDiscordUser().userId, DiscordRPC.DiscordReply.NO); +// DiscordRPC.discordRespond(joinRequest.getDiscordUser().userId, DiscordRPC.DiscordReply.NO); partyJoinRequestList.add(joinRequest); } else if (joinRequest.getExpire() < System.currentTimeMillis()) { partyJoinRequestList.add(joinRequest); @@ -107,21 +106,21 @@ public class PartyInviteViewer { if (joinRequest.getAcceptRect().contains(mouseX, mouseY)) { joinRequest.setReply(PartyJoinRequest.Reply.ACCEPT); joinRequest.setTtl(60); - DiscordRPC.discordRespond(joinRequest.getDiscordUser().userId, DiscordRPC.DiscordReply.YES); +// DiscordRPC.discordRespond(joinRequest.getDiscordUser().userId, DiscordRPC.DiscordReply.YES); return; } if (joinRequest.getDenyRect().contains(mouseX, mouseY)) { joinRequest.setReply(PartyJoinRequest.Reply.DENY); joinRequest.setTtl(60); - DiscordRPC.discordRespond(joinRequest.getDiscordUser().userId, DiscordRPC.DiscordReply.NO); +// DiscordRPC.discordRespond(joinRequest.getDiscordUser().userId, DiscordRPC.DiscordReply.NO); return; } if (joinRequest.getIgnoreRect().contains(mouseX, mouseY)) { joinRequest.setReply(PartyJoinRequest.Reply.IGNORE); joinRequest.setTtl(60); - DiscordRPC.discordRespond(joinRequest.getDiscordUser().userId, DiscordRPC.DiscordReply.IGNORE); +// DiscordRPC.discordRespond(joinRequest.getDiscordUser().userId, DiscordRPC.DiscordReply.IGNORE); return; } @@ -195,7 +194,7 @@ public class PartyInviteViewer { Gui.drawRect(0, 0,width,height, 0xFF23272a); Gui.drawRect(2, 2, width-2, height-2, 0XFF2c2f33); { - String avatar = "https://cdn.discordapp.com/avatars/"+partyJoinRequest.getDiscordUser().userId+"/"+partyJoinRequest.getDiscordUser().avatar+".png"; + String avatar = "https://cdn.discordapp.com/avatars/"+partyJoinRequest.getDiscordUser().id.longValue()+"/"+partyJoinRequest.getDiscordUser().avatar+".png"; Future<LoadedImage> loadedImageFuture = loadImage(avatar); LoadedImage loadedImage = null; if (loadedImageFuture.isDone()) { @@ -237,11 +236,11 @@ public class PartyInviteViewer { GlStateManager.pushMatrix(); GlStateManager.scale(3.0,3.0,1.0); - fr.drawString(partyJoinRequest.getDiscordUser().username, 0,0, 0xFFFFFFFF, true); + fr.drawString(partyJoinRequest.getDiscordUser().username+"", 0,0, 0xFFFFFFFF, true); GlStateManager.popMatrix(); GlStateManager.pushMatrix(); - GlStateManager.translate(fr.getStringWidth(partyJoinRequest.getDiscordUser().username) * 3 + 1, (int)(fr.FONT_HEIGHT*1.5), 0); + GlStateManager.translate(fr.getStringWidth(partyJoinRequest.getDiscordUser().username+"") * 3 + 1, (int)(fr.FONT_HEIGHT*1.5), 0); fr.drawString("#"+partyJoinRequest.getDiscordUser().discriminator, 0,0,0xFFaaaaaa, true); GlStateManager.popMatrix(); GlStateManager.pushMatrix(); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/party/PartyJoinRequest.java b/src/main/java/kr/syeyoung/dungeonsguide/party/PartyJoinRequest.java index eb7e8f57..06b04e20 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/party/PartyJoinRequest.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/party/PartyJoinRequest.java @@ -18,14 +18,12 @@ package kr.syeyoung.dungeonsguide.party; +import kr.syeyoung.dungeonsguide.gamesdk.jna.datastruct.DiscordUser; import lombok.AllArgsConstructor; import lombok.Data; import lombok.Getter; -import net.arikia.dev.drpc.DiscordRPC; -import net.arikia.dev.drpc.DiscordUser; import java.awt.*; -import java.time.Instant; @Data public class PartyJoinRequest { |