feat: remove drag and drop support, its broken on all platforms
This commit is contained in:
committed by
Chris Rizzitello
parent
55a7fa3266
commit
5365e34f08
@ -15,7 +15,6 @@
|
||||
#include "deskflow/AppUtil.h"
|
||||
#include "deskflow/Clipboard.h"
|
||||
#include "deskflow/ClipboardChunk.h"
|
||||
#include "deskflow/FileChunk.h"
|
||||
#include "deskflow/OptionTypes.h"
|
||||
#include "deskflow/ProtocolTypes.h"
|
||||
#include "deskflow/ProtocolUtil.h"
|
||||
@ -314,11 +313,7 @@ ServerProxy::EResult ServerProxy::parseMessage(const uint8_t *code)
|
||||
setOptions();
|
||||
}
|
||||
|
||||
else if (memcmp(code, kMsgDFileTransfer, 4) == 0) {
|
||||
fileChunkReceived();
|
||||
} else if (memcmp(code, kMsgDDragInfo, 4) == 0) {
|
||||
dragInfoReceived();
|
||||
} else if (memcmp(code, kMsgDSecureInputNotification, 4) == 0) {
|
||||
else if (memcmp(code, kMsgDSecureInputNotification, 4) == 0) {
|
||||
secureInputNotification();
|
||||
}
|
||||
|
||||
@ -818,46 +813,11 @@ void ServerProxy::infoAcknowledgment()
|
||||
m_ignoreMouse = false;
|
||||
}
|
||||
|
||||
void ServerProxy::fileChunkReceived()
|
||||
{
|
||||
int result = FileChunk::assemble(m_stream, m_client->getReceivedFileData(), m_client->getExpectedFileSize());
|
||||
|
||||
if (result == kFinish) {
|
||||
m_events->addEvent(Event(EventTypes::FileReceiveCompleted, m_client));
|
||||
} else if (result == kStart) {
|
||||
if (m_client->getDragFileList().size() > 0) {
|
||||
std::string filename = m_client->getDragFileList().at(0).getFilename();
|
||||
LOG((CLOG_DEBUG "start receiving %s", filename.c_str()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ServerProxy::dragInfoReceived()
|
||||
{
|
||||
// parse
|
||||
uint32_t fileNum = 0;
|
||||
std::string content;
|
||||
ProtocolUtil::readf(m_stream, kMsgDDragInfo + 4, &fileNum, &content);
|
||||
|
||||
m_client->dragInfoReceived(fileNum, content);
|
||||
}
|
||||
|
||||
void ServerProxy::handleClipboardSendingEvent(const Event &event, void *)
|
||||
{
|
||||
ClipboardChunk::send(m_stream, event.getDataObject());
|
||||
}
|
||||
|
||||
void ServerProxy::fileChunkSending(uint8_t mark, char *data, size_t dataSize)
|
||||
{
|
||||
FileChunk::send(m_stream, mark, data, dataSize);
|
||||
}
|
||||
|
||||
void ServerProxy::sendDragInfo(uint32_t fileCount, const char *info, size_t size)
|
||||
{
|
||||
std::string data(info, size);
|
||||
ProtocolUtil::writef(m_stream, kMsgDDragInfo, fileCount, &data);
|
||||
}
|
||||
|
||||
void ServerProxy::secureInputNotification()
|
||||
{
|
||||
std::string app;
|
||||
|
||||
Reference in New Issue
Block a user