1 /* 2 * synergy -- mouse and keyboard sharing utility 3 * Copyright (C) 2013-2016 Symless Ltd. 4 * 5 * This package is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU General Public License 7 * found in the file LICENSE that should have accompanied this file. 8 * 9 * This package is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 */ 17 18 #pragma once 19 20 #include "synergy/clipboard_types.h" 21 #include "base/String.h" 22 23 class IEventQueue; 24 class Mutex; 25 26 class StreamChunker { 27 public: 28 static void sendFile( 29 char* filename, 30 IEventQueue* events, 31 void* eventTarget); 32 static void sendClipboard( 33 String& data, 34 size_t size, 35 ClipboardID id, 36 UInt32 sequence, 37 IEventQueue* events, 38 void* eventTarget); 39 static void interruptFile(); 40 41 private: 42 static bool s_isChunkingFile; 43 static bool s_interruptFile; 44 static Mutex* s_interruptMutex; 45 }; 46