VirtualBox

Changeset 85553 in vbox for trunk/src


Ignore:
Timestamp:
Jul 30, 2020 12:47:52 PM (4 years ago)
Author:
vboxsync
Message:

DnD/Main: Docs.

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/GuestDnDPrivate.h

    r85549 r85553  
    4949typedef std::vector<com::Utf8Str> GuestDnDMIMEList;
    5050
    51 /*
    52  ** @todo Put most of the implementations below in GuestDnDPrivate.cpp!
    53  */
    54 
     51/**
     52 * Class to handle a guest DnD callback event.
     53 */
    5554class GuestDnDCallbackEvent
    5655{
     
    9796    }
    9897
     98    /**
     99     * Adds new meta data.
     100     *
     101     * @returns New (total) meta data size in bytes.
     102     * @param   pvDataAdd       Pointer of data to add.
     103     * @param   cbDataAdd       Size (in bytes) of data to add.
     104     */
    99105    size_t add(const void *pvDataAdd, size_t cbDataAdd)
    100106    {
     
    121127    }
    122128
     129    /**
     130     * Adds new meta data.
     131     *
     132     * @returns New (total) meta data size in bytes.
     133     * @param   vecAdd          Meta data to add.
     134     */
    123135    size_t add(const std::vector<BYTE> &vecAdd)
    124136    {
     
    132144    }
    133145
     146    /**
     147     * Resets (clears) all data.
     148     */
    134149    void reset(void)
    135150    {
     
    148163    }
    149164
     165    /**
     166     * Resizes the allocation size.
     167     *
     168     * @returns VBox status code.
     169     * @param   cbSize          New allocation size (in bytes).
     170     */
    150171    int resize(size_t cbSize)
    151172    {
     
    212233    }
    213234
     235    /**
     236     * Adds processed data to the internal accounting.
     237     *
     238     * @returns New processed data size.
     239     * @param   cbDataAdd       Bytes to add as done processing.
     240     */
    214241    size_t addProcessed(size_t cbDataAdd)
    215242    {
     
    220247    }
    221248
     249    /**
     250     * Returns whether all data has been processed or not.
     251     *
     252     * @returns \c true if all data has been processed, \c false if not.
     253     */
    222254    bool isComplete(void) const
    223255    {
     
    228260    }
    229261
     262    /**
     263     * Returns the percentage (0-100) of the already processed data.
     264     *
     265     * @returns Percentage (0-100) of the already processed data.
     266     */
    230267    uint8_t getPercentComplete(void) const
    231268    {
     
    234271    }
    235272
     273    /**
     274     * Returns the remaining (outstanding) data left for processing.
     275     *
     276     * @returns Remaining (outstanding) data (in bytes) left for processing.
     277     */
    236278    size_t getRemaining(void) const
    237279    {
     
    241283    }
    242284
     285    /**
     286     * Returns the total data size (in bytes) announced.
     287     *
     288     * @returns Total data size (in bytes) announced.
     289     */
    243290    size_t getTotalAnnounced(void) const
    244291    {
     
    246293    }
    247294
     295    /**
     296     * Returns the total data size (in bytes) available.
     297     * For receiving data, this represents the already received data.
     298     * For sending data, this represents the data left to send.
     299     *
     300     * @returns Total data size (in bytes) available.
     301     */
    248302    size_t getTotalAvailable(void) const
    249303    {
     
    251305    }
    252306
     307    /**
     308     * Resets all data.
     309     */
    253310    void reset(void)
    254311    {
     
    278335
    279336/**
    280  * Class for keeping around DnD (file) transfer data.
     337 * Base class for keeping around DnD (file) transfer data.
     338 * Used for sending / receiving transfer data.
    281339 */
    282340struct GuestDnDTransferData
     
    296354    }
    297355
     356    /**
     357     * Initializes a transfer data object.
     358     *
     359     * @param   cbBuf           Scratch buffer size (in bytes) to use.
     360     */
    298361    int init(size_t cbBuf = _64K)
    299362    {
     
    308371    }
    309372
     373    /**
     374     * Destroys a transfer data object.
     375     */
    310376    void destroy(void)
    311377    {
     
    321387    }
    322388
     389    /**
     390     * Resets a transfer data object.
     391     */
    323392    void reset(void)
    324393    {
     
    329398    }
    330399
     400    /**
     401     * Returns whether this transfer object is complete or not.
     402     *
     403     * @returns \c true if complete, \c false if not.
     404     */
    331405    bool isComplete(void) const
    332406    {
     
    345419};
    346420
     421/**
     422 * Class for keeping around DnD transfer send data (Host -> Guest).
     423 */
    347424struct GuestDnDTransferSendData : public GuestDnDTransferData
    348425{
     
    360437    }
    361438
     439    /**
     440     * Destroys the object.
     441     */
    362442    void destroy(void)
    363443    {
     
    365445    }
    366446
     447    /**
     448     * Resets the object.
     449     */
    367450    void reset(void)
    368451    {
     
    389472    GuestDnDSendCtx(void);
    390473
     474    /**
     475     * Resets the object.
     476     */
    391477    void reset(void);
    392478
     
    425511    }
    426512
     513    /**
     514     * Destroys the object.
     515     */
    427516    void destroy(void)
    428517    {
     
    430519    }
    431520
     521    /**
     522     * Resets the object.
     523     */
    432524    void reset(void)
    433525    {
     
    457549    GuestDnDRecvCtx(void);
    458550
     551    /**
     552     * Resets the object.
     553     */
    459554    void reset(void);
    460555
     
    487582
    488583/**
    489  * Simple structure for a buffered guest DnD message.
     584 * Class for maintainig a (buffered) guest DnD message.
    490585 */
    491586class GuestDnDMsg
     
    506601public:
    507602
     603    /**
     604     * Appends a new HGCM parameter to the message and returns the pointer to it.
     605     */
    508606    PVBOXHGCMSVCPARM getNextParam(void)
    509607    {
     
    523621    }
    524622
     623    /**
     624     * Returns the current parameter count.
     625     *
     626     * @returns Current parameter count.
     627     */
    525628    uint32_t getCount(void) const { return cParms; }
     629
     630    /**
     631     * Returns the pointer to the beginning of the HGCM parameters array. Use with care.
     632     *
     633     * @returns Pointer to the beginning of the HGCM parameters array.
     634     */
    526635    PVBOXHGCMSVCPARM getParms(void) const { return paParms; }
     636
     637    /**
     638     * Returns the message type.
     639     *
     640     * @returns Message type.
     641     */
    527642    uint32_t getType(void) const { return uMsg; }
    528643
     644    /**
     645     * Resets the object.
     646     */
    529647    void reset(void)
    530648    {
     
    549667    }
    550668
     669    /**
     670     * Appends a new message parameter of type pointer.
     671     *
     672     * @returns VBox status code.
     673     * @param   pvBuf           Pointer to data to use.
     674     * @param   cbBuf           Size (in bytes) of data to use.
     675     */
    551676    int setNextPointer(void *pvBuf, uint32_t cbBuf)
    552677    {
     
    568693    }
    569694
     695    /**
     696     * Appends a new message parameter of type string.
     697     *
     698     * @returns VBox status code.
     699     * @param   pszString       Pointer to string data to use.
     700     */
    570701    int setNextString(const char *pszString)
    571702    {
     
    582713    }
    583714
     715    /**
     716     * Appends a new message parameter of type uint32_t.
     717     *
     718     * @returns VBox status code.
     719     * @param   u32Val          uint32_t value to use.
     720     */
    584721    int setNextUInt32(uint32_t u32Val)
    585722    {
     
    592729    }
    593730
     731    /**
     732     * Appends a new message parameter of type uint64_t.
     733     *
     734     * @returns VBox status code.
     735     * @param   u64Val          uint64_t value to use.
     736     */
    594737    int setNextUInt64(uint64_t u64Val)
    595738    {
     
    602745    }
    603746
     747    /**
     748     * Sets the HGCM message type (function number).
     749     *
     750     * @param   uMsgType        Message type to set.
     751     */
    604752    void setType(uint32_t uMsgType) { uMsg = uMsgType; }
    605753
     
    718866public:
    719867
     868    /**
     869     * Creates the Singleton GuestDnD object.
     870     *
     871     * @returns Newly created Singleton object, or NULL on failure.
     872     */
    720873    static GuestDnD *createInstance(const ComObjPtr<Guest>& pGuest)
    721874    {
     
    725878    }
    726879
     880    /**
     881     * Destroys the Singleton GuestDnD object.
     882     */
    727883    static void destroyInstance(void)
    728884    {
     
    734890    }
    735891
     892    /**
     893     * Returns the Singleton GuestDnD object.
     894     *
     895     * @returns Pointer to Singleton GuestDnD object, or NULL if not created yet.
     896     */
    736897    static inline GuestDnD *getInstance(void)
    737898    {
  • trunk/src/VBox/Main/src-client/GuestDnDPrivate.cpp

    r85537 r85553  
    157157
    158158
    159 /********************************************************************************************************************************
    160  *
     159/*********************************************************************************************************************************
     160 * Internal macros.                                                                                                              *
    161161 ********************************************************************************************************************************/
    162162
     163/** Tries locking the GuestDnD object and returns on failure. */
    163164#define GUESTDND_LOCK() \
    164165    { \
     
    168169    }
    169170
     171/** Tries locking the GuestDnD object and returns a_Ret failure. */
    170172#define GUESTDND_LOCK_RET(a_Ret) \
    171173    { \
     
    175177    }
    176178
     179/** Unlocks a formerly locked GuestDnD object. */
    177180#define GUESTDND_UNLOCK() \
    178181    { \
     
    181184    }
    182185
    183 /********************************************************************************************************************************
    184  *
     186/*********************************************************************************************************************************
     187 * GuestDnDSendCtx implementation.                                                                                               *
    185188 ********************************************************************************************************************************/
    186189
     
    192195}
    193196
     197/**
     198 * Resets a GuestDnDSendCtx object.
     199 */
    194200void GuestDnDSendCtx::reset(void)
    195201{
     
    208214
    209215/*********************************************************************************************************************************
    210  *                                                                                                                               *
     216 * GuestDnDRecvCtx implementation.                                                                                               *
    211217 ********************************************************************************************************************************/
    212218
     
    218224}
    219225
     226/**
     227 * Resets a GuestDnDRecvCtx object.
     228 */
    220229void GuestDnDRecvCtx::reset(void)
    221230{
     
    237246
    238247/*********************************************************************************************************************************
    239  *                                                                                                                               *
     248 * GuestDnDCallbackEvent implementation.                                                                                         *
    240249 ********************************************************************************************************************************/
    241250
     
    246255}
    247256
     257/**
     258 * Resets a GuestDnDCallbackEvent object.
     259 */
    248260int GuestDnDCallbackEvent::Reset(void)
    249261{
     
    257269}
    258270
     271/**
     272 * Completes a callback event by notifying the waiting side.
     273 *
     274 * @returns VBox status code.
     275 * @param   rc                  Result code to use for the event completion.
     276 */
    259277int GuestDnDCallbackEvent::Notify(int rc /* = VINF_SUCCESS */)
    260278{
     
    263281}
    264282
     283/**
     284 * Waits on a callback event for being notified.
     285 *
     286 * @returns VBox status code.
     287 * @param   msTimeout           Timeout (in ms) to wait for callback event.
     288 */
    265289int GuestDnDCallbackEvent::Wait(RTMSINTERVAL msTimeout)
    266290{
     
    291315}
    292316
     317/**
     318 * Notifies the waiting side about a guest notification response.
     319 */
    293320int GuestDnDResponse::notifyAboutGuestResponse(void) const
    294321{
     
    296323}
    297324
     325/**
     326 * Resets a GuestDnDResponse object.
     327 */
    298328void GuestDnDResponse::reset(void)
    299329{
     
    306336}
    307337
     338/**
     339 * Resets the progress object.
     340 *
     341 * @returns HRESULT
     342 * @param   pParent             Parent to set for the progress object.
     343 */
    308344HRESULT GuestDnDResponse::resetProgress(const ComObjPtr<Guest>& pParent)
    309345{
     
    321357}
    322358
     359/**
     360 * Returns whether the progress object has been canceled or not.
     361 *
     362 * @returns \c true if canceled, \c false if not.
     363 */
    323364bool GuestDnDResponse::isProgressCanceled(void) const
    324365{
     
    335376}
    336377
     378/**
     379 * Sets a callback for a specific HGCM message.
     380 *
     381 * @returns VBox status code.
     382 * @param   uMsg                HGCM message ID to set callback for.
     383 * @param   pfnCallback         Callback function pointer to use.
     384 * @param   pvUser              User-provided arguments for the callback function. Optional and can be NULL.
     385 */
    337386int GuestDnDResponse::setCallback(uint32_t uMsg, PFNGUESTDNDCALLBACK pfnCallback, void *pvUser /* = NULL */)
    338387{
     
    359408}
    360409
     410/**
     411 * Sets the progress object to a new state.
     412 *
     413 * @returns VBox status code.
     414 * @param   uPercentage         Percentage (0-100) to set.
     415 * @param   uStatus             Status (of type DND_PROGRESS_XXX) to set.
     416 * @param   rcOp                IPRT-style result code to set. Optional.
     417 * @param   strMsg              Message to set. Optional.
     418 */
    361419int GuestDnDResponse::setProgress(unsigned uPercentage, uint32_t uStatus,
    362420                                  int rcOp /* = VINF_SUCCESS */, const Utf8Str &strMsg /* = "" */)
     
    454512}
    455513
     514/**
     515 * Dispatching function for handling the host service service callback.
     516 *
     517 * @returns VBox status code.
     518 * @param   u32Function         HGCM message ID to handle.
     519 * @param   pvParms             Pointer to optional data provided for a particular message. Optional.
     520 * @param   cbParms             Size (in bytes) of \a pvParms.
     521 */
    456522int GuestDnDResponse::onDispatch(uint32_t u32Function, void *pvParms, uint32_t cbParms)
    457523{
     
    595661}
    596662
     663/**
     664 * Helper function to query the internal progress object to an IProgress interface.
     665 *
     666 * @returns HRESULT
     667 * @param   ppProgress          Where to query the progress object to.
     668 */
    597669HRESULT GuestDnDResponse::queryProgressTo(IProgress **ppProgress)
    598670{
     
    600672}
    601673
     674/**
     675 * Waits for a guest response to happen.
     676 *
     677 * @returns VBox status code.
     678 * @param   msTimeout           Timeout (in ms) for waiting. Optional, waits 500 ms if not specified.
     679 */
    602680int GuestDnDResponse::waitForGuestResponse(RTMSINTERVAL msTimeout /*= 500 */) const
    603681{
     
    610688
    611689/*********************************************************************************************************************************
    612  *                                                                                                                               *
     690 * GuestDnD implementation.                                                                                                      *
    613691 ********************************************************************************************************************************/
    614692
     693/** Static (Singleton) instance of the GuestDnD object. */
    615694GuestDnD* GuestDnD::s_pInstance = NULL;
    616695
     
    656735}
    657736
     737/**
     738 * Adjusts coordinations to a given screen.
     739 *
     740 * @returns HRESULT
     741 * @param   uScreenId           ID of screen to adjust coordinates to.
     742 * @param   puX                 Pointer to X coordinate to adjust. Will return the adjusted value on success.
     743 * @param   puY                 Pointer to Y coordinate to adjust. Will return the adjusted value on success.
     744 */
    658745HRESULT GuestDnD::adjustScreenCoordinates(ULONG uScreenId, ULONG *puX, ULONG *puY) const
    659746{
     
    686773}
    687774
     775/**
     776 * Sends a (blocking) message to the host side of the host service.
     777 *
     778 * @returns VBox status code.
     779 * @param   u32Function         HGCM message ID to send.
     780 * @param   cParms              Number of parameters to send.
     781 * @param   paParms             Array of parameters to send. Must match \c cParms.
     782 */
    688783int GuestDnD::hostCall(uint32_t u32Function, uint32_t cParms, PVBOXHGCMSVCPARM paParms) const
    689784{
     
    700795}
    701796
     797/**
     798 * Registers a GuestDnDSource object with the GuestDnD manager.
     799 *
     800 * Currently only one source is supported at a time.
     801 *
     802 * @returns VBox status code.
     803 * @param   Source              Source to register.
     804 */
    702805int GuestDnD::registerSource(const ComObjPtr<GuestDnDSource> &Source)
    703806{
     
    711814}
    712815
     816/**
     817 * Unregisters a GuestDnDSource object from the GuestDnD manager.
     818 *
     819 * @returns VBox status code.
     820 * @param   Source              Source to unregister.
     821 */
    713822int GuestDnD::unregisterSource(const ComObjPtr<GuestDnDSource> &Source)
    714823{
     
    723832}
    724833
     834/**
     835 * Returns the current number of registered sources.
     836 *
     837 * @returns Current number of registered sources.
     838 */
    725839size_t GuestDnD::getSourceCount(void)
    726840{
     
    733847}
    734848
     849/**
     850 * Registers a GuestDnDTarget object with the GuestDnD manager.
     851 *
     852 * Currently only one target is supported at a time.
     853 *
     854 * @returns VBox status code.
     855 * @param   Target              Target to register.
     856 */
    735857int GuestDnD::registerTarget(const ComObjPtr<GuestDnDTarget> &Target)
    736858{
     
    744866}
    745867
     868/**
     869 * Unregisters a GuestDnDTarget object from the GuestDnD manager.
     870 *
     871 * @returns VBox status code.
     872 * @param   Target              Target to unregister.
     873 */
    746874int GuestDnD::unregisterTarget(const ComObjPtr<GuestDnDTarget> &Target)
    747875{
     
    756884}
    757885
     886/**
     887 * Returns the current number of registered targets.
     888 *
     889 * @returns Current number of registered targets.
     890 */
    758891size_t GuestDnD::getTargetCount(void)
    759892{
     
    766899}
    767900
     901/**
     902 * Static main dispatcher function to handle callbacks from the DnD host service.
     903 *
     904 * @returns VBox status code.
     905 * @param   pvExtension         Pointer to service extension.
     906 * @param   u32Function         Callback HGCM message ID.
     907 * @param   pvParms             Pointer to optional data provided for a particular message. Optional.
     908 * @param   cbParms             Size (in bytes) of \a pvParms.
     909 */
    768910/* static */
    769911DECLCALLBACK(int) GuestDnD::notifyDnDDispatcher(void *pvExtension, uint32_t u32Function,
     
    786928}
    787929
     930/**
     931 * Static helper function to determine whether a format is part of a given MIME list.
     932 *
     933 * @returns \c true if found, \c false if not.
     934 * @param   strFormat           Format to search for.
     935 * @param   lstFormats          MIME list to search in.
     936 */
    788937/* static */
    789938bool GuestDnD::isFormatInFormatList(const com::Utf8Str &strFormat, const GuestDnDMIMEList &lstFormats)
     
    792941}
    793942
     943/**
     944 * Static helper function to create a GuestDnDMIMEList out of a format list string.
     945 *
     946 * @returns MIME list object.
     947 * @param   strFormats          List of formats (separated by DND_FORMATS_SEPARATOR) to convert.
     948 */
    794949/* static */
    795950GuestDnDMIMEList GuestDnD::toFormatList(const com::Utf8Str &strFormats)
     
    804959}
    805960
     961/**
     962 * Static helper function to create a format list string from a given GuestDnDMIMEList object.
     963 *
     964 * @returns Format list string.
     965 * @param   lstFormats          GuestDnDMIMEList to convert.
     966 */
    806967/* static */
    807968com::Utf8Str GuestDnD::toFormatString(const GuestDnDMIMEList &lstFormats)
     
    817978}
    818979
     980/**
     981 * Static helper function to create a filtered GuestDnDMIMEList object from supported and wanted formats.
     982 *
     983 * @returns Filtered MIME list object.
     984 * @param   lstFormatsSupported     MIME list of supported formats.
     985 * @param   lstFormatsWanted        MIME list of wanted formats in returned object.
     986 */
    819987/* static */
    820988GuestDnDMIMEList GuestDnD::toFilteredFormatList(const GuestDnDMIMEList &lstFormatsSupported, const GuestDnDMIMEList &lstFormatsWanted)
     
    8351003}
    8361004
     1005/**
     1006 * Static helper function to create a filtered GuestDnDMIMEList object from supported and wanted formats.
     1007 *
     1008 * @returns Filtered MIME list object.
     1009 * @param   lstFormatsSupported     MIME list of supported formats.
     1010 * @param   strFormatsWanted        Format list string of wanted formats in returned object.
     1011 */
    8371012/* static */
    8381013GuestDnDMIMEList GuestDnD::toFilteredFormatList(const GuestDnDMIMEList &lstFormatsSupported, const com::Utf8Str &strFormatsWanted)
     
    8561031}
    8571032
     1033/**
     1034 * Static helper function to convert a Main DnD action an internal DnD action.
     1035 *
     1036 * @returns Internal DnD action, or VBOX_DND_ACTION_IGNORE if not found / supported.
     1037 * @param   enmAction               Main DnD action to convert.
     1038 */
    8581039/* static */
    8591040VBOXDNDACTION GuestDnD::toHGCMAction(DnDAction_T enmAction)
     
    8821063}
    8831064
     1065/**
     1066 * Static helper function to convert a Main DnD default action and allowed Main actions to their
     1067 * corresponding internal representations.
     1068 *
     1069 * @param   enmDnDActionDefault     Default Main action to convert.
     1070 * @param   pDnDActionDefault       Where to store the converted default action.
     1071 * @param   vecDnDActionsAllowed    Allowed Main actions to convert.
     1072 * @param   pDnDLstActionsAllowed   Where to store the converted allowed actions.
     1073 */
    8841074/* static */
    8851075void GuestDnD::toHGCMActions(DnDAction_T                    enmDnDActionDefault,
     
    9161106}
    9171107
     1108/**
     1109 * Static helper function to convert an internal DnD action to its Main representation.
     1110 *
     1111 * @returns Converted Main DnD action.
     1112 * @param   dndAction           DnD action to convert.
     1113 */
    9181114/* static */
    9191115DnDAction_T GuestDnD::toMainAction(VBOXDNDACTION dndAction)
     
    9261122}
    9271123
     1124/**
     1125 * Static helper function to convert an internal DnD action list to its Main representation.
     1126 *
     1127 * @returns Converted Main DnD action list.
     1128 * @param   dndActionList       DnD action list to convert.
     1129 */
    9281130/* static */
    9291131std::vector<DnDAction_T> GuestDnD::toMainActions(VBOXDNDACTIONLIST dndActionList)
     
    9461148
    9471149/*********************************************************************************************************************************
    948  *                                                                                                                               *
     1150 * GuestDnDBase implementation.                                                                                                  *
    9491151 ********************************************************************************************************************************/
    9501152
     
    9591161}
    9601162
     1163/**
     1164 * Checks whether a given DnD format is supported or not.
     1165 *
     1166 * @returns HRESULT
     1167 * @param   aFormat             DnD format to check.
     1168 * @param   aSupported          Where to return \c TRUE if supported, or \c FALSE if not.
     1169 */
    9611170HRESULT GuestDnDBase::i_isFormatSupported(const com::Utf8Str &aFormat, BOOL *aSupported)
    9621171{
     
    9671176}
    9681177
     1178/**
     1179 * Returns the currently supported DnD formats.
     1180 *
     1181 * @returns HRESULT
     1182 * @param   aFormats            Where to store list of the supported DnD formats.
     1183 */
    9691184HRESULT GuestDnDBase::i_getFormats(GuestDnDMIMEList &aFormats)
    9701185{
     
    9741189}
    9751190
     1191/**
     1192 * Adds DnD formats to the supported formats list.
     1193 *
     1194 * @returns HRESULT
     1195 * @param   aFormats            List of DnD formats to add.
     1196 */
    9761197HRESULT GuestDnDBase::i_addFormats(const GuestDnDMIMEList &aFormats)
    9771198{
     
    9891210}
    9901211
     1212/**
     1213 * Removes DnD formats from tehh supported formats list.
     1214 *
     1215 * @returns HRESULT
     1216 * @param   aFormats            List of DnD formats to remove.
     1217 */
    9911218HRESULT GuestDnDBase::i_removeFormats(const GuestDnDMIMEList &aFormats)
    9921219{
     
    10031230}
    10041231
     1232/* Deprecated. */
    10051233HRESULT GuestDnDBase::i_getProtocolVersion(ULONG *puVersion)
    10061234{
     
    10121240 * Tries to guess the DnD protocol version to use on the guest, based on the
    10131241 * installed Guest Additions version + revision.
     1242 *
     1243 * Deprecated.
    10141244 *
    10151245 * If unable to retrieve the protocol version, VERR_NOT_FOUND is returned along
     
    10671297}
    10681298
     1299/**
     1300 * Adds a new guest DnD message to the internal message queue.
     1301 *
     1302 * @returns VBox status code.
     1303 * @param   pMsg                Pointer to message to add.
     1304 */
    10691305int GuestDnDBase::msgQueueAdd(GuestDnDMsg *pMsg)
    10701306{
     
    10731309}
    10741310
     1311/**
     1312 * Returns the next guest DnD message in the internal message queue (FIFO).
     1313 *
     1314 * @returns Pointer to guest DnD message, or NULL if none found.
     1315 */
    10751316GuestDnDMsg *GuestDnDBase::msgQueueGetNext(void)
    10761317{
     
    10801321}
    10811322
     1323/**
     1324 * Removes the next guest DnD message from the internal message queue.
     1325 */
    10821326void GuestDnDBase::msgQueueRemoveNext(void)
    10831327{
     
    10911335}
    10921336
     1337/**
     1338 * Clears the internal message queue.
     1339 */
    10931340void GuestDnDBase::msgQueueClear(void)
    10941341{
     
    11081355}
    11091356
     1357/**
     1358 * Sends a request to the guest side to cancel the current DnD operation.
     1359 *
     1360 * @returns VBox status code.
     1361 */
    11101362int GuestDnDBase::sendCancel(void)
    11111363{
     
    11241376}
    11251377
     1378/**
     1379 * Helper function to update the progress based on given a GuestDnDData object.
     1380 *
     1381 * @returns VBox status code.
     1382 * @param   pData               GuestDnDData object to use for accounting.
     1383 * @param   pResp               GuestDnDResponse to update its progress object for.
     1384 * @param   cbDataAdd           By how much data (in bytes) to update the progress.
     1385 */
    11261386int GuestDnDBase::updateProgress(GuestDnDData *pData, GuestDnDResponse *pResp,
    11271387                                 size_t cbDataAdd /* = 0 */)
     
    11531413}
    11541414
    1155 /** @todo GuestDnDResponse *pResp needs to go. */
     1415/**
     1416 * Waits for a specific guest callback event to get signalled.
     1417 *
     1418 ** @todo GuestDnDResponse *pResp needs to go.
     1419 *
     1420 * @returns VBox status code. Will return VERR_CANCELLED if the user has cancelled the progress object.
     1421 * @param   pEvent                  Callback event to wait for.
     1422 * @param   pResp                   Response to update.
     1423 * @param   msTimeout               Timeout (in ms) to wait.
     1424 */
    11561425int GuestDnDBase::waitForEvent(GuestDnDCallbackEvent *pEvent, GuestDnDResponse *pResp, RTMSINTERVAL msTimeout)
    11571426{
Note: See TracChangeset for help on using the changeset viewer.

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