VirtualBox

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


Ignore:
Timestamp:
Aug 16, 2010 10:01:36 AM (14 years ago)
Author:
vboxsync
Message:

FT api

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

Legend:

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

    r31683 r31685  
    25702570}
    25712571
     2572STDMETHODIMP Machine::COMGETTER(FaultToleranceState)(FaultToleranceState_T *aState)
     2573{
     2574    CheckComArgOutPointerValid(aState);
     2575
     2576    AutoCaller autoCaller(this);
     2577    if (FAILED(autoCaller.rc())) return autoCaller.rc();
     2578
     2579    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
     2580
     2581    *aState = mUserData->s.enmFaultToleranceState;
     2582    return S_OK;
     2583}
     2584
     2585STDMETHODIMP Machine::COMSETTER(FaultToleranceState)(FaultToleranceState_T aState)
     2586{
     2587    AutoCaller autoCaller(this);
     2588    if (FAILED(autoCaller.rc())) return autoCaller.rc();
     2589
     2590    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     2591
     2592    /* @todo deal with running state change. */
     2593
     2594    setModified(IsModified_MachineData);
     2595    mUserData.backup();
     2596    mUserData->s.enmFaultToleranceState = aState;
     2597    return S_OK;
     2598}
     2599
     2600STDMETHODIMP Machine::COMGETTER(FaultTolerancePort)(ULONG *aPort)
     2601{
     2602    CheckComArgOutPointerValid(aPort);
     2603
     2604    AutoCaller autoCaller(this);
     2605    if (FAILED(autoCaller.rc())) return autoCaller.rc();
     2606
     2607    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
     2608
     2609    *aPort = mUserData->s.uFaultTolerancePort;
     2610    return S_OK;
     2611}
     2612
     2613STDMETHODIMP Machine::COMSETTER(FaultTolerancePort)(ULONG aPort)
     2614{
     2615    AutoCaller autoCaller(this);
     2616    if (FAILED(autoCaller.rc())) return autoCaller.rc();
     2617
     2618    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     2619
     2620    /* @todo deal with running state change. */
     2621
     2622    setModified(IsModified_MachineData);
     2623    mUserData.backup();
     2624    mUserData->s.uFaultTolerancePort = aPort;
     2625    return S_OK;
     2626}
     2627
     2628STDMETHODIMP Machine::COMGETTER(FaultToleranceAddress)(BSTR *aAddress)
     2629{
     2630    CheckComArgOutPointerValid(aAddress);
     2631
     2632    AutoCaller autoCaller(this);
     2633    if (FAILED(autoCaller.rc())) return autoCaller.rc();
     2634
     2635    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
     2636
     2637    mUserData->s.strFaultToleranceAddress.cloneTo(aAddress);
     2638    return S_OK;
     2639}
     2640
     2641STDMETHODIMP Machine::COMSETTER(FaultToleranceAddress)(IN_BSTR aAddress)
     2642{
     2643    AutoCaller autoCaller(this);
     2644    if (FAILED(autoCaller.rc())) return autoCaller.rc();
     2645
     2646    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     2647
     2648    /* @todo deal with running state change. */
     2649
     2650    setModified(IsModified_MachineData);
     2651    mUserData.backup();
     2652    mUserData->s.strFaultToleranceAddress = aAddress;
     2653    return S_OK;
     2654}
     2655
    25722656STDMETHODIMP Machine::COMGETTER(RTCUseUTC)(BOOL *aEnabled)
    25732657{
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r31647 r31685  
    905905  </enum>
    906906
     907  <enum
     908   name="FaultToleranceState"
     909   uuid="05f65593-743e-4862-8700-57bf6cc48f3f"
     910  >
     911    <desc>
     912      Used with <link to="IMachine::faultToleranceState" />.
     913    </desc>
     914    <const name="Inactive" value="1">
     915      <desc>No fault tolerance enabled.</desc>
     916    </const>
     917    <const name="Source" value="2">
     918      <desc>Fault tolerant source VM.</desc>
     919    </const>
     920    <const name="Target" value="3">
     921      <desc>Fault tolerant target VM.</desc>
     922    </const>
     923  </enum>
     924   
    907925  <enum
    908926   name="LockType"
     
    33983416  <interface
    33993417     name="IMachine" extends="$unknown"
    3400      uuid="d647d330-02fa-4614-a2a0-3029c3db942e"
     3418     uuid="7315c8f6-5010-4e2a-9242-c84ead390d55"
    34013419     wsmap="managed"
    34023420     >
     
    39293947    </attribute>
    39303948
     3949    <attribute name="faultToleranceState" type="FaultToleranceState">
     3950      <desc>
     3951        Fault tolerance state; disabled, source or target.
     3952        This property can be changed at any time. If you change it for a running
     3953        VM, then the fault tolerance address and port must be set beforehand.
     3954      </desc>
     3955    </attribute>
     3956
     3957    <attribute name="faultTolerancePort" type="unsigned long">
     3958      <desc>
     3959        The TCP port the fault tolerance source or target will use for
     3960        communication.
     3961      </desc>
     3962    </attribute>
     3963
     3964    <attribute name="faultToleranceAddress" type="wstring">
     3965      <desc>
     3966        The address the fault tolerance source or target.
     3967      </desc>
     3968    </attribute>
     3969     
    39313970    <attribute name="RTCUseUTC" type="boolean">
    39323971      <desc>
  • trunk/src/VBox/Main/include/MachineImpl.h

    r31615 r31685  
    432432    STDMETHOD(COMGETTER(TeleporterPassword))(BSTR *aPassword);
    433433    STDMETHOD(COMSETTER(TeleporterPassword))(IN_BSTR aPassword);
     434    STDMETHOD(COMGETTER(FaultToleranceState))(FaultToleranceState_T *aEnabled);
     435    STDMETHOD(COMSETTER(FaultToleranceState))(FaultToleranceState_T aEnabled);
     436    STDMETHOD(COMGETTER(FaultTolerancePort))(ULONG *aPort);
     437    STDMETHOD(COMSETTER(FaultTolerancePort))(ULONG aPort);
     438    STDMETHOD(COMGETTER(FaultToleranceAddress))(BSTR *aAddress);
     439    STDMETHOD(COMSETTER(FaultToleranceAddress))(IN_BSTR aAddress);
    434440    STDMETHOD(COMGETTER(RTCUseUTC))(BOOL *aEnabled);
    435441    STDMETHOD(COMSETTER(RTCUseUTC))(BOOL aEnabled);
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