Logo Search packages:      
Sourcecode: vcdimager version File versions

lid_t vcdinfo_get_multi_default_lid ( const vcdinfo_obj_t *  obj,
lid_t  lid,
lsn_t  lsn 
)

Get default or multi-default LID.

Return the LID offset associated with a the "default" entry of the passed-in LID parameter. Note "default" entries are associated with PSDs that are (extended) selection lists. If the "default" is a multi-default, we use entry_num to find the proper "default" LID. Otherwise this routine is exactly like vcdinfo_get_default_offset with the exception of requiring an additional "entry_num" parameter.

Returns:
VCDINFO_INVALID_LID is returned on error, or if the LID is not a selection list or no "default" entry. Otherwise the LID offset is returned.
Return the LID offset associated with a the "default" entry of the passed-in LID parameter. Note "default" entries are associated with PSDs that are (extended) selection lists. If the "default" offset is a multi-default, we use entry_num to find the proper "default" LID. Otherwise this routine is exactly like vcdinfo_get_default_lid with the exception of requiring an additional "entry_num" parameter.

Returns:
VCDINFO_INVALID_LID is returned on error, or if the LID is not a selection list or no "default" entry. Otherwise the LID offset is returned.

Definition at line 525 of file info.c.

References vcdinfo_offset_t::lid, vcdinfo_get_multi_default_lid(), vcdinfo_get_multi_default_offset(), vcdinfo_get_offset_t(), VCDINFO_INVALID_LID, VCDINFO_INVALID_OFFSET, and vcdinfo_lsn_get_entry().

Referenced by vcdinfo_get_multi_default_lid().

{
  unsigned int offset;
  unsigned int entry_num;

  entry_num = vcdinfo_lsn_get_entry(obj, lsn);
  offset    = vcdinfo_get_multi_default_offset(obj, lid, entry_num);

  switch (offset) {
  case VCDINFO_INVALID_OFFSET:
  case PSD_OFS_MULTI_DEF:
  case PSD_OFS_MULTI_DEF_NO_NUM:
    return VCDINFO_INVALID_LID;
  default: 
    {
      vcdinfo_offset_t *ofs = vcdinfo_get_offset_t(obj, offset);
      return ofs->lid;
    }
  }
}


Generated by  Doxygen 1.6.0   Back to index