From b49291a6110a5f69ecb7390193bcd478e817c75e Mon Sep 17 00:00:00 2001 From: Jake Turner Date: Wed, 7 Jan 2026 09:10:06 +1300 Subject: [PATCH] Make enum RemoteServerPacket into enum class, move Count to the end --- renderdoc/core/remote_server.cpp | 398 ++++++++++++++++--------------- 1 file changed, 201 insertions(+), 197 deletions(-) diff --git a/renderdoc/core/remote_server.cpp b/renderdoc/core/remote_server.cpp index d72744b7f..495e2394b 100644 --- a/renderdoc/core/remote_server.cpp +++ b/renderdoc/core/remote_server.cpp @@ -50,53 +50,54 @@ RDOC_CONFIG(bool, RemoteServer_DebugLogging, false, static const uint32_t RemoteServerProtocolVersion = MAKE_REMOTE_SERVER_VERSION(RENDERDOC_VERSION_MAJOR, RENDERDOC_VERSION_MINOR); -enum RemoteServerPacket +enum class RemoteServerPacket { // fixed packets. These are used cross-version so MUST NOT CHANGE - eRemoteServer_Noop = 1, - eRemoteServer_Handshake, - eRemoteServer_VersionMismatch, - eRemoteServer_Busy, - eRemoteServer_VersionMismatch2, // sent for versions 1.23 and above, including the version info + Noop = 1, + Handshake, + VersionMismatch, + Busy, + VersionMismatch2, // sent for versions 1.23 and above, including the version info // variable packets. These are used only after a handshake has been established with an identical // version so can be freely changed - eRemoteServer_Ping, - eRemoteServer_RemoteDriverList, - eRemoteServer_TakeOwnershipCapture, - eRemoteServer_CopyCaptureToRemote, - eRemoteServer_CopyCaptureFromRemote, - eRemoteServer_OpenLog, - eRemoteServer_LogOpenProgress, - eRemoteServer_LogOpened, - eRemoteServer_HasCallstacks, - eRemoteServer_InitResolver, - eRemoteServer_ResolverProgress, - eRemoteServer_GetResolve, - eRemoteServer_CloseLog, - eRemoteServer_HomeDir, - eRemoteServer_ListDir, - eRemoteServer_ExecuteAndInject, - eRemoteServer_ShutdownServer, - eRemoteServer_GetDriverName, - eRemoteServer_GetSectionCount, - eRemoteServer_FindSectionByName, - eRemoteServer_FindSectionByType, - eRemoteServer_GetSectionProperties, - eRemoteServer_GetSectionContents, - eRemoteServer_WriteSection, - eRemoteServer_GetAvailableGPUs, - eRemoteServer_RemoteServerCount, - eRemoteServer_EmbedDependenciesIntoCapture, - eRemoteServer_RemoveDependenciesFromCapture, - eRemoteServer_HasEmbeddedDependencies, - eRemoteServer_HasPendingDependencies, - eRemoteServer_GetPendingDependenciesNicknames, + Ping, + RemoteDriverList, + TakeOwnershipCapture, + CopyCaptureToRemote, + CopyCaptureFromRemote, + OpenLog, + LogOpenProgress, + LogOpened, + HasCallstacks, + InitResolver, + ResolverProgress, + GetResolve, + CloseLog, + HomeDir, + ListDir, + ExecuteAndInject, + ShutdownServer, + GetDriverName, + GetSectionCount, + FindSectionByName, + FindSectionByType, + GetSectionProperties, + GetSectionContents, + WriteSection, + GetAvailableGPUs, + EmbedDependenciesIntoCapture, + RemoveDependenciesFromCapture, + HasEmbeddedDependencies, + HasPendingDependencies, + GetPendingDependenciesNicknames, + // This must be last + Count, }; DECLARE_REFLECTION_ENUM(RemoteServerPacket); -RDCCOMPILE_ASSERT((int)eRemoteServer_RemoteServerCount < (int)eReplayProxy_First, +RDCCOMPILE_ASSERT((int)RemoteServerPacket::Count < (int)eReplayProxy_First, "Remote server and Replay Proxy packets overlap"); template <> @@ -104,56 +105,59 @@ rdcstr DoStringise(const RemoteServerPacket &el) { BEGIN_ENUM_STRINGISE(RemoteServerPacket); { - STRINGISE_ENUM_NAMED(eRemoteServer_Noop, "No-op"); - STRINGISE_ENUM_NAMED(eRemoteServer_Handshake, "Handshake"); - STRINGISE_ENUM_NAMED(eRemoteServer_VersionMismatch, "VersionMismatch"); - STRINGISE_ENUM_NAMED(eRemoteServer_Busy, "Busy"); - STRINGISE_ENUM_NAMED(eRemoteServer_VersionMismatch2, "VersionMismatch"); + STRINGISE_ENUM_NAMED(RemoteServerPacket::Noop, "No-op"); + STRINGISE_ENUM_NAMED(RemoteServerPacket::Handshake, "Handshake"); + STRINGISE_ENUM_NAMED(RemoteServerPacket::VersionMismatch, "VersionMismatch"); + STRINGISE_ENUM_NAMED(RemoteServerPacket::Busy, "Busy"); + STRINGISE_ENUM_NAMED(RemoteServerPacket::VersionMismatch2, "VersionMismatch"); - STRINGISE_ENUM_NAMED(eRemoteServer_Ping, "Ping"); - STRINGISE_ENUM_NAMED(eRemoteServer_RemoteDriverList, "RemoteDriverList"); - STRINGISE_ENUM_NAMED(eRemoteServer_TakeOwnershipCapture, "TakeOwnershipCapture"); - STRINGISE_ENUM_NAMED(eRemoteServer_CopyCaptureToRemote, "CopyCaptureToRemote"); - STRINGISE_ENUM_NAMED(eRemoteServer_CopyCaptureFromRemote, "CopyCaptureFromRemote"); - STRINGISE_ENUM_NAMED(eRemoteServer_OpenLog, "OpenLog"); - STRINGISE_ENUM_NAMED(eRemoteServer_LogOpenProgress, "LogOpenProgress"); - STRINGISE_ENUM_NAMED(eRemoteServer_LogOpened, "LogOpened"); - STRINGISE_ENUM_NAMED(eRemoteServer_HasCallstacks, "HasCallstacks"); - STRINGISE_ENUM_NAMED(eRemoteServer_InitResolver, "InitResolver"); - STRINGISE_ENUM_NAMED(eRemoteServer_ResolverProgress, "ResolverProgress"); - STRINGISE_ENUM_NAMED(eRemoteServer_GetResolve, "GetResolve"); - STRINGISE_ENUM_NAMED(eRemoteServer_CloseLog, "CloseLog"); - STRINGISE_ENUM_NAMED(eRemoteServer_HomeDir, "HomeDir"); - STRINGISE_ENUM_NAMED(eRemoteServer_ListDir, "ListDir"); - STRINGISE_ENUM_NAMED(eRemoteServer_ExecuteAndInject, "ExecuteAndInject"); - STRINGISE_ENUM_NAMED(eRemoteServer_ShutdownServer, "ShutdownServer"); - STRINGISE_ENUM_NAMED(eRemoteServer_GetDriverName, "GetDriverName"); - STRINGISE_ENUM_NAMED(eRemoteServer_GetSectionCount, "GetSectionCount"); - STRINGISE_ENUM_NAMED(eRemoteServer_FindSectionByName, "FindSectionByName"); - STRINGISE_ENUM_NAMED(eRemoteServer_FindSectionByType, "FindSectionByType"); - STRINGISE_ENUM_NAMED(eRemoteServer_GetSectionProperties, "GetSectionProperties"); - STRINGISE_ENUM_NAMED(eRemoteServer_GetSectionContents, "GetSectionContents"); - STRINGISE_ENUM_NAMED(eRemoteServer_WriteSection, "WriteSection"); - STRINGISE_ENUM_NAMED(eRemoteServer_GetAvailableGPUs, "GetAvailableGPUs"); - STRINGISE_ENUM_NAMED(eRemoteServer_RemoteServerCount, "RemoteServerCount"); - STRINGISE_ENUM_NAMED(eRemoteServer_EmbedDependenciesIntoCapture, + STRINGISE_ENUM_NAMED(RemoteServerPacket::Ping, "Ping"); + STRINGISE_ENUM_NAMED(RemoteServerPacket::RemoteDriverList, "RemoteDriverList"); + STRINGISE_ENUM_NAMED(RemoteServerPacket::TakeOwnershipCapture, "TakeOwnershipCapture"); + STRINGISE_ENUM_NAMED(RemoteServerPacket::CopyCaptureToRemote, "CopyCaptureToRemote"); + STRINGISE_ENUM_NAMED(RemoteServerPacket::CopyCaptureFromRemote, "CopyCaptureFromRemote"); + STRINGISE_ENUM_NAMED(RemoteServerPacket::OpenLog, "OpenLog"); + STRINGISE_ENUM_NAMED(RemoteServerPacket::LogOpenProgress, "LogOpenProgress"); + STRINGISE_ENUM_NAMED(RemoteServerPacket::LogOpened, "LogOpened"); + STRINGISE_ENUM_NAMED(RemoteServerPacket::HasCallstacks, "HasCallstacks"); + STRINGISE_ENUM_NAMED(RemoteServerPacket::InitResolver, "InitResolver"); + STRINGISE_ENUM_NAMED(RemoteServerPacket::ResolverProgress, "ResolverProgress"); + STRINGISE_ENUM_NAMED(RemoteServerPacket::GetResolve, "GetResolve"); + STRINGISE_ENUM_NAMED(RemoteServerPacket::CloseLog, "CloseLog"); + STRINGISE_ENUM_NAMED(RemoteServerPacket::HomeDir, "HomeDir"); + STRINGISE_ENUM_NAMED(RemoteServerPacket::ListDir, "ListDir"); + STRINGISE_ENUM_NAMED(RemoteServerPacket::ExecuteAndInject, "ExecuteAndInject"); + STRINGISE_ENUM_NAMED(RemoteServerPacket::ShutdownServer, "ShutdownServer"); + STRINGISE_ENUM_NAMED(RemoteServerPacket::GetDriverName, "GetDriverName"); + STRINGISE_ENUM_NAMED(RemoteServerPacket::GetSectionCount, "GetSectionCount"); + STRINGISE_ENUM_NAMED(RemoteServerPacket::FindSectionByName, "FindSectionByName"); + STRINGISE_ENUM_NAMED(RemoteServerPacket::FindSectionByType, "FindSectionByType"); + STRINGISE_ENUM_NAMED(RemoteServerPacket::GetSectionProperties, "GetSectionProperties"); + STRINGISE_ENUM_NAMED(RemoteServerPacket::GetSectionContents, "GetSectionContents"); + STRINGISE_ENUM_NAMED(RemoteServerPacket::WriteSection, "WriteSection"); + STRINGISE_ENUM_NAMED(RemoteServerPacket::GetAvailableGPUs, "GetAvailableGPUs"); + STRINGISE_ENUM_NAMED(RemoteServerPacket::EmbedDependenciesIntoCapture, "EmbedDependenciesIntoCapture"); - STRINGISE_ENUM_NAMED(eRemoteServer_RemoveDependenciesFromCapture, + STRINGISE_ENUM_NAMED(RemoteServerPacket::RemoveDependenciesFromCapture, "RemoveDependenciesFromCapture"); - STRINGISE_ENUM_NAMED(eRemoteServer_HasEmbeddedDependencies, "HasEmbeddedDependencies"); - STRINGISE_ENUM_NAMED(eRemoteServer_HasPendingDependencies, "HasPendingDependencies"); - STRINGISE_ENUM_NAMED(eRemoteServer_GetPendingDependenciesNicknames, + STRINGISE_ENUM_NAMED(RemoteServerPacket::HasEmbeddedDependencies, "HasEmbeddedDependencies"); + STRINGISE_ENUM_NAMED(RemoteServerPacket::HasPendingDependencies, "HasPendingDependencies"); + STRINGISE_ENUM_NAMED(RemoteServerPacket::GetPendingDependenciesNicknames, "GetPendingDependenciesNicknames"); + STRINGISE_ENUM_NAMED(RemoteServerPacket::Count, "Count"); } END_ENUM_STRINGISE(); } rdcstr GetRemoteServerChunkName(uint32_t idx) { - if(idx < eRemoteServer_RemoteServerCount) + if(idx <= (uint32_t)RemoteServerPacket::Count) return ToStr((RemoteServerPacket)idx); - return ToStr((ReplayProxyPacket)idx); + if(idx >= eReplayProxy_First) + return ToStr((ReplayProxyPacket)idx); + + return StringFormat::Fmt("Invalid RemoteServerChunkIndex %u", idx); } #define WRITE_DATA_SCOPE() WriteSerialiser &ser = writer; @@ -199,7 +203,7 @@ static bool HandleHandshakeClient(ActiveClient &activeClient, ClientThread *thre // the server thread RemoteServerPacket type = ser.ReadChunk(); - if(ser.IsErrored() || type != eRemoteServer_Handshake) + if(ser.IsErrored() || type != RemoteServerPacket::Handshake) { RDCWARN("Didn't receive proper handshake"); return activeConnectionEstablished; @@ -225,13 +229,13 @@ static bool HandleHandshakeClient(ActiveClient &activeClient, ClientThread *thre // to. if(version >= MAKE_REMOTE_SERVER_VERSION(1, 23)) { - SCOPED_SERIALISE_CHUNK(eRemoteServer_VersionMismatch2); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::VersionMismatch2); SERIALISE_ELEMENT(RemoteServerProtocolVersion); } else { - SCOPED_SERIALISE_CHUNK(eRemoteServer_VersionMismatch); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::VersionMismatch); } } else @@ -258,7 +262,7 @@ static bool HandleHandshakeClient(ActiveClient &activeClient, ClientThread *thre RDCLOG("Returning busy signal for connection from %u.%u.%u.%u.", Network::GetIPOctet(ip, 0), Network::GetIPOctet(ip, 1), Network::GetIPOctet(ip, 2), Network::GetIPOctet(ip, 3)); - SCOPED_SERIALISE_CHUNK(eRemoteServer_Busy); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::Busy); } // otherwise we return a successful handshake. For active connections this begins the active // thread, for passive connection checks this is enough @@ -267,7 +271,7 @@ static bool HandleHandshakeClient(ActiveClient &activeClient, ClientThread *thre RDCLOG("Returning OK signal for connection from %u.%u.%u.%u.", Network::GetIPOctet(ip, 0), Network::GetIPOctet(ip, 1), Network::GetIPOctet(ip, 2), Network::GetIPOctet(ip, 3)); - SCOPED_SERIALISE_CHUNK(eRemoteServer_Handshake); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::Handshake); } } } @@ -339,7 +343,7 @@ static void ActiveRemoteClientThread(ClientThread *threadData, if(client == NULL) continue; - if(type == eRemoteServer_Ping) + if(type == RemoteServerPacket::Ping) { reader.EndChunk(); @@ -350,9 +354,9 @@ static void ActiveRemoteClientThread(ClientThread *threadData, Android::TickDeviceLogcat(); WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_Ping); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::Ping); } - else if(type == eRemoteServer_RemoteDriverList) + else if(type == RemoteServerPacket::RemoteDriverList) { reader.EndChunk(); @@ -360,7 +364,7 @@ static void ActiveRemoteClientThread(ClientThread *threadData, uint32_t count = (uint32_t)drivers.size(); WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_RemoteDriverList); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::RemoteDriverList); SERIALISE_ELEMENT(count); for(auto it = drivers.begin(); it != drivers.end(); ++it) @@ -372,7 +376,7 @@ static void ActiveRemoteClientThread(ClientThread *threadData, SERIALISE_ELEMENT(driverName); } } - else if(type == eRemoteServer_HomeDir) + else if(type == RemoteServerPacket::HomeDir) { reader.EndChunk(); @@ -380,11 +384,11 @@ static void ActiveRemoteClientThread(ClientThread *threadData, { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_HomeDir); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::HomeDir); SERIALISE_ELEMENT(home); } } - else if(type == eRemoteServer_ListDir) + else if(type == RemoteServerPacket::ListDir) { rdcstr path; @@ -400,11 +404,11 @@ static void ActiveRemoteClientThread(ClientThread *threadData, { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_ListDir); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::ListDir); SERIALISE_ELEMENT(files); } } - else if(type == eRemoteServer_CopyCaptureFromRemote) + else if(type == RemoteServerPacket::CopyCaptureFromRemote) { rdcstr path; @@ -417,13 +421,13 @@ static void ActiveRemoteClientThread(ClientThread *threadData, { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_CopyCaptureFromRemote); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::CopyCaptureFromRemote); StreamReader fileStream(FileIO::fopen(path, FileIO::ReadBinary)); ser.SerialiseStream(path, fileStream); } } - else if(type == eRemoteServer_CopyCaptureToRemote) + else if(type == RemoteServerPacket::CopyCaptureToRemote) { rdcstr path; rdcstr dummy, dummy2; @@ -464,11 +468,11 @@ static void ActiveRemoteClientThread(ClientThread *threadData, { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_CopyCaptureToRemote); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::CopyCaptureToRemote); SERIALISE_ELEMENT(path); } } - else if(type == eRemoteServer_TakeOwnershipCapture) + else if(type == RemoteServerPacket::TakeOwnershipCapture) { rdcstr path; @@ -483,7 +487,7 @@ static void ActiveRemoteClientThread(ClientThread *threadData, tempFiles.push_back(path); } - else if(type == eRemoteServer_GetAvailableGPUs) + else if(type == RemoteServerPacket::GetAvailableGPUs) { reader.EndChunk(); @@ -491,11 +495,11 @@ static void ActiveRemoteClientThread(ClientThread *threadData, { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_GetAvailableGPUs); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::GetAvailableGPUs); SERIALISE_ELEMENT(gpus); } } - else if(type == eRemoteServer_ShutdownServer) + else if(type == RemoteServerPacket::ShutdownServer) { reader.EndChunk(); @@ -506,10 +510,10 @@ static void ActiveRemoteClientThread(ClientThread *threadData, { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_ShutdownServer); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::ShutdownServer); } } - else if(type == eRemoteServer_OpenLog) + else if(type == RemoteServerPacket::OpenLog) { rdcstr path; ReplayOptions opts; @@ -543,7 +547,7 @@ static void ActiveRemoteClientThread(ClientThread *threadData, { { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_LogOpenProgress); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::LogOpenProgress); SERIALISE_ELEMENT(progress); } Threading::Sleep(100); @@ -612,11 +616,11 @@ static void ActiveRemoteClientThread(ClientThread *threadData, { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_LogOpened); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::LogOpened); SERIALISE_ELEMENT(result); } } - else if(type == eRemoteServer_HasCallstacks) + else if(type == RemoteServerPacket::HasCallstacks) { reader.EndChunk(); @@ -624,11 +628,11 @@ static void ActiveRemoteClientThread(ClientThread *threadData, { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_HasCallstacks); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::HasCallstacks); SERIALISE_ELEMENT(HasCallstacks); } } - else if(type == eRemoteServer_InitResolver) + else if(type == RemoteServerPacket::InitResolver) { reader.EndChunk(); @@ -658,7 +662,7 @@ static void ActiveRemoteClientThread(ClientThread *threadData, { { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_ResolverProgress); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::ResolverProgress); SERIALISE_ELEMENT(progress); } Threading::Sleep(100); @@ -679,11 +683,11 @@ static void ActiveRemoteClientThread(ClientThread *threadData, { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_InitResolver); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::InitResolver); SERIALISE_ELEMENT(res); } } - else if(type == eRemoteServer_GetResolve) + else if(type == RemoteServerPacket::GetResolve) { rdcarray StackAddresses; @@ -712,22 +716,22 @@ static void ActiveRemoteClientThread(ClientThread *threadData, { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_GetResolve); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::GetResolve); SERIALISE_ELEMENT(StackFrames); } } - else if(type == eRemoteServer_GetDriverName) + else if(type == RemoteServerPacket::GetDriverName) { reader.EndChunk(); rdcstr driver = rdc ? rdc->GetDriverName() : ""; { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_GetDriverName); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::GetDriverName); SERIALISE_ELEMENT(driver); } } - else if(type == eRemoteServer_GetSectionCount) + else if(type == RemoteServerPacket::GetSectionCount) { reader.EndChunk(); @@ -735,11 +739,11 @@ static void ActiveRemoteClientThread(ClientThread *threadData, { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_GetSectionCount); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::GetSectionCount); SERIALISE_ELEMENT(count); } } - else if(type == eRemoteServer_FindSectionByName) + else if(type == RemoteServerPacket::FindSectionByName) { rdcstr name; @@ -754,11 +758,11 @@ static void ActiveRemoteClientThread(ClientThread *threadData, { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_FindSectionByName); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::FindSectionByName); SERIALISE_ELEMENT(index); } } - else if(type == eRemoteServer_FindSectionByType) + else if(type == RemoteServerPacket::FindSectionByType) { SectionType sectionType; @@ -773,11 +777,11 @@ static void ActiveRemoteClientThread(ClientThread *threadData, { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_FindSectionByType); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::FindSectionByType); SERIALISE_ELEMENT(index); } } - else if(type == eRemoteServer_GetSectionProperties) + else if(type == RemoteServerPacket::GetSectionProperties) { int index = -1; @@ -794,11 +798,11 @@ static void ActiveRemoteClientThread(ClientThread *threadData, { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_GetSectionProperties); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::GetSectionProperties); SERIALISE_ELEMENT(props); } } - else if(type == eRemoteServer_GetSectionContents) + else if(type == RemoteServerPacket::GetSectionContents) { int index = -1; @@ -826,11 +830,11 @@ static void ActiveRemoteClientThread(ClientThread *threadData, { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_GetSectionContents); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::GetSectionContents); SERIALISE_ELEMENT(contents); } } - else if(type == eRemoteServer_WriteSection) + else if(type == RemoteServerPacket::WriteSection) { SectionProperties props; bytebuf contents; @@ -867,11 +871,11 @@ static void ActiveRemoteClientThread(ClientThread *threadData, { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_WriteSection); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::WriteSection); SERIALISE_ELEMENT(result); } } - else if(type == eRemoteServer_CloseLog) + else if(type == RemoteServerPacket::CloseLog) { reader.EndChunk(); @@ -885,7 +889,7 @@ static void ActiveRemoteClientThread(ClientThread *threadData, SAFE_DELETE(rdc); SAFE_DELETE(resolver); } - else if(type == eRemoteServer_ExecuteAndInject) + else if(type == RemoteServerPacket::ExecuteAndInject) { rdcstr app, workingDir, cmdLine, logfile; CaptureOptions opts; @@ -917,12 +921,12 @@ static void ActiveRemoteClientThread(ClientThread *threadData, { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_ExecuteAndInject); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::ExecuteAndInject); SERIALISE_ELEMENT(res); SERIALISE_ELEMENT(ident); } } - else if(type == eRemoteServer_EmbedDependenciesIntoCapture) + else if(type == RemoteServerPacket::EmbedDependenciesIntoCapture) { reader.EndChunk(); @@ -939,11 +943,11 @@ static void ActiveRemoteClientThread(ClientThread *threadData, { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_EmbedDependenciesIntoCapture); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::EmbedDependenciesIntoCapture); SERIALISE_ELEMENT(result); } } - else if(type == eRemoteServer_RemoveDependenciesFromCapture) + else if(type == RemoteServerPacket::RemoveDependenciesFromCapture) { reader.EndChunk(); @@ -960,11 +964,11 @@ static void ActiveRemoteClientThread(ClientThread *threadData, { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_RemoveDependenciesFromCapture); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::RemoveDependenciesFromCapture); SERIALISE_ELEMENT(result); } } - else if(type == eRemoteServer_HasEmbeddedDependencies) + else if(type == RemoteServerPacket::HasEmbeddedDependencies) { reader.EndChunk(); @@ -980,11 +984,11 @@ static void ActiveRemoteClientThread(ClientThread *threadData, { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_HasEmbeddedDependencies); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::HasEmbeddedDependencies); SERIALISE_ELEMENT(res); } } - else if(type == eRemoteServer_HasPendingDependencies) + else if(type == RemoteServerPacket::HasPendingDependencies) { reader.EndChunk(); @@ -1000,11 +1004,11 @@ static void ActiveRemoteClientThread(ClientThread *threadData, { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_HasPendingDependencies); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::HasPendingDependencies); SERIALISE_ELEMENT(res); } } - else if(type == eRemoteServer_GetPendingDependenciesNicknames) + else if(type == RemoteServerPacket::GetPendingDependenciesNicknames) { reader.EndChunk(); @@ -1020,13 +1024,13 @@ static void ActiveRemoteClientThread(ClientThread *threadData, { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_GetPendingDependenciesNicknames); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::GetPendingDependenciesNicknames); SERIALISE_ELEMENT(res); } } else if((int)type >= eReplayProxy_First && proxy) { - bool ok = proxy->Tick(type); + bool ok = proxy->Tick((int)type); if(!ok) break; @@ -1324,7 +1328,7 @@ RENDERDOC_CreateRemoteServerConnection(const rdcstr &URL, IRemoteServer **rend) ser.SetStreamingMode(true); - SCOPED_SERIALISE_CHUNK(eRemoteServer_Handshake); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::Handshake); SERIALISE_ELEMENT(version); SERIALISE_ELEMENT(activeConnection); } @@ -1340,20 +1344,20 @@ RENDERDOC_CreateRemoteServerConnection(const rdcstr &URL, IRemoteServer **rend) RemoteServerPacket type = ser.ReadChunk(); uint32_t remoteVersion = 0; - if(type == eRemoteServer_VersionMismatch2) + if(type == RemoteServerPacket::VersionMismatch2) { SERIALISE_ELEMENT(remoteVersion); } ser.EndChunk(); - if(type == eRemoteServer_Busy) + if(type == RemoteServerPacket::Busy) { SAFE_DELETE(sock); return RDResult(ResultCode::NetworkRemoteBusy); } - if(type == eRemoteServer_VersionMismatch || type == eRemoteServer_VersionMismatch2) + if(type == RemoteServerPacket::VersionMismatch || type == RemoteServerPacket::VersionMismatch2) { SAFE_DELETE(sock); @@ -1365,7 +1369,7 @@ RENDERDOC_CreateRemoteServerConnection(const rdcstr &URL, IRemoteServer **rend) return RDResult(ResultCode::NetworkVersionMismatch, ver); } - if(ser.IsErrored() || type != eRemoteServer_Handshake) + if(ser.IsErrored() || type != RemoteServerPacket::Handshake) { RDCWARN("Didn't get proper handshake"); SAFE_DELETE(sock); @@ -1456,7 +1460,7 @@ void RemoteServer::ShutdownServerAndConnection() { { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_ShutdownServer); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::ShutdownServer); } { @@ -1464,7 +1468,7 @@ void RemoteServer::ShutdownServerAndConnection() RemoteServerPacket type = ser.ReadChunk(); ser.EndChunk(); - RDCASSERT(type == eRemoteServer_ShutdownServer); + RDCASSERT(type == RemoteServerPacket::ShutdownServer); } delete this; @@ -1487,7 +1491,7 @@ ResultDetails RemoteServer::Ping() { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_Ping); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::Ping); } RemoteServerPacket type; @@ -1498,7 +1502,7 @@ ResultDetails RemoteServer::Ping() ser.EndChunk(); } - if(type == eRemoteServer_Ping) + if(type == RemoteServerPacket::Ping) ret = ResultCode::Succeeded; else ret = ResultCode::RemoteServerConnectionLost; @@ -1525,7 +1529,7 @@ rdcarray RemoteServer::RemoteSupportedReplays() { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_RemoteDriverList); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::RemoteDriverList); } { @@ -1533,7 +1537,7 @@ rdcarray RemoteServer::RemoteSupportedReplays() RemoteServerPacket type = ser.ReadChunk(); - if(type == eRemoteServer_RemoteDriverList) + if(type == RemoteServerPacket::RemoteDriverList) { uint32_t count = 0; SERIALISE_ELEMENT(count); @@ -1566,7 +1570,7 @@ rdcstr RemoteServer::GetHomeFolder() { { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_HomeDir); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::HomeDir); } rdcstr home; @@ -1576,7 +1580,7 @@ rdcstr RemoteServer::GetHomeFolder() RemoteServerPacket type = ser.ReadChunk(); - if(type == eRemoteServer_HomeDir) + if(type == RemoteServerPacket::HomeDir) { SERIALISE_ELEMENT(home); } @@ -1595,7 +1599,7 @@ rdcarray RemoteServer::ListFolder(const rdcstr &path) { { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_ListDir); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::ListDir); SERIALISE_ELEMENT(path); } @@ -1606,7 +1610,7 @@ rdcarray RemoteServer::ListFolder(const rdcstr &path) RemoteServerPacket type = ser.ReadChunk(); - if(type == eRemoteServer_ListDir) + if(type == RemoteServerPacket::ListDir) { SERIALISE_ELEMENT(files); } @@ -1631,7 +1635,7 @@ ExecuteResult RemoteServer::ExecuteAndInject(const rdcstr &app, const rdcstr &wo { { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_ExecuteAndInject); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::ExecuteAndInject); SERIALISE_ELEMENT(app); SERIALISE_ELEMENT(workingDir); SERIALISE_ELEMENT(cmdline); @@ -1645,7 +1649,7 @@ ExecuteResult RemoteServer::ExecuteAndInject(const rdcstr &app, const rdcstr &wo READ_DATA_SCOPE(); RemoteServerPacket type = ser.ReadChunk(); - if(type == eRemoteServer_ExecuteAndInject) + if(type == RemoteServerPacket::ExecuteAndInject) { SERIALISE_ELEMENT_LOCAL(result, RDResult()); SERIALISE_ELEMENT_LOCAL(ident, uint32_t()); @@ -1669,7 +1673,7 @@ void RemoteServer::CopyCaptureFromRemote(const rdcstr &remotepath, const rdcstr { { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_CopyCaptureFromRemote); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::CopyCaptureFromRemote); SERIALISE_ELEMENT(remotepath); } @@ -1677,7 +1681,7 @@ void RemoteServer::CopyCaptureFromRemote(const rdcstr &remotepath, const rdcstr READ_DATA_SCOPE(); RemoteServerPacket type = ser.ReadChunk(); - if(type == eRemoteServer_CopyCaptureFromRemote) + if(type == RemoteServerPacket::CopyCaptureFromRemote) { StreamWriter streamWriter(FileIO::fopen(localpath, FileIO::WriteBinary), Ownership::Stream); @@ -1710,7 +1714,7 @@ rdcstr RemoteServer::CopyCaptureToRemote(const rdcstr &filename, RENDERDOC_Progr { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_CopyCaptureToRemote); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::CopyCaptureToRemote); // this will take ownership of and close the file StreamReader fileStream(fileHandle); @@ -1723,7 +1727,7 @@ rdcstr RemoteServer::CopyCaptureToRemote(const rdcstr &filename, RENDERDOC_Progr READ_DATA_SCOPE(); RemoteServerPacket type = ser.ReadChunk(); - if(type == eRemoteServer_CopyCaptureToRemote) + if(type == RemoteServerPacket::CopyCaptureToRemote) { SERIALISE_ELEMENT(path); } @@ -1742,7 +1746,7 @@ void RemoteServer::TakeOwnershipCapture(const rdcstr &filename) { { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_TakeOwnershipCapture); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::TakeOwnershipCapture); SERIALISE_ELEMENT(filename); } } @@ -1771,18 +1775,18 @@ rdcpair RemoteServer::OpenCapture( { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_OpenLog); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::OpenLog); SERIALISE_ELEMENT(filename); SERIALISE_ELEMENT(opts); } - RemoteServerPacket type = eRemoteServer_Noop; + RemoteServerPacket type = RemoteServerPacket::Noop; while(!reader->IsErrored()) { READ_DATA_SCOPE(); type = ser.ReadChunk(); - if(reader->IsErrored() || type != eRemoteServer_LogOpenProgress) + if(reader->IsErrored() || type != RemoteServerPacket::LogOpenProgress) break; float progressValue = 0.0f; @@ -1797,7 +1801,7 @@ rdcpair RemoteServer::OpenCapture( RDCLOG("Capture open complete"); - if(reader->IsErrored() || type != eRemoteServer_LogOpened) + if(reader->IsErrored() || type != RemoteServerPacket::LogOpened) { RDCERR("Error opening capture"); ret.first = ResultCode::NetworkIOFailed; @@ -1863,7 +1867,7 @@ void RemoteServer::CloseCapture(IReplayController *rend) { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_CloseLog); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::CloseLog); } } @@ -1874,7 +1878,7 @@ rdcstr RemoteServer::DriverName() { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_GetDriverName); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::GetDriverName); } rdcstr driverName = ""; @@ -1883,7 +1887,7 @@ rdcstr RemoteServer::DriverName() READ_DATA_SCOPE(); RemoteServerPacket type = ser.ReadChunk(); - if(type == eRemoteServer_GetDriverName) + if(type == RemoteServerPacket::GetDriverName) { SERIALISE_ELEMENT(driverName); } @@ -1905,7 +1909,7 @@ rdcarray RemoteServer::GetAvailableGPUs() { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_GetAvailableGPUs); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::GetAvailableGPUs); } rdcarray gpus; @@ -1914,7 +1918,7 @@ rdcarray RemoteServer::GetAvailableGPUs() READ_DATA_SCOPE(); RemoteServerPacket type = ser.ReadChunk(); - if(type == eRemoteServer_GetAvailableGPUs) + if(type == RemoteServerPacket::GetAvailableGPUs) { SERIALISE_ELEMENT(gpus); } @@ -1936,7 +1940,7 @@ int RemoteServer::GetSectionCount() { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_GetSectionCount); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::GetSectionCount); } int count = 0; @@ -1945,7 +1949,7 @@ int RemoteServer::GetSectionCount() READ_DATA_SCOPE(); RemoteServerPacket type = ser.ReadChunk(); - if(type == eRemoteServer_GetSectionCount) + if(type == RemoteServerPacket::GetSectionCount) { SERIALISE_ELEMENT(count); } @@ -1967,7 +1971,7 @@ int RemoteServer::FindSectionByName(const rdcstr &name) { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_FindSectionByName); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::FindSectionByName); SERIALISE_ELEMENT(name); } @@ -1977,7 +1981,7 @@ int RemoteServer::FindSectionByName(const rdcstr &name) READ_DATA_SCOPE(); RemoteServerPacket type = ser.ReadChunk(); - if(type == eRemoteServer_FindSectionByName) + if(type == RemoteServerPacket::FindSectionByName) { SERIALISE_ELEMENT(index); } @@ -1999,7 +2003,7 @@ int RemoteServer::FindSectionByType(SectionType sectionType) { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_FindSectionByType); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::FindSectionByType); SERIALISE_ELEMENT(sectionType); } @@ -2009,7 +2013,7 @@ int RemoteServer::FindSectionByType(SectionType sectionType) READ_DATA_SCOPE(); RemoteServerPacket type = ser.ReadChunk(); - if(type == eRemoteServer_FindSectionByType) + if(type == RemoteServerPacket::FindSectionByType) { SERIALISE_ELEMENT(index); } @@ -2031,7 +2035,7 @@ SectionProperties RemoteServer::GetSectionProperties(int index) { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_GetSectionProperties); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::GetSectionProperties); SERIALISE_ELEMENT(index); } @@ -2041,7 +2045,7 @@ SectionProperties RemoteServer::GetSectionProperties(int index) READ_DATA_SCOPE(); RemoteServerPacket type = ser.ReadChunk(); - if(type == eRemoteServer_GetSectionProperties) + if(type == RemoteServerPacket::GetSectionProperties) { SERIALISE_ELEMENT(props); } @@ -2063,7 +2067,7 @@ bytebuf RemoteServer::GetSectionContents(int index) { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_GetSectionContents); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::GetSectionContents); SERIALISE_ELEMENT(index); } @@ -2073,7 +2077,7 @@ bytebuf RemoteServer::GetSectionContents(int index) READ_DATA_SCOPE(); RemoteServerPacket type = ser.ReadChunk(); - if(type == eRemoteServer_GetSectionContents) + if(type == RemoteServerPacket::GetSectionContents) { SERIALISE_ELEMENT(contents); } @@ -2100,7 +2104,7 @@ ResultDetails RemoteServer::WriteSection(const SectionProperties &props, const b { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_WriteSection); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::WriteSection); SERIALISE_ELEMENT(props); SERIALISE_ELEMENT(contents); } @@ -2111,7 +2115,7 @@ ResultDetails RemoteServer::WriteSection(const SectionProperties &props, const b READ_DATA_SCOPE(); RemoteServerPacket type = ser.ReadChunk(); - if(type == eRemoteServer_WriteSection) + if(type == RemoteServerPacket::WriteSection) { SERIALISE_ELEMENT(success); } @@ -2133,7 +2137,7 @@ bool RemoteServer::HasCallstacks() { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_HasCallstacks); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::HasCallstacks); } bool hasCallstacks = false; @@ -2142,7 +2146,7 @@ bool RemoteServer::HasCallstacks() READ_DATA_SCOPE(); RemoteServerPacket type = ser.ReadChunk(); - if(type == eRemoteServer_HasCallstacks) + if(type == RemoteServerPacket::HasCallstacks) { SERIALISE_ELEMENT(hasCallstacks); } @@ -2161,16 +2165,16 @@ ResultDetails RemoteServer::InitResolver(bool interactive, RENDERDOC_ProgressCal { { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_InitResolver); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::InitResolver); } - RemoteServerPacket type = eRemoteServer_Noop; + RemoteServerPacket type = RemoteServerPacket::Noop; while(!reader->IsErrored()) { READ_DATA_SCOPE(); type = ser.ReadChunk(); - if(reader->IsErrored() || type != eRemoteServer_ResolverProgress) + if(reader->IsErrored() || type != RemoteServerPacket::ResolverProgress) break; float progressValue = 0.0f; @@ -2187,7 +2191,7 @@ ResultDetails RemoteServer::InitResolver(bool interactive, RENDERDOC_ProgressCal RDResult res; - if(reader->IsErrored() || type != eRemoteServer_InitResolver) + if(reader->IsErrored() || type != RemoteServerPacket::InitResolver) { res = ResultCode::NetworkIOFailed; return res; @@ -2212,7 +2216,7 @@ rdcarray RemoteServer::GetResolve(const rdcarray &callstack) { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_GetResolve); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::GetResolve); SERIALISE_ELEMENT(callstack); } @@ -2222,7 +2226,7 @@ rdcarray RemoteServer::GetResolve(const rdcarray &callstack) READ_DATA_SCOPE(); RemoteServerPacket type = ser.ReadChunk(); - if(type == eRemoteServer_GetResolve) + if(type == RemoteServerPacket::GetResolve) { SERIALISE_ELEMENT(StackFrames); } @@ -2249,14 +2253,14 @@ ResultDetails RemoteServer::EmbedDependenciesIntoCapture() { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_EmbedDependenciesIntoCapture); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::EmbedDependenciesIntoCapture); } { READ_DATA_SCOPE(); RemoteServerPacket type = ser.ReadChunk(); - if(type == eRemoteServer_EmbedDependenciesIntoCapture) + if(type == RemoteServerPacket::EmbedDependenciesIntoCapture) { SERIALISE_ELEMENT(ret); } @@ -2282,14 +2286,14 @@ ResultDetails RemoteServer::RemoveDependenciesFromCapture() { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_RemoveDependenciesFromCapture); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::RemoveDependenciesFromCapture); } { READ_DATA_SCOPE(); RemoteServerPacket type = ser.ReadChunk(); - if(type == eRemoteServer_RemoveDependenciesFromCapture) + if(type == RemoteServerPacket::RemoveDependenciesFromCapture) { SERIALISE_ELEMENT(ret); } @@ -2314,14 +2318,14 @@ bool RemoteServer::HasEmbeddedDependencies() { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_HasEmbeddedDependencies); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::HasEmbeddedDependencies); } { READ_DATA_SCOPE(); RemoteServerPacket type = ser.ReadChunk(); - if(type == eRemoteServer_HasEmbeddedDependencies) + if(type == RemoteServerPacket::HasEmbeddedDependencies) { SERIALISE_ELEMENT(ret); } @@ -2345,14 +2349,14 @@ bool RemoteServer::HasPendingDependencies() { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_HasPendingDependencies); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::HasPendingDependencies); } { READ_DATA_SCOPE(); RemoteServerPacket type = ser.ReadChunk(); - if(type == eRemoteServer_HasPendingDependencies) + if(type == RemoteServerPacket::HasPendingDependencies) { SERIALISE_ELEMENT(ret); } @@ -2375,14 +2379,14 @@ rdcarray RemoteServer::GetPendingDependenciesNicknames() } { WRITE_DATA_SCOPE(); - SCOPED_SERIALISE_CHUNK(eRemoteServer_GetPendingDependenciesNicknames); + SCOPED_SERIALISE_CHUNK(RemoteServerPacket::GetPendingDependenciesNicknames); } { READ_DATA_SCOPE(); RemoteServerPacket type = ser.ReadChunk(); - if(type == eRemoteServer_GetPendingDependenciesNicknames) + if(type == RemoteServerPacket::GetPendingDependenciesNicknames) { SERIALISE_ELEMENT(ret); }