45e9809aff7304721fddb95654901b32195c9c7avboxsync * Private guest drag and drop code, used by GuestDnDTarget +
45e9809aff7304721fddb95654901b32195c9c7avboxsync * GuestDnDSource.
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Copyright (C) 2011-2014 Oracle Corporation
45e9809aff7304721fddb95654901b32195c9c7avboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
45e9809aff7304721fddb95654901b32195c9c7avboxsync * available from http://www.virtualbox.org. This file is free software;
45e9809aff7304721fddb95654901b32195c9c7avboxsync * you can redistribute it and/or modify it under the terms of the GNU
45e9809aff7304721fddb95654901b32195c9c7avboxsync * General Public License (GPL) as published by the Free Software
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
45e9809aff7304721fddb95654901b32195c9c7avboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
45e9809aff7304721fddb95654901b32195c9c7avboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include "VBox/hgcmsvc.h" /* For PVBOXHGCMSVCPARM. */
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* Forward prototype declarations. */
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Class for handling drag'n drop responses from
45e9809aff7304721fddb95654901b32195c9c7avboxsync * the guest side.
45e9809aff7304721fddb95654901b32195c9c7avboxsync int waitForGuestResponse(RTMSINTERVAL msTimeout = 500);
45e9809aff7304721fddb95654901b32195c9c7avboxsync uint32_t defAction(void) const { return m_defAction; }
45e9809aff7304721fddb95654901b32195c9c7avboxsync void setAllActions(uint32_t a) { m_allActions = a; }
45e9809aff7304721fddb95654901b32195c9c7avboxsync uint32_t allActions() const { return m_allActions; }
45e9809aff7304721fddb95654901b32195c9c7avboxsync void setFormat(const Utf8Str &strFormat) { m_strFormat = strFormat; }
45e9809aff7304721fddb95654901b32195c9c7avboxsync void setDropDir(const Utf8Str &strDropDir) { m_strDropDir = strDropDir; }
45e9809aff7304721fddb95654901b32195c9c7avboxsync Utf8Str dropDir(void) const { return m_strDropDir; }
45e9809aff7304721fddb95654901b32195c9c7avboxsync int dataAdd(const void *pvData, uint32_t cbData, uint32_t *pcbCurSize);
45e9809aff7304721fddb95654901b32195c9c7avboxsync int dataSetStatus(size_t cbDataAdd, size_t cbDataTotal = 0);
45e9809aff7304721fddb95654901b32195c9c7avboxsync int setProgress(unsigned uPercentage, uint32_t uState, int rcOp = VINF_SUCCESS);
45e9809aff7304721fddb95654901b32195c9c7avboxsync HRESULT resetProgress(const ComObjPtr<Guest>& pParent);
45e9809aff7304721fddb95654901b32195c9c7avboxsync int writeToFile(const char *pszPath, size_t cbPath, void *pvData, size_t cbData, uint32_t fMode);
45e9809aff7304721fddb95654901b32195c9c7avboxsync Utf8Str errorToString(const ComObjPtr<Guest>& pGuest, int guestRc);
static DECLCALLBACK(int) notifyDnDDispatcher(void *pvExtension, uint32_t u32Function, void *pvParms, uint32_t cbParms);
static com::Utf8Str toFormatString(const std::vector<com::Utf8Str> &lstSupportedFormats, const std::vector<com::Utf8Str> &lstFormats);
static void toFormatVector(const std::vector<com::Utf8Str> &lstSupportedFormats, const com::Utf8Str &strFormats, std::vector<com::Utf8Str> &vecformats);
static void toHGCMActions(DnDAction_T enmDefAction, uint32_t *puDefAction, const std::vector<DnDAction_T> vecAllowedActions, uint32_t *puAllowedActions);
/** List of supported default MIME/Content-type formats. */
#ifdef VBOX_WITH_DRAG_AND_DROP_GH
int onGHSendFile(GuestDnDResponse *pResp, const char *pszPath, size_t cbPath, void *pvData, size_t cbData, uint32_t fMode);
GuestDnDBase(void);
/** List of supported MIME/Content-type formats. */