Mirage.Fragment¶
- Subclasses:
None
Methods¶
- Inherited:
Mirage.Object (2), GObject.Object (37), Mirage.Contextual (8)
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Emitted when a layout of |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Mirage.Fragment(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
All the fields in the
Mirage.Fragment
structure are private to theMirage.Fragment
implementation and should never be accessed directly.- contains_address(address)¶
- Parameters:
address (
int
) – address to be checked- Returns:
- Return type:
Checks whether the fragment contains the given address or not.
- get_address()¶
- Returns:
start address
- Return type:
Retrieves fragment’s start address. The address is given in sectors.
Intended for internal use only.
- get_length()¶
- Returns:
length
- Return type:
Retrieves fragment’s length. The returned length is given in sectors.
Intended for internal use only.
- is_writable()¶
-
Checks if fragment is writable, i.e., whether it has main channel data stream set and this stream is writable.
- main_data_get_filename()¶
- Returns:
pointer to main channel data file name string. The string belongs to object and should not be modified.
- Return type:
Retrieves filename of main channel data stream.
- main_data_get_format()¶
- Returns:
main data file format
- Return type:
Retrieves main data file format.
- main_data_get_offset()¶
- Returns:
main data file offset
- Return type:
Retrieves main data file offset.
- main_data_get_size()¶
- Returns:
main data file sector size
- Return type:
Retrieves main data file sector size.
- main_data_set_format(format)¶
- Parameters:
format (
int
) – main data file format
Sets main data file format. format must be one of
Mirage.MainDataFormat
.
- main_data_set_offset(offset)¶
- Parameters:
offset (
int
) – main data file offset
Sets main data file offset.
- main_data_set_size(size)¶
- Parameters:
size (
int
) – main data file sector size
Sets main data file sector size.
- main_data_set_stream(stream)¶
- Parameters:
stream (
Mirage.Stream
) – aMirage.Stream
on main channel data file
Sets main channel data stream.
- read_main_data(address)¶
- Parameters:
address (
int
) – address- Raises:
- Returns:
True
on success,False
on failure- buffer:
location to store pointer to buffer with read data, or
None
- Return type:
Reads main channel data for sector at fragment-relative address (given in sectors). The buffer for reading data into is allocated by function and should be freed using
GLib.free
() when no longer needed. The pointer to buffer is stored into buffer and the length of read data is stored into length.
- read_subchannel_data(address, buffer)¶
- Parameters:
- Raises:
- Returns:
- Return type:
Writes subchannel data for sector at fragment-relative address (given in sectors).
- set_address(address)¶
- Parameters:
address (
int
) – start address
Sets fragment’s start address. The address is given in sectors.
Intended for internal use only.
Causes top-down change.
- set_length(length)¶
- Parameters:
length (
int
) – length
Sets fragment’s length. The length is given in sectors.
Intended for internal use only.
Causes bottom-up change.
- subchannel_data_get_filename()¶
- Returns:
pointer to subchannel data file name string. The string belongs to object and should not be modified.
- Return type:
Retrieves filename of subchannel data input stream.
- subchannel_data_get_format()¶
- Returns:
subchannel data file format
- Return type:
Retrieves subchannel data file format.
- subchannel_data_get_offset()¶
- Returns:
subchannel data file offset
- Return type:
Retrieves subchannel data file offset.
- subchannel_data_get_size()¶
- Returns:
subchannel data file sector size
- Return type:
Retrieves subchannel data file sector size.
- subchannel_data_set_format(format)¶
- Parameters:
format (
int
) – subchannel data file format
Sets subchannel data file format. format must be a combination of
Mirage.SubchannelDataFormat
.
- subchannel_data_set_offset(offset)¶
- Parameters:
offset (
int
) – subchannel data file offset
Sets subchannel data file offset.
- subchannel_data_set_size(size)¶
- Parameters:
size (
int
) – subchannel data file sector size
Sets subchannel data file sector size.
- subchannel_data_set_stream(stream)¶
- Parameters:
stream (
Mirage.Stream
) – aMirage.Stream
on subchannel data file
Sets subchannel data stream.
- use_the_rest_of_file()¶
- Raises:
- Returns:
- Return type:
Uses the rest of data file. It automatically calculates and sets fragment’s length.
- write_main_data(address, buffer)¶
- Parameters:
- Raises:
- Returns:
- Return type:
Writes main channel data for sector at fragment-relative address (given in sectors).
- write_subchannel_data(address, buffer)¶
- Parameters:
- Raises:
- Returns:
- Return type:
Reads subchannel data for sector at fragment-relative address (given in sectors). The buffer for reading data into is allocated by function and should be freed using
GLib.free
() when no longer needed. The pointer to buffer is stored into buffer and the length of read data is stored into length.
Signal Details¶
- Mirage.Fragment.signals.layout_changed(fragment)¶
- Signal Name:
layout-changed
- Flags:
- Parameters:
fragment (
Mirage.Fragment
) – The object which received the signal
Emitted when a layout of
Mirage.Fragment
changed in a way that causes a bottom-up change.