VirtualBox

Changeset 4540 in vbox for trunk/src/VBox


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
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Display/pointer.c

    r1 r4540  
    535535                }
    536536               
    537                 if (pjSrcAlpha[cx * 4 + 3] >= 0xF0)
     537                if (pjSrcAlpha[cx * 4 + 3] > 0x7f)
    538538                {
    539539                    pjDstAnd[cx / 8] &= ~bitmask;
  • trunk/src/VBox/Additions/WINNT/VBoxService/Makefile.kmk

    r4516 r4540  
    3131        VBoxClipboard.cpp \
    3232        VBoxDisplay.cpp \
     33        VBoxVRDP.cpp \
    3334        VBoxRestore.cpp \
    3435        VBoxGuest.cpp \
  • trunk/src/VBox/Additions/WINNT/VBoxService/VBoxService.cpp

    r4516 r4540  
    2020#include "VBoxDisplay.h"
    2121#include "VBoxRestore.h"
     22#include "VBoxVRDP.h"
    2223#include "VBoxGuest.h"
    2324#include <VBoxHook.h>
     
    113114    },
    114115#endif
     116    {
     117        "VRDP",
     118        VBoxVRDPInit,
     119        VBoxVRDPThread,
     120        VBoxVRDPDestroy,
     121    },
    115122    {
    116123        NULL
  • 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;
  • trunk/src/VBox/Main/ConsoleImpl.cpp

    r4521 r4540  
    661661
    662662#ifdef VBOX_VRDP
    663     ASMAtomicIncU32(&console->mcVRDPClients);
     663    uint32_t u32Clients = ASMAtomicIncU32(&console->mcVRDPClients);
     664
     665    if (u32Clients == 1)
     666    {
     667        console->getVMMDev()->getVMMDevPort()->
     668            pfnVRDPChange (console->getVMMDev()->getVMMDevPort(),
     669                           true, VRDP_EXPERIENCE_LEVEL_FULL); // @todo configurable
     670    }
    664671
    665672    NOREF(u32ClientId);
     
    695702
    696703#ifdef VBOX_VRDP
    697     ASMAtomicDecU32(&console->mcVRDPClients);
     704    uint32_t u32Clients = ASMAtomicDecU32(&console->mcVRDPClients);
     705   
     706    if (u32Clients == 0)
     707    {
     708        console->getVMMDev()->getVMMDevPort()->
     709            pfnVRDPChange (console->getVMMDev()->getVMMDevPort(),
     710                           false, 0);
     711    }
    698712
    699713    console->mDisplay->VideoAccelVRDP (false);
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