1
/*********************************************************
2
* Copyright (C) 2009 VMware, Inc. All rights reserved.
4
* This program is free software; you can redistribute it and/or modify it
5
* under the terms of the GNU Lesser General Public License as published
6
* by the Free Software Foundation version 2.1 and no later version.
8
* This program is distributed in the hope that it will be useful, but
9
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10
* or FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public
11
* License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program; if not, write to the Free Software Foundation, Inc.,
15
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17
*********************************************************/
22
* This class implements the methods that allows CopyPaste between host
25
* For a perspective on X copy/paste, see
26
* http://www.jwz.org/doc/x-cut-and-paste.html
31
#include "copyPasteUI.h"
32
#include "dndFileList.hh"
35
#include "vmwareuserInt.h"
41
#include "dndClipboard.h"
44
#include "cpNameUtil.h"
46
#include "eventManager.h"
50
*-----------------------------------------------------------------------------
52
* CopyPasteUI::CopyPasteUI --
62
*-----------------------------------------------------------------------------
65
CopyPasteUI::CopyPasteUI()
66
: mClipboardEmpty(true),
68
mIsClipboardOwner(false),
71
mHGGetFilesInitiated(false),
72
mFileTransferDone(false),
81
*-----------------------------------------------------------------------------
83
* CopyPasteUI::Init --
85
* Initialize copy paste UI class and register for V3 or greater copy
94
*-----------------------------------------------------------------------------
106
CPClipboard_Init(&mClipboard);
108
Gtk::TargetEntry gnome(FCP_TARGET_NAME_GNOME_COPIED_FILES);
109
Gtk::TargetEntry kde(FCP_TARGET_NAME_URI_LIST);
110
gnome.set_info(FCP_TARGET_INFO_GNOME_COPIED_FILES);
111
kde.set_info(FCP_TARGET_INFO_URI_LIST);
113
mListTargets.push_back(gnome);
114
mListTargets.push_back(kde);
116
/* Tell the VMX about the copyPaste version we support. */
117
if (!RpcOut_sendOne(NULL, NULL, "tools.capability.copypaste_version 3")) {
118
Debug("%s: could not set guest copypaste version capability\n",
122
Debug("%s: set copypaste version 3\n", __FUNCTION__);
124
mCP.newClipboard.connect(
125
sigc::mem_fun(this, &CopyPasteUI::GetRemoteClipboardCB));
126
mCP.localGetClipboard.connect(
127
sigc::mem_fun(this, &CopyPasteUI::GetLocalClipboard));
128
mCP.localGetFilesDoneChanged.connect(
129
sigc::mem_fun(this, &CopyPasteUI::GetLocalFilesDone));
134
*-----------------------------------------------------------------------------
136
* CopyPasteUI::~CopyPaste --
146
*-----------------------------------------------------------------------------
149
CopyPasteUI::~CopyPasteUI()
151
CPClipboard_Destroy(&mClipboard);
156
*-----------------------------------------------------------------------------
158
* CopyPasteUI::VmxCopyPasteVersionChanged --
160
* Update version information in mCP.
168
*-----------------------------------------------------------------------------
172
CopyPasteUI::VmxCopyPasteVersionChanged(struct RpcIn *rpcIn, // IN
173
uint32 version) // IN
175
Debug("%s: new version is %d\n", __FUNCTION__, version);
176
mCP.VmxCopyPasteVersionChanged(rpcIn, version);
181
*-----------------------------------------------------------------------------
183
* CopyPasteUI::GetLocalClipboard --
185
* Retrives the data from local clipboard and sends it to host. Send empty
186
* data back if there is no data or can not get data successfully. For
187
* guest->host copy/paste.
195
*-----------------------------------------------------------------------------
199
CopyPasteUI::GetLocalClipboard(CPClipboard *clip) // OUT
201
Debug("%s: enter.\n", __FUNCTION__);
203
if (mIsClipboardOwner) {
204
Debug("%s: is clipboard owner, set changed to false and return.\n", __FUNCTION__);
205
CPClipboard_SetChanged(clip, FALSE);
209
if (!mCP.IsCopyPasteAllowed()) {
210
Debug("%s: copyPaste is not allowed\n", __FUNCTION__);
214
Glib::RefPtr<Gtk::Clipboard> refClipboard =
215
Gtk::Clipboard::get(GDK_SELECTION_CLIPBOARD);
219
mGHSelection = GDK_SELECTION_CLIPBOARD;
220
Debug("%s: retrieving timestamps\n", __FUNCTION__);
221
refClipboard->request_contents(TARGET_NAME_TIMESTAMP,
222
sigc::mem_fun(this, &CopyPasteUI::LocalClipboardTimestampCB));
228
*-----------------------------------------------------------------------------
230
* CopyPasteUI::GetCurrentTime --
232
* Get current time in microseconds.
235
* Time in microseconds.
240
*-----------------------------------------------------------------------------
244
CopyPasteUI::GetCurrentTime(void)
249
if (gettimeofday(&tv, NULL) != 0) {
250
Debug("%s: gettimeofday failed!\n", __FUNCTION__);
251
return (VmTimeType) 0;
253
curTime = (tv.tv_sec * 1000000 + tv.tv_usec);
259
*-----------------------------------------------------------------------------
261
* CopyPasteUI::LocalGetFileRequestCB --
263
* Callback from a file paste request from another guest application.
264
* Begins copying the files from host to guest and return the file list.
272
*-----------------------------------------------------------------------------
276
CopyPasteUI::LocalGetFileRequestCB(Gtk::SelectionData& sd, // IN:
279
Debug("%s: enter.\n", __FUNCTION__);
280
mHGCopiedUriList = "";
284
curTime = GetCurrentTime();
287
* Some applications may ask for clipboard contents right after clipboard
288
* owner changed. So HG FCP will return nothing for some time after switch
289
* from guest OS to host OS.
291
if ((curTime - mHGGetListTime) < FCP_COPY_DELAY) {
292
Debug("%s: time delta less than FCP_COPY_DELAY, returning.\n",
297
if (!mIsClipboardOwner || !mCP.IsCopyPasteAllowed()) {
298
Debug("%s: not clipboard ownder, or copy paste not allowed, returning.\n",
303
Debug("%s: Got paste request, target is %s\n", __FUNCTION__,
304
sd.get_target().c_str());
306
/* Copy the files. */
307
if (!mHGGetFilesInitiated) {
309
utf::string hgStagingDir;
310
utf::string stagingDirName;
314
mFileTransferDone = false;
316
hgStagingDir = static_cast<utf::string>(mCP.GetFiles());
317
Debug("%s: Getting files. Staging dir: %s", __FUNCTION__,
318
hgStagingDir.c_str());
320
if (0 == hgStagingDir.bytes()) {
321
Debug("%s: Can not create staging directory\n", __FUNCTION__);
324
mHGGetFilesInitiated = true;
326
if (DnD_AddBlock(mBlockFd, hgStagingDir.c_str())) {
327
Debug("%s: add block mBlockFd %d.\n", __FUNCTION__, mBlockFd);
328
mHGStagingDir = hgStagingDir;
331
Debug("%s: unable to add block fd %d dir %s.\n",
332
__FUNCTION__, mBlockFd, hgStagingDir.c_str());
335
/* Provide URIs for each path in the guest's file list. */
336
if (FCP_TARGET_INFO_GNOME_COPIED_FILES == info) {
337
mHGCopiedUriList = "copy\n";
338
pre = FCP_GNOME_LIST_PRE;
339
post = FCP_GNOME_LIST_POST;
340
} else if (FCP_TARGET_INFO_URI_LIST == info) {
341
pre = DND_URI_LIST_PRE_KDE;
342
post = DND_URI_LIST_POST;
344
Debug("%s: Unknown request target: %s\n", __FUNCTION__,
345
sd.get_target().c_str());
349
/* Provide path within vmblock file system instead of actual path. */
350
stagingDirName = GetLastDirName(hgStagingDir);
351
if (0 == stagingDirName.bytes()) {
352
Debug("%s: Can not get staging directory name\n", __FUNCTION__);
356
while ((str = GetNextPath(mHGFCPData, index).c_str()).bytes() != 0) {
357
Debug("%s: Path: %s", __FUNCTION__, str.c_str());
358
mHGCopiedUriList += pre;
359
mHGCopiedUriList += VMBLOCK_MOUNT_POINT;
360
mHGCopiedUriList += DIRSEPS + stagingDirName + DIRSEPS + str + post;
363
/* Nautilus does not expect FCP_GNOME_LIST_POST after the last uri. See bug 143147. */
364
if (FCP_TARGET_INFO_GNOME_COPIED_FILES == info) {
365
mHGCopiedUriList.erase(mHGCopiedUriList.size() - 1, 1);
369
if (0 == mHGCopiedUriList.bytes()) {
370
Debug("%s: Can not get uri list\n", __FUNCTION__);
376
* If there is no blocking driver, wait here till file copy is done.
377
* 2 reasons to keep this:
378
* 1. If run vmware-user stand-alone as non-root, blocking driver can
379
* not be opened. Debug purpose only.
380
* 2. Other platforms (Solaris, etc) may also use this code,
381
* and there is no blocking driver yet.
383
* Polling here will not be sufficient for large files (experiments
384
* showed it was sufficient for a 256MB file, and failed for a 1GB
385
* file, but those numbers are of course context-sensitive and so YMMV).
386
* The reason is we are executing in the context of gtkmm callback, and
387
* apparently it only has so much patience regarding how quickly we
390
Debug("%s no blocking driver, waiting for "
391
"HG file copy done ...\n", __FUNCTION__);
392
while (mFileTransferDone == false) {
397
nr = EventManager_ProcessNext(gEventQueue, (uint64 *)&tv.tv_usec);
399
Debug("%s: unexpected end of loop: returned "
400
"value is %d.\n", __FUNCTION__, nr);
403
if (select(0, NULL, NULL, NULL, &tv) == -1) {
404
Debug("%s: error in select (%s).\n", __FUNCTION__,
409
Debug("%s: file transfer done!\n", __FUNCTION__);
412
Debug("%s: providing file list [%s]\n", __FUNCTION__,
413
mHGCopiedUriList.c_str());
415
sd.set(sd.get_target().c_str(), mHGCopiedUriList.c_str());
420
*-----------------------------------------------------------------------------
422
* CopyPaste::LocalClearClipboardCB --
424
* Clear clipboard request from another host application.
432
*-----------------------------------------------------------------------------
436
CopyPasteUI::LocalClearClipboardCB(void)
438
Debug("%s: got clear callback\n", __FUNCTION__);
439
mIsClipboardOwner = FALSE;
444
*----------------------------------------------------------------------
446
* CopyPasteUI::LocalClipboardTimestampCB --
448
* Got the local clipboard timestamp. Ask for the primary timestamp.
456
*----------------------------------------------------------------------
460
CopyPasteUI::LocalClipboardTimestampCB(const Gtk::SelectionData& sd) // IN
462
int length = sd.get_length();
463
Debug("%s: enter sd.get_length() %d.\n", __FUNCTION__,
466
mClipTime = ((uint32*) sd.get_data())[0];
467
Debug("%s: mClipTime: %"FMT64"u.", __FUNCTION__, mClipTime);
468
} else if (length == 8) {
469
mClipTime = ((uint64*) sd.get_data())[0];
470
Debug("%s: mClipTime: %"FMT64"u.", __FUNCTION__, mClipTime);
472
Debug("%s: Unable to get mClipTime.", __FUNCTION__);
475
Glib::RefPtr<Gtk::Clipboard> refClipboard
476
= Gtk::Clipboard::get(GDK_SELECTION_PRIMARY);
477
refClipboard->request_contents(TARGET_NAME_TIMESTAMP,
478
sigc::mem_fun(this, &CopyPasteUI::LocalPrimTimestampCB));
483
*----------------------------------------------------------------------
485
* CopyPasteUI::LocalPrimTimestampCB --
487
* Got the local primary timestamp. Choose the most recently changed
488
* clipboard and get the selection from it.
496
*----------------------------------------------------------------------
500
CopyPasteUI::LocalPrimTimestampCB(const Gtk::SelectionData& sd) // IN
502
bool unchanged = FALSE;
503
int length = sd.get_length();
504
Debug("%s: enter sd.get_length() is %d.\n", __FUNCTION__, length);
506
mPrimTime = ((uint32*) sd.get_data())[0];
507
Debug("%s: mPrimTime: %"FMT64"u.", __FUNCTION__, mPrimTime);
508
} else if (length == 8) {
509
mPrimTime = ((uint64*) sd.get_data())[0];
510
Debug("%s: mPrimTime: %"FMT64"u.", __FUNCTION__, mPrimTime);
512
Debug("%s: Unable to get mPrimTime.", __FUNCTION__);
515
/* After got both timestamp, choose latest one as active selection. */
516
mGHSelection = GDK_SELECTION_PRIMARY;
517
if (mClipTime > mPrimTime) {
518
mGHSelection = GDK_SELECTION_CLIPBOARD;
519
Debug("%s: mClipTimePrev: %"FMT64"u.", __FUNCTION__, mClipTimePrev);
520
unchanged = mClipTime <= mClipTimePrev;
522
Debug("%s: mPrimTimePrev: %"FMT64"u.", __FUNCTION__, mPrimTimePrev);
523
unchanged = mPrimTime <= mPrimTimePrev;
527
Debug("%s: clipboard is unchanged, get out\n", __FUNCTION__);
528
CPClipboard_SetChanged(&mClipboard, FALSE);
532
mPrimTimePrev = mPrimTime;
533
mClipTimePrev = mClipTime;
535
/* Ask for available targets from active selection. */
536
Glib::RefPtr<Gtk::Clipboard> refClipboard =
537
Gtk::Clipboard::get(mGHSelection);
539
refClipboard->request_targets(
540
sigc::mem_fun(this, &CopyPasteUI::LocalReceivedTargetsCB));
545
*----------------------------------------------------------------------
547
* CopyPasteUI::LocalReceivedTargetsCB --
549
* Received targets. Check if any desired target available. If so,
550
* ask for all supported contents.
556
* Clipboard owner may send us file list.
558
*----------------------------------------------------------------------
562
CopyPasteUI::LocalReceivedTargetsCB(const Glib::StringArrayHandle& targetsArray) // IN
564
std::list<utf::string> targets = targetsArray;
565
Glib::RefPtr<Gtk::Clipboard> refClipboard = Gtk::Clipboard::get(mGHSelection);
567
Debug("%s: enter", __FUNCTION__);
568
CPClipboard_Clear(&mClipboard);
570
if (std::find(targets.begin(),
572
FCP_TARGET_NAME_GNOME_COPIED_FILES) != targets.end()) {
573
Debug("%s: gnome copy file list available\n", __FUNCTION__);
574
refClipboard->request_contents(FCP_TARGET_NAME_GNOME_COPIED_FILES,
576
&CopyPasteUI::LocalReceivedFileListCB));
580
if (std::find(targets.begin(),
582
FCP_TARGET_NAME_URI_LIST) != targets.end()) {
583
Debug("%s: KDE copy file list available\n", __FUNCTION__);
584
refClipboard->request_contents(FCP_TARGET_NAME_URI_LIST,
586
&CopyPasteUI::LocalReceivedFileListCB));
590
Debug("%s: ask for text\n", __FUNCTION__);
591
refClipboard->request_text(sigc::mem_fun(this,
592
&CopyPasteUI::LocalReceivedTextCB));
597
*----------------------------------------------------------------------
599
* CopyPasteUI::LocalReceivedFileListCB --
601
* Got clipboard or primary selection file list. Parse it and add
602
* it to the crossplaform clipboard. Send clipboard to the host.
610
*----------------------------------------------------------------------
614
CopyPasteUI::LocalReceivedFileListCB(const Gtk::SelectionData& sd) // IN
616
Debug("%s: enter", __FUNCTION__);
617
const utf::string target = sd.get_target().c_str();
619
if (target == FCP_TARGET_NAME_GNOME_COPIED_FILES ||
620
target == FCP_TARGET_NAME_URI_LIST) {
621
LocalGetSelectionFileList(sd);
622
mCP.SetRemoteClipboard(&mClipboard);
628
*----------------------------------------------------------------------
630
* CopyPasteUI::LocalReceivedTextCB --
632
* Got clipboard (or primary selection) text, add to local clipboard
633
* cache and send clipboard to host.
641
*----------------------------------------------------------------------
645
CopyPasteUI::LocalReceivedTextCB(const Glib::ustring& text) // IN
647
Debug("%s: enter", __FUNCTION__);
648
utf::string source = text;
651
* With 'cut' operation OpenOffice will put data into clipboard but
652
* set same timestamp for both clipboard and primary selection.
653
* If primary timestamp is same as clipboard timestamp, we should try
654
* clipboard again if primary selection is empty. For details please
655
* refer to bug 300780.
657
if (0 == source.bytes() &&
658
mClipTime == mPrimTime &&
662
mGHSelection = GDK_SELECTION_CLIPBOARD;
664
/* Ask for available targets from active selection. */
665
Glib::RefPtr<Gtk::Clipboard> refClipboard =
666
Gtk::Clipboard::get(mGHSelection);
668
refClipboard->request_targets(
669
sigc::mem_fun(this, &CopyPasteUI::LocalReceivedTargetsCB));
673
Debug("%s: Got text: %s", __FUNCTION__, source.c_str());
675
/* Add NUL terminator. */
676
CPClipboard_SetItem(&mClipboard, CPFORMAT_TEXT, source.c_str(),
678
mCP.SetRemoteClipboard(&mClipboard);
683
*-----------------------------------------------------------------------------
685
* CopyPasteUI::LocalGetSelectionFileList --
687
* Construct local file list and remote file list from selection data.
688
* Called by both DnD and FCP.
696
*-----------------------------------------------------------------------------
700
CopyPasteUI::LocalGetSelectionFileList(const Gtk::SelectionData& sd) // IN
707
DnDFileList fileList;
709
uint64 totalSize = 0;
713
* Turn the uri list into two \0 delimited lists. One for full paths and
714
* one for just the last path component.
716
source = sd.get_data_as_string().c_str();
717
Debug("%s: Got file list: [%s]\n", __FUNCTION__, source.c_str());
720
* In gnome, before file list there may be a extra line indicating it
723
if (source.startsWith("copy\n")) {
724
source = source.erase(0, 5);
727
if (source.startsWith("cut\n")) {
728
source = source.erase(0, 4);
731
while (source.bytes() > 0 &&
732
(source[0] == '\n' || source[0] == '\r' || source[0] == ' ')) {
733
source = source.erase(0, 1);
736
while ((newPath = DnD_UriListGetNextFile(source.c_str(),
738
&newPathLen)) != NULL) {
741
* Parse relative path.
743
newRelPath = Str_Strrchr(newPath, DIRSEPC) + 1; // Point to char after '/'
746
* XXX For directory, value is -1, so if there is any directory,
747
* total size is not accurate.
749
if ((size = File_GetSize(newPath)) >= 0) {
752
Debug("%s: Unable to get file size for %s\n", __FUNCTION__, newPath);
755
Debug("%s: Adding newPath '%s' newRelPath '%s'\n", __FUNCTION__,
756
newPath, newRelPath);
757
fileList.AddFile(newPath, newRelPath);
762
fileList.SetFileSize(totalSize);
763
Debug("%s: totalSize is %"FMT64"u\n", __FUNCTION__, totalSize);
764
fileList.ToCPClipboard(&buf, false);
765
CPClipboard_SetItem(&mClipboard, CPFORMAT_FILELIST, DynBuf_Get(&buf),
766
DynBuf_GetSize(&buf));
767
DynBuf_Destroy(&buf);
772
*----------------------------------------------------------------------------
774
* CopyPasteUI::GetNextPath --
776
* Provides a substring containing the next path from the provided
777
* NUL-delimited string starting at the provided index.
780
* A string with the next path or "" if there are no more paths.
785
*----------------------------------------------------------------------------
789
CopyPasteUI::GetNextPath(utf::utf8string& str, // IN: NUL-delimited path list
790
size_t& index) // IN/OUT: current index into string
795
if (index >= str.length()) {
799
for (start = index; str[index] != '\0' && index < str.length(); index++) {
801
* Escape reserved characters according to RFC 1630. We'd use
802
* Escape_Do() if this wasn't a utf::string, but let's use the same table
803
* replacement approach.
805
static char const Dec2Hex[] = {
806
'0', '1', '2', '3', '4', '5', '6', '7',
807
'8', '9', 'A', 'B', 'C', 'D', 'E', 'F',
810
unsigned char ubyte = str[index];
812
if (ubyte == '#' || /* Fragment identifier delimiter */
813
ubyte == '?' || /* Query string delimiter */
814
ubyte == '*' || /* "Special significance within specific schemes" */
815
ubyte == '!' || /* "Special significance within specific schemes" */
816
ubyte == '%' || /* Escape character */
817
ubyte >= 0x80) { /* UTF-8 encoding bytes */
818
str.replace(index, 1, "%");
819
str.insert(index + 1, 1, Dec2Hex[ubyte >> 4]);
820
str.insert(index + 2, 1, Dec2Hex[ubyte & 0xF]);
825
ret = str.substr(start, index - start);
826
Debug("%s: nextpath: %s", __FUNCTION__, ret.c_str());
833
*-----------------------------------------------------------------------------
835
* CopyPasteUI::GetLastDirName --
837
* Try to get last directory name from a full path name.
840
* Last dir name in the full path name if sucess, empty str otherwise
845
*-----------------------------------------------------------------------------
849
CopyPasteUI::GetLastDirName(const utf::string &str) // IN
855
end = str.bytes() - 1;
856
if (end >= 0 && DIRSEPC == str[end]) {
860
if (end <= 0 || str[0] != DIRSEPC) {
866
while (str[start] != DIRSEPC) {
870
return str.substr(start + 1, end - start);
874
*-----------------------------------------------------------------------------
876
* CopyPasteUI::GetRemoteClipboardCB --
878
* Invoked when got data from host. Update the internal data to get the file
879
* names or the text that needs to be transferred.
881
* Method for copy and paste from host to guest.
889
*-----------------------------------------------------------------------------
893
CopyPasteUI::GetRemoteClipboardCB(const CPClipboard *clip) // IN
895
Glib::RefPtr<Gtk::Clipboard> refClipboard =
896
Gtk::Clipboard::get(GDK_SELECTION_CLIPBOARD);
897
Glib::RefPtr<Gtk::Clipboard> refPrimary =
898
Gtk::Clipboard::get(GDK_SELECTION_PRIMARY);
902
Debug("%s: enter\n", __FUNCTION__);
904
Debug("%s: No clipboard contents.", __FUNCTION__);
908
/* Clear the clipboard contents if we are the owner. */
909
if (mIsClipboardOwner) {
910
refClipboard->clear();
912
mIsClipboardOwner = FALSE;
913
Debug("%s: Cleared local clipboard", __FUNCTION__);
916
if (CPClipboard_GetItem(clip, CPFORMAT_TEXT, &buf, &sz)) {
917
Debug("%s: Text data: %s.\n", __FUNCTION__, (char *)buf);
918
refClipboard->set_text((const char *) buf);
919
refPrimary->set_text((const char *) buf);
921
if (CPClipboard_GetItem(clip, CPFORMAT_FILELIST, &buf, &sz)) {
922
Debug("%s: File data.\n", __FUNCTION__);
924
flist.FromCPClipboard(buf, sz);
925
mHGFCPData = flist.GetRelPathsStr();
927
refClipboard->set(mListTargets,
928
sigc::mem_fun(this, &CopyPasteUI::LocalGetFileRequestCB),
929
sigc::mem_fun(this, &CopyPasteUI::LocalClearClipboardCB));
930
refPrimary->set(mListTargets,
931
sigc::mem_fun(this, &CopyPasteUI::LocalGetFileRequestCB),
932
sigc::mem_fun(this, &CopyPasteUI::LocalClearClipboardCB));
934
mIsClipboardOwner = TRUE;
935
mHGGetListTime = GetCurrentTime();
936
mHGGetFilesInitiated = false;
937
mHGCopiedUriList = "";
943
*-----------------------------------------------------------------------------
945
* CopyPasteUI::GetLocalFilesDone --
947
* Callback when CopyPasteUI::GetLocalFiles is done, which finishes the file
948
* copying from host to guest staging directory. This function notifies
949
* the Copy/Paste data object and end its waiting state in order to continue
950
* the file copying from local staging directory to local target directory.
958
*-----------------------------------------------------------------------------
962
CopyPasteUI::GetLocalFilesDone(bool success)
964
Debug("%s: enter success %d\n", __FUNCTION__, success);
967
Debug("%s: removing block mBlockFd %d\n", __FUNCTION__, mBlockFd);
968
DnD_RemoveBlock(mBlockFd, mHGStagingDir.c_str());
972
mFileTransferDone = true;
975
* Mark current staging dir to be deleted on next reboot for FCP. The
976
* file will not be deleted after reboot if it is moved to another
977
* location by target application.
979
DnD_DeleteStagingFiles(mHGStagingDir.c_str(), TRUE);
981
/* Copied files are already removed in common layer. */
982
mHGStagingDir.clear();
984
mHGGetFilesInitiated = false;
989
*-----------------------------------------------------------------------------
991
* CopyPasteUI::Reset --
1000
*-----------------------------------------------------------------------------
1004
CopyPasteUI::Reset(void)
1006
Debug("%s: enter\n", __FUNCTION__);
1007
/* Cancel any pending file transfer. */