Changeset 23823 in vbox for trunk/src/VBox/Main
- Timestamp:
- Oct 16, 2009 2:15:04 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 53579
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/MediumImpl.cpp
r23591 r23823 1434 1434 } 1435 1435 1436 STDMETHODIMP Medium::COMGETTER(DeviceType)(DeviceType_T *aDeviceType) 1437 { 1438 CheckComArgOutPointerValid(aDeviceType); 1439 1440 AutoCaller autoCaller(this); 1441 CheckComRCReturnRC(autoCaller.rc()); 1442 1443 AutoReadLock alock(this); 1444 1445 *aDeviceType = m->devType; 1446 1447 return S_OK; 1448 } 1449 1436 1450 STDMETHODIMP Medium::COMGETTER(HostDrive)(BOOL *aHostDrive) 1437 1451 { … … 3344 3358 * and assign to this medium, and <ext> is the default extension for this 3345 3359 * medium's storage format. Note that this procedure requires the media state to 3346 * be NotCreated and will return a fai ulre otherwise.3360 * be NotCreated and will return a failure otherwise. 3347 3361 * 3348 3362 * @param aLocation Location of the storage unit. If the location is a FS-path, … … 3368 3382 E_FAIL); 3369 3383 3370 /* are we dealing with a new hard diskconstructed using the existing3384 /* are we dealing with a new medium constructed using the existing 3371 3385 * location? */ 3372 3386 bool isImport = m->format.isNull(); … … 3419 3433 if (RT_FAILURE(vrc)) 3420 3434 return setError(VBOX_E_FILE_ERROR, 3421 tr("Invalid hard diskstorage file location '%s' (%Rrc)"),3435 tr("Invalid medium storage file location '%s' (%Rrc)"), 3422 3436 location.raw(), vrc); 3423 3437 … … 3449 3463 if (vrc == VERR_FILE_NOT_FOUND || vrc == VERR_PATH_NOT_FOUND) 3450 3464 return setError(VBOX_E_FILE_ERROR, 3451 tr("Could not find file for the hard disk'%s' (%Rrc)"),3465 tr("Could not find file for the medium '%s' (%Rrc)"), 3452 3466 locationFull.raw(), vrc); 3453 3467 else if (aFormat.isEmpty()) 3454 3468 return setError(VBOX_E_IPRT_ERROR, 3455 tr("Could not get the storage format of the hard disk'%s' (%Rrc)"),3469 tr("Could not get the storage format of the medium '%s' (%Rrc)"), 3456 3470 locationFull.raw(), vrc); 3457 3471 else … … 3592 3606 } 3593 3607 3594 /* are we dealing with a new hard diskconstructed using the existing3608 /* are we dealing with a new medium constructed using the existing 3595 3609 * location? */ 3596 3610 bool isImport = m->id.isEmpty(); … … 3605 3619 3606 3620 /* Note that we don't use VD_OPEN_FLAGS_READONLY when opening new 3607 * hard disksbecause that would prevent necessary modifications3608 * when opening hard disksof some third-party formats for the first3621 * media because that would prevent necessary modifications 3622 * when opening media of some third-party formats for the first 3609 3623 * time in VirtualBox (such as VMDK for which VDOpen() needs to 3610 3624 * generate an UUID if it is missing) */ … … 3623 3637 if (RT_FAILURE(vrc)) 3624 3638 { 3625 lastAccessError = Utf8StrFmt(tr("Could not open the hard disk'%ls'%s"),3639 lastAccessError = Utf8StrFmt(tr("Could not open the medium '%ls'%s"), 3626 3640 m->locationFull.raw(), vdError(vrc).raw()); 3627 3641 throw S_OK; … … 3667 3681 { 3668 3682 lastAccessError = Utf8StrFmt( 3669 tr("UUID {%RTuuid} of the hard disk'%ls' does not match the value {%RTuuid} stored in the media registry ('%ls')"),3683 tr("UUID {%RTuuid} of the medium '%ls' does not match the value {%RTuuid} stored in the media registry ('%ls')"), 3670 3684 &uuid, m->locationFull.raw(), m->id.raw(), 3671 3685 mVirtualBox->settingsFilePath().raw()); … … 3679 3693 * underlying storage so use what we store in XML */ 3680 3694 3681 /* generate an UUID for an imported UUID-less hard disk*/3695 /* generate an UUID for an imported UUID-less medium */ 3682 3696 if (isImport) 3683 3697 { -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r23801 r23823 8477 8477 <interface 8478 8478 name="IMedium" extends="$unknown" 8479 uuid=" 62551115-83b8-4d20-925f-79e9d3c00f96"8479 uuid="ad3cdc5b-28ce-4390-8273-ca2068a217c5" 8480 8480 wsmap="managed" 8481 8481 > … … 8919 8919 given type and format. 8920 8920 </desc> 8921 </attribute> 8922 8923 <attribute name="deviceType" type="DeviceType" readonly="yes"> 8924 <desc>Kind of device (DVD/Floppy/HardDisk) which is applicable to this 8925 medium.</desc> 8921 8926 </attribute> 8922 8927 -
trunk/src/VBox/Main/include/MediumImpl.h
r23591 r23823 105 105 STDMETHOD(COMSETTER(Location))(IN_BSTR aLocation); 106 106 STDMETHOD(COMGETTER(Name))(BSTR *aName); 107 STDMETHOD(COMGETTER(DeviceType))(DeviceType_T *aDeviceType); 107 108 STDMETHOD(COMGETTER(HostDrive))(BOOL *aHostDrive); 108 109 STDMETHOD(COMGETTER(Size))(ULONG64 *aSize);
Note:
See TracChangeset
for help on using the changeset viewer.