CedarBackup2.writers.dvdwriter.MediaDefinition

Package CedarBackup2 :: Package writers :: Module dvdwriter :: Class MediaDefinition |
[hide private]
[frames] | no frames]

# Class MediaDefinition

source code

    object --+
             |
            MediaDefinition

Class encapsulating information about DVD media definitions.

The following media types are accepted:

- `MEDIA_DVDPLUSR`: DVD+R media (4.4 GB capacity)
- `MEDIA_DVDPLUSRW`: DVD+RW media (4.4 GB capacity)

Note that the capacity attribute returns capacity in terms of ISO sectors (`util.ISO_SECTOR_SIZE)`. This is for compatibility with the CD writer functionality.

The capacities are 4.4 GB because Cedar Backup deals in "true" gigabytes of 1024*1024*1024 bytes per gigabyte.

Instance Methods | [hide private]
__init__(self, mediaType) Creates a media definition for the indicated media type. | source code
_setValues(self, mediaType) Sets values based on media type. | source code
_getMediaType(self) Property target used to get the media type value. | source code
_getRewritable(self) Property target used to get the rewritable flag value. | source code
_getCapacity(self) Property target used to get the capacity value. | source code
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Properties | [hide private]
| mediaType Configured media type.
| rewritable Boolean indicating whether the media is rewritable.
| capacity Total capacity of media in 2048-byte sectors.
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, mediaType) (Constructor) | source code
Creates a media definition for the indicated media type. Parameters: `mediaType` - Type of the media, as discussed above. Raises: `ValueError` - If the media type is unknown or unsupported. Overrides: object.__init__

### _setValues(self, mediaType) | source code
Sets values based on media type. Parameters: `mediaType` - Type of the media, as discussed above. Raises: `ValueError` - If the media type is unknown or unsupported.

Property Details | [hide private]

### mediaType Configured media type. Get Method: _getMediaType(self) - Property target used to get the media type value.

### rewritable Boolean indicating whether the media is rewritable. Get Method: _getRewritable(self) - Property target used to get the rewritable flag value.

### capacity Total capacity of media in 2048-byte sectors. Get Method: _getCapacity(self) - Property target used to get the capacity value.