diff --git a/src/lib/base/EventTypes.cpp b/src/lib/base/EventTypes.cpp index 173a0a97..c0cbcfdd 100644 --- a/src/lib/base/EventTypes.cpp +++ b/src/lib/base/EventTypes.cpp @@ -201,5 +201,5 @@ REGISTER_EVENT(Clipboard, clipboardSending) // REGISTER_EVENT(File, fileChunkSending) -REGISTER_EVENT(File, fileRecieveCompleted) +REGISTER_EVENT(File, fileReceiveCompleted) REGISTER_EVENT(File, keepAlive) diff --git a/src/lib/base/EventTypes.h b/src/lib/base/EventTypes.h index 995490e9..2d63b85c 100644 --- a/src/lib/base/EventTypes.h +++ b/src/lib/base/EventTypes.h @@ -745,7 +745,7 @@ class FileEvents : public EventTypes { public: FileEvents() : m_fileChunkSending(Event::kUnknown), - m_fileRecieveCompleted(Event::kUnknown), + m_fileReceiveCompleted(Event::kUnknown), m_keepAlive(Event::kUnknown) { } //! @name accessors @@ -755,7 +755,7 @@ public: Event::Type fileChunkSending(); //! Completed receiving a file - Event::Type fileRecieveCompleted(); + Event::Type fileReceiveCompleted(); //! Send a keep alive Event::Type keepAlive(); @@ -764,6 +764,6 @@ public: private: Event::Type m_fileChunkSending; - Event::Type m_fileRecieveCompleted; + Event::Type m_fileReceiveCompleted; Event::Type m_keepAlive; }; diff --git a/src/lib/client/Client.cpp b/src/lib/client/Client.cpp index a7b15cf5..65cf3a56 100644 --- a/src/lib/client/Client.cpp +++ b/src/lib/client/Client.cpp @@ -90,10 +90,10 @@ Client::Client(IEventQueue* events, const std::string& name, const NetworkAddres this, new TMethodEventJob(this, &Client::handleFileChunkSending)); - m_events->adoptHandler(m_events->forFile().fileRecieveCompleted(), + m_events->adoptHandler(m_events->forFile().fileReceiveCompleted(), this, new TMethodEventJob(this, - &Client::handleFileRecieveCompleted)); + &Client::handleFileReceiveCompleted)); } } @@ -750,13 +750,13 @@ Client::handleFileChunkSending(const Event& event, void*) } void -Client::handleFileRecieveCompleted(const Event& event, void*) +Client::handleFileReceiveCompleted(const Event& event, void*) { - onFileRecieveCompleted(); + onFileReceiveCompleted(); } void -Client::onFileRecieveCompleted() +Client::onFileReceiveCompleted() { if (isReceivedFileSizeValid()) { m_writeToDropDirThread = new Thread([this](){ write_to_drop_dir_thread(); }); diff --git a/src/lib/client/Client.h b/src/lib/client/Client.h index c172af22..42972a3a 100644 --- a/src/lib/client/Client.h +++ b/src/lib/client/Client.h @@ -189,9 +189,9 @@ private: void handleSuspend(const Event& event, void*); void handleResume(const Event& event, void*); void handleFileChunkSending(const Event&, void*); - void handleFileRecieveCompleted(const Event&, void*); + void handleFileReceiveCompleted(const Event&, void*); void handleStopRetry(const Event&, void*); - void onFileRecieveCompleted(); + void onFileReceiveCompleted(); void sendClipboardThread(void*); public: diff --git a/src/lib/client/ServerProxy.cpp b/src/lib/client/ServerProxy.cpp index c6e35766..a48a0732 100644 --- a/src/lib/client/ServerProxy.cpp +++ b/src/lib/client/ServerProxy.cpp @@ -879,7 +879,7 @@ ServerProxy::fileChunkReceived() m_client->getExpectedFileSize()); if (result == kFinish) { - m_events->addEvent(Event(m_events->forFile().fileRecieveCompleted(), m_client)); + m_events->addEvent(Event(m_events->forFile().fileReceiveCompleted(), m_client)); } else if (result == kStart) { if (m_client->getDragFileList().size() > 0) { diff --git a/src/lib/server/ClientProxy1_5.cpp b/src/lib/server/ClientProxy1_5.cpp index 72c0bf81..42653bf3 100644 --- a/src/lib/server/ClientProxy1_5.cpp +++ b/src/lib/server/ClientProxy1_5.cpp @@ -89,7 +89,7 @@ ClientProxy1_5::fileChunkReceived() if (result == kFinish) { - m_events->addEvent(Event(m_events->forFile().fileRecieveCompleted(), server)); + m_events->addEvent(Event(m_events->forFile().fileReceiveCompleted(), server)); } else if (result == kStart) { if (server->getFakeDragFileList().size() > 0) { diff --git a/src/lib/server/Server.cpp b/src/lib/server/Server.cpp index a169db16..b02a1930 100644 --- a/src/lib/server/Server.cpp +++ b/src/lib/server/Server.cpp @@ -191,10 +191,10 @@ Server::Server( this, new TMethodEventJob(this, &Server::handleFileChunkSendingEvent)); - m_events->adoptHandler(m_events->forFile().fileRecieveCompleted(), + m_events->adoptHandler(m_events->forFile().fileReceiveCompleted(), this, new TMethodEventJob(this, - &Server::handleFileRecieveCompletedEvent)); + &Server::handleFileReceiveCompletedEvent)); } // add connection @@ -1528,9 +1528,9 @@ Server::handleFileChunkSendingEvent(const Event& event, void*) } void -Server::handleFileRecieveCompletedEvent(const Event& event, void*) +Server::handleFileReceiveCompletedEvent(const Event& event, void*) { - onFileRecieveCompleted(); + onFileReceiveCompleted(); } void @@ -2078,7 +2078,7 @@ Server::onFileChunkSending(const void* data) } void -Server::onFileRecieveCompleted() +Server::onFileReceiveCompleted() { if (isReceivedFileSizeValid()) { m_writeToDropDirThread = new Thread([this]() { write_to_drop_dir_thread(); }); diff --git a/src/lib/server/Server.h b/src/lib/server/Server.h index ae8b2bd5..edc83f2f 100644 --- a/src/lib/server/Server.h +++ b/src/lib/server/Server.h @@ -315,7 +315,7 @@ private: void handleFakeInputBeginEvent(const Event&, void*); void handleFakeInputEndEvent(const Event&, void*); void handleFileChunkSendingEvent(const Event&, void*); - void handleFileRecieveCompletedEvent(const Event&, void*); + void handleFileReceiveCompletedEvent(const Event&, void*); // event processing void onClipboardChanged(BaseClientProxy* sender, @@ -332,7 +332,7 @@ private: void onMouseMoveSecondary(SInt32 dx, SInt32 dy); void onMouseWheel(SInt32 xDelta, SInt32 yDelta); void onFileChunkSending(const void* data); - void onFileRecieveCompleted(); + void onFileReceiveCompleted(); // add client to list and attach event handlers for client bool addClient(BaseClientProxy*); diff --git a/src/test/integtests/net/NetworkTests.cpp b/src/test/integtests/net/NetworkTests.cpp index 92767bfa..5dae22de 100644 --- a/src/test/integtests/net/NetworkTests.cpp +++ b/src/test/integtests/net/NetworkTests.cpp @@ -85,16 +85,16 @@ public: void sendMockData(void* eventTarget); void sendToClient_mockData_handleClientConnected(const Event&, void* vlistener); - void sendToClient_mockData_fileRecieveCompleted(const Event&, void*); + void sendToClient_mockData_fileReceiveCompleted(const Event&, void*); void sendToClient_mockFile_handleClientConnected(const Event&, void* vlistener); - void sendToClient_mockFile_fileRecieveCompleted(const Event& event, void*); + void sendToClient_mockFile_fileReceiveCompleted(const Event& event, void*); void sendToServer_mockData_handleClientConnected(const Event&, void* vlistener); - void sendToServer_mockData_fileRecieveCompleted(const Event& event, void*); + void sendToServer_mockData_fileReceiveCompleted(const Event& event, void*); void sendToServer_mockFile_handleClientConnected(const Event&, void* vlistener); - void sendToServer_mockFile_fileRecieveCompleted(const Event& event, void*); + void sendToServer_mockFile_fileReceiveCompleted(const Event& event, void*); public: TestEventQueue m_events; @@ -150,16 +150,16 @@ TEST_F(NetworkTests, sendToClient_mockData) Client client(&m_events, "stub", serverAddress, clientSocketFactory, &clientScreen, clientArgs); m_events.adoptHandler( - m_events.forFile().fileRecieveCompleted(), &client, + m_events.forFile().fileReceiveCompleted(), &client, new TMethodEventJob( - this, &NetworkTests::sendToClient_mockData_fileRecieveCompleted)); + this, &NetworkTests::sendToClient_mockData_fileReceiveCompleted)); client.connect(); m_events.initQuitTimeout(10); m_events.loop(); m_events.removeHandler(m_events.forClientListener().connected(), &listener); - m_events.removeHandler(m_events.forFile().fileRecieveCompleted(), &client); + m_events.removeHandler(m_events.forFile().fileReceiveCompleted(), &client); m_events.cleanupQuitTimeout(); } @@ -209,16 +209,16 @@ TEST_F(NetworkTests, sendToClient_mockFile) Client client(&m_events, "stub", serverAddress, clientSocketFactory, &clientScreen, clientArgs); m_events.adoptHandler( - m_events.forFile().fileRecieveCompleted(), &client, + m_events.forFile().fileReceiveCompleted(), &client, new TMethodEventJob( - this, &NetworkTests::sendToClient_mockFile_fileRecieveCompleted)); + this, &NetworkTests::sendToClient_mockFile_fileReceiveCompleted)); client.connect(); m_events.initQuitTimeout(10); m_events.loop(); m_events.removeHandler(m_events.forClientListener().connected(), &listener); - m_events.removeHandler(m_events.forFile().fileRecieveCompleted(), &client); + m_events.removeHandler(m_events.forFile().fileReceiveCompleted(), &client); m_events.cleanupQuitTimeout(); } @@ -266,16 +266,16 @@ TEST_F(NetworkTests, sendToServer_mockData) this, &NetworkTests::sendToServer_mockData_handleClientConnected, &client)); m_events.adoptHandler( - m_events.forFile().fileRecieveCompleted(), &server, + m_events.forFile().fileReceiveCompleted(), &server, new TMethodEventJob( - this, &NetworkTests::sendToServer_mockData_fileRecieveCompleted)); + this, &NetworkTests::sendToServer_mockData_fileReceiveCompleted)); client.connect(); m_events.initQuitTimeout(10); m_events.loop(); m_events.removeHandler(m_events.forClientListener().connected(), &listener); - m_events.removeHandler(m_events.forFile().fileRecieveCompleted(), &server); + m_events.removeHandler(m_events.forFile().fileReceiveCompleted(), &server); m_events.cleanupQuitTimeout(); } @@ -324,16 +324,16 @@ TEST_F(NetworkTests, sendToServer_mockFile) this, &NetworkTests::sendToServer_mockFile_handleClientConnected, &client)); m_events.adoptHandler( - m_events.forFile().fileRecieveCompleted(), &server, + m_events.forFile().fileReceiveCompleted(), &server, new TMethodEventJob( - this, &NetworkTests::sendToServer_mockFile_fileRecieveCompleted)); + this, &NetworkTests::sendToServer_mockFile_fileReceiveCompleted)); client.connect(); m_events.initQuitTimeout(10); m_events.loop(); m_events.removeHandler(m_events.forClientListener().connected(), &listener); - m_events.removeHandler(m_events.forFile().fileRecieveCompleted(), &server); + m_events.removeHandler(m_events.forFile().fileReceiveCompleted(), &server); m_events.cleanupQuitTimeout(); } @@ -356,7 +356,7 @@ NetworkTests::sendToClient_mockData_handleClientConnected(const Event&, void* vl } void -NetworkTests::sendToClient_mockData_fileRecieveCompleted(const Event& event, void*) +NetworkTests::sendToClient_mockData_fileReceiveCompleted(const Event& event, void*) { Client* client = static_cast(event.getTarget()); EXPECT_TRUE(client->isReceivedFileSizeValid()); @@ -383,7 +383,7 @@ NetworkTests::sendToClient_mockFile_handleClientConnected(const Event&, void* vl } void -NetworkTests::sendToClient_mockFile_fileRecieveCompleted(const Event& event, void*) +NetworkTests::sendToClient_mockFile_fileReceiveCompleted(const Event& event, void*) { Client* client = static_cast(event.getTarget()); EXPECT_TRUE(client->isReceivedFileSizeValid()); @@ -399,7 +399,7 @@ NetworkTests::sendToServer_mockData_handleClientConnected(const Event&, void* vc } void -NetworkTests::sendToServer_mockData_fileRecieveCompleted(const Event& event, void*) +NetworkTests::sendToServer_mockData_fileReceiveCompleted(const Event& event, void*) { Server* server = static_cast(event.getTarget()); EXPECT_TRUE(server->isReceivedFileSizeValid()); @@ -415,7 +415,7 @@ NetworkTests::sendToServer_mockFile_handleClientConnected(const Event&, void* vc } void -NetworkTests::sendToServer_mockFile_fileRecieveCompleted(const Event& event, void*) +NetworkTests::sendToServer_mockFile_fileReceiveCompleted(const Event& event, void*) { Server* server = static_cast(event.getTarget()); EXPECT_TRUE(server->isReceivedFileSizeValid());