Changeset 24961 in vbox for trunk/src/VBox/Main
- Timestamp:
- Nov 25, 2009 4:02:32 PM (15 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/ProgressImpl.cpp
r23827 r24961 60 60 mResultCode = S_OK; 61 61 62 m_cOperations = 63 m_ulTotalOperationsWeight = 64 m_ulOperationsCompletedWeight = 65 m_ulCurrentOperation = 66 m_ulCurrentOperationWeight = 67 m_ulOperationPercent = 0; 62 m_cOperations 63 = m_ulTotalOperationsWeight 64 = m_ulOperationsCompletedWeight 65 = m_ulCurrentOperation 66 = m_ulCurrentOperationWeight 67 = m_ulOperationPercent 68 = m_cMsTimeout 69 = 0; 68 70 69 71 // get creation timestamp … … 467 469 *aOperationPercent = m_ulOperationPercent; 468 470 471 return S_OK; 472 } 473 474 STDMETHODIMP ProgressBase::COMSETTER(Timeout)(ULONG aTimeout) 475 { 476 AutoCaller autoCaller(this); 477 CheckComRCReturnRC(autoCaller.rc()); 478 479 AutoWriteLock alock(this); 480 481 if (!mCancelable) 482 return setError(VBOX_E_INVALID_OBJECT_STATE, 483 tr("Operation cannot be canceled")); 484 485 LogThisFunc(("%#x => %#x\n", m_cMsTimeout, aTimeout)); 486 m_cMsTimeout = aTimeout; 487 return S_OK; 488 } 489 490 STDMETHODIMP ProgressBase::COMGETTER(Timeout)(ULONG *aTimeout) 491 { 492 CheckComArgOutPointerValid(aTimeout); 493 494 AutoCaller autoCaller(this); 495 CheckComRCReturnRC(autoCaller.rc()); 496 497 AutoReadLock alock(this); 498 499 *aTimeout = m_cMsTimeout; 469 500 return S_OK; 470 501 } … … 1472 1503 } 1473 1504 1505 STDMETHODIMP CombinedProgress::COMSETTER(Timeout)(ULONG aTimeout) 1506 { 1507 NOREF(aTimeout); 1508 AssertFailed(); 1509 return E_NOTIMPL; 1510 } 1511 1512 STDMETHODIMP CombinedProgress::COMGETTER(Timeout)(ULONG *aTimeout) 1513 { 1514 CheckComArgOutPointerValid(aTimeout); 1515 1516 AssertFailed(); 1517 return E_NOTIMPL; 1518 } 1519 1474 1520 // IProgress methods 1475 1521 ///////////////////////////////////////////////////////////////////////////// -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r24923 r24961 8296 8296 <interface 8297 8297 name="IProgress" extends="$unknown" 8298 uuid=" 62827ef1-c098-40eb-be96-36d0508489a6"8298 uuid="856aa038-853f-42e2-acf7-6e7b02dbe294" 8299 8299 wsmap="managed" 8300 8300 > … … 8418 8418 <attribute name="operationPercent" type="unsigned long" readonly="yes"> 8419 8419 <desc>Progress value of the current sub-operation only, in percent.</desc> 8420 </attribute> 8421 8422 <attribute name="timeout" type="unsigned long"> 8423 <desc> 8424 When non-zero, this specifies the number of milliseconds after which 8425 the operation will automatically be canceled. This can only be set on 8426 cancelable objects. 8427 </desc> 8420 8428 </attribute> 8421 8429 -
trunk/src/VBox/Main/include/ProgressImpl.h
r23827 r24961 82 82 STDMETHOD(COMGETTER(OperationDescription)) (BSTR *aOperationDescription); 83 83 STDMETHOD(COMGETTER(OperationPercent)) (ULONG *aOperationPercent); 84 STDMETHOD(COMSETTER(Timeout)) (ULONG aTimeout); 85 STDMETHOD(COMGETTER(Timeout)) (ULONG *aTimeout); 84 86 85 87 // public methods only for internal purposes … … 130 132 ULONG m_ulCurrentOperationWeight; // weight of current operation, given to setNextOperation() 131 133 ULONG m_ulOperationPercent; // percentage of current operation, set with setCurrentOperationProgress() 134 ULONG m_cMsTimeout; /**< Automatic timeout value. 0 means none. */ 132 135 }; 133 136 … … 409 412 STDMETHOD(COMGETTER(OperationDescription)) (BSTR *aOperationDescription); 410 413 STDMETHOD(COMGETTER(OperationPercent)) (ULONG *aOperationPercent); 414 STDMETHOD(COMSETTER(Timeout)) (ULONG aTimeout); 415 STDMETHOD(COMGETTER(Timeout)) (ULONG *aTimeout); 411 416 412 417 // IProgress methods
Note:
See TracChangeset
for help on using the changeset viewer.