CedarBackup2.writers.cdwriter.MediaDefinition

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

# Class MediaDefinition

source code

    object --+
             |
            MediaDefinition

Class encapsulating information about CD media definitions.

The following media types are accepted:

- `MEDIA_CDR_74`: 74-minute CD-R media (650 MB capacity)
- `MEDIA_CDRW_74`: 74-minute CD-RW media (650 MB capacity)
- `MEDIA_CDR_80`: 80-minute CD-R media (700 MB capacity)
- `MEDIA_CDRW_80`: 80-minute CD-RW media (700 MB capacity)

Note that all of the capacities associated with a media definition are in terms of ISO sectors (`util.ISO_SECTOR_SIZE)`.

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
_getInitialLeadIn(self) Property target used to get the initial lead-in value. | source code
_getLeadIn(self) Property target used to get the lead-in 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.
| initialLeadIn Initial lead-in required for first image written to media.
| leadIn Lead-in required on successive images written to media.
| capacity Total capacity of the media before any required lead-in.
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.

### initialLeadIn Initial lead-in required for first image written to media. Get Method: _getInitialLeadIn(self) - Property target used to get the initial lead-in value.

### leadIn Lead-in required on successive images written to media. Get Method: _getLeadIn(self) - Property target used to get the lead-in value.

### capacity Total capacity of the media before any required lead-in. Get Method: _getCapacity(self) - Property target used to get the capacity value.