VirtualBox

Changeset 44249 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jan 8, 2013 11:08:44 AM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
83109
Message:

GuestControl/service: const, HostCmd -> VBOXGUESTCTRLHOSTCMD.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/GuestControl/service.cpp

    r42354 r44249  
    128128 * Structure for holding a buffered host command.
    129129 */
    130 struct HostCmd
     130typedef struct VBOXGUESTCTRLHOSTCMD
    131131{
    132132    /** The context ID this command belongs to. Will be extracted
     
    140140
    141141    /** The standard constructor. */
    142     HostCmd() : mContextID(0), mTries(0) {}
     142    VBOXGUESTCTRLHOSTCMD() : mContextID(0), mTries(0) {}
    143143};
    144144/** The host cmd list + iterator type */
    145 typedef std::list< HostCmd > HostCmdList;
    146 typedef std::list< HostCmd >::iterator HostCmdListIter;
    147 typedef std::list< HostCmd >::const_iterator HostCmdListIterConst;
     145typedef std::list< VBOXGUESTCTRLHOSTCMD > HostCmdList;
     146typedef std::list< VBOXGUESTCTRLHOSTCMD >::iterator HostCmdListIter;
     147typedef std::list< VBOXGUESTCTRLHOSTCMD >::const_iterator HostCmdListIterConst;
    148148
    149149/**
     
    281281    int paramBufferAllocate(PVBOXGUESTCTRPARAMBUFFER pBuf, uint32_t uMsg, uint32_t cParms, VBOXHGCMSVCPARM paParms[]);
    282282    void paramBufferFree(PVBOXGUESTCTRPARAMBUFFER pBuf);
    283     int paramBufferAssign(VBOXHGCMSVCPARM paDstParms[], uint32_t cDstParms, PVBOXGUESTCTRPARAMBUFFER pSrcBuf);
     283    int paramBufferAssign(VBOXHGCMSVCPARM paDstParms[], uint32_t cDstParms, const VBOXGUESTCTRPARAMBUFFER *pSrcBuf);
    284284    int prepareExecute(uint32_t cParms, VBOXHGCMSVCPARM paParms[]);
    285285    int clientConnect(uint32_t u32ClientID, void *pvClient);
    286286    int clientDisconnect(uint32_t u32ClientID, void *pvClient);
    287     int assignHostCmdToGuest(HostCmd *pCmd, VBOXHGCMCALLHANDLE callHandle, uint32_t cParms, VBOXHGCMSVCPARM paParms[]);
     287    int assignHostCmdToGuest(const VBOXGUESTCTRLHOSTCMD *pCmd, VBOXHGCMCALLHANDLE callHandle, uint32_t cParms, VBOXHGCMSVCPARM paParms[]);
    288288    int retrieveNextHostCmd(uint32_t u32ClientID, VBOXHGCMCALLHANDLE callHandle, uint32_t cParms, VBOXHGCMSVCPARM paParms[]);
    289289    int cancelHostCmd(uint32_t u32ContextID);
     
    415415 * @param   pSrcBuf                 Parameter buffer to assign.
    416416 */
    417 int Service::paramBufferAssign(VBOXHGCMSVCPARM paDstParms[], uint32_t cDstParms, PVBOXGUESTCTRPARAMBUFFER pSrcBuf)
     417int Service::paramBufferAssign(VBOXHGCMSVCPARM paDstParms[], uint32_t cDstParms, const VBOXGUESTCTRPARAMBUFFER *pSrcBuf)
    418418{
    419419    AssertPtr(pSrcBuf);
     
    614614 * @param   paParms                 Array of parameters.
    615615 */
    616 int Service::assignHostCmdToGuest(HostCmd *pCmd, VBOXHGCMCALLHANDLE callHandle, uint32_t cParms, VBOXHGCMSVCPARM paParms[])
     616int Service::assignHostCmdToGuest(const VBOXGUESTCTRLHOSTCMD *pCmd, VBOXHGCMCALLHANDLE callHandle, uint32_t cParms, VBOXHGCMSVCPARM paParms[])
    617617{
    618618    AssertPtrReturn(pCmd, VERR_INVALID_POINTER);
     
    701701         * Get the next unassigned host command in the list.
    702702         */
    703          HostCmd &curCmd = mHostCmds.front();
     703         VBOXGUESTCTRLHOSTCMD &curCmd = mHostCmds.front();
    704704         rc = assignHostCmdToGuest(&curCmd, callHandle, cParms, paParms);
    705705         if (RT_SUCCESS(rc))
     
    883883    if (mNumClients == 0)
    884884        return VERR_NOT_FOUND;
    885     HostCmd newCmd;
     885    VBOXGUESTCTRLHOSTCMD newCmd;
    886886    int rc = paramBufferAllocate(&newCmd.mParmBuf, eFunction, cParms, paParms);
    887887    if (   RT_SUCCESS(rc)
Note: See TracChangeset for help on using the changeset viewer.

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