VirtualBox

Changeset 79287 in vbox for trunk/include


Ignore:
Timestamp:
Jun 22, 2019 12:05:44 AM (6 years ago)
Author:
vboxsync
Message:

GuestCtrlSvc,Main,VBoxService: Implemented IGuestFile::SetSize. bugref:9320

Location:
trunk/include/VBox
Files:
2 edited

Legend:

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

    r79286 r79287  
    195195    HOST_MSG_FILE_TELL,
    196196    /**
     197     * Changes the file size.
     198     */
     199    HOST_MSG_FILE_SET_SIZE,
     200    /**
    197201     * Removes a directory on the guest.
    198202     */
     
    242246        RT_CASE_RET_STR(HOST_MSG_FILE_SEEK);
    243247        RT_CASE_RET_STR(HOST_MSG_FILE_TELL);
     248        RT_CASE_RET_STR(HOST_MSG_FILE_SET_SIZE);
    244249        RT_CASE_RET_STR(HOST_MSG_DIR_REMOVE);
    245250        RT_CASE_RET_STR(HOST_MSG_PATH_RENAME);
     
    632637    GUEST_FILE_NOTIFYTYPE_WRITE = 40,
    633638    GUEST_FILE_NOTIFYTYPE_SEEK = 50,
    634     GUEST_FILE_NOTIFYTYPE_TELL = 60
     639    GUEST_FILE_NOTIFYTYPE_TELL = 60,
     640    GUEST_FILE_NOTIFYTYPE_SET_SIZE
    635641};
    636642
     
    11011107} HGCMMsgFileTell;
    11021108
     1109/**
     1110 * Changes the file size.
     1111 */
     1112typedef struct HGCMMsgFileSetSize
     1113{
     1114    VBGLIOCHGCMCALL         Hdr;
     1115    /** Context ID. */
     1116    HGCMFunctionParameter   id32Context;
     1117    /** File handle to seek. */
     1118    HGCMFunctionParameter   id32Handle;
     1119    /** The new file size. */
     1120    HGCMFunctionParameter   cb64NewSize;
     1121} HGCMMsgFileSetSize;
     1122
     1123
    11031124/******************************************************************************
    11041125* HGCM replies from the guest. These are handled in Main's low-level HGCM     *
     
    11411162            HGCMFunctionParameter offset;
    11421163        } tell;
     1164        struct
     1165        {
     1166            HGCMFunctionParameter cb64Size;
     1167        } SetSize;
    11431168    } u;
    11441169} HGCMReplyFileNotify;
     
    13551380            uint64_t uOffActual;
    13561381        } tell;
     1382        struct
     1383        {
     1384            /** The new file siz.e */
     1385            uint64_t cbSize;
     1386        } SetSize;
    13571387    } u;
    13581388} CALLBACKDATA_FILE_NOTIFY, *PCALLBACKDATA_FILE_NOTIFY;
  • trunk/include/VBox/VBoxGuestLib.h

    r79036 r79287  
    876876                                           uint32_t *puSeekMethod, uint64_t *poffSeek);
    877877VBGLR3DECL(int) VbglR3GuestCtrlFileGetTell(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puHandle);
     878VBGLR3DECL(int) VbglR3GuestCtrlFileGetSetSize(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t *puHandle, uint64_t *pcbNew);
     879
    878880/* Guest -> Host. */
    879881VBGLR3DECL(int) VbglR3GuestCtrlFileCbOpen(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc, uint32_t uFileHandle);
     
    881883VBGLR3DECL(int) VbglR3GuestCtrlFileCbError(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc);
    882884VBGLR3DECL(int) VbglR3GuestCtrlFileCbRead(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc, void *pvData, uint32_t cbData);
    883 VBGLR3DECL(int) VbglR3GuestCtrlFileCbWrite(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc, uint32_t uWritten);
    884 VBGLR3DECL(int) VbglR3GuestCtrlFileCbSeek(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc, uint64_t uOffActual);
    885 VBGLR3DECL(int) VbglR3GuestCtrlFileCbTell(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc, uint64_t uOffActual);
     885VBGLR3DECL(int) VbglR3GuestCtrlFileCbWrite(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc, uint32_t cbWritten);
     886VBGLR3DECL(int) VbglR3GuestCtrlFileCbSeek(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc, uint64_t offCurrent);
     887VBGLR3DECL(int) VbglR3GuestCtrlFileCbTell(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc, uint64_t offCurrent);
     888VBGLR3DECL(int) VbglR3GuestCtrlFileCbSetSize(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uRc, uint64_t cbNew);
    886889VBGLR3DECL(int) VbglR3GuestCtrlProcCbStatus(PVBGLR3GUESTCTRLCMDCTX pCtx, uint32_t uPID, uint32_t uStatus, uint32_t fFlags,
    887890                                            void *pvData, uint32_t cbData);
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