VirtualBox

source: vbox/trunk/src/VBox/GuestHost/DragAndDrop/DnDUtils.cpp@ 95821

Last change on this file since 95821 was 95821, checked in by vboxsync, 3 years ago

DnD: Added GuestHost/DnDUtils module for various utility functions, (release2) log the acknowledged / pending actions by the guest, to make it easier in the future to diagnose DnD errors. bugref:10267

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.8 KB
Line 
1/* $Id: DnDUtils.cpp 95821 2022-07-25 16:00:26Z vboxsync $ */
2/** @file
3 * DnD - Common utility functions.
4 */
5
6/*
7 * Copyright (C) 2022 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18
19/*********************************************************************************************************************************
20* Header Files *
21*********************************************************************************************************************************/
22#define LOG_GROUP LOG_GROUP_GUEST_DND
23#include <VBox/GuestHost/DragAndDrop.h>
24
25#include <iprt/assert.h>
26#include <iprt/dir.h>
27#include <iprt/err.h>
28#include <iprt/file.h>
29#include <iprt/mem.h>
30#include <iprt/path.h>
31#include <iprt/string.h>
32
33#include <VBox/log.h>
34
35
36/**
37 * Converts a VBOXDNDACTION to a string.
38 *
39 * @returns Stringified version of VBOXDNDACTION
40 * @param uAction DnD action to convert.
41 */
42const char *DnDActionToStr(VBOXDNDACTION uAction)
43{
44 switch (uAction)
45 {
46 case VBOX_DND_ACTION_IGNORE: return "ignore";
47 case VBOX_DND_ACTION_COPY: return "copy";
48 case VBOX_DND_ACTION_MOVE: return "move";
49 case VBOX_DND_ACTION_LINK: return "link";
50 default:
51 break;
52 }
53 AssertMsgFailedReturn(("Unknown uAction=%d\n", uAction), "bad");
54}
55
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette