Feature to drag a file from Windows to Mac:

- On Mac client main thread is used for cocoa application in order to simulate drag.
- Send dragging file dir from Windows server to Mac client while dragging after switching screen.
- Dragging information sending is immature now (need to support multi files dragging in the future).
- Used Cocoa function to monitor dragg pasteboard.
- Changed Mac client to use another thread for event queue instead of the main thread.
- Change fileRecieveComplete to fileRecieveCompleted.
This commit is contained in:
jerry 2013-08-30 14:38:43 +00:00
parent 031a84ca84
commit ce1b62db14
52 changed files with 875 additions and 184 deletions

View file

@ -40,6 +40,14 @@ CClientProxy1_5::~CClientProxy1_5()
{
}
void
CClientProxy1_5::draggingInfoSending(UInt32 fileCount, const char* data, size_t dataSize)
{
CString info(data, dataSize);
CProtocolUtil::writef(getStream(), kMsgDDragInfo, fileCount, &info);
}
void
CClientProxy1_5::fileChunkSending(UInt8 mark, char* data, size_t dataSize)
{
@ -79,7 +87,7 @@ void
CClientProxy1_5::fileChunkReceived()
{
// parse
UInt8 mark;
UInt8 mark = 0;
CString content;
CProtocolUtil::readf(getStream(), kMsgDFileTransfer + 4, &mark, &content);
@ -113,7 +121,7 @@ CClientProxy1_5::fileChunkReceived()
break;
case kFileEnd:
m_events->addEvent(CEvent(m_events->forIScreen().fileRecieveComplete(), server));
m_events->addEvent(CEvent(m_events->forIScreen().fileRecieveCompleted(), server));
if (CLOG->getFilter() >= kDEBUG2) {
LOG((CLOG_DEBUG2 "file data transfer finished"));
m_elapsedTime += m_stopwatch.getTime();