Top | ![]() |
![]() |
![]() |
![]() |
gboolean | mirage_sector_feed_data () |
gboolean | mirage_sector_get_data () |
gboolean | mirage_sector_get_edc_ecc () |
gboolean | mirage_sector_get_header () |
MirageTrackModes | mirage_sector_get_sector_type () |
gboolean | mirage_sector_get_subchannel () |
gboolean | mirage_sector_get_subheader () |
gboolean | mirage_sector_get_sync () |
gboolean | mirage_sector_verify_lec () |
gboolean | mirage_sector_verify_subchannel_crc () |
struct | MirageSector |
struct | MirageSectorClass |
enum | MirageSectorSubchannelFormat |
enum | MirageSectorValidData |
MirageSector object represents a sector. It provides access to the sector data, generating it if needed.
gboolean mirage_sector_feed_data (MirageSector *self
,gint address
,MirageTrack *track
,GError **error
);
Feeds data to sector. It finds appropriate fragment to feed from, reads data into sector object and sets data validity flags.
gboolean mirage_sector_get_data (MirageSector *self
,const guint8 **ret_buf
,gint *ret_len
,GError **error
);
Retrieves sector's user data. The pointer to appropriate location in
sector's data buffer is stored into ret_buf
; therefore, the buffer should not
be modified.
self |
||
ret_buf |
location to store pointer to buffer containing user data, or |
[out][transfer none][allow-none][array length=ret_len] |
ret_len |
location to store length of user data, or |
[out][allow-none] |
error |
location to store error, or |
[out][allow-none] |
gboolean mirage_sector_get_edc_ecc (MirageSector *self
,const guint8 **ret_buf
,gint *ret_len
,GError **error
);
Retrieves sector's EDC/ECC data. The pointer to appropriate location in
sector's data buffer is stored into ret_buf
; therefore, the buffer should not
be modified.
If EDC/ECC data is not provided by image file(s), it is generated.
self |
||
ret_buf |
location to store pointer to buffer containing EDC/ECC data, or |
[out][transfer none][allow-none][array length=ret_len] |
ret_len |
location to store length of EDC/ECC data, or |
[out][allow-none] |
error |
location to store error, or |
[out][allow-none] |
gboolean mirage_sector_get_header (MirageSector *self
,const guint8 **ret_buf
,gint *ret_len
,GError **error
);
Retrieves sector's header. The pointer to appropriate location in
sector's data buffer is stored into ret_buf
; therefore, the buffer should not
be modified.
If header is not provided by image file(s), it is generated.
MirageTrackModes
mirage_sector_get_sector_type (MirageSector *self
);
Retrieves sector type (track mode); one of MirageTrackModes.
gboolean mirage_sector_get_subchannel (MirageSector *self
,MirageSectorSubchannelFormat format
,const guint8 **ret_buf
,gint *ret_len
,GError **error
);
Retrieves sector's subchannel. format
must be one of MirageSectorSubchannelFormat.
The pointer to appropriate location in sector's data buffer is stored into
ret_buf
; therefore, the buffer should not be modified.
If subchannel is not provided by image file(s), it is generated.
self |
||
format |
subchannel format. |
[in] |
ret_buf |
location to store pointer to buffer containing subchannel, or |
[out][transfer none][allow-none][array length=ret_len] |
ret_len |
location to store length of subchannel data, or |
[out][allow-none] |
error |
location to store error, or |
[out][allow-none] |
gboolean mirage_sector_get_subheader (MirageSector *self
,const guint8 **ret_buf
,gint *ret_len
,GError **error
);
Retrieves sector's subheader. The pointer to appropriate location in
sector's data buffer is stored into ret_buf
; therefore, the buffer should not
be modified.
If subheader is not provided by image file(s), it is generated.
self |
||
ret_buf |
location to store pointer to buffer containing subheader, or |
[out][transfer none][allow-none][array length=ret_len] |
ret_len |
location to store length of subheader, or |
[out][allow-none] |
error |
location to store error, or |
[out][allow-none] |
gboolean mirage_sector_get_sync (MirageSector *self
,const guint8 **ret_buf
,gint *ret_len
,GError **error
);
Retrieves sector's sync pattern. The pointer to appropriate location in
sector's data buffer is stored into ret_buf
; therefore, the buffer should not
be modified.
If sync pattern is not provided by image file(s), it is generated.
self |
||
ret_buf |
location to store pointer to buffer containing sync pattern, or |
[out][transfer none][allow-none][array length=ret_len] |
ret_len |
location to store length of sync pattern, or |
[out][allow-none] |
error |
location to store error, or |
[out][allow-none] |
gboolean
mirage_sector_verify_lec (MirageSector *self
);
Verifies the sector data in terms of L-EC error detection/correction. Data sectors (Mode 1, Mode 2 Form 1 and Mode 2 Form 2) contain error detection/error correction codes which is part of so called layered error correction. This function calculates the EDC for sector data and compares it with EDC provided by the image file.
As a result of comparison, the sectors with intentionally faulty EDC (and possibly ECC, though ECC is not verified) can be discovered.
This function requires EDC/ECC data to be provided by the image. If it
is not provided, it would be generated by MirageSector on first access
via mirage_sector_get_edc_ecc()
using the same algorithm as the one used
by this function. Therefore, in case of EDC/ECC data missing, the verification
automatically succeeds.
gboolean
mirage_sector_verify_subchannel_crc (MirageSector *self
);
Verifies the Q subchannel's CRC for the sector.
As a result of comparison, the sectors with intentionally faulty Q subchannel can be discovered.
This function requires subchannel data to be provided by the image. If it
is not provided, it would be generated by MirageSector on first access
via mirage_sector_get_subchannel()
using the same algorithm as the one used
by this function. Therefore, in case of subchannel data missing, the verification
automatically succeeds.
struct MirageSector;
All the fields in the MirageSector structure are private to the MirageSector implementation and should never be accessed directly.
struct MirageSectorClass { MirageObjectClass parent_class; };
The class structure for the MirageSector type.