VirtualBox

Changeset 84984 in vbox


Ignore:
Timestamp:
Jun 29, 2020 9:47:21 AM (5 years ago)
Author:
vboxsync
Message:

DnD/DragAndDropSvc: Renaming to emphasize that these structs actually are classes and not POD types.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/HostServices/DragAndDropSvc.h

    r82968 r84984  
    253253 * HOST_DND_HG_EVT_DROPPED
    254254 */
    255 typedef struct VBOXDNDHGACTIONMSG
     255typedef struct HGCMMsgHGAction
    256256{
    257257    VBGLIOCHGCMCALL hdr;
     
    282282        } v3;
    283283    } u;
    284 } VBOXDNDHGACTIONMSG;
     284} HGCMMsgHGAction;
    285285
    286286/**
     
    290290 * HOST_DND_HG_EVT_LEAVE
    291291 */
    292 typedef struct VBOXDNDHGLEAVEMSG
     292typedef struct HGCMMsgHGLeave
    293293{
    294294    VBGLIOCHGCMCALL hdr;
     
    301301        } v3;
    302302    } u;
    303 } VBOXDNDHGLEAVEMSG;
     303} HGCMMsgHGLeave;
    304304
    305305/**
     
    309309 * HOST_DND_HG_EVT_CANCEL
    310310 */
    311 typedef struct VBOXDNDHGCANCELMSG
     311typedef struct HGCMMsgHGCancel
    312312{
    313313    VBGLIOCHGCMCALL hdr;
     
    320320        } v3;
    321321    } u;
    322 } VBOXDNDHGCANCELMSG;
     322} HGCMMsgHGCancel;
    323323
    324324/**
     
    331331 * New since protocol v3.
    332332 */
    333 typedef struct VBOXDNDHGSENDDATAHDRMSG
     333typedef struct HGCMMsgHGSendDataHdr
    334334{
    335335    VBGLIOCHGCMCALL hdr;
     
    364364    /** Size (in bytes) of checksum. */
    365365    HGCMFunctionParameter cbChecksum;      /* OUT uint32_t */
    366 } VBOXDNDHGSENDDATAHDRMSG;
     366} HGCMMsgHGSendDataHdr;
    367367
    368368/**
     
    372372 * HOST_DND_HG_SND_DATA
    373373 */
    374 typedef struct VBOXDNDHGSENDDATAMSG
     374typedef struct HGCMMsgHGSendData
    375375{
    376376    VBGLIOCHGCMCALL hdr;
     
    402402        } v3;
    403403    } u;
    404 } VBOXDNDHGSENDDATAMSG;
     404} HGCMMsgHGSendData;
    405405
    406406/**
     
    413413 * HOST_DND_HG_SND_MORE_DATA
    414414 */
    415 typedef struct VBOXDNDHGSENDMOREDATAMSG
     415typedef struct HGCMMsgHGSendMoreData
    416416{
    417417    VBGLIOCHGCMCALL hdr;
     
    419419    HGCMFunctionParameter pvData;       /* OUT ptr */
    420420    HGCMFunctionParameter cbData;       /* OUT uint32_t */
    421 } VBOXDNDHGSENDMOREDATAMSG;
     421} HGCMMsgHGSendMoreData;
    422422
    423423/**
     
    428428 * GUEST_DND_GH_SND_DIR
    429429 */
    430 typedef struct VBOXDNDHGSENDDIRMSG
     430typedef struct HGCMMsgHGSendDir
    431431{
    432432    VBGLIOCHGCMCALL hdr;
     
    455455        } v3;
    456456    } u;
    457 } VBOXDNDHGSENDDIRMSG;
     457} HGCMMsgHGSendDir;
    458458
    459459/**
     
    465465 * GUEST_DND_GH_SND_FILE_HDR
    466466 */
    467 typedef struct VBOXDNDHGSENDFILEHDRMSG
     467typedef struct HGCMMsgHGSendFileHdr
    468468{
    469469    VBGLIOCHGCMCALL hdr;
     
    481481    /** Total size (in bytes). */
    482482    HGCMFunctionParameter cbTotal;      /* OUT uint64_t */
    483 } VBOXDNDHGSENDFILEHDRMSG;
     483} HGCMMsgHGSendFileHdr;
    484484
    485485/**
     
    489489 * HOST_DND_HG_SND_FILE
    490490 */
    491 typedef struct VBOXDNDHGSENDFILEDATAMSG
     491typedef struct HGCMMsgHGSendFileData
    492492{
    493493    VBGLIOCHGCMCALL hdr;
     
    537537        } v3;
    538538    } u;
    539 } VBOXDNDHGSENDFILEDATAMSG;
     539} HGCMMsgHGSendFileData;
    540540
    541541/**
     
    545545 * HOST_DND_GH_REQ_PENDING
    546546 */
    547 typedef struct VBOXDNDGHREQPENDINGMSG
     547typedef struct HGCMMsgGHReqPending
    548548{
    549549    VBGLIOCHGCMCALL hdr;
     
    564564        } v3;
    565565    } u;
    566 } VBOXDNDGHREQPENDINGMSG;
     566} HGCMMsgGHReqPending;
    567567
    568568/**
     
    573573 * HOST_DND_GH_EVT_DROPPED
    574574 */
    575 typedef struct VBOXDNDGHDROPPEDMSG
     575typedef struct HGCMMsgGHDropped
    576576{
    577577    VBGLIOCHGCMCALL hdr;
     
    600600        } v3;
    601601    } u;
    602 } VBOXDNDGHDROPPEDMSG;
     602} HGCMMsgGHDropped;
    603603
    604604/*
     
    614614 * GUEST_DND_GET_NEXT_HOST_MSG
    615615 */
    616 typedef struct VBOXDNDNEXTMSGMSG
     616typedef struct HGCMMsgGetNext
    617617{
    618618    VBGLIOCHGCMCALL hdr;
     
    625625     *  new message to arrive. */
    626626    HGCMFunctionParameter fBlock;    /* OUT uint32_t */
    627 } VBOXDNDNEXTMSGMSG;
     627} HGCMMsgGetNext;
    628628
    629629/**
     
    634634 * GUEST_DND_CONNECT
    635635 */
    636 typedef struct VBOXDNDCONNECTMSG
     636typedef struct HGCMMsgConnect
    637637{
    638638    VBGLIOCHGCMCALL hdr;
     
    657657        } v3;
    658658    } u;
    659 } VBOXDNDCONNECTMSG;
     659} HGCMMsgConnect;
    660660
    661661/**
     
    666666 * GUEST_DND_HG_ACK_OP
    667667 */
    668 typedef struct VBOXDNDHGACKOPMSG
     668typedef struct HGCMMsgHGAck
    669669{
    670670    VBGLIOCHGCMCALL hdr;
     
    683683        } v3;
    684684    } u;
    685 } VBOXDNDHGACKOPMSG;
    686 
    687 /**
    688  * HG request for data event.
     685} HGCMMsgHGAck;
     686
     687/**
     688 * Requests data to be sent to the guest.
    689689 *
    690690 * Used by:
    691691 * GUEST_DND_HG_REQ_DATA
    692692 */
    693 typedef struct VBOXDNDHGREQDATAMSG
     693typedef struct HGCMMsgHGReqData
    694694{
    695695    VBGLIOCHGCMCALL hdr;
     
    709709        } v3;
    710710    } u;
    711 } VBOXDNDHGREQDATAMSG;
    712 
    713 typedef struct VBOXDNDHGEVTPROGRESSMSG
     711} HGCMMsgHGReqData;
     712
     713typedef struct HGCMMsgHGProgress
    714714{
    715715    VBGLIOCHGCMCALL hdr;
     
    732732        } v3;
    733733    } u;
    734 } VBOXDNDHGEVTPROGRESSMSG;
    735 
    736 /**
    737  * Acknowledges a pending drag and drop event
    738  * to the host.
     734} HGCMMsgHGProgress;
     735
     736/**
     737 * Acknowledges a pending guest drag and drop event to the host.
    739738 *
    740739 * Used by:
    741740 * GUEST_DND_GH_ACK_PENDING
    742741 */
    743 typedef struct VBOXDNDGHACKPENDINGMSG
     742typedef struct HGCMMsgGHAckPending
    744743{
    745744    VBGLIOCHGCMCALL hdr;
     
    763762        } v3;
    764763    } u;
    765 } VBOXDNDGHACKPENDINGMSG;
     764} HGCMMsgGHAckPending;
    766765
    767766/**
     
    774773 * New since protocol v3.
    775774 */
    776 typedef struct VBOXDNDHGSENDDATAHDRMSG VBOXDNDGHSENDDATAHDRMSG;
     775typedef struct HGCMMsgHGSendDataHdr HGCMMsgGHSendDataHdr;
    777776
    778777/**
     
    782781 * GUEST_DND_GH_SND_DATA
    783782 */
    784 typedef struct VBOXDNDGHSENDDATAMSG
     783typedef struct HGCMMsgGHSendData
    785784{
    786785    VBGLIOCHGCMCALL hdr;
     
    810809        } v3;
    811810    } u;
    812 } VBOXDNDGHSENDDATAMSG;
     811} HGCMMsgGHSendData;
    813812
    814813/**
     
    818817 * GUEST_DND_GH_SND_DIR
    819818 */
    820 typedef struct VBOXDNDHGSENDDIRMSG VBOXDNDGHSENDDIRMSG;
     819typedef struct HGCMMsgHGSendDir HGCMMsgGHSendDir;
    821820
    822821/**
     
    828827 * New since protocol v2.
    829828 */
    830 typedef struct VBOXDNDHGSENDFILEHDRMSG VBOXDNDGHSENDFILEHDRMSG;
     829typedef struct HGCMMsgHGSendFileHdr HGCMMsgGHSendFileHdr;
    831830
    832831/**
     
    836835 * GUEST_DND_GH_SND_FILE_DATA
    837836 */
    838 typedef struct VBOXDNDHGSENDFILEDATAMSG VBOXDNDGHSENDFILEDATAMSG;
     837typedef struct HGCMMsgHGSendFileData HGCMMsgGHSendFileData;
    839838
    840839/**
     
    844843 * GUEST_DND_GH_EVT_ERROR
    845844 */
    846 typedef struct VBOXDNDGHEVTERRORMSG
     845typedef struct HGCMMsgGHError
    847846{
    848847    VBGLIOCHGCMCALL hdr;
     
    861860        } v3;
    862861    } u;
    863 } VBOXDNDGHEVTERRORMSG;
     862} HGCMMsgGHError;
    864863
    865864#pragma pack()
  • trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3LibDragAndDrop.cpp

    r82968 r84984  
    7272    AssertPtrReturn(pcParms, VERR_INVALID_POINTER);
    7373
    74     VBOXDNDNEXTMSGMSG Msg;
     74    HGCMMsgGetNext Msg;
    7575    RT_ZERO(Msg);
    7676    VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, GUEST_DND_GET_NEXT_HOST_MSG, 3);
     
    127127        return VERR_NO_MEMORY;
    128128
    129     VBOXDNDHGACTIONMSG Msg;
     129    HGCMMsgHGAction Msg;
    130130    RT_ZERO(Msg);
    131131
     
    184184    AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
    185185
    186     VBOXDNDHGLEAVEMSG Msg;
     186    HGCMMsgHGLeave Msg;
    187187    RT_ZERO(Msg);
    188188
     
    205205    AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
    206206
    207     VBOXDNDHGCANCELMSG Msg;
     207    HGCMMsgHGCancel Msg;
    208208    RT_ZERO(Msg);
    209209
     
    238238    AssertPtrReturn(pfMode,         VERR_INVALID_POINTER);
    239239
    240     VBOXDNDHGSENDDIRMSG Msg;
     240    HGCMMsgHGSendDir Msg;
    241241    RT_ZERO(Msg);
    242242
     
    281281    AssertPtrReturn(pcbDataRecv,     VERR_INVALID_POINTER);
    282282
    283     VBOXDNDHGSENDFILEDATAMSG Msg;
     283    HGCMMsgHGSendFileData Msg;
    284284    RT_ZERO(Msg);
    285285
     
    329329    AssertReturn(pcbTotal,       VERR_INVALID_POINTER);
    330330
    331     VBOXDNDHGSENDFILEHDRMSG Msg;
     331    HGCMMsgHGSendFileHdr Msg;
    332332    RT_ZERO(Msg);
    333333
     
    657657    LogFlowFunc(("pvDate=%p, cbData=%RU32\n", pvData, cbData));
    658658
    659     VBOXDNDHGSENDDATAMSG Msg;
     659    HGCMMsgHGSendData Msg;
    660660    RT_ZERO(Msg);
    661661
     
    703703    Assert(pCtx->uProtocol >= 3); /* Only for protocol v3 and up. */
    704704
    705     VBOXDNDHGSENDDATAHDRMSG Msg;
     705    HGCMMsgHGSendDataHdr Msg;
    706706    RT_ZERO(Msg);
    707707    VBGL_HGCM_HDR_INIT(&Msg.hdr, pCtx->uClientID, HOST_DND_HG_SND_DATA_HDR, 12);
     
    970970   /* pScreenID is optional. */
    971971
    972     VBOXDNDGHREQPENDINGMSG Msg;
     972    HGCMMsgGHReqPending Msg;
    973973    RT_ZERO(Msg);
    974974
     
    10131013        return VERR_NO_MEMORY;
    10141014
    1015     VBOXDNDGHDROPPEDMSG Msg;
     1015    HGCMMsgGHDropped Msg;
    10161016    RT_ZERO(Msg);
    10171017
     
    11111111         *       does not implement this command.
    11121112         */
    1113         VBOXDNDCONNECTMSG Msg;
     1113        HGCMMsgConnect Msg;
    11141114        RT_ZERO(Msg);
    11151115
     
    13661366    AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
    13671367
    1368     VBOXDNDHGACKOPMSG Msg;
     1368    HGCMMsgHGAck Msg;
    13691369    RT_ZERO(Msg);
    13701370
     
    13941394    const uint32_t cbFormat = (uint32_t)strlen(pcszFormat) + 1; /* Include termination */
    13951395
    1396     VBOXDNDHGREQDATAMSG Msg;
     1396    HGCMMsgHGReqData Msg;
    13971397    RT_ZERO(Msg);
    13981398
     
    14211421    AssertReturn(uStatus > DND_PROGRESS_UNKNOWN, VERR_INVALID_PARAMETER);
    14221422
    1423     VBOXDNDHGEVTPROGRESSMSG Msg;
     1423    HGCMMsgHGProgress Msg;
    14241424    RT_ZERO(Msg);
    14251425
     
    14581458        return VERR_INVALID_UTF8_ENCODING;
    14591459
    1460     VBOXDNDGHACKPENDINGMSG Msg;
     1460    HGCMMsgGHAckPending Msg;
    14611461    RT_ZERO(Msg);
    14621462
     
    14901490    AssertPtrReturn(pDataHdr, VERR_INVALID_POINTER);
    14911491
    1492     VBOXDNDGHSENDDATAHDRMSG MsgHdr;
     1492    HGCMMsgGHSendDataHdr MsgHdr;
    14931493    RT_ZERO(MsgHdr);
    14941494
     
    15141514    if (RT_SUCCESS(rc))
    15151515    {
    1516         VBOXDNDGHSENDDATAMSG MsgData;
    1517         RT_ZERO(MsgData);
     1516        HGCMMsgGHSendData MsgData;
    15181517
    15191518        VBGL_HGCM_HDR_INIT(&MsgData.hdr, pCtx->uClientID, GUEST_DND_GH_SND_DATA, 5);
     
    15761575    const uint32_t cbPath = (uint32_t)strPath.length() + 1; /* Include termination. */
    15771576
    1578     VBOXDNDGHSENDDIRMSG Msg;
     1577    HGCMMsgGHSendDir Msg;
    15791578    RT_ZERO(Msg);
    15801579
     
    16141613                 pObj->GetSize(), pObj->GetMode()));
    16151614
    1616     VBOXDNDGHSENDFILEHDRMSG MsgHdr;
     1615    HGCMMsgGHSendFileHdr MsgHdr;
    16171616    RT_ZERO(MsgHdr);
    16181617
     
    16341633         * Send the actual file data, chunk by chunk.
    16351634         */
    1636         VBOXDNDGHSENDFILEDATAMSG Msg;
     1635        HGCMMsgGHSendFileData Msg;
    16371636        RT_ZERO(Msg);
    16381637
     
    18691868    AssertPtrReturn(pCtx, VERR_INVALID_POINTER);
    18701869
    1871     VBOXDNDGHEVTERRORMSG Msg;
     1870    HGCMMsgGHError Msg;
    18721871    RT_ZERO(Msg);
    18731872
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