VirtualBox

Changeset 4540 in vbox for trunk/src/VBox/Devices/VMMDev


Ignore:
Timestamp:
Sep 5, 2007 7:06:21 PM (17 years ago)
Author:
vboxsync
Message:

Implemented notification for guest about an active VRDP connection.

Location:
trunk/src/VBox/Devices/VMMDev
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/VMMDev/VBoxDev.cpp

    r4533 r4540  
    11781178        }
    11791179
     1180        case VMMDevReq_GetVRDPChangeRequest:
     1181        {
     1182            if (requestHeader->size != sizeof(VMMDevVRDPChangeRequest))
     1183            {
     1184                requestHeader->rc = VERR_INVALID_PARAMETER;
     1185            }
     1186            else
     1187            {
     1188                VMMDevVRDPChangeRequest *vrdpChangeRequest = (VMMDevVRDPChangeRequest*)requestHeader;
     1189                /* just pass on the information */
     1190                Log(("VMMDev: returning VRDP status %d level %d\n", pData->fVRDPEnabled, pData->u32VRDPExperienceLevel));
     1191               
     1192                vrdpChangeRequest->u8VRDPActive = pData->fVRDPEnabled;
     1193                vrdpChangeRequest->u32VRDPExperienceLevel = pData->u32VRDPExperienceLevel;
     1194               
     1195                requestHeader->rc = VINF_SUCCESS;
     1196            }
     1197            break;
     1198        }
    11801199
    11811200        case VMMDevReq_GetMemBalloonChangeRequest:
     
    17381757        /* IRQ so the guest knows what's going on */
    17391758        VMMDevNotifyGuest (pData, VMMDEV_EVENT_BALLOON_CHANGE_REQUEST);
     1759    }
     1760
     1761    return VINF_SUCCESS;
     1762}
     1763
     1764static DECLCALLBACK(int) vmmdevVRDPChange(PPDMIVMMDEVPORT pInterface, bool fVRDPEnabled, uint32_t u32VRDPExperienceLevel)
     1765{
     1766    VMMDevState *pData = IVMMDEVPORT_2_VMMDEVSTATE(pInterface);
     1767
     1768    bool fSame = (pData->fVRDPEnabled == fVRDPEnabled);
     1769
     1770    Log(("vmmdevVRDPChange: old=%d. new=%d\n", pData->fVRDPEnabled, fVRDPEnabled));
     1771
     1772    if (!fSame)
     1773    {
     1774        pData->fVRDPEnabled = fVRDPEnabled;
     1775        pData->u32VRDPExperienceLevel = u32VRDPExperienceLevel;
     1776
     1777        VMMDevNotifyGuest (pData, VMMDEV_EVENT_VRDP);
    17401778    }
    17411779
     
    20542092    pData->Port.pfnSetMemoryBalloon       = vmmdevSetMemoryBalloon;
    20552093    pData->Port.pfnSetStatisticsInterval  = vmmdevSetStatisticsInterval;
     2094    pData->Port.pfnVRDPChange             = vmmdevVRDPChange;
    20562095
    20572096    /* Shared folder LED */
  • trunk/src/VBox/Devices/VMMDev/VMMDevState.h

    r4524 r4540  
    141141    bool fLastSeamlessEnabled, fSeamlessEnabled;
    142142
     143    bool fVRDPEnabled;
     144    uint32_t u32VRDPExperienceLevel;
     145       
    143146#ifdef TIMESYNC_BACKDOOR
    144147    bool fTimesyncBackdoorLo;
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