Used a thread to send clipboard data #4601

This commit is contained in:
Jerry (Xinyu Hou) 2015-05-14 13:51:21 -07:00
parent 8c82996fc4
commit 220b6befab
5 changed files with 44 additions and 5 deletions

View file

@ -22,6 +22,7 @@
class Server;
class IEventQueue;
class Thread;
//! Proxy for client implementing protocol version 1.5
class ClientProxy1_5 : public ClientProxy1_4 {
@ -31,10 +32,15 @@ public:
virtual void sendDragInfo(UInt32 fileCount, const char* info, size_t size);
virtual void fileChunkSending(UInt8 mark, char* data, size_t dataSize);
virtual void setClipboard(ClipboardID id, const IClipboard* clipboard);
virtual bool parseMessage(const UInt8* code);
void fileChunkReceived();
void dragInfoReceived();
private:
// thread funciton for sending clipboard
void sendClipboardThread(void*);
private:
IEventQueue* m_events;
@ -42,4 +48,6 @@ private:
double m_elapsedTime;
size_t m_receivedDataSize;
static const UInt16 m_intervalThreshold;
Thread* m_sendFileThread;
String m_clipboardData;
};