From eb78b1a9592d8bd1234beb18fe8141ef705d97ee Mon Sep 17 00:00:00 2001 From: Fuwn Date: Wed, 12 Jun 2024 07:02:50 -0700 Subject: refactor: use snake case (style guide) --- AppInitCommand.proto | 9 --- AppearActorCommand.proto | 11 ---- BuddyListNotifyCommand.proto | 8 --- BuddyListUpdateCommand.proto | 8 --- ChannelCommand.proto | 7 --- Command.proto | 35 ----------- DisappearActorCommand.proto | 5 -- FingerReplyCommand.proto | 10 --- FingerRequestCommand.proto | 7 --- LongLocationCommand.proto | 10 --- Network2Property.proto | 13 ---- NetworkCommands.proto | 8 --- NetworkConstants.proto | 132 --------------------------------------- NetworkData.proto | 9 --- NetworkPacket.proto | 67 -------------------- NetworkProperty.proto | 8 --- ObjID.proto | 8 --- OldPropertyList.proto | 9 --- PropCommand.proto | 9 --- PropRequestCommand.proto | 7 --- PropertyList.proto | 9 --- PropertySetCommand.proto | 10 --- PropertyUpdateCommand.proto | 9 --- RedirectCommand.proto | 12 ---- RedirectIDCommand.proto | 13 ---- RoomIDCommand.proto | 8 --- RoomIDRequestCommand.proto | 7 --- SessionExitCommand.proto | 9 --- SessionInitCommand.proto | 9 --- ShortLocationCommand.proto | 9 --- SubscribeDistanceCommand.proto | 8 --- SubscribeRoomCommand.proto | 11 ---- TeleportCommand.proto | 13 ---- TextCommand.proto | 10 --- UnsubscribeRoomCommand.proto | 7 --- WhisperCommand.proto | 11 ---- app_init_command.proto | 9 +++ appear_actor_command.proto | 11 ++++ buddy_list_notify_command.proto | 8 +++ buddy_list_update_command.proto | 8 +++ build/test.py | 10 +-- channel_command.proto | 7 +++ command.proto | 35 +++++++++++ disappear_actor_command.proto | 5 ++ finger_reply_command.proto | 10 +++ finger_request_command.proto | 7 +++ long_location_command.proto | 10 +++ network_2_property.proto | 13 ++++ network_commands.proto | 8 +++ network_constants.proto | 132 +++++++++++++++++++++++++++++++++++++++ network_data.proto | 9 +++ network_packet.proto | 67 ++++++++++++++++++++ network_property.proto | 8 +++ obj_id.proto | 8 +++ old_property_list.proto | 9 +++ prop_command.proto | 9 +++ prop_request_command.proto | 7 +++ property_list.proto | 9 +++ property_set_command.proto | 10 +++ property_update_command.proto | 9 +++ redirect_command.proto | 12 ++++ redirect_id_command.proto | 13 ++++ room_id_command.proto | 8 +++ room_id_request_command.proto | 7 +++ session_exit_command.proto | 9 +++ session_init_command.proto | 9 +++ short_location_command.proto | 9 +++ subscribe_distance_command.proto | 8 +++ subscribe_room_command.proto | 11 ++++ teleport_command.proto | 13 ++++ text_command.proto | 10 +++ unsubscribe_room_command.proto | 7 +++ whisper_command.proto | 11 ++++ 73 files changed, 540 insertions(+), 540 deletions(-) delete mode 100644 AppInitCommand.proto delete mode 100644 AppearActorCommand.proto delete mode 100644 BuddyListNotifyCommand.proto delete mode 100644 BuddyListUpdateCommand.proto delete mode 100644 ChannelCommand.proto delete mode 100644 Command.proto delete mode 100644 DisappearActorCommand.proto delete mode 100644 FingerReplyCommand.proto delete mode 100644 FingerRequestCommand.proto delete mode 100644 LongLocationCommand.proto delete mode 100644 Network2Property.proto delete mode 100644 NetworkCommands.proto delete mode 100644 NetworkConstants.proto delete mode 100644 NetworkData.proto delete mode 100644 NetworkPacket.proto delete mode 100644 NetworkProperty.proto delete mode 100644 ObjID.proto delete mode 100644 OldPropertyList.proto delete mode 100644 PropCommand.proto delete mode 100644 PropRequestCommand.proto delete mode 100644 PropertyList.proto delete mode 100644 PropertySetCommand.proto delete mode 100644 PropertyUpdateCommand.proto delete mode 100644 RedirectCommand.proto delete mode 100644 RedirectIDCommand.proto delete mode 100644 RoomIDCommand.proto delete mode 100644 RoomIDRequestCommand.proto delete mode 100644 SessionExitCommand.proto delete mode 100644 SessionInitCommand.proto delete mode 100644 ShortLocationCommand.proto delete mode 100644 SubscribeDistanceCommand.proto delete mode 100644 SubscribeRoomCommand.proto delete mode 100644 TeleportCommand.proto delete mode 100644 TextCommand.proto delete mode 100644 UnsubscribeRoomCommand.proto delete mode 100644 WhisperCommand.proto create mode 100644 app_init_command.proto create mode 100644 appear_actor_command.proto create mode 100644 buddy_list_notify_command.proto create mode 100644 buddy_list_update_command.proto create mode 100644 channel_command.proto create mode 100644 command.proto create mode 100644 disappear_actor_command.proto create mode 100644 finger_reply_command.proto create mode 100644 finger_request_command.proto create mode 100644 long_location_command.proto create mode 100644 network_2_property.proto create mode 100644 network_commands.proto create mode 100644 network_constants.proto create mode 100644 network_data.proto create mode 100644 network_packet.proto create mode 100644 network_property.proto create mode 100644 obj_id.proto create mode 100644 old_property_list.proto create mode 100644 prop_command.proto create mode 100644 prop_request_command.proto create mode 100644 property_list.proto create mode 100644 property_set_command.proto create mode 100644 property_update_command.proto create mode 100644 redirect_command.proto create mode 100644 redirect_id_command.proto create mode 100644 room_id_command.proto create mode 100644 room_id_request_command.proto create mode 100644 session_exit_command.proto create mode 100644 session_init_command.proto create mode 100644 short_location_command.proto create mode 100644 subscribe_distance_command.proto create mode 100644 subscribe_room_command.proto create mode 100644 teleport_command.proto create mode 100644 text_command.proto create mode 100644 unsubscribe_room_command.proto create mode 100644 whisper_command.proto diff --git a/AppInitCommand.proto b/AppInitCommand.proto deleted file mode 100644 index a567a23..0000000 --- a/AppInitCommand.proto +++ /dev/null @@ -1,9 +0,0 @@ -syntax = "proto3"; - -package whirl; - -import "NetworkProperty.proto"; - -message AppInitCommand { - repeated NetworkProperty property_list = 2; -} \ No newline at end of file diff --git a/AppearActorCommand.proto b/AppearActorCommand.proto deleted file mode 100644 index 718af2d..0000000 --- a/AppearActorCommand.proto +++ /dev/null @@ -1,11 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message AppearActorCommand { - int32 room_id = 1; - int32 x = 2; - int32 y = 3; - int32 z = 4; - int32 direction = 5; -} diff --git a/BuddyListNotifyCommand.proto b/BuddyListNotifyCommand.proto deleted file mode 100644 index 34259ea..0000000 --- a/BuddyListNotifyCommand.proto +++ /dev/null @@ -1,8 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message BuddyListNotifyCommand { - string buddy_name = 1; - int32 logged_on = 2; -} diff --git a/BuddyListUpdateCommand.proto b/BuddyListUpdateCommand.proto deleted file mode 100644 index d422f55..0000000 --- a/BuddyListUpdateCommand.proto +++ /dev/null @@ -1,8 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message BuddyListUpdateCommand { - string buddy = 1; - int32 add = 2; -} diff --git a/ChannelCommand.proto b/ChannelCommand.proto deleted file mode 100644 index b76f984..0000000 --- a/ChannelCommand.proto +++ /dev/null @@ -1,7 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message ChannelCommand { - string channel = 1; -} diff --git a/Command.proto b/Command.proto deleted file mode 100644 index d3b69fa..0000000 --- a/Command.proto +++ /dev/null @@ -1,35 +0,0 @@ -syntax = "proto3"; - -package whirl; - -enum Command { - UNKNOWN = 0; - APPEARACTORCMD = 12; - APPINITCMD = 8; - BUDDYLISTNOTIFYCMD = 30; - BUDDYLISTUPDATECMD = 29; - CHANNELCMD = 31; - DISAPPEARACTORCMD = 11; - FINGERREPLYCMD = 28; - FINGERREQCMD = 27; - LONGLOCCMD = 1; - PROPCMD = 3; - PROPSETCMD = 15; - PROPUPDCMD = 16; - PROPREQCMD = 10; - REDIRECTCMD = 25; - REDIRECTIDCMD = 26; - REGOBJIDCMD = 13; - ROOMCHNGCMD = 5; - ROOMIDCMD = 21; - ROOMIDREQCMD = 20; - SESSIONEXITCMD = 7; - SESSIONINITCMD = 6; - SHORTLOCCMD = 4; - SUBSCRIBEDISTCMD = 24; - SUBSCRIBEROOMCMD = 22; - TELEPORTCMD = 18; - TEXTCMD = 14; - UNSUBSCRIBEROOMCMD = 23; - WHISPERCMD = 17; -} diff --git a/DisappearActorCommand.proto b/DisappearActorCommand.proto deleted file mode 100644 index fe7770a..0000000 --- a/DisappearActorCommand.proto +++ /dev/null @@ -1,5 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message DisappearActorCommand {}; diff --git a/FingerReplyCommand.proto b/FingerReplyCommand.proto deleted file mode 100644 index 42d747c..0000000 --- a/FingerReplyCommand.proto +++ /dev/null @@ -1,10 +0,0 @@ -syntax = "proto3"; - -package whirl; - -import "PropertyList.proto"; - -message FingerReplyCommand { - string user = 1; - PropertyList property_list = 2; -} diff --git a/FingerRequestCommand.proto b/FingerRequestCommand.proto deleted file mode 100644 index 4727e9c..0000000 --- a/FingerRequestCommand.proto +++ /dev/null @@ -1,7 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message FingerRequestCommand { - string user = 1; -} diff --git a/LongLocationCommand.proto b/LongLocationCommand.proto deleted file mode 100644 index 913dbd2..0000000 --- a/LongLocationCommand.proto +++ /dev/null @@ -1,10 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message LongLocationCommand { - int32 x = 1; - int32 y = 2; - int32 z = 3; - int32 direction = 4; -} diff --git a/Network2Property.proto b/Network2Property.proto deleted file mode 100644 index 94f6309..0000000 --- a/Network2Property.proto +++ /dev/null @@ -1,13 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message Network2Property { - int32 prop_id = 1; - int32 flags = 2; - int32 access = 3; - oneof value { - string string_value = 4; - bytes binary_value = 5; - } -} \ No newline at end of file diff --git a/NetworkCommands.proto b/NetworkCommands.proto deleted file mode 100644 index d909716..0000000 --- a/NetworkCommands.proto +++ /dev/null @@ -1,8 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message NetworkCommands { - repeated string receivable_network_packet = 1; - map property_list = 2; -} diff --git a/NetworkConstants.proto b/NetworkConstants.proto deleted file mode 100644 index e51476f..0000000 --- a/NetworkConstants.proto +++ /dev/null @@ -1,132 +0,0 @@ -syntax = "proto3"; - -package whirl; - -enum NetConst { - UNKNOWN = 0; - - PROTOCOL_VERSION = 24; - - STATECMD = 2; - - MAXCMD = 255; - CURRENT_ROOM = 253; -} - -enum Client { - UNKNOWN_CLIENT = 0; - - CLIENT = 1; - CO = 254; - PO = 255; -} - -enum Variable { - VAR_NULL = 0; - VAR_APPNAME = 1; - VAR_USERNAME = 2; - VAR_PROTOCOL = 3; - VAR_ERROR = 4; - VAR_CHANNEL = 5; - VAR_BITMAP = 6; - VAR_PASSWORD = 7; - VAR_AVATARS = 8; - VAR_UPDATETIME = 9; - VAR_CLIENT = 10; - VAR_SERIAL = 11; - VAR_EMAIL = 12; - VAR_LOGONOFF = 13; - VAR_DURATION = 14; - VAR_GUEST = 15; - VAR_SERVERTYPE = 16; - VAR_BIZCARD = 17; - VAR_NEW_PASSWD = 18; - VAR_PRIV = 19; - VAR_ASLEEP = 20; - VAR_EXTERNAL_HTTP_SERVER = 21; - VAR_SCRIPT_SERVER = 22; - VAR_SMTP_SERVER = 23; - VAR_MAIL_DOMAIN = 24; - VAR_NEW_USERNAME = 25; - VAR_INTERNAL_HTTP_SERVER = 26; - VAR_INVENTORY = 27; -} - -enum Acknowledgement { - ACK = 0; - NAK_BAD_USER = 1; - NAK_MAX_ORDINARY = 2; - NAK_MAX_PRIORITY = 3; - NAK_BAD_WORLD = 4; - NAK_FATAL = 5; - NAK_BAD_PROTOCOL = 6; - NAK_BAD_CLIENTSW = 7; - NAK_BAD_ROOM = 8; - NAK_BAD_SERIAL = 9; - NAK_TAKEN_SERIAL = 10; - NAK_TAKEN_USER = 11; - NAK_NO_SUCH_USER = 12; - NAK_BAD_PASSWORD = 13; - NAK_BAD_ACCOUNT = 14; - NAK_NOT_LOGGEDON = 15; - NAK_BAD_IPADDRESS = 16; - NAK_LOGGEDON = 17; - NAK_CRYPT_METHOD = 18; - NAK_CRYPT_ERROR = 19; - NAK_SESSIONINIT = 20; - NAK_ROOM_FULL = 21; - NAK_SHUTDOWN = 100; - NAK_WRITE_ERROR = 101; - NAK_READ_ERROR = 102; - NAK_UNEXPECTED = 103; - NAK_CONNECTION = 104; - NAK_IOSTREAMS = 105; - NAK_TIMEOUT = 106; - NAK_UNREACHABLE = 107; -} - -enum Status { - STATUS_UNKNOWN = 0; - - STATUS_CONNECTED = 200; - STATUS_DETACHING = 201; - STATUS_WILLRETRY = 202; - STATUS_DISCONNECTED = 203; - STATUS_DEAD = 204; - STATUS_OFFLINE = 205; - STATUS_GALAXY_ONLINE = 206; - STATUS_GALAXY_OFFLINE = 207; // 206 -} - -enum PropertyFlag { - PROPFLAG_NONE = 0; - PROPFLAG_BINARY = 16; - PROPFLAG_FINGER = 32; - PROPFLAG_AUTOUPDATE = 64; - PROPFLAG_DBSTORE = 128; -} - -enum PropertyAccess { - PROPACCESS_UNKNOWN = 0; - - PROPACCESS_POSSESS = 1; - PROPACCESS_PRIVATE = 2; -} - -enum Server { - SERVER_UNKNOWN = 0; - USER_SERVER_DB = 1; - USER_SERVER_ANON = 2; - ROOM_SERVER_US = 3; - ROOM_SERVER_ANON = 4; -} - -enum Privilage { - PRIV_NONE = 0; - PRIV_BUILD = 1; - PRIV_BROADCAST = 2; - PRIV_PROPERTY = 4; - PRIV_VIP = 8; - PRIV_VIP2 = 16; - PRIV_SPECIALGUEST = 64; -} diff --git a/NetworkData.proto b/NetworkData.proto deleted file mode 100644 index 786370e..0000000 --- a/NetworkData.proto +++ /dev/null @@ -1,9 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message NetData { - bytes data = 1; - int32 packet_size = 2; - int32 offset = 3; -} diff --git a/NetworkPacket.proto b/NetworkPacket.proto deleted file mode 100644 index 86876a7..0000000 --- a/NetworkPacket.proto +++ /dev/null @@ -1,67 +0,0 @@ -syntax = "proto3"; - -package whirl; - -import "AppearActorCommand.proto"; -import "AppInitCommand.proto"; -import "PropCommand.proto"; -import "BuddyListNotifyCommand.proto"; -import "BuddyListUpdateCommand.proto"; -import "ChannelCommand.proto"; -import "DisappearActorCommand.proto"; -import "FingerReplyCommand.proto"; -import "FingerRequestCommand.proto"; -import "LongLocationCommand.proto"; -import "PropertySetCommand.proto"; -import "PropertyUpdateCommand.proto"; -import "PropRequestCommand.proto"; -import "RedirectCommand.proto"; -import "RedirectIDCommand.proto"; -import "RoomIDCommand.proto"; -import "RoomIDRequestCommand.proto"; -import "SessionExitCommand.proto"; -import "SessionInitCommand.proto"; -import "ShortLocationCommand.proto"; -import "SubscribeDistanceCommand.proto"; -import "SubscribeRoomCommand.proto"; -import "TeleportCommand.proto"; -import "TextCommand.proto"; -import "UnsubscribeRoomCommand.proto"; -import "WhisperCommand.proto"; - -message NetworkPacket { - uint32 length = 1; - oneof object_id { - uint32 short_object_id = 2; - string long_object_id = 3; - } - uint32 type = 4; - oneof command { - AppearActorCommand appear_actor_command = 5; - AppInitCommand app_init_command = 6; - PropCommand prop_command = 7; - BuddyListNotifyCommand buddy_list_notify_command = 8; - BuddyListUpdateCommand buddy_list_update_command = 9; - ChannelCommand channel_command = 10; - DisappearActorCommand disappear_actor_command = 11; - FingerReplyCommand finger_reply_command = 12; - FingerRequestCommand finger_request_command = 13; - LongLocationCommand long_location_command = 14; - PropertySetCommand property_set_command = 15; - PropertyUpdateCommand property_update_command = 16; - PropRequestCommand prop_request_command = 17; - RedirectCommand redirect_command = 18; - RedirectIDCommand redirect_id_command = 19; - RoomIDCommand room_id_command = 20; - RoomIDRequestCommand room_id_request_command = 21; - SessionExitCommand session_exit_command = 22; - SessionInitCommand session_init_command = 23; - ShortLocationCommand short_location_command = 24; - SubscribeDistanceCommand subscribe_distance_command = 25; - SubscribeRoomCommand subscribe_room_command = 26; - TeleportCommand teleport_command = 27; - TextCommand text_command = 28; - UnsubscribeRoomCommand unsubscribe_room_command = 29; - WhisperCommand whisper_command = 30; - } -} diff --git a/NetworkProperty.proto b/NetworkProperty.proto deleted file mode 100644 index 4f30762..0000000 --- a/NetworkProperty.proto +++ /dev/null @@ -1,8 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message NetworkProperty { - int32 property_id = 1; - string value = 2; -} diff --git a/ObjID.proto b/ObjID.proto deleted file mode 100644 index bc8aa7e..0000000 --- a/ObjID.proto +++ /dev/null @@ -1,8 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message ObjID { - int32 short_object_id = 1; - string long_object_id = 2; -} \ No newline at end of file diff --git a/OldPropertyList.proto b/OldPropertyList.proto deleted file mode 100644 index 358ad67..0000000 --- a/OldPropertyList.proto +++ /dev/null @@ -1,9 +0,0 @@ -syntax = "proto3"; - -package whirl; - -import "NetworkProperty.proto"; - -message OldPropertyList { - repeated NetworkProperty properties = 1; -} diff --git a/PropCommand.proto b/PropCommand.proto deleted file mode 100644 index 6f52c0c..0000000 --- a/PropCommand.proto +++ /dev/null @@ -1,9 +0,0 @@ -syntax = "proto3"; - -package whirl; - -import "OldPropertyList.proto"; - -message PropCommand { - OldPropertyList property_list = 1; -} \ No newline at end of file diff --git a/PropRequestCommand.proto b/PropRequestCommand.proto deleted file mode 100644 index 040bf4d..0000000 --- a/PropRequestCommand.proto +++ /dev/null @@ -1,7 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message PropRequestCommand { - repeated int32 variable_ids = 1; -} diff --git a/PropertyList.proto b/PropertyList.proto deleted file mode 100644 index 15e5ec7..0000000 --- a/PropertyList.proto +++ /dev/null @@ -1,9 +0,0 @@ -syntax = "proto3"; - -package whirl; - -import "Network2Property.proto"; - -message PropertyList { - repeated Network2Property properties = 1; -} diff --git a/PropertySetCommand.proto b/PropertySetCommand.proto deleted file mode 100644 index 76edf40..0000000 --- a/PropertySetCommand.proto +++ /dev/null @@ -1,10 +0,0 @@ -syntax = "proto3"; - -package whirl; - -import "PropertyList.proto"; - -message PropertySetCommand { - string from_user = 1; - PropertyList property_list = 2; -} diff --git a/PropertyUpdateCommand.proto b/PropertyUpdateCommand.proto deleted file mode 100644 index 3ca0ada..0000000 --- a/PropertyUpdateCommand.proto +++ /dev/null @@ -1,9 +0,0 @@ -syntax = "proto3"; - -package whirl; - -import "PropertyList.proto"; - -message PropertyUpdateCommand { - PropertyList property_list = 1; -} diff --git a/RedirectCommand.proto b/RedirectCommand.proto deleted file mode 100644 index 7c1ce16..0000000 --- a/RedirectCommand.proto +++ /dev/null @@ -1,12 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message RedirectCommand { - int32 room_number = 1; - int32 ip_1 = 2; - int32 ip_2 = 3; - int32 ip_3 = 4; - int32 ip_4 = 5; - int32 port = 6; -} diff --git a/RedirectIDCommand.proto b/RedirectIDCommand.proto deleted file mode 100644 index 023377d..0000000 --- a/RedirectIDCommand.proto +++ /dev/null @@ -1,13 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message RedirectIDCommand { - string room_name = 1; - int32 room_number = 2; - int32 ip_1 = 3; - int32 ip_2 = 4; - int32 ip_3 = 5; - int32 ip_4 = 6; - int32 port = 7; -} diff --git a/RoomIDCommand.proto b/RoomIDCommand.proto deleted file mode 100644 index 237a96f..0000000 --- a/RoomIDCommand.proto +++ /dev/null @@ -1,8 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message RoomIDCommand { - string room_name = 1; - int32 room_number = 2; -} diff --git a/RoomIDRequestCommand.proto b/RoomIDRequestCommand.proto deleted file mode 100644 index 75f5d54..0000000 --- a/RoomIDRequestCommand.proto +++ /dev/null @@ -1,7 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message RoomIDRequestCommand { - string room_name = 1; -} diff --git a/SessionExitCommand.proto b/SessionExitCommand.proto deleted file mode 100644 index da48f34..0000000 --- a/SessionExitCommand.proto +++ /dev/null @@ -1,9 +0,0 @@ -syntax = "proto3"; - -package whirl; - -import "OldPropertyList.proto"; - -message SessionExitCommand { - OldPropertyList property_list = 1; -} diff --git a/SessionInitCommand.proto b/SessionInitCommand.proto deleted file mode 100644 index 477a9c2..0000000 --- a/SessionInitCommand.proto +++ /dev/null @@ -1,9 +0,0 @@ -syntax = "proto3"; - -package whirl; - -import "OldPropertyList.proto"; - -message SessionInitCommand { - OldPropertyList property_list = 1; -} diff --git a/ShortLocationCommand.proto b/ShortLocationCommand.proto deleted file mode 100644 index 2be8ac1..0000000 --- a/ShortLocationCommand.proto +++ /dev/null @@ -1,9 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message ShortLocationCommand { - int32 dx = 1; - int32 dy = 2; - int32 ddirection = 3; -} diff --git a/SubscribeDistanceCommand.proto b/SubscribeDistanceCommand.proto deleted file mode 100644 index 5881a2e..0000000 --- a/SubscribeDistanceCommand.proto +++ /dev/null @@ -1,8 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message SubscribeDistanceCommand { - int32 room_number = 1; - int32 distance = 2; -} diff --git a/SubscribeRoomCommand.proto b/SubscribeRoomCommand.proto deleted file mode 100644 index 9866e43..0000000 --- a/SubscribeRoomCommand.proto +++ /dev/null @@ -1,11 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message SubscribeRoomCommand { - int32 room_number = 1; - int32 x = 2; - int32 y = 3; - int32 z = 4; - int32 distance = 5; -} diff --git a/TeleportCommand.proto b/TeleportCommand.proto deleted file mode 100644 index d0c92b9..0000000 --- a/TeleportCommand.proto +++ /dev/null @@ -1,13 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message TeleportCommand { - int32 room_id = 1; - int32 exit_type = 2; - int32 entry_type = 3; - int32 x = 4; - int32 y = 5; - int32 z = 6; - int32 direction = 7; -} diff --git a/TextCommand.proto b/TextCommand.proto deleted file mode 100644 index 8da6086..0000000 --- a/TextCommand.proto +++ /dev/null @@ -1,10 +0,0 @@ -syntax = "proto3"; - -package whirl; - -import "ObjID.proto"; - -message TextCommand { - ObjID sender_id = 1; - string text = 2; -} diff --git a/UnsubscribeRoomCommand.proto b/UnsubscribeRoomCommand.proto deleted file mode 100644 index a0bab2b..0000000 --- a/UnsubscribeRoomCommand.proto +++ /dev/null @@ -1,7 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message UnsubscribeRoomCommand { - int32 room_number = 1; -} diff --git a/WhisperCommand.proto b/WhisperCommand.proto deleted file mode 100644 index 746b2fe..0000000 --- a/WhisperCommand.proto +++ /dev/null @@ -1,11 +0,0 @@ -syntax = "proto3"; - -package whirl; - -import "ObjID.proto"; - -message WhisperCommand { - ObjID sender_id = 1; - string text = 2; - ObjID receiver_id = 3; -} diff --git a/app_init_command.proto b/app_init_command.proto new file mode 100644 index 0000000..d7feed5 --- /dev/null +++ b/app_init_command.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package whirl; + +import "network_property.proto"; + +message AppInitCommand { + repeated NetworkProperty property_list = 2; +} \ No newline at end of file diff --git a/appear_actor_command.proto b/appear_actor_command.proto new file mode 100644 index 0000000..718af2d --- /dev/null +++ b/appear_actor_command.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + +package whirl; + +message AppearActorCommand { + int32 room_id = 1; + int32 x = 2; + int32 y = 3; + int32 z = 4; + int32 direction = 5; +} diff --git a/buddy_list_notify_command.proto b/buddy_list_notify_command.proto new file mode 100644 index 0000000..34259ea --- /dev/null +++ b/buddy_list_notify_command.proto @@ -0,0 +1,8 @@ +syntax = "proto3"; + +package whirl; + +message BuddyListNotifyCommand { + string buddy_name = 1; + int32 logged_on = 2; +} diff --git a/buddy_list_update_command.proto b/buddy_list_update_command.proto new file mode 100644 index 0000000..d422f55 --- /dev/null +++ b/buddy_list_update_command.proto @@ -0,0 +1,8 @@ +syntax = "proto3"; + +package whirl; + +message BuddyListUpdateCommand { + string buddy = 1; + int32 add = 2; +} diff --git a/build/test.py b/build/test.py index f23bbc4..cf4b869 100644 --- a/build/test.py +++ b/build/test.py @@ -1,13 +1,13 @@ -import NetworkPacket_pb2 -import BuddyListNotifyCommand_pb2 +import network_packet_pb2 as network_packet +import buddy_list_notify_command_pb2 as buddy_list_notify_command -request = NetworkPacket_pb2.NetworkPacket() +request = network_packet.NetworkPacket() request.length = 3 request.short_object_id = 0xFF request.type = 0x0A request.buddy_list_notify_command.CopyFrom( - BuddyListNotifyCommand_pb2.BuddyListNotifyCommand() + buddy_list_notify_command.BuddyListNotifyCommand() ) request.buddy_list_notify_command.buddy_name = "Whirl" request.buddy_list_notify_command.logged_on = 1 @@ -15,7 +15,7 @@ request.buddy_list_notify_command.logged_on = 1 print(request.SerializeToString()) print(request.WhichOneof("command")) -deserialised_request = NetworkPacket_pb2.NetworkPacket() +deserialised_request = network_packet.NetworkPacket() deserialised_request.ParseFromString(request.SerializeToString()) diff --git a/channel_command.proto b/channel_command.proto new file mode 100644 index 0000000..b76f984 --- /dev/null +++ b/channel_command.proto @@ -0,0 +1,7 @@ +syntax = "proto3"; + +package whirl; + +message ChannelCommand { + string channel = 1; +} diff --git a/command.proto b/command.proto new file mode 100644 index 0000000..d3b69fa --- /dev/null +++ b/command.proto @@ -0,0 +1,35 @@ +syntax = "proto3"; + +package whirl; + +enum Command { + UNKNOWN = 0; + APPEARACTORCMD = 12; + APPINITCMD = 8; + BUDDYLISTNOTIFYCMD = 30; + BUDDYLISTUPDATECMD = 29; + CHANNELCMD = 31; + DISAPPEARACTORCMD = 11; + FINGERREPLYCMD = 28; + FINGERREQCMD = 27; + LONGLOCCMD = 1; + PROPCMD = 3; + PROPSETCMD = 15; + PROPUPDCMD = 16; + PROPREQCMD = 10; + REDIRECTCMD = 25; + REDIRECTIDCMD = 26; + REGOBJIDCMD = 13; + ROOMCHNGCMD = 5; + ROOMIDCMD = 21; + ROOMIDREQCMD = 20; + SESSIONEXITCMD = 7; + SESSIONINITCMD = 6; + SHORTLOCCMD = 4; + SUBSCRIBEDISTCMD = 24; + SUBSCRIBEROOMCMD = 22; + TELEPORTCMD = 18; + TEXTCMD = 14; + UNSUBSCRIBEROOMCMD = 23; + WHISPERCMD = 17; +} diff --git a/disappear_actor_command.proto b/disappear_actor_command.proto new file mode 100644 index 0000000..fe7770a --- /dev/null +++ b/disappear_actor_command.proto @@ -0,0 +1,5 @@ +syntax = "proto3"; + +package whirl; + +message DisappearActorCommand {}; diff --git a/finger_reply_command.proto b/finger_reply_command.proto new file mode 100644 index 0000000..0821c32 --- /dev/null +++ b/finger_reply_command.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + +package whirl; + +import "property_list.proto"; + +message FingerReplyCommand { + string user = 1; + PropertyList property_list = 2; +} diff --git a/finger_request_command.proto b/finger_request_command.proto new file mode 100644 index 0000000..4727e9c --- /dev/null +++ b/finger_request_command.proto @@ -0,0 +1,7 @@ +syntax = "proto3"; + +package whirl; + +message FingerRequestCommand { + string user = 1; +} diff --git a/long_location_command.proto b/long_location_command.proto new file mode 100644 index 0000000..913dbd2 --- /dev/null +++ b/long_location_command.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + +package whirl; + +message LongLocationCommand { + int32 x = 1; + int32 y = 2; + int32 z = 3; + int32 direction = 4; +} diff --git a/network_2_property.proto b/network_2_property.proto new file mode 100644 index 0000000..94f6309 --- /dev/null +++ b/network_2_property.proto @@ -0,0 +1,13 @@ +syntax = "proto3"; + +package whirl; + +message Network2Property { + int32 prop_id = 1; + int32 flags = 2; + int32 access = 3; + oneof value { + string string_value = 4; + bytes binary_value = 5; + } +} \ No newline at end of file diff --git a/network_commands.proto b/network_commands.proto new file mode 100644 index 0000000..d909716 --- /dev/null +++ b/network_commands.proto @@ -0,0 +1,8 @@ +syntax = "proto3"; + +package whirl; + +message NetworkCommands { + repeated string receivable_network_packet = 1; + map property_list = 2; +} diff --git a/network_constants.proto b/network_constants.proto new file mode 100644 index 0000000..e51476f --- /dev/null +++ b/network_constants.proto @@ -0,0 +1,132 @@ +syntax = "proto3"; + +package whirl; + +enum NetConst { + UNKNOWN = 0; + + PROTOCOL_VERSION = 24; + + STATECMD = 2; + + MAXCMD = 255; + CURRENT_ROOM = 253; +} + +enum Client { + UNKNOWN_CLIENT = 0; + + CLIENT = 1; + CO = 254; + PO = 255; +} + +enum Variable { + VAR_NULL = 0; + VAR_APPNAME = 1; + VAR_USERNAME = 2; + VAR_PROTOCOL = 3; + VAR_ERROR = 4; + VAR_CHANNEL = 5; + VAR_BITMAP = 6; + VAR_PASSWORD = 7; + VAR_AVATARS = 8; + VAR_UPDATETIME = 9; + VAR_CLIENT = 10; + VAR_SERIAL = 11; + VAR_EMAIL = 12; + VAR_LOGONOFF = 13; + VAR_DURATION = 14; + VAR_GUEST = 15; + VAR_SERVERTYPE = 16; + VAR_BIZCARD = 17; + VAR_NEW_PASSWD = 18; + VAR_PRIV = 19; + VAR_ASLEEP = 20; + VAR_EXTERNAL_HTTP_SERVER = 21; + VAR_SCRIPT_SERVER = 22; + VAR_SMTP_SERVER = 23; + VAR_MAIL_DOMAIN = 24; + VAR_NEW_USERNAME = 25; + VAR_INTERNAL_HTTP_SERVER = 26; + VAR_INVENTORY = 27; +} + +enum Acknowledgement { + ACK = 0; + NAK_BAD_USER = 1; + NAK_MAX_ORDINARY = 2; + NAK_MAX_PRIORITY = 3; + NAK_BAD_WORLD = 4; + NAK_FATAL = 5; + NAK_BAD_PROTOCOL = 6; + NAK_BAD_CLIENTSW = 7; + NAK_BAD_ROOM = 8; + NAK_BAD_SERIAL = 9; + NAK_TAKEN_SERIAL = 10; + NAK_TAKEN_USER = 11; + NAK_NO_SUCH_USER = 12; + NAK_BAD_PASSWORD = 13; + NAK_BAD_ACCOUNT = 14; + NAK_NOT_LOGGEDON = 15; + NAK_BAD_IPADDRESS = 16; + NAK_LOGGEDON = 17; + NAK_CRYPT_METHOD = 18; + NAK_CRYPT_ERROR = 19; + NAK_SESSIONINIT = 20; + NAK_ROOM_FULL = 21; + NAK_SHUTDOWN = 100; + NAK_WRITE_ERROR = 101; + NAK_READ_ERROR = 102; + NAK_UNEXPECTED = 103; + NAK_CONNECTION = 104; + NAK_IOSTREAMS = 105; + NAK_TIMEOUT = 106; + NAK_UNREACHABLE = 107; +} + +enum Status { + STATUS_UNKNOWN = 0; + + STATUS_CONNECTED = 200; + STATUS_DETACHING = 201; + STATUS_WILLRETRY = 202; + STATUS_DISCONNECTED = 203; + STATUS_DEAD = 204; + STATUS_OFFLINE = 205; + STATUS_GALAXY_ONLINE = 206; + STATUS_GALAXY_OFFLINE = 207; // 206 +} + +enum PropertyFlag { + PROPFLAG_NONE = 0; + PROPFLAG_BINARY = 16; + PROPFLAG_FINGER = 32; + PROPFLAG_AUTOUPDATE = 64; + PROPFLAG_DBSTORE = 128; +} + +enum PropertyAccess { + PROPACCESS_UNKNOWN = 0; + + PROPACCESS_POSSESS = 1; + PROPACCESS_PRIVATE = 2; +} + +enum Server { + SERVER_UNKNOWN = 0; + USER_SERVER_DB = 1; + USER_SERVER_ANON = 2; + ROOM_SERVER_US = 3; + ROOM_SERVER_ANON = 4; +} + +enum Privilage { + PRIV_NONE = 0; + PRIV_BUILD = 1; + PRIV_BROADCAST = 2; + PRIV_PROPERTY = 4; + PRIV_VIP = 8; + PRIV_VIP2 = 16; + PRIV_SPECIALGUEST = 64; +} diff --git a/network_data.proto b/network_data.proto new file mode 100644 index 0000000..786370e --- /dev/null +++ b/network_data.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package whirl; + +message NetData { + bytes data = 1; + int32 packet_size = 2; + int32 offset = 3; +} diff --git a/network_packet.proto b/network_packet.proto new file mode 100644 index 0000000..d58d303 --- /dev/null +++ b/network_packet.proto @@ -0,0 +1,67 @@ +syntax = "proto3"; + +package whirl; + +import "appear_actor_command.proto"; +import "app_init_command.proto"; +import "prop_command.proto"; +import "buddy_list_notify_command.proto"; +import "buddy_list_update_command.proto"; +import "channel_command.proto"; +import "disappear_actor_command.proto"; +import "finger_reply_command.proto"; +import "finger_request_command.proto"; +import "long_location_command.proto"; +import "property_set_command.proto"; +import "property_update_command.proto"; +import "prop_request_command.proto"; +import "redirect_command.proto"; +import "redirect_id_command.proto"; +import "room_id_command.proto"; +import "room_id_request_command.proto"; +import "session_exit_command.proto"; +import "session_init_command.proto"; +import "short_location_command.proto"; +import "subscribe_distance_command.proto"; +import "subscribe_room_command.proto"; +import "teleport_command.proto"; +import "text_command.proto"; +import "unsubscribe_room_command.proto"; +import "whisper_command.proto"; + +message NetworkPacket { + uint32 length = 1; + oneof object_id { + uint32 short_object_id = 2; + string long_object_id = 3; + } + uint32 type = 4; + oneof command { + AppearActorCommand appear_actor_command = 5; + AppInitCommand app_init_command = 6; + PropCommand prop_command = 7; + BuddyListNotifyCommand buddy_list_notify_command = 8; + BuddyListUpdateCommand buddy_list_update_command = 9; + ChannelCommand channel_command = 10; + DisappearActorCommand disappear_actor_command = 11; + FingerReplyCommand finger_reply_command = 12; + FingerRequestCommand finger_request_command = 13; + LongLocationCommand long_location_command = 14; + PropertySetCommand property_set_command = 15; + PropertyUpdateCommand property_update_command = 16; + PropRequestCommand prop_request_command = 17; + RedirectCommand redirect_command = 18; + RedirectIDCommand redirect_id_command = 19; + RoomIDCommand room_id_command = 20; + RoomIDRequestCommand room_id_request_command = 21; + SessionExitCommand session_exit_command = 22; + SessionInitCommand session_init_command = 23; + ShortLocationCommand short_location_command = 24; + SubscribeDistanceCommand subscribe_distance_command = 25; + SubscribeRoomCommand subscribe_room_command = 26; + TeleportCommand teleport_command = 27; + TextCommand text_command = 28; + UnsubscribeRoomCommand unsubscribe_room_command = 29; + WhisperCommand whisper_command = 30; + } +} diff --git a/network_property.proto b/network_property.proto new file mode 100644 index 0000000..4f30762 --- /dev/null +++ b/network_property.proto @@ -0,0 +1,8 @@ +syntax = "proto3"; + +package whirl; + +message NetworkProperty { + int32 property_id = 1; + string value = 2; +} diff --git a/obj_id.proto b/obj_id.proto new file mode 100644 index 0000000..bc8aa7e --- /dev/null +++ b/obj_id.proto @@ -0,0 +1,8 @@ +syntax = "proto3"; + +package whirl; + +message ObjID { + int32 short_object_id = 1; + string long_object_id = 2; +} \ No newline at end of file diff --git a/old_property_list.proto b/old_property_list.proto new file mode 100644 index 0000000..cacdc50 --- /dev/null +++ b/old_property_list.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package whirl; + +import "network_property.proto"; + +message OldPropertyList { + repeated NetworkProperty properties = 1; +} diff --git a/prop_command.proto b/prop_command.proto new file mode 100644 index 0000000..c847c92 --- /dev/null +++ b/prop_command.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package whirl; + +import "old_property_list.proto"; + +message PropCommand { + OldPropertyList property_list = 1; +} \ No newline at end of file diff --git a/prop_request_command.proto b/prop_request_command.proto new file mode 100644 index 0000000..040bf4d --- /dev/null +++ b/prop_request_command.proto @@ -0,0 +1,7 @@ +syntax = "proto3"; + +package whirl; + +message PropRequestCommand { + repeated int32 variable_ids = 1; +} diff --git a/property_list.proto b/property_list.proto new file mode 100644 index 0000000..c2e1fbd --- /dev/null +++ b/property_list.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package whirl; + +import "network_2_property.proto"; + +message PropertyList { + repeated Network2Property properties = 1; +} diff --git a/property_set_command.proto b/property_set_command.proto new file mode 100644 index 0000000..df6b7bc --- /dev/null +++ b/property_set_command.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + +package whirl; + +import "property_list.proto"; + +message PropertySetCommand { + string from_user = 1; + PropertyList property_list = 2; +} diff --git a/property_update_command.proto b/property_update_command.proto new file mode 100644 index 0000000..5259978 --- /dev/null +++ b/property_update_command.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package whirl; + +import "property_list.proto"; + +message PropertyUpdateCommand { + PropertyList property_list = 1; +} diff --git a/redirect_command.proto b/redirect_command.proto new file mode 100644 index 0000000..7c1ce16 --- /dev/null +++ b/redirect_command.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; + +package whirl; + +message RedirectCommand { + int32 room_number = 1; + int32 ip_1 = 2; + int32 ip_2 = 3; + int32 ip_3 = 4; + int32 ip_4 = 5; + int32 port = 6; +} diff --git a/redirect_id_command.proto b/redirect_id_command.proto new file mode 100644 index 0000000..023377d --- /dev/null +++ b/redirect_id_command.proto @@ -0,0 +1,13 @@ +syntax = "proto3"; + +package whirl; + +message RedirectIDCommand { + string room_name = 1; + int32 room_number = 2; + int32 ip_1 = 3; + int32 ip_2 = 4; + int32 ip_3 = 5; + int32 ip_4 = 6; + int32 port = 7; +} diff --git a/room_id_command.proto b/room_id_command.proto new file mode 100644 index 0000000..237a96f --- /dev/null +++ b/room_id_command.proto @@ -0,0 +1,8 @@ +syntax = "proto3"; + +package whirl; + +message RoomIDCommand { + string room_name = 1; + int32 room_number = 2; +} diff --git a/room_id_request_command.proto b/room_id_request_command.proto new file mode 100644 index 0000000..75f5d54 --- /dev/null +++ b/room_id_request_command.proto @@ -0,0 +1,7 @@ +syntax = "proto3"; + +package whirl; + +message RoomIDRequestCommand { + string room_name = 1; +} diff --git a/session_exit_command.proto b/session_exit_command.proto new file mode 100644 index 0000000..9a5fc4f --- /dev/null +++ b/session_exit_command.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package whirl; + +import "old_property_list.proto"; + +message SessionExitCommand { + OldPropertyList property_list = 1; +} diff --git a/session_init_command.proto b/session_init_command.proto new file mode 100644 index 0000000..42a3bdb --- /dev/null +++ b/session_init_command.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package whirl; + +import "old_property_list.proto"; + +message SessionInitCommand { + OldPropertyList property_list = 1; +} diff --git a/short_location_command.proto b/short_location_command.proto new file mode 100644 index 0000000..2be8ac1 --- /dev/null +++ b/short_location_command.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package whirl; + +message ShortLocationCommand { + int32 dx = 1; + int32 dy = 2; + int32 ddirection = 3; +} diff --git a/subscribe_distance_command.proto b/subscribe_distance_command.proto new file mode 100644 index 0000000..5881a2e --- /dev/null +++ b/subscribe_distance_command.proto @@ -0,0 +1,8 @@ +syntax = "proto3"; + +package whirl; + +message SubscribeDistanceCommand { + int32 room_number = 1; + int32 distance = 2; +} diff --git a/subscribe_room_command.proto b/subscribe_room_command.proto new file mode 100644 index 0000000..9866e43 --- /dev/null +++ b/subscribe_room_command.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + +package whirl; + +message SubscribeRoomCommand { + int32 room_number = 1; + int32 x = 2; + int32 y = 3; + int32 z = 4; + int32 distance = 5; +} diff --git a/teleport_command.proto b/teleport_command.proto new file mode 100644 index 0000000..d0c92b9 --- /dev/null +++ b/teleport_command.proto @@ -0,0 +1,13 @@ +syntax = "proto3"; + +package whirl; + +message TeleportCommand { + int32 room_id = 1; + int32 exit_type = 2; + int32 entry_type = 3; + int32 x = 4; + int32 y = 5; + int32 z = 6; + int32 direction = 7; +} diff --git a/text_command.proto b/text_command.proto new file mode 100644 index 0000000..bb58baf --- /dev/null +++ b/text_command.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + +package whirl; + +import "obj_id.proto"; + +message TextCommand { + ObjID sender_id = 1; + string text = 2; +} diff --git a/unsubscribe_room_command.proto b/unsubscribe_room_command.proto new file mode 100644 index 0000000..a0bab2b --- /dev/null +++ b/unsubscribe_room_command.proto @@ -0,0 +1,7 @@ +syntax = "proto3"; + +package whirl; + +message UnsubscribeRoomCommand { + int32 room_number = 1; +} diff --git a/whisper_command.proto b/whisper_command.proto new file mode 100644 index 0000000..4be883f --- /dev/null +++ b/whisper_command.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + +package whirl; + +import "obj_id.proto"; + +message WhisperCommand { + ObjID sender_id = 1; + string text = 2; + ObjID receiver_id = 3; +} -- cgit v1.2.3