Начало трансляции сервероного кода к новому протоколу

This commit is contained in:
RoyceDa
2026-04-18 17:50:23 +02:00
parent 068492b56d
commit 33582e2730
123 changed files with 3380 additions and 2745 deletions

View File

@@ -0,0 +1,116 @@
package im.rosetta.network;
import im.rosetta.network.packet.PacketHandshake;
import im.rosetta.network.packet.PacketUserInfo;
import im.rosetta.network.packet.PacketResult;
import im.rosetta.network.packet.PacketSearch;
import im.rosetta.network.packet.PacketOnlineSubscribe;
import im.rosetta.network.packet.PacketOnlineState;
import im.rosetta.network.packet.PacketMessage;
import im.rosetta.network.packet.PacketRead;
import im.rosetta.network.packet.PacketDelivery;
import im.rosetta.network.packet.PacketDeviceNew;
import im.rosetta.network.packet.PacketRequestUpdate;
import im.rosetta.network.packet.PacketTypeing;
import im.rosetta.network.packet.PacketRequestTransport;
import im.rosetta.network.packet.PacketPushNotification;
import im.rosetta.network.packet.PacketGroupCreate;
import im.rosetta.network.packet.PacketGroupInfo;
import im.rosetta.network.packet.PacketGroupInviteInfo;
import im.rosetta.network.packet.PacketGroupJoin;
import im.rosetta.network.packet.PacketGroupLeave;
import im.rosetta.network.packet.PacketGroupBan;
import im.rosetta.network.packet.PacketDeviceList;
import im.rosetta.network.packet.PacketDeviceResolve;
import im.rosetta.network.packet.PacketSync;
import im.rosetta.network.packet.PacketSignalPeer;
import im.rosetta.network.packet.PacketWebRTC;
import im.rosetta.network.packet.PacketIceServers;
import io.orprotocol.packet.PacketManager;
// Auto-generated by RCC (Rosetta Code Compiler). Do not edit manually.
public final class RccGeneratedPacketRegistry {
public static final int PACKET_HANDSHAKE_ID = 0;
public static final int PACKET_USER_INFO_ID = 1;
public static final int PACKET_RESULT_ID = 2;
public static final int PACKET_SEARCH_ID = 3;
public static final int PACKET_ONLINE_SUBSCRIBE_ID = 4;
public static final int PACKET_ONLINE_STATE_ID = 5;
public static final int PACKET_MESSAGE_ID = 6;
public static final int PACKET_READ_ID = 7;
public static final int PACKET_DELIVERY_ID = 8;
public static final int PACKET_DEVICE_NEW_ID = 9;
public static final int PACKET_REQUEST_UPDATE_ID = 10;
public static final int PACKET_TYPEING_ID = 11;
public static final int PACKET_REQUEST_TRANSPORT_ID = 15;
public static final int PACKET_PUSH_NOTIFICATION_ID = 16;
public static final int PACKET_GROUP_CREATE_ID = 17;
public static final int PACKET_GROUP_INFO_ID = 18;
public static final int PACKET_GROUP_INVITE_INFO_ID = 19;
public static final int PACKET_GROUP_JOIN_ID = 20;
public static final int PACKET_GROUP_LEAVE_ID = 21;
public static final int PACKET_GROUP_BAN_ID = 22;
public static final int PACKET_DEVICE_LIST_ID = 23;
public static final int PACKET_DEVICE_RESOLVE_ID = 24;
public static final int PACKET_SYNC_ID = 25;
public static final int PACKET_SIGNAL_PEER_ID = 26;
public static final int PACKET_WEB_RTC_ID = 27;
public static final int PACKET_ICE_SERVERS_ID = 28;
private RccGeneratedPacketRegistry() {}
public static void registerAll(PacketManager manager) {
manager.registerPacket(PACKET_HANDSHAKE_ID, PacketHandshake.class);
manager.registerCodec(PACKET_HANDSHAKE_ID, new im.rosetta.network.codec.PacketHandshakeCodec());
manager.registerPacket(PACKET_USER_INFO_ID, PacketUserInfo.class);
manager.registerCodec(PACKET_USER_INFO_ID, new im.rosetta.network.codec.PacketUserInfoCodec());
manager.registerPacket(PACKET_RESULT_ID, PacketResult.class);
manager.registerCodec(PACKET_RESULT_ID, new im.rosetta.network.codec.PacketResultCodec());
manager.registerPacket(PACKET_SEARCH_ID, PacketSearch.class);
manager.registerCodec(PACKET_SEARCH_ID, new im.rosetta.network.codec.PacketSearchCodec());
manager.registerPacket(PACKET_ONLINE_SUBSCRIBE_ID, PacketOnlineSubscribe.class);
manager.registerCodec(PACKET_ONLINE_SUBSCRIBE_ID, new im.rosetta.network.codec.PacketOnlineSubscribeCodec());
manager.registerPacket(PACKET_ONLINE_STATE_ID, PacketOnlineState.class);
manager.registerCodec(PACKET_ONLINE_STATE_ID, new im.rosetta.network.codec.PacketOnlineStateCodec());
manager.registerPacket(PACKET_MESSAGE_ID, PacketMessage.class);
manager.registerCodec(PACKET_MESSAGE_ID, new im.rosetta.network.codec.PacketMessageCodec());
manager.registerPacket(PACKET_READ_ID, PacketRead.class);
manager.registerCodec(PACKET_READ_ID, new im.rosetta.network.codec.PacketReadCodec());
manager.registerPacket(PACKET_DELIVERY_ID, PacketDelivery.class);
manager.registerCodec(PACKET_DELIVERY_ID, new im.rosetta.network.codec.PacketDeliveryCodec());
manager.registerPacket(PACKET_DEVICE_NEW_ID, PacketDeviceNew.class);
manager.registerCodec(PACKET_DEVICE_NEW_ID, new im.rosetta.network.codec.PacketDeviceNewCodec());
manager.registerPacket(PACKET_REQUEST_UPDATE_ID, PacketRequestUpdate.class);
manager.registerCodec(PACKET_REQUEST_UPDATE_ID, new im.rosetta.network.codec.PacketRequestUpdateCodec());
manager.registerPacket(PACKET_TYPEING_ID, PacketTypeing.class);
manager.registerCodec(PACKET_TYPEING_ID, new im.rosetta.network.codec.PacketTypeingCodec());
manager.registerPacket(PACKET_REQUEST_TRANSPORT_ID, PacketRequestTransport.class);
manager.registerCodec(PACKET_REQUEST_TRANSPORT_ID, new im.rosetta.network.codec.PacketRequestTransportCodec());
manager.registerPacket(PACKET_PUSH_NOTIFICATION_ID, PacketPushNotification.class);
manager.registerCodec(PACKET_PUSH_NOTIFICATION_ID, new im.rosetta.network.codec.PacketPushNotificationCodec());
manager.registerPacket(PACKET_GROUP_CREATE_ID, PacketGroupCreate.class);
manager.registerCodec(PACKET_GROUP_CREATE_ID, new im.rosetta.network.codec.PacketGroupCreateCodec());
manager.registerPacket(PACKET_GROUP_INFO_ID, PacketGroupInfo.class);
manager.registerCodec(PACKET_GROUP_INFO_ID, new im.rosetta.network.codec.PacketGroupInfoCodec());
manager.registerPacket(PACKET_GROUP_INVITE_INFO_ID, PacketGroupInviteInfo.class);
manager.registerCodec(PACKET_GROUP_INVITE_INFO_ID, new im.rosetta.network.codec.PacketGroupInviteInfoCodec());
manager.registerPacket(PACKET_GROUP_JOIN_ID, PacketGroupJoin.class);
manager.registerCodec(PACKET_GROUP_JOIN_ID, new im.rosetta.network.codec.PacketGroupJoinCodec());
manager.registerPacket(PACKET_GROUP_LEAVE_ID, PacketGroupLeave.class);
manager.registerCodec(PACKET_GROUP_LEAVE_ID, new im.rosetta.network.codec.PacketGroupLeaveCodec());
manager.registerPacket(PACKET_GROUP_BAN_ID, PacketGroupBan.class);
manager.registerCodec(PACKET_GROUP_BAN_ID, new im.rosetta.network.codec.PacketGroupBanCodec());
manager.registerPacket(PACKET_DEVICE_LIST_ID, PacketDeviceList.class);
manager.registerCodec(PACKET_DEVICE_LIST_ID, new im.rosetta.network.codec.PacketDeviceListCodec());
manager.registerPacket(PACKET_DEVICE_RESOLVE_ID, PacketDeviceResolve.class);
manager.registerCodec(PACKET_DEVICE_RESOLVE_ID, new im.rosetta.network.codec.PacketDeviceResolveCodec());
manager.registerPacket(PACKET_SYNC_ID, PacketSync.class);
manager.registerCodec(PACKET_SYNC_ID, new im.rosetta.network.codec.PacketSyncCodec());
manager.registerPacket(PACKET_SIGNAL_PEER_ID, PacketSignalPeer.class);
manager.registerCodec(PACKET_SIGNAL_PEER_ID, new im.rosetta.network.codec.PacketSignalPeerCodec());
manager.registerPacket(PACKET_WEB_RTC_ID, PacketWebRTC.class);
manager.registerCodec(PACKET_WEB_RTC_ID, new im.rosetta.network.codec.PacketWebRTCCodec());
manager.registerPacket(PACKET_ICE_SERVERS_ID, PacketIceServers.class);
manager.registerCodec(PACKET_ICE_SERVERS_ID, new im.rosetta.network.codec.PacketIceServersCodec());
}
}