VirtualBox

Changeset 28205 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Apr 12, 2010 1:39:18 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
59945
Message:

Main/VirtualBoxCallback: rename OnSnapshotDiscard to OnSnapshotDeleted for consistency, clean up wording and other minor issues

Location:
trunk/src/VBox/Main
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/ConsoleImpl.cpp

    r27797 r28205  
    10251025    if (RT_FAILURE(vrc))
    10261026        rc = setError(VBOX_E_FILE_ERROR,
    1027             tr("The saved state file '%ls' is invalid (%Rrc). Discard the saved state and try again"),
     1027            tr("The saved state file '%ls' is invalid (%Rrc). Delete the saved state and try again"),
    10281028            savedStateFile.raw(), vrc);
    10291029
     
    22972297    if (mMachineState != MachineState_Saved)
    22982298        return setError(VBOX_E_INVALID_VM_STATE,
    2299             tr("Cannot discard the machine state as the machine is not in the saved state (machine state: %s)"),
     2299            tr("Cannot delete the machine state as the machine is not in the saved state (machine state: %s)"),
    23002300            Global::stringifyMachineState(mMachineState));
    23012301
     
    28432843    if (Global::IsOnlineOrTransient(mMachineState))
    28442844        return setError(VBOX_E_INVALID_VM_STATE,
    2845             tr("Cannot discard a snapshot of the running machine (machine state: %s)"),
     2845            tr("Cannot delete a snapshot of the running machine (machine state: %s)"),
    28462846            Global::stringifyMachineState(mMachineState));
    28472847
     
    28632863    if (Global::IsOnlineOrTransient(mMachineState))
    28642864        return setError(VBOX_E_INVALID_VM_STATE,
    2865                         tr("Cannot discard the current state of the running machine (machine state: %s)"),
     2865                        tr("Cannot delete the current state of the running machine (machine state: %s)"),
    28662866                        Global::stringifyMachineState(mMachineState));
    28672867
     
    50025002        if (RT_FAILURE(vrc))
    50035003            return setError(VBOX_E_FILE_ERROR,
    5004                             tr("VM cannot start because the saved state file '%ls' is invalid (%Rrc). Discard the saved state prior to starting the VM"),
     5004                            tr("VM cannot start because the saved state file '%ls' is invalid (%Rrc). Delete the saved state prior to starting the VM"),
    50055005                            savedStateFile.raw(), vrc);
    50065006    }
  • trunk/src/VBox/Main/VirtualBoxCallbackImpl.cpp

    r26782 r28205  
    138138}
    139139
    140 STDMETHODIMP CallbackWrapper::OnSnapshotDiscarded(IN_BSTR aMachineId, IN_BSTR aSnapshotId)
    141 {
    142     if (mVBoxCallback.isNull())
    143         return S_OK;
    144 
    145     return mVBoxCallback->OnSnapshotDiscarded(aMachineId, aSnapshotId);
     140STDMETHODIMP CallbackWrapper::OnSnapshotDeleted(IN_BSTR aMachineId, IN_BSTR aSnapshotId)
     141{
     142    if (mVBoxCallback.isNull())
     143        return S_OK;
     144
     145    return mVBoxCallback->OnSnapshotDeleted(aMachineId, aSnapshotId);
    146146}
    147147
  • trunk/src/VBox/Main/VirtualBoxImpl.cpp

    r28091 r28205  
    308308    m = new Data;
    309309
    310     LogFlow (("===========================================================\n"));
     310    LogFlow(("===========================================================\n"));
    311311    LogFlowThisFuncEnter();
    312312
     
    376376        unconst(m->pSystemProperties).createObject();
    377377        rc = m->pSystemProperties->init(this);
    378         ComAssertComRCThrowRC (rc);
     378        ComAssertComRCThrowRC(rc);
    379379
    380380        rc = m->pSystemProperties->loadSettings(m->pMainConfigFile->systemProperties);
     
    382382
    383383        /* guest OS type objects, needed by machines */
    384         for (size_t i = 0; i < RT_ELEMENTS (Global::sOSTypes); ++ i)
     384        for (size_t i = 0; i < RT_ELEMENTS(Global::sOSTypes); ++ i)
    385385        {
    386386            ComObjPtr <GuestOSType> guestOSTypeObj;
     
    403403                    m->ollGuestOSTypes.addChild(guestOSTypeObj);
    404404            }
    405             ComAssertComRCThrowRC (rc);
     405            ComAssertComRCThrowRC(rc);
    406406        }
    407407
     
    450450        /* start the client watcher thread */
    451451#if defined(RT_OS_WINDOWS)
    452         unconst(m->updateReq) = ::CreateEvent (NULL, FALSE, FALSE, NULL);
     452        unconst(m->updateReq) = ::CreateEvent(NULL, FALSE, FALSE, NULL);
    453453#elif defined(RT_OS_OS2)
    454454        RTSemEventCreate(&unconst(m->updateReq));
     
    460460        int vrc = RTThreadCreate(&unconst(m->threadClientWatcher),
    461461                                 ClientWatcher,
    462                                  (void *) this,
     462                                 (void *)this,
    463463                                 0,
    464464                                 RTTHREADTYPE_MAIN_WORKER,
     
    470470    }
    471471
    472     if (SUCCEEDED(rc)) do
    473     {
    474         /* start the async event handler thread */
    475         int vrc = RTThreadCreate(&unconst(m->threadAsyncEvent),
    476                                  AsyncEventHandler,
    477                                  &unconst(m->pAsyncEventQ),
    478                                  0,
    479                                  RTTHREADTYPE_MAIN_WORKER,
    480                                  RTTHREADFLAGS_WAITABLE,
    481                                  "EventHandler");
    482         ComAssertRCBreak (vrc, rc = E_FAIL);
    483 
    484         /* wait until the thread sets m->pAsyncEventQ */
    485         RTThreadUserWait(m->threadAsyncEvent, RT_INDEFINITE_WAIT);
    486         ComAssertBreak(m->pAsyncEventQ, rc = E_FAIL);
    487     }
    488     while (0);
     472    if (SUCCEEDED(rc))
     473    {
     474        try
     475        {
     476            /* start the async event handler thread */
     477            int vrc = RTThreadCreate(&unconst(m->threadAsyncEvent),
     478                                     AsyncEventHandler,
     479                                     &unconst(m->pAsyncEventQ),
     480                                     0,
     481                                     RTTHREADTYPE_MAIN_WORKER,
     482                                     RTTHREADFLAGS_WAITABLE,
     483                                     "EventHandler");
     484            ComAssertRCThrow(vrc, E_FAIL);
     485
     486            /* wait until the thread sets m->pAsyncEventQ */
     487            RTThreadUserWait(m->threadAsyncEvent, RT_INDEFINITE_WAIT);
     488            ComAssertThrow(m->pAsyncEventQ, E_FAIL);
     489        }
     490        catch (HRESULT aRC)
     491        {
     492            rc = aRC;
     493        }
     494    }
    489495
    490496    /* Confirm a successful initialization when it's the case */
     
    494500    LogFlowThisFunc(("rc=%08X\n", rc));
    495501    LogFlowThisFuncLeave();
    496     LogFlow (("===========================================================\n"));
     502    LogFlow(("===========================================================\n"));
    497503    return rc;
    498504}
     
    588594        return;
    589595
    590     LogFlow (("===========================================================\n"));
     596    LogFlow(("===========================================================\n"));
    591597    LogFlowThisFuncEnter();
    592598    LogFlowThisFunc(("initFailed()=%d\n", autoUninitSpan.initFailed()));
     
    634640    {
    635641        /* release all callbacks */
    636         LogWarningFunc (("%d unregistered callbacks!\n",
    637                          m->llCallbacks.size()));
     642        LogWarningFunc(("%d unregistered callbacks!\n",
     643                        m->llCallbacks.size()));
    638644        m->llCallbacks.clear();
    639645    }
     
    643649    {
    644650        /* signal to exit the event loop */
    645         if (m->pAsyncEventQ->postEvent (NULL))
     651        if (m->pAsyncEventQ->postEvent(NULL))
    646652        {
    647653            /*
     
    677683    if (m->updateReq != NULL)
    678684    {
    679         ::CloseHandle (m->updateReq);
     685        ::CloseHandle(m->updateReq);
    680686        unconst(m->updateReq) = NULL;
    681687    }
     
    683689    if (m->updateReq != NIL_RTSEMEVENT)
    684690    {
    685         RTSemEventDestroy (m->updateReq);
     691        RTSemEventDestroy(m->updateReq);
    686692        unconst(m->updateReq) = NIL_RTSEMEVENT;
    687693    }
     
    689695    if (m->updateReq != NIL_RTSEMEVENT)
    690696    {
    691         RTSemEventDestroy (m->updateReq);
     697        RTSemEventDestroy(m->updateReq);
    692698        unconst(m->updateReq) = NIL_RTSEMEVENT;
    693699    }
     
    703709
    704710    LogFlowThisFuncLeave();
    705     LogFlow (("===========================================================\n"));
     711    LogFlow(("===========================================================\n"));
    706712}
    707713
     
    709715/////////////////////////////////////////////////////////////////////////////
    710716
    711 STDMETHODIMP VirtualBox::COMGETTER(Version) (BSTR *aVersion)
     717STDMETHODIMP VirtualBox::COMGETTER(Version)(BSTR *aVersion)
    712718{
    713719    CheckComArgNotNull(aVersion);
     
    720726}
    721727
    722 STDMETHODIMP VirtualBox::COMGETTER(Revision) (ULONG *aRevision)
     728STDMETHODIMP VirtualBox::COMGETTER(Revision)(ULONG *aRevision)
    723729{
    724730    CheckComArgNotNull(aRevision);
     
    731737}
    732738
    733 STDMETHODIMP VirtualBox::COMGETTER(PackageType) (BSTR *aPackageType)
     739STDMETHODIMP VirtualBox::COMGETTER(PackageType)(BSTR *aPackageType)
    734740{
    735741    CheckComArgNotNull(aPackageType);
     
    742748}
    743749
    744 STDMETHODIMP VirtualBox::COMGETTER(HomeFolder) (BSTR *aHomeFolder)
     750STDMETHODIMP VirtualBox::COMGETTER(HomeFolder)(BSTR *aHomeFolder)
    745751{
    746752    CheckComArgNotNull(aHomeFolder);
     
    754760}
    755761
    756 STDMETHODIMP VirtualBox::COMGETTER(SettingsFilePath) (BSTR *aSettingsFilePath)
     762STDMETHODIMP VirtualBox::COMGETTER(SettingsFilePath)(BSTR *aSettingsFilePath)
    757763{
    758764    CheckComArgNotNull(aSettingsFilePath);
     
    766772}
    767773
    768 STDMETHODIMP VirtualBox::COMGETTER(Host) (IHost **aHost)
     774STDMETHODIMP VirtualBox::COMGETTER(Host)(IHost **aHost)
    769775{
    770776    CheckComArgOutSafeArrayPointerValid(aHost);
     
    779785
    780786STDMETHODIMP
    781 VirtualBox::COMGETTER(SystemProperties) (ISystemProperties **aSystemProperties)
     787VirtualBox::COMGETTER(SystemProperties)(ISystemProperties **aSystemProperties)
    782788{
    783789    CheckComArgOutSafeArrayPointerValid(aSystemProperties);
     
    792798
    793799STDMETHODIMP
    794 VirtualBox::COMGETTER(Machines) (ComSafeArrayOut(IMachine *, aMachines))
     800VirtualBox::COMGETTER(Machines)(ComSafeArrayOut(IMachine *, aMachines))
    795801{
    796802    if (ComSafeArrayOutIsNull(aMachines))
     
    807813}
    808814
    809 STDMETHODIMP VirtualBox::COMGETTER(HardDisks) (ComSafeArrayOut(IMedium *, aHardDisks))
     815STDMETHODIMP VirtualBox::COMGETTER(HardDisks)(ComSafeArrayOut(IMedium *, aHardDisks))
    810816{
    811817    if (ComSafeArrayOutIsNull(aHardDisks))
     
    822828}
    823829
    824 STDMETHODIMP VirtualBox::COMGETTER(DVDImages) (ComSafeArrayOut(IMedium *, aDVDImages))
     830STDMETHODIMP VirtualBox::COMGETTER(DVDImages)(ComSafeArrayOut(IMedium *, aDVDImages))
    825831{
    826832    if (ComSafeArrayOutIsNull(aDVDImages))
     
    837843}
    838844
    839 STDMETHODIMP VirtualBox::COMGETTER(FloppyImages) (ComSafeArrayOut(IMedium *, aFloppyImages))
     845STDMETHODIMP VirtualBox::COMGETTER(FloppyImages)(ComSafeArrayOut(IMedium *, aFloppyImages))
    840846{
    841847    if (ComSafeArrayOutIsNull(aFloppyImages))
     
    852858}
    853859
    854 STDMETHODIMP VirtualBox::COMGETTER(ProgressOperations) (ComSafeArrayOut(IProgress *, aOperations))
     860STDMETHODIMP VirtualBox::COMGETTER(ProgressOperations)(ComSafeArrayOut(IProgress *, aOperations))
    855861{
    856862    CheckComArgOutSafeArrayPointerValid(aOperations);
     
    867873}
    868874
    869 STDMETHODIMP VirtualBox::COMGETTER(GuestOSTypes) (ComSafeArrayOut(IGuestOSType *, aGuestOSTypes))
     875STDMETHODIMP VirtualBox::COMGETTER(GuestOSTypes)(ComSafeArrayOut(IGuestOSType *, aGuestOSTypes))
    870876{
    871877    CheckComArgOutSafeArrayPointerValid(aGuestOSTypes);
     
    881887}
    882888
    883 STDMETHODIMP VirtualBox::COMGETTER(SharedFolders) (ComSafeArrayOut(ISharedFolder *, aSharedFolders))
     889STDMETHODIMP VirtualBox::COMGETTER(SharedFolders)(ComSafeArrayOut(ISharedFolder *, aSharedFolders))
    884890{
    885891#ifndef RT_OS_WINDOWS
     
    896902
    897903STDMETHODIMP
    898 VirtualBox::COMGETTER(PerformanceCollector) (IPerformanceCollector **aPerformanceCollector)
     904VirtualBox::COMGETTER(PerformanceCollector)(IPerformanceCollector **aPerformanceCollector)
    899905{
    900906#ifdef VBOX_WITH_RESOURCE_USAGE_API
     
    914920
    915921STDMETHODIMP
    916 VirtualBox::COMGETTER(DHCPServers) (ComSafeArrayOut(IDHCPServer *, aDHCPServers))
     922VirtualBox::COMGETTER(DHCPServers)(ComSafeArrayOut(IDHCPServer *, aDHCPServers))
    917923{
    918924    if (ComSafeArrayOutIsNull(aDHCPServers))
     
    923929
    924930    AutoReadLock al(m->ollDHCPServers.getLockHandle() COMMA_LOCKVAL_SRC_POS);
    925     SafeIfaceArray<IDHCPServer> svrs (m->ollDHCPServers.getList());
     931    SafeIfaceArray<IDHCPServer> svrs(m->ollDHCPServers.getList());
    926932    svrs.detachTo(ComSafeArrayOutArg(aDHCPServers));
    927933
     
    10331039    LogFlowThisFunc(("aName=\"%ls\",aOsTypeId =\"%ls\",aBaseFolder=\"%ls\"\n", aName, aOsTypeId, aBaseFolder));
    10341040
    1035     CheckComArgStrNotEmptyOrNull (aName);
     1041    CheckComArgStrNotEmptyOrNull(aName);
    10361042    /** @todo tighten checks on aId? */
    10371043    CheckComArgOutPointerValid(aMachine);
     
    10871093        /* set the return value */
    10881094        rc = machine.queryInterfaceTo(aMachine);
    1089         AssertComRC (rc);
     1095        AssertComRC(rc);
    10901096    }
    10911097
     
    11011107                                             IMachine **aMachine)
    11021108{
    1103     CheckComArgStrNotEmptyOrNull (aName);
    1104     CheckComArgStrNotEmptyOrNull (aSettingsFile);
     1109    CheckComArgStrNotEmptyOrNull(aName);
     1110    CheckComArgStrNotEmptyOrNull(aSettingsFile);
    11051111    /** @todo tighten checks on aId? */
    11061112    CheckComArgOutPointerValid(aMachine);
     
    11421148        /* set the return value */
    11431149        rc = machine.queryInterfaceTo(aMachine);
    1144         AssertComRC (rc);
     1150        AssertComRC(rc);
    11451151    }
    11461152
     
    11721178            /* set the return value */
    11731179            rc = machine.queryInterfaceTo(aMachine);
    1174             ComAssertComRC (rc);
     1180            ComAssertComRC(rc);
    11751181        }
    11761182    }
     
    11901196
    11911197    Bstr name;
    1192     rc = aMachine->COMGETTER(Name) (name.asOutParam());
     1198    rc = aMachine->COMGETTER(Name)(name.asOutParam());
    11931199    if (FAILED(rc)) return rc;
    11941200
     
    12171223
    12181224    ComObjPtr<Machine> machine;
    1219     HRESULT rc = findMachine (Guid (aId), true /* setError */, &machine);
     1225    HRESULT rc = findMachine(Guid(aId), true /* setError */, &machine);
    12201226
    12211227    /* the below will set *aMachine to NULL if machine is null */
     
    14881494
    14891495/** @note Locks objects! */
    1490 STDMETHODIMP VirtualBox::GetDVDImage (IN_BSTR aId, IMedium **aDVDImage)
     1496STDMETHODIMP VirtualBox::GetDVDImage(IN_BSTR aId, IMedium **aDVDImage)
    14911497{
    14921498    CheckComArgOutSafeArrayPointerValid(aDVDImage);
     
    14971503    Guid id(aId);
    14981504    ComObjPtr<Medium> image;
    1499     HRESULT rc = findDVDImage (&id, NULL, true /* setError */, &image);
     1505    HRESULT rc = findDVDImage(&id, NULL, true /* setError */, &image);
    15001506
    15011507    /* the below will set *aDVDImage to NULL if image is null */
     
    15061512
    15071513/** @note Locks objects! */
    1508 STDMETHODIMP VirtualBox::FindDVDImage (IN_BSTR aLocation, IMedium **aDVDImage)
     1514STDMETHODIMP VirtualBox::FindDVDImage(IN_BSTR aLocation, IMedium **aDVDImage)
    15091515{
    15101516    CheckComArgStrNotEmptyOrNull(aLocation);
     
    15151521
    15161522    ComObjPtr<Medium> image;
    1517     HRESULT rc = findDVDImage (NULL, aLocation, true /* setError */, &image);
     1523    HRESULT rc = findDVDImage(NULL, aLocation, true /* setError */, &image);
    15181524
    15191525    /* the below will set *aDVDImage to NULL if dvd is null */
     
    15241530
    15251531/** @note Doesn't lock anything. */
    1526 STDMETHODIMP VirtualBox::OpenFloppyImage (IN_BSTR aLocation, IN_BSTR aId,
    1527                                           IMedium **aFloppyImage)
     1532STDMETHODIMP VirtualBox::OpenFloppyImage(IN_BSTR aLocation, IN_BSTR aId,
     1533                                         IMedium **aFloppyImage)
    15281534{
    15291535    CheckComArgStrNotEmptyOrNull(aLocation);
     
    15421548    ComObjPtr<Medium> image;
    15431549    image.createObject();
    1544     rc = image->init (this, aLocation, Medium::OpenReadWrite, DeviceType_Floppy, true, id, false, Guid());
     1550    rc = image->init(this, aLocation, Medium::OpenReadWrite, DeviceType_Floppy, true, id, false, Guid());
    15451551    if (SUCCEEDED(rc))
    15461552    {
     
    15641570
    15651571/** @note Locks objects! */
    1566 STDMETHODIMP VirtualBox::GetFloppyImage (IN_BSTR aId,
    1567                                          IMedium **aFloppyImage)
     1572STDMETHODIMP VirtualBox::GetFloppyImage(IN_BSTR aId, IMedium **aFloppyImage)
    15681573
    15691574{
     
    15751580    Guid id(aId);
    15761581    ComObjPtr<Medium> image;
    1577     HRESULT rc = findFloppyImage (&id, NULL, true /* setError */, &image);
     1582    HRESULT rc = findFloppyImage(&id, NULL, true /* setError */, &image);
    15781583
    15791584    /* the below will set *aFloppyImage to NULL if image is null */
     
    15841589
    15851590/** @note Locks objects! */
    1586 STDMETHODIMP VirtualBox::FindFloppyImage (IN_BSTR aLocation,
    1587                                           IMedium **aFloppyImage)
     1591STDMETHODIMP VirtualBox::FindFloppyImage(IN_BSTR aLocation,
     1592                                         IMedium **aFloppyImage)
    15881593{
    15891594    CheckComArgStrNotEmptyOrNull(aLocation);
     
    16031608
    16041609/** @note Locks this object for reading. */
    1605 STDMETHODIMP VirtualBox::GetGuestOSType (IN_BSTR aId, IGuestOSType **aType)
     1610STDMETHODIMP VirtualBox::GetGuestOSType(IN_BSTR aId, IGuestOSType **aType)
    16061611{
    16071612    /* Old ID to new ID conversion table. See r39691 for a source */
     
    16311636    /* first, look for a substitution */
    16321637    Bstr id = aId;
    1633     for (size_t i = 0; i < RT_ELEMENTS (kOldNewIDs) / 2; i += 2)
     1638    for (size_t i = 0; i < RT_ELEMENTS(kOldNewIDs) / 2; i += 2)
    16341639    {
    16351640        if (id == kOldNewIDs[i])
     
    18171822 *  @note Locks objects!
    18181823 */
    1819 STDMETHODIMP VirtualBox::OpenSession (ISession *aSession, IN_BSTR aMachineId)
     1824STDMETHODIMP VirtualBox::OpenSession(ISession *aSession, IN_BSTR aMachineId)
    18201825{
    18211826    CheckComArgNotNull(aSession);
     
    18271832    ComObjPtr<Machine> machine;
    18281833
    1829     HRESULT rc = findMachine (id, true /* setError */, &machine);
     1834    HRESULT rc = findMachine(id, true /* setError */, &machine);
    18301835    if (FAILED(rc)) return rc;
    18311836
    18321837    /* check the session state */
    18331838    SessionState_T state;
    1834     rc = aSession->COMGETTER(State) (&state);
     1839    rc = aSession->COMGETTER(State)(&state);
    18351840    if (FAILED(rc)) return rc;
    18361841
     
    18411846    /* get the IInternalSessionControl interface */
    18421847    ComPtr<IInternalSessionControl> control = aSession;
    1843     ComAssertMsgRet (!!control, ("No IInternalSessionControl interface"),
    1844                      E_INVALIDARG);
    1845 
    1846     rc = machine->openSession (control);
     1848    ComAssertMsgRet(!!control, ("No IInternalSessionControl interface"),
     1849                    E_INVALIDARG);
     1850
     1851    rc = machine->openSession(control);
    18471852
    18481853    if (SUCCEEDED(rc))
     
    18551860
    18561861        /* fire an event */
    1857         onSessionStateChange (id, SessionState_Open);
     1862        onSessionStateChange(id, SessionState_Open);
    18581863    }
    18591864
     
    18641869 *  @note Locks objects!
    18651870 */
    1866 STDMETHODIMP VirtualBox::OpenRemoteSession (ISession *aSession,
    1867                                             IN_BSTR aMachineId,
    1868                                             IN_BSTR aType,
    1869                                             IN_BSTR aEnvironment,
    1870                                             IProgress **aProgress)
     1871STDMETHODIMP VirtualBox::OpenRemoteSession(ISession *aSession,
     1872                                           IN_BSTR aMachineId,
     1873                                           IN_BSTR aType,
     1874                                           IN_BSTR aEnvironment,
     1875                                           IProgress **aProgress)
    18711876{
    18721877    LogRel(("remotesession=%s\n", Utf8Str(aMachineId).c_str()));
     
    18831888    ComObjPtr<Machine> machine;
    18841889
    1885     HRESULT rc = findMachine (id, true /* setError */, &machine);
     1890    HRESULT rc = findMachine(id, true /* setError */, &machine);
    18861891    if (FAILED(rc)) return rc;
    18871892
    18881893    /* check the session state */
    18891894    SessionState_T state;
    1890     rc = aSession->COMGETTER(State) (&state);
     1895    rc = aSession->COMGETTER(State)(&state);
    18911896    if (FAILED(rc)) return rc;
    18921897
     
    18971902    /* get the IInternalSessionControl interface */
    18981903    ComPtr<IInternalSessionControl> control = aSession;
    1899     ComAssertMsgRet (!!control, ("No IInternalSessionControl interface"),
    1900                      E_INVALIDARG);
     1904    ComAssertMsgRet(!!control, ("No IInternalSessionControl interface"),
     1905                    E_INVALIDARG);
    19011906
    19021907    /* create a progress object */
    19031908    ComObjPtr<Progress> progress;
    19041909    progress.createObject();
    1905     progress->init (this, static_cast <IMachine *> (machine),
    1906                     Bstr (tr ("Spawning session")),
    1907                     FALSE /* aCancelable */);
    1908 
    1909     rc = machine->openRemoteSession (control, aType, aEnvironment, progress);
     1910    progress->init(this, static_cast <IMachine *>(machine),
     1911                   Bstr(tr("Spawning session")),
     1912                   FALSE /* aCancelable */);
     1913
     1914    rc = machine->openRemoteSession(control, aType, aEnvironment, progress);
    19101915
    19111916    if (SUCCEEDED(rc))
     
    19171922
    19181923        /* fire an event */
    1919         onSessionStateChange (id, SessionState_Spawning);
     1924        onSessionStateChange(id, SessionState_Spawning);
    19201925    }
    19211926
     
    19261931 *  @note Locks objects!
    19271932 */
    1928 STDMETHODIMP VirtualBox::OpenExistingSession (ISession *aSession,
    1929                                               IN_BSTR  aMachineId)
     1933STDMETHODIMP VirtualBox::OpenExistingSession(ISession *aSession,
     1934                                             IN_BSTR  aMachineId)
    19301935{
    19311936    CheckComArgNotNull(aSession);
     
    19371942    ComObjPtr<Machine> machine;
    19381943
    1939     HRESULT rc = findMachine (id, true /* setError */, &machine);
     1944    HRESULT rc = findMachine(id, true /* setError */, &machine);
    19401945    if (FAILED(rc)) return rc;
    19411946
    19421947    /* check the session state */
    19431948    SessionState_T state;
    1944     rc = aSession->COMGETTER(State) (&state);
     1949    rc = aSession->COMGETTER(State)(&state);
    19451950    if (FAILED(rc)) return rc;
    19461951
     
    19511956    /* get the IInternalSessionControl interface */
    19521957    ComPtr<IInternalSessionControl> control = aSession;
    1953     ComAssertMsgRet (!!control, ("No IInternalSessionControl interface"),
    1954                      E_INVALIDARG);
    1955 
    1956     rc = machine->openExistingSession (control);
     1958    ComAssertMsgRet(!!control, ("No IInternalSessionControl interface"),
     1959                    E_INVALIDARG);
     1960
     1961    rc = machine->openExistingSession(control);
    19571962
    19581963    return rc;
     
    19621967 *  @note Locks this object for writing.
    19631968 */
    1964 STDMETHODIMP VirtualBox::RegisterCallback (IVirtualBoxCallback *aCallback)
     1969STDMETHODIMP VirtualBox::RegisterCallback(IVirtualBoxCallback *aCallback)
    19651970{
    19661971    LogFlowThisFunc(("aCallback=%p\n", aCallback));
     
    19801985
    19811986    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    1982     m->llCallbacks.push_back (CallbackList::value_type (aCallback));
     1987    m->llCallbacks.push_back(CallbackList::value_type(aCallback));
    19831988
    19841989    return S_OK;
     
    19881993 *  @note Locks this object for writing.
    19891994 */
    1990 STDMETHODIMP VirtualBox::UnregisterCallback (IVirtualBoxCallback *aCallback)
     1995STDMETHODIMP VirtualBox::UnregisterCallback(IVirtualBoxCallback *aCallback)
    19911996{
    19921997    CheckComArgNotNull(aCallback);
     
    20002005
    20012006    CallbackList::iterator it;
    2002     it = std::find (m->llCallbacks.begin(),
    2003                     m->llCallbacks.end(),
    2004                     CallbackList::value_type (aCallback));
     2007    it = std::find(m->llCallbacks.begin(),
     2008                   m->llCallbacks.end(),
     2009                   CallbackList::value_type(aCallback));
    20052010    if (it == m->llCallbacks.end())
    20062011        rc = E_INVALIDARG;
    20072012    else
    2008         m->llCallbacks.erase (it);
     2013        m->llCallbacks.erase(it);
    20092014
    20102015    LogFlowThisFunc(("aCallback=%p, rc=%08X\n", aCallback, rc));
     
    20722077    if (autoCaller.state() != Ready)
    20732078    {
    2074         LogWarningFunc (("VirtualBox has been uninitialized (state=%d), "
    2075                          "the event is discarded!\n",
    2076                          autoCaller.state()));
     2079        LogWarningFunc(("VirtualBox has been uninitialized (state=%d), the event is discarded!\n",
     2080                        autoCaller.state()));
    20772081        return S_OK;
    20782082    }
     
    21032107
    21042108    Bstr id;
    2105     HRESULT rc = aProgress->COMGETTER(Id) (id.asOutParam());
     2109    HRESULT rc = aProgress->COMGETTER(Id)(id.asOutParam());
    21062110    AssertComRCReturnRC(rc);
    21072111
     
    21092113    AutoWriteLock safeLock(m->mtxProgressOperations COMMA_LOCKVAL_SRC_POS);
    21102114
    2111     m->mapProgressOperations.insert (ProgressMap::value_type (Guid(id), aProgress));
     2115    m->mapProgressOperations.insert(ProgressMap::value_type(Guid(id), aProgress));
    21122116    return S_OK;
    21132117}
     
    21972201 *  @note Doesn't lock anything.
    21982202 */
    2199 HRESULT VirtualBox::startSVCHelperClient (bool aPrivileged,
    2200                                           SVCHelperClientFunc aFunc,
    2201                                           void *aUser, Progress *aProgress)
     2203HRESULT VirtualBox::startSVCHelperClient(bool aPrivileged,
     2204                                         SVCHelperClientFunc aFunc,
     2205                                         void *aUser, Progress *aProgress)
    22022206{
    22032207    AssertReturn(aFunc, E_POINTER);
     
    22092213    /* create the SVCHelperClientThread() argument */
    22102214    std::auto_ptr <StartSVCHelperClientData>
    2211         d (new StartSVCHelperClientData());
     2215        d(new StartSVCHelperClientData());
    22122216    AssertReturn(d.get(), E_OUTOFMEMORY);
    22132217
     
    22192223
    22202224    RTTHREAD tid = NIL_RTTHREAD;
    2221     int vrc = RTThreadCreate (&tid, SVCHelperClientThread,
    2222                               static_cast <void *> (d.get()),
    2223                               0, RTTHREADTYPE_MAIN_WORKER,
    2224                               RTTHREADFLAGS_WAITABLE, "SVCHelper");
    2225 
    2226     ComAssertMsgRCRet (vrc, ("Could not create SVCHelper thread (%Rrc)", vrc),
     2225    int vrc = RTThreadCreate(&tid, SVCHelperClientThread,
     2226                             static_cast <void *>(d.get()),
     2227                             0, RTTHREADTYPE_MAIN_WORKER,
     2228                             RTTHREADFLAGS_WAITABLE, "SVCHelper");
     2229
     2230    ComAssertMsgRCRet(vrc, ("Could not create SVCHelper thread (%Rrc)", vrc),
    22272231                       E_FAIL);
    22282232
     
    22382242/* static */
    22392243DECLCALLBACK(int)
    2240 VirtualBox::SVCHelperClientThread (RTTHREAD aThread, void *aUser)
     2244VirtualBox::SVCHelperClientThread(RTTHREAD aThread, void *aUser)
    22412245{
    22422246    LogFlowFuncEnter();
    22432247
    22442248    std::auto_ptr <StartSVCHelperClientData>
    2245         d (static_cast <StartSVCHelperClientData *> (aUser));
     2249        d(static_cast <StartSVCHelperClientData *>(aUser));
    22462250
    22472251    HRESULT rc = S_OK;
     
    22502254    do
    22512255    {
    2252         AssertBreakStmt (d.get(), rc = E_POINTER);
     2256        AssertBreakStmt(d.get(), rc = E_POINTER);
    22532257        AssertReturn(!d->progress.isNull(), E_POINTER);
    22542258
     
    22782282        /* get the path to the executable */
    22792283        char exePathBuf[RTPATH_MAX];
    2280         char *exePath = RTProcGetExecutableName (exePathBuf, RTPATH_MAX);
    2281         ComAssertBreak (exePath, E_FAIL);
    2282 
    2283         Utf8Str argsStr = Utf8StrFmt ("/Helper %s", client.name().raw());
    2284 
    2285         LogFlowFunc (("Starting '\"%s\" %s'...\n", exePath, argsStr.raw()));
     2284        char *exePath = RTProcGetExecutableName(exePathBuf, RTPATH_MAX);
     2285        ComAssertBreak(exePath, E_FAIL);
     2286
     2287        Utf8Str argsStr = Utf8StrFmt("/Helper %s", client.name().raw());
     2288
     2289        LogFlowFunc(("Starting '\"%s\" %s'...\n", exePath, argsStr.raw()));
    22862290
    22872291        RTPROCESS pid = NIL_RTPROCESS;
     
    22962300            SHELLEXECUTEINFO shExecInfo;
    22972301
    2298             shExecInfo.cbSize = sizeof (SHELLEXECUTEINFO);
     2302            shExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
    22992303
    23002304            shExecInfo.fMask = NULL;
     
    23072311            shExecInfo.hInstApp = NULL;
    23082312
    2309             if (!ShellExecuteEx (&shExecInfo))
     2313            if (!ShellExecuteEx(&shExecInfo))
    23102314            {
    2311                 int vrc2 = RTErrConvertFromWin32 (GetLastError());
     2315                int vrc2 = RTErrConvertFromWin32(GetLastError());
    23122316                /* hide excessive details in case of a frequent error
    23132317                 * (pressing the Cancel button to close the Run As dialog) */
     
    23252329        {
    23262330            const char *args[] = { exePath, "/Helper", client.name().c_str(), 0 };
    2327             vrc = RTProcCreate (exePath, args, RTENV_DEFAULT, 0, &pid);
     2331            vrc = RTProcCreate(exePath, args, RTENV_DEFAULT, 0, &pid);
    23282332            if (RT_FAILURE(vrc))
    23292333            {
     
    23392343        {
    23402344            /* start the user supplied function */
    2341             rc = d->func (&client, d->progress, d->user, &vrc);
     2345            rc = d->func(&client, d->progress, d->user, &vrc);
    23422346            userFuncCalled = true;
    23432347        }
     
    23452349        /* send the termination signal to the process anyway */
    23462350        {
    2347             int vrc2 = client.write (SVCHlpMsg::Null);
     2351            int vrc2 = client.write(SVCHlpMsg::Null);
    23482352            if (RT_SUCCESS(vrc))
    23492353                vrc = vrc2;
     
    23632367        /* call the user function in the "cleanup only" mode
    23642368         * to let it free resources passed to in aUser */
    2365         d->func (NULL, NULL, d->user, NULL);
    2366     }
    2367 
    2368     d->progress->notifyComplete (rc);
     2369        d->func(NULL, NULL, d->user, NULL);
     2370    }
     2371
     2372    d->progress->notifyComplete(rc);
    23692373
    23702374    LogFlowFuncLeave();
     
    23832387{
    23842388    AutoCaller autoCaller(this);
    2385     AssertComRCReturn(autoCaller.rc(), (void) 0);
    2386 
    2387     AssertReturn(m->threadClientWatcher != NIL_RTTHREAD, (void) 0);
     2389    AssertComRCReturnVoid(autoCaller.rc());
     2390
     2391    AssertReturnVoid(m->threadClientWatcher != NIL_RTTHREAD);
    23882392
    23892393    /* sent an update request */
    23902394#if defined(RT_OS_WINDOWS)
    2391     ::SetEvent (m->updateReq);
     2395    ::SetEvent(m->updateReq);
    23922396#elif defined(RT_OS_OS2)
    2393     RTSemEventSignal (m->updateReq);
     2397    RTSemEventSignal(m->updateReq);
    23942398#elif defined(VBOX_WITH_SYS_V_IPC_SESSION_WATCHER)
    2395     RTSemEventSignal (m->updateReq);
     2399    RTSemEventSignal(m->updateReq);
    23962400#else
    23972401# error "Port me!"
     
    24032407 *  This call should be followed by #updateClientWatcher() to take the effect.
    24042408 */
    2405 void VirtualBox::addProcessToReap (RTPROCESS pid)
    2406 {
    2407     AutoCaller autoCaller(this);
    2408     AssertComRCReturn(autoCaller.rc(), (void) 0);
     2409void VirtualBox::addProcessToReap(RTPROCESS pid)
     2410{
     2411    AutoCaller autoCaller(this);
     2412    AssertComRCReturnVoid(autoCaller.rc());
    24092413
    24102414    /// @todo (dmik) Win32?
    24112415#ifndef RT_OS_WINDOWS
    24122416    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    2413     m->llProcesses.push_back (pid);
     2417    m->llProcesses.push_back(pid);
    24142418#endif
    24152419}
     
    24202424    enum What { DataChanged, StateChanged, Registered };
    24212425
    2422     MachineEvent (VirtualBox *aVB, const Guid &aId)
    2423         : CallbackEvent (aVB), what (DataChanged), id (aId)
     2426    MachineEvent(VirtualBox *aVB, const Guid &aId)
     2427        : CallbackEvent(aVB), what(DataChanged), id(aId)
    24242428        {}
    24252429
    2426     MachineEvent (VirtualBox *aVB, const Guid &aId, MachineState_T aState)
    2427         : CallbackEvent (aVB), what (StateChanged), id (aId)
    2428         , state (aState)
     2430    MachineEvent(VirtualBox *aVB, const Guid &aId, MachineState_T aState)
     2431        : CallbackEvent(aVB), what(StateChanged), id(aId)
     2432        , state(aState)
    24292433        {}
    24302434
    2431     MachineEvent (VirtualBox *aVB, const Guid &aId, BOOL aRegistered)
    2432         : CallbackEvent (aVB), what (Registered), id (aId)
    2433         , registered (aRegistered)
     2435    MachineEvent(VirtualBox *aVB, const Guid &aId, BOOL aRegistered)
     2436        : CallbackEvent(aVB), what(Registered), id(aId)
     2437        , registered(aRegistered)
    24342438        {}
    24352439
    2436     void handleCallback (const ComPtr<IVirtualBoxCallback> &aCallback)
     2440    void handleCallback(const ComPtr<IVirtualBoxCallback> &aCallback)
    24372441    {
    24382442        switch (what)
    24392443        {
    24402444            case DataChanged:
    2441                 LogFlow (("OnMachineDataChange: id={%RTuuid}\n", id.ptr()));
    2442                 aCallback->OnMachineDataChange (id.toUtf16());
     2445                LogFlow(("OnMachineDataChange: id={%RTuuid}\n", id.ptr()));
     2446                aCallback->OnMachineDataChange(id.toUtf16());
    24432447                break;
    24442448
    24452449            case StateChanged:
    2446                 LogFlow (("OnMachineStateChange: id={%RTuuid}, state=%d\n",
     2450                LogFlow(("OnMachineStateChange: id={%RTuuid}, state=%d\n",
    24472451                          id.ptr(), state));
    2448                 aCallback->OnMachineStateChange (id.toUtf16(), state);
     2452                aCallback->OnMachineStateChange(id.toUtf16(), state);
    24492453                break;
    24502454
    24512455            case Registered:
    2452                 LogFlow (("OnMachineRegistered: id={%RTuuid}, registered=%d\n",
     2456                LogFlow(("OnMachineRegistered: id={%RTuuid}, registered=%d\n",
    24532457                          id.ptr(), registered));
    2454                 aCallback->OnMachineRegistered (id.toUtf16(), registered);
     2458                aCallback->OnMachineRegistered(id.toUtf16(), registered);
    24552459                break;
    24562460        }
     
    24692473void VirtualBox::onMachineStateChange(const Guid &aId, MachineState_T aState)
    24702474{
    2471     postEvent (new MachineEvent (this, aId, aState));
     2475    postEvent(new MachineEvent(this, aId, aState));
    24722476}
    24732477
     
    24772481void VirtualBox::onMachineDataChange(const Guid &aId)
    24782482{
    2479     postEvent (new MachineEvent (this, aId));
     2483    postEvent(new MachineEvent(this, aId));
    24802484}
    24812485
     
    24832487 *  @note Locks this object for reading.
    24842488 */
    2485 BOOL VirtualBox::onExtraDataCanChange (const Guid &aId, IN_BSTR aKey, IN_BSTR aValue,
     2489BOOL VirtualBox::onExtraDataCanChange(const Guid &aId, IN_BSTR aKey, IN_BSTR aValue,
    24862490                                       Bstr &aError)
    24872491{
     
    25032507    while ((it != list.end()) && allowChange)
    25042508    {
    2505         HRESULT rc = (*it++)->OnExtraDataCanChange (id, aKey, aValue,
    2506                                                     aError.asOutParam(), &allowChange);
     2509        HRESULT rc = (*it++)->OnExtraDataCanChange(id, aKey, aValue,
     2510                                                   aError.asOutParam(),
     2511                                                   &allowChange);
    25072512        if (FAILED(rc))
    25082513        {
     
    25232528struct ExtraDataEvent : public VirtualBox::CallbackEvent
    25242529{
    2525     ExtraDataEvent (VirtualBox *aVB, const Guid &aMachineId,
     2530    ExtraDataEvent(VirtualBox *aVB, const Guid &aMachineId,
    25262531                    IN_BSTR aKey, IN_BSTR aVal)
    2527         : CallbackEvent (aVB), machineId (aMachineId)
    2528         , key (aKey), val (aVal)
     2532        : CallbackEvent(aVB), machineId(aMachineId)
     2533        , key(aKey), val(aVal)
    25292534        {}
    25302535
    2531     void handleCallback (const ComPtr<IVirtualBoxCallback> &aCallback)
    2532     {
    2533         LogFlow (("OnExtraDataChange: machineId={%RTuuid}, key='%ls', val='%ls'\n",
    2534                   machineId.ptr(), key.raw(), val.raw()));
    2535         aCallback->OnExtraDataChange (machineId.toUtf16(), key, val);
     2536    void handleCallback(const ComPtr<IVirtualBoxCallback> &aCallback)
     2537    {
     2538        LogFlow(("OnExtraDataChange: machineId={%RTuuid}, key='%ls', val='%ls'\n",
     2539                 machineId.ptr(), key.raw(), val.raw()));
     2540        aCallback->OnExtraDataChange(machineId.toUtf16(), key, val);
    25362541    }
    25372542
     
    25432548 *  @note Doesn't lock any object.
    25442549 */
    2545 void VirtualBox::onExtraDataChange (const Guid &aId, IN_BSTR aKey, IN_BSTR aValue)
    2546 {
    2547     postEvent (new ExtraDataEvent (this, aId, aKey, aValue));
     2550void VirtualBox::onExtraDataChange(const Guid &aId, IN_BSTR aKey, IN_BSTR aValue)
     2551{
     2552    postEvent(new ExtraDataEvent(this, aId, aKey, aValue));
    25482553}
    25492554
     
    25512556 *  @note Doesn't lock any object.
    25522557 */
    2553 void VirtualBox::onMachineRegistered (const Guid &aId, BOOL aRegistered)
    2554 {
    2555     postEvent (new MachineEvent (this, aId, aRegistered));
     2558void VirtualBox::onMachineRegistered(const Guid &aId, BOOL aRegistered)
     2559{
     2560    postEvent(new MachineEvent(this, aId, aRegistered));
    25562561}
    25572562
     
    25592564struct SessionEvent : public VirtualBox::CallbackEvent
    25602565{
    2561     SessionEvent (VirtualBox *aVB, const Guid &aMachineId, SessionState_T aState)
    2562         : CallbackEvent (aVB), machineId (aMachineId), sessionState (aState)
     2566    SessionEvent(VirtualBox *aVB, const Guid &aMachineId, SessionState_T aState)
     2567        : CallbackEvent(aVB), machineId(aMachineId), sessionState(aState)
    25632568        {}
    25642569
    2565     void handleCallback (const ComPtr<IVirtualBoxCallback> &aCallback)
    2566     {
    2567         LogFlow (("OnSessionStateChange: machineId={%RTuuid}, sessionState=%d\n",
    2568                   machineId.ptr(), sessionState));
    2569         aCallback->OnSessionStateChange (machineId.toUtf16(), sessionState);
     2570    void handleCallback(const ComPtr<IVirtualBoxCallback> &aCallback)
     2571    {
     2572        LogFlow(("OnSessionStateChange: machineId={%RTuuid}, sessionState=%d\n",
     2573                 machineId.ptr(), sessionState));
     2574        aCallback->OnSessionStateChange(machineId.toUtf16(), sessionState);
    25702575    }
    25712576
     
    25772582 *  @note Doesn't lock any object.
    25782583 */
    2579 void VirtualBox::onSessionStateChange (const Guid &aId, SessionState_T aState)
    2580 {
    2581     postEvent (new SessionEvent (this, aId, aState));
    2582 }
    2583 
    2584 /** Event for onSnapshotTaken(), onSnapshotRemoved() and onSnapshotChange() */
     2584void VirtualBox::onSessionStateChange(const Guid &aId, SessionState_T aState)
     2585{
     2586    postEvent(new SessionEvent(this, aId, aState));
     2587}
     2588
     2589/** Event for onSnapshotTaken(), onSnapshotDeleted() and onSnapshotChange() */
    25852590struct SnapshotEvent : public VirtualBox::CallbackEvent
    25862591{
    2587     enum What { Taken, Discarded, Changed };
    2588 
    2589     SnapshotEvent (VirtualBox *aVB, const Guid &aMachineId, const Guid &aSnapshotId,
     2592    enum What { Taken, Deleted, Changed };
     2593
     2594    SnapshotEvent(VirtualBox *aVB, const Guid &aMachineId, const Guid &aSnapshotId,
    25902595                   What aWhat)
    2591         : CallbackEvent (aVB)
    2592         , what (aWhat)
    2593         , machineId (aMachineId), snapshotId (aSnapshotId)
     2596        : CallbackEvent(aVB)
     2597        , what(aWhat)
     2598        , machineId(aMachineId), snapshotId(aSnapshotId)
    25942599        {}
    25952600
    2596     void handleCallback (const ComPtr<IVirtualBoxCallback> &aCallback)
     2601    void handleCallback(const ComPtr<IVirtualBoxCallback> &aCallback)
    25972602    {
    25982603        Bstr mid = machineId.toUtf16();
     
    26022607        {
    26032608            case Taken:
    2604                 LogFlow (("OnSnapshotTaken: machineId={%RTuuid}, snapshotId={%RTuuid}\n",
     2609                LogFlow(("OnSnapshotTaken: machineId={%RTuuid}, snapshotId={%RTuuid}\n",
    26052610                          machineId.ptr(), snapshotId.ptr()));
    2606                 aCallback->OnSnapshotTaken (mid, sid);
     2611                aCallback->OnSnapshotTaken(mid, sid);
    26072612                break;
    26082613
    2609             case Discarded:
    2610                 LogFlow (("OnSnapshotDiscarded: machineId={%RTuuid}, snapshotId={%RTuuid}\n",
     2614            case Deleted:
     2615                LogFlow(("OnSnapshotDeleted: machineId={%RTuuid}, snapshotId={%RTuuid}\n",
    26112616                          machineId.ptr(), snapshotId.ptr()));
    2612                 aCallback->OnSnapshotDiscarded (mid, sid);
     2617                aCallback->OnSnapshotDeleted(mid, sid);
    26132618                break;
    26142619
    26152620            case Changed:
    2616                 LogFlow (("OnSnapshotChange: machineId={%RTuuid}, snapshotId={%RTuuid}\n",
     2621                LogFlow(("OnSnapshotChange: machineId={%RTuuid}, snapshotId={%RTuuid}\n",
    26172622                          machineId.ptr(), snapshotId.ptr()));
    2618                 aCallback->OnSnapshotChange (mid, sid);
     2623                aCallback->OnSnapshotChange(mid, sid);
    26192624                break;
    26202625        }
     
    26302635 *  @note Doesn't lock any object.
    26312636 */
    2632 void VirtualBox::onSnapshotTaken (const Guid &aMachineId, const Guid &aSnapshotId)
     2637void VirtualBox::onSnapshotTaken(const Guid &aMachineId, const Guid &aSnapshotId)
    26332638{
    26342639    postEvent(new SnapshotEvent(this, aMachineId, aSnapshotId, SnapshotEvent::Taken));
     
    26402645void VirtualBox::onSnapshotDeleted(const Guid &aMachineId, const Guid &aSnapshotId)
    26412646{
    2642     postEvent(new SnapshotEvent(this, aMachineId, aSnapshotId, SnapshotEvent::Discarded));
     2647    postEvent(new SnapshotEvent(this, aMachineId, aSnapshotId, SnapshotEvent::Deleted));
    26432648}
    26442649
     
    26672672        LogFlow(("OnGuestPropertyChange: machineId={%RTuuid}, name='%ls', value='%ls', flags='%ls'\n",
    26682673                 machineId.ptr(), name.raw(), value.raw(), flags.raw()));
    2669         aCallback->OnGuestPropertyChange (machineId.toUtf16(), name, value, flags);
     2674        aCallback->OnGuestPropertyChange(machineId.toUtf16(), name, value, flags);
    26702675    }
    26712676
     
    27182723{
    27192724    AutoCaller autoCaller(this);
    2720     AssertComRCReturnVoid (autoCaller.rc());
     2725    AssertComRCReturnVoid(autoCaller.rc());
    27212726
    27222727    aMachines.clear();
     
    31573162{
    31583163    AutoCaller autoCaller(this);
    3159     AssertComRCReturnVoid (autoCaller.rc());
     3164    AssertComRCReturnVoid(autoCaller.rc());
    31603165
    31613166    /* no need to lock since mHomeDir is const */
     
    34223427    catch (...)
    34233428    {
    3424         rc = VirtualBox::handleUnexpectedExceptions (RT_SRC_POS);
     3429        rc = VirtualBox::handleUnexpectedExceptions(RT_SRC_POS);
    34253430    }
    34263431
     
    35683573    AssertComRCReturn(autoCaller.rc(), autoCaller.rc());
    35693574
    3570     AutoCaller hardDiskCaller (aHardDisk);
     3575    AutoCaller hardDiskCaller(aHardDisk);
    35713576    AssertComRCReturn(hardDiskCaller.rc(), hardDiskCaller.rc());
    35723577
     
    38383843                                 COINIT_MULTITHREADED | COINIT_DISABLE_OLE1DDE |
    38393844                                 COINIT_SPEED_OVER_MEMORY);
    3840     AssertComRC (hrc);
     3845    AssertComRC(hrc);
    38413846
    38423847    /// @todo (dmik) processes reaping!
     
    39133918                {
    39143919                    /// @todo handle situations with more than 64 objects
    3915                     AssertMsgBreak ((1 + cnt) <= MAXIMUM_WAIT_OBJECTS,
    3916                                     ("MAXIMUM_WAIT_OBJECTS reached"));
     3920                    AssertMsgBreak((1 + cnt) <= MAXIMUM_WAIT_OBJECTS,
     3921                                   ("MAXIMUM_WAIT_OBJECTS reached"));
    39173922
    39183923                    ComObjPtr<SessionMachine> sm;
     
    39263931                }
    39273932
    3928                 LogFlowFunc (("UPDATE: direct session count = %d\n", cnt));
     3933                LogFlowFunc(("UPDATE: direct session count = %d\n", cnt));
    39293934
    39303935                /* obtain a new set of spawned machines */
     
    39373942                {
    39383943                    /// @todo handle situations with more than 64 objects
    3939                     AssertMsgBreak ((1 + cnt + cntSpawned) <= MAXIMUM_WAIT_OBJECTS,
    3940                                     ("MAXIMUM_WAIT_OBJECTS reached"));
     3944                    AssertMsgBreak((1 + cnt + cntSpawned) <= MAXIMUM_WAIT_OBJECTS,
     3945                                   ("MAXIMUM_WAIT_OBJECTS reached"));
    39413946
    39423947                    RTPROCESS pid;
     
    39443949                    {
    39453950                        HANDLE ph = OpenProcess(SYNCHRONIZE, FALSE, pid);
    3946                         AssertMsg (ph != NULL, ("OpenProcess (pid=%d) failed with %d\n",
    3947                                                 pid, GetLastError()));
     3951                        AssertMsg(ph != NULL, ("OpenProcess (pid=%d) failed with %d\n",
     3952                                               pid, GetLastError()));
    39483953                        if (rc == 0)
    39493954                        {
     
    39553960                }
    39563961
    3957                 LogFlowFunc (("UPDATE: spawned session count = %d\n", cntSpawned));
     3962                LogFlowFunc(("UPDATE: spawned session count = %d\n", cntSpawned));
    39583963
    39593964                // machines lock unwinds here
     
    39663971    /* close old process handles */
    39673972    for (size_t i = 1 + cnt; i < 1 + cnt + cntSpawned; ++ i)
    3968         CloseHandle (handles[i]);
     3973        CloseHandle(handles[i]);
    39693974
    39703975    /* release sets of machines if any */
     
    39743979    ::CoUninitialize();
    39753980
    3976 #elif defined (RT_OS_OS2)
     3981#elif defined(RT_OS_OS2)
    39773982
    39783983    /// @todo (dmik) processes reaping!
     
    40144019            else
    40154020            {
    4016                 AssertMsg (vrc == VERR_TIMEOUT || vrc == VERR_INTERRUPTED,
    4017                            ("RTSemEventWait returned %Rrc\n", vrc));
     4021                AssertMsg(vrc == VERR_TIMEOUT || vrc == VERR_INTERRUPTED,
     4022                          ("RTSemEventWait returned %Rrc\n", vrc));
    40184023
    40194024                /* are there any mutexes? */
     
    40234028
    40244029                    unsigned long semId = 0;
    4025                     APIRET arc = ::DosWaitMuxWaitSem (muxSem,
    4026                                                       SEM_IMMEDIATE_RETURN, &semId);
     4030                    APIRET arc = ::DosWaitMuxWaitSem(muxSem,
     4031                                                     SEM_IMMEDIATE_RETURN, &semId);
    40274032
    40284033                    if (arc == NO_ERROR)
     
    40354040                            {
    40364041                                AutoReadLock machineLock(machines[semId] COMMA_LOCKVAL_SRC_POS);
    4037                                 LogFlowFunc (("released mutex: machine='%ls'\n",
    4038                                               machines[semId]->name().raw()));
     4042                                LogFlowFunc(("released mutex: machine='%ls'\n",
     4043                                             machines[semId]->name().raw()));
    40394044                            }
    40404045#endif
     
    40754080                    }
    40764081                    else
    4077                         AssertMsg (arc == ERROR_INTERRUPT || arc == ERROR_TIMEOUT,
    4078                                    ("DosWaitMuxWaitSem returned %d\n", arc));
     4082                        AssertMsg(arc == ERROR_INTERRUPT || arc == ERROR_TIMEOUT,
     4083                                  ("DosWaitMuxWaitSem returned %d\n", arc));
    40794084                }
    40804085
     
    40964101                    /* close the old muxsem */
    40974102                    if (muxSem != NULLHANDLE)
    4098                         ::DosCloseMuxWaitSem (muxSem);
     4103                        ::DosCloseMuxWaitSem(muxSem);
    40994104
    41004105                    /* obtain a new set of opened machines */
     
    41064111                    {
    41074112                        /// @todo handle situations with more than 64 objects
    4108                         AssertMsg (cnt <= 64 /* according to PMREF */,
    4109                                    ("maximum of 64 mutex semaphores reached (%d)",
    4110                                     cnt));
     4113                        AssertMsg(cnt <= 64 /* according to PMREF */,
     4114                                  ("maximum of 64 mutex semaphores reached (%d)",
     4115                                   cnt));
    41114116
    41124117                        ComObjPtr<SessionMachine> sm;
    41134118                        HMTX ipcSem;
    4114                         if ((*it)->isSessionOpenOrClosing (sm, NULL, &ipcSem))
     4119                        if ((*it)->isSessionOpenOrClosing(sm, NULL, &ipcSem))
    41154120                        {
    4116                             machines.push_back (sm);
    4117                             handles[cnt].hsemCur = (HSEM) ipcSem;
     4121                            machines.push_back(sm);
     4122                            handles[cnt].hsemCur = (HSEM)ipcSem;
    41184123                            handles[cnt].ulUser = cnt;
    41194124                            ++ cnt;
     
    41214126                    }
    41224127
    4123                     LogFlowFunc (("UPDATE: direct session count = %d\n", cnt));
     4128                    LogFlowFunc(("UPDATE: direct session count = %d\n", cnt));
    41244129
    41254130                    if (cnt > 0)
    41264131                    {
    41274132                        /* create a new muxsem */
    4128                         APIRET arc = ::DosCreateMuxWaitSem (NULL, &muxSem, cnt,
    4129                                                             handles,
    4130                                                             DCMW_WAIT_ANY);
    4131                         AssertMsg (arc == NO_ERROR,
    4132                                    ("DosCreateMuxWaitSem returned %d\n", arc));
     4133                        APIRET arc = ::DosCreateMuxWaitSem(NULL, &muxSem, cnt,
     4134                                                           handles,
     4135                                                           DCMW_WAIT_ANY);
     4136                        AssertMsg(arc == NO_ERROR,
     4137                                  ("DosCreateMuxWaitSem returned %d\n", arc));
    41334138                        NOREF(arc);
    41344139                    }
     
    41444149                    {
    41454150                        if ((*it)->isSessionSpawning())
    4146                             spawnedMachines.push_back (*it);
     4151                            spawnedMachines.push_back(*it);
    41474152                    }
    41484153
    41494154                    cntSpawned = spawnedMachines.size();
    4150                     LogFlowFunc (("UPDATE: spawned session count = %d\n", cntSpawned));
     4155                    LogFlowFunc(("UPDATE: spawned session count = %d\n", cntSpawned));
    41514156                }
    41524157            }
     
    41584163    /* close the muxsem */
    41594164    if (muxSem != NULLHANDLE)
    4160         ::DosCloseMuxWaitSem (muxSem);
     4165        ::DosCloseMuxWaitSem(muxSem);
    41614166
    41624167    /* release sets of machines if any */
     
    42484253                if (that->m->llProcesses.size())
    42494254                {
    4250                     LogFlowFunc (("UPDATE: child process count = %d\n",
    4251                                   that->m->llProcesses.size()));
     4255                    LogFlowFunc(("UPDATE: child process count = %d\n",
     4256                                 that->m->llProcesses.size()));
    42524257                    VirtualBox::Data::ProcessList::iterator it = that->m->llProcesses.begin();
    42534258                    while (it != that->m->llProcesses.end())
     
    42584263                        if (vrc == VINF_SUCCESS)
    42594264                        {
    4260                             LogFlowFunc (("pid %d (%x) was reaped, "
    4261                                           "status=%d, reason=%d\n",
    4262                                           pid, pid, status.iStatus,
    4263                                           status.enmReason));
     4265                            LogFlowFunc(("pid %d (%x) was reaped, status=%d, reason=%d\n",
     4266                                         pid, pid, status.iStatus,
     4267                                         status.enmReason));
    42644268                            it = that->m->llProcesses.erase(it);
    42654269                        }
    42664270                        else
    42674271                        {
    4268                             LogFlowFunc (("pid %d (%x) was NOT reaped, vrc=%Rrc\n",
    4269                                           pid, pid, vrc));
     4272                            LogFlowFunc(("pid %d (%x) was NOT reaped, vrc=%Rrc\n",
     4273                                         pid, pid, vrc));
    42704274                            if (vrc != VERR_PROCESS_RUNNING)
    42714275                            {
     
    43004304 */
    43014305// static
    4302 DECLCALLBACK(int) VirtualBox::AsyncEventHandler (RTTHREAD thread, void *pvUser)
     4306DECLCALLBACK(int) VirtualBox::AsyncEventHandler(RTTHREAD thread, void *pvUser)
    43034307{
    43044308    LogFlowFuncEnter();
     
    43114315
    43124316    // return the queue to the one who created this thread
    4313     *(static_cast <EventQueue **> (pvUser)) = eventQ;
     4317    *(static_cast <EventQueue **>(pvUser)) = eventQ;
    43144318    // signal that we're ready
    4315     RTThreadUserSignal (thread);
     4319    RTThreadUserSignal(thread);
    43164320
    43174321    BOOL ok = TRUE;
    43184322    Event *event = NULL;
    43194323
    4320     while ((ok = eventQ->waitForEvent (&event)) && event)
    4321         eventQ->handleEvent (event);
     4324    while ((ok = eventQ->waitForEvent(&event)) && event)
     4325        eventQ->handleEvent(event);
    43224326
    43234327    AssertReturn(ok, VERR_GENERAL_FAILURE);
     
    43484352    if (!autoCaller.isOk())
    43494353    {
    4350         LogWarningFunc (("VirtualBox has been uninitialized (state=%d), "
    4351                          "the callback event is discarded!\n",
    4352                          autoCaller.state()));
     4354        LogWarningFunc(("VirtualBox has been uninitialized (state=%d), the callback event is discarded!\n",
     4355                        autoCaller.state()));
    43534356        /* We don't need mVirtualBox any more, so release it */
    43544357        mVirtualBox = NULL;
     
    43734376}
    43744377
    4375 //STDMETHODIMP VirtualBox::CreateDHCPServerForInterface (/*IHostNetworkInterface * aIinterface,*/ IDHCPServer ** aServer)
     4378//STDMETHODIMP VirtualBox::CreateDHCPServerForInterface(/*IHostNetworkInterface * aIinterface,*/ IDHCPServer ** aServer)
    43764379//{
    43774380//    return E_NOTIMPL;
    43784381//}
    43794382
    4380 STDMETHODIMP VirtualBox::CreateDHCPServer (IN_BSTR aName, IDHCPServer ** aServer)
     4383STDMETHODIMP VirtualBox::CreateDHCPServer(IN_BSTR aName, IDHCPServer ** aServer)
    43814384{
    43824385    CheckComArgStrNotEmptyOrNull(aName);
     
    43884391    ComObjPtr<DHCPServer> dhcpServer;
    43894392    dhcpServer.createObject();
    4390     HRESULT rc = dhcpServer->init (this, aName);
     4393    HRESULT rc = dhcpServer->init(this, aName);
    43914394    if (FAILED(rc)) return rc;
    43924395
     
    44334436}
    44344437
    4435 STDMETHODIMP VirtualBox::RemoveDHCPServer (IDHCPServer * aServer)
     4438STDMETHODIMP VirtualBox::RemoveDHCPServer(IDHCPServer * aServer)
    44364439{
    44374440    CheckComArgNotNull(aServer);
     
    45224525    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    45234526
    4524     AutoCaller dhcpServerCaller (aDHCPServer);
     4527    AutoCaller dhcpServerCaller(aDHCPServer);
    45254528    AssertComRCReturn(dhcpServerCaller.rc(), dhcpServerCaller.rc());
    45264529
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r28193 r28205  
    568568
    569569      The next two diagrams demonstrate the process of taking a snapshot of a
    570       powered off virtual machine and performing one of the "discard..."
    571       operations, respectively.
     570      powered off virtual machine, restoring the state to that as of a snapshot
     571      or deleting a snapshot, respectively.
    572572
    573573      <pre>
     
    12491249  <interface
    12501250     name="IVirtualBoxCallback" extends="$unknown"
    1251      uuid="9a65adf2-3ee6-406b-bca2-2b1fa05f0d0b"
     1251     uuid="7f6a65b6-ad5d-4a67-8872-0b11cb7ea95c"
    12521252     wsmap="suppress"
    12531253     >
     
    14171417    </method>
    14181418
    1419     <method name="onSnapshotDiscarded">
    1420       <desc>
    1421         Snapshot of the given machine has been discarded.
     1419    <method name="onSnapshotDeleted">
     1420      <desc>
     1421        Snapshot of the given machine has been deleted.
    14221422
    14231423        <note>
     
    14341434      <param name="snapshotId" type="uuid" mod="string" dir="in">
    14351435        <desc>
    1436           ID of the discarded snapshot. @c null means the current machine
    1437           state has been discarded (restored from the current snapshot).
     1436          ID of the deleted snapshot. @c null means the current machine
     1437          state has been deleted (restored from the current snapshot).
    14381438        </desc>
    14391439      </param>
     
    39733973      </param>
    39743974      <param name="id" type="uuid" mod="string" dir="in">
    3975         <desc>UUID of the snapshot to discard.</desc>
     3975        <desc>UUID of the snapshot to delete.</desc>
    39763976      </param>
    39773977      <param name="machineState" type="MachineState" dir="out">
     
    45954595        <ul>
    45964596          <li>settings of the machine are changed</li>
    4597           <li>the saved state is discarded</li>
    4598           <li>the current snapshot is discarded</li>
     4597          <li>the saved state is deleted</li>
     4598          <li>the current snapshot is deleted</li>
    45994599          <li>an attempt to execute the machine is made</li>
    46004600        </ul>
     
    71347134        this snapshot will be merged with the contents of their dependent child
    71357135        media to keep the medium chain valid (in other words, all changes
    7136         represented by media being discarded will be propagated to their child
     7136        represented by media being deleted will be propagated to their child
    71377137        medium). After that, this snapshot's differencing medium will be
    71387138        deleted. The parent of this snapshot will become a new parent for all
     
    71427142        become a new current snapshot. The current machine state is not directly
    71437143        affected in this case, except that currently attached differencing
    7144         media based on media of the discarded snapshot will be also merged as
     7144        media based on media of the deleted snapshot will be also merged as
    71457145        described above.
    71467146
     
    71537153
    71547154        <ul>
    7155           <li>Child media of all normal media of the discarded snapshot
     7155          <li>Child media of all normal media of the deleted snapshot
    71567156            must be accessible (see <link to="IMedium::state"/>) for this
    71577157            operation to succeed.  In particular, this means that all virtual
    71587158            machines, whose media are directly or indirectly based on the
    7159             media of discarded snapshot, must be powered off.</li>
     7159            media of deleted snapshot, must be powered off.</li>
    71607160
    71617161          <li>You cannot delete the snapshot if a medium attached to it has
     
    71747174          Merging medium contents can be very time and disk space
    71757175          consuming, if these media are big in size and have many
    7176           children. However, if the snapshot being discarded is the last
     7176          children. However, if the snapshot being deleted is the last
    71777177          (head) snapshot on the branch, the operation will be rather
    71787178          quick.
     
    71837183      </desc>
    71847184      <param name="id" type="uuid" mod="string" dir="in">
    7185         <desc>UUID of the snapshot to discard.</desc>
     7185        <desc>UUID of the snapshot to delete.</desc>
    71867186      </param>
    71877187      <param name="progress" type="IProgress" dir="return">
     
    72137213          If the machine state is <link to="MachineState_Saved">Saved</link>
    72147214          prior to this operation, the saved state file will be implicitly
    7215           discarded (as if <link to="IConsole::forgetSavedState"/> were
     7215          deleted (as if <link to="IConsole::forgetSavedState"/> were
    72167216          called).
    72177217        </note>
     
    88728872      to the last snapshot in the chain. In a future version of VirtualBox,
    88738873      it will be possible to reset a machine's current state to that of an
    8874       earlier snapshot without discarding the current state so that it will be
     8874      earlier snapshot without deleting the current state so that it will be
    88758875      possible to create alternative snapshot paths in a snapshot tree.
    88768876
  • trunk/src/VBox/Main/include/AutoCaller.h

    r27797 r28205  
    141141            if (mObj && SUCCEEDED(mRC))
    142142                release();
     143            else if (!mObj)
     144            {
     145                /* Fix up the success state when nothing is attached. Otherwise
     146                 * there are a couple of assertion which would trigger. */
     147                mRC = E_FAIL;
     148            }
    143149            mObj = aObj;
    144150            add();
  • trunk/src/VBox/Main/include/Global.h

    r27820 r28205  
    77
    88/*
    9  * Copyright (C) 2008 Sun Microsystems, Inc.
     9 * Copyright (C) 2008-2010 Sun Microsystems, Inc.
    1010 *
    1111 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    113113     * Returns @c true if the given machine state is a transient state. This is
    114114     * a recommended way to detect if the VM is performing some potentially
    115      * lengthy operation (such as starting, stopping, saving, discarding
     115     * lengthy operation (such as starting, stopping, saving, deleting
    116116     * snapshot, etc.). Note some (but not all) transitional states are also
    117117     * online states (see #IsOnline()).
  • trunk/src/VBox/Main/include/Performance.h

    r28058 r28205  
    356356        SubMetric *mUsed;
    357357        SubMetric *mAvailable;
    358         SubMetric *mAllocVMM; 
    359         SubMetric *mFreeVMM; 
     358        SubMetric *mAllocVMM;
     359        SubMetric *mFreeVMM;
    360360        SubMetric *mBalloonVMM;
    361361    };
  • trunk/src/VBox/Main/include/VirtualBoxCallbackImpl.h

    r26782 r28205  
    11/*
    2  * Copyright (C) 2009 Sun Microsystems, Inc.
     2 * Copyright (C) 2009-2010 Sun Microsystems, Inc.
    33 *
    44 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    5656    // public initializers/uninitializers only for internal purposes
    5757    HRESULT init();
    58     void uninit (bool aFinalRelease);
     58    void uninit(bool aFinalRelease);
    5959
    6060    // ILocalOwner methods
     
    6767                                    BSTR *error, BOOL *changeAllowed);
    6868    STDMETHOD(OnExtraDataChange)(IN_BSTR machineId, IN_BSTR key, IN_BSTR value);
    69     STDMETHOD(OnMediumRegistered) (IN_BSTR mediaId, DeviceType_T mediaType,
    70                                    BOOL registered);
     69    STDMETHOD(OnMediumRegistered)(IN_BSTR mediaId, DeviceType_T mediaType,
     70                                  BOOL registered);
    7171    STDMETHOD(OnMachineRegistered)(IN_BSTR machineId, BOOL registered);
    7272    STDMETHOD(OnSessionStateChange)(IN_BSTR machineId, SessionState_T state);
    73     STDMETHOD(OnSnapshotTaken) (IN_BSTR aMachineId, IN_BSTR aSnapshotId);
    74     STDMETHOD(OnSnapshotDiscarded) (IN_BSTR aMachineId, IN_BSTR aSnapshotId);
    75     STDMETHOD(OnSnapshotChange) (IN_BSTR aMachineId, IN_BSTR aSnapshotId);
     73    STDMETHOD(OnSnapshotTaken)(IN_BSTR aMachineId, IN_BSTR aSnapshotId);
     74    STDMETHOD(OnSnapshotDeleted)(IN_BSTR aMachineId, IN_BSTR aSnapshotId);
     75    STDMETHOD(OnSnapshotChange)(IN_BSTR aMachineId, IN_BSTR aSnapshotId);
    7676    STDMETHOD(OnGuestPropertyChange)(IN_BSTR machineId, IN_BSTR key, IN_BSTR value, IN_BSTR flags);
    7777
     
    8383    STDMETHOD(OnStateChange)(MachineState_T machineState);
    8484    STDMETHOD(OnAdditionsStateChange)();
    85     STDMETHOD(OnNetworkAdapterChange) (INetworkAdapter *aNetworkAdapter);
    86     STDMETHOD(OnSerialPortChange) (ISerialPort *aSerialPort);
    87     STDMETHOD(OnParallelPortChange) (IParallelPort *aParallelPort);
     85    STDMETHOD(OnNetworkAdapterChange)(INetworkAdapter *aNetworkAdapter);
     86    STDMETHOD(OnSerialPortChange)(ISerialPort *aSerialPort);
     87    STDMETHOD(OnParallelPortChange)(IParallelPort *aParallelPort);
    8888    STDMETHOD(OnVRDPServerChange)();
    8989    STDMETHOD(OnRemoteDisplayInfoChange)();
    9090    STDMETHOD(OnUSBControllerChange)();
    91     STDMETHOD(OnUSBDeviceStateChange) (IUSBDevice *aDevice, BOOL aAttached,
     91    STDMETHOD(OnUSBDeviceStateChange)(IUSBDevice *aDevice, BOOL aAttached,
    9292                                       IVirtualBoxErrorInfo *aError);
    93     STDMETHOD(OnSharedFolderChange) (Scope_T aScope);
    94     STDMETHOD(OnStorageControllerChange) ();
     93    STDMETHOD(OnSharedFolderChange)(Scope_T aScope);
     94    STDMETHOD(OnStorageControllerChange)();
    9595    STDMETHOD(OnMediumChange)(IMediumAttachment *iMediumAttachment);
    9696    STDMETHOD(OnCPUChange)(ULONG aCPU, BOOL aRemove);
    9797    STDMETHOD(OnRuntimeError)(BOOL fFatal, IN_BSTR id, IN_BSTR message);
    9898    STDMETHOD(OnCanShowWindow)(BOOL *canShow);
    99     STDMETHOD(OnShowWindow) (ULONG64 *winId);
     99    STDMETHOD(OnShowWindow)(ULONG64 *winId);
    100100
    101101    // for VirtualBoxSupportErrorInfoImpl
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