Logo Search packages:      
Sourcecode: vcdimager version File versions

vcdinfo_selection_get_lid ( const vcdinfo_obj_t *  obj,
lid_t  lid,
unsigned int  selection 
)

Get the "default" lid of a selection for a given lid.

Get offset of a selection for a given lid.

Return the LID offset associated with a the selection number of the passed-in LID parameter.

Returns:
VCDINFO_INVALID_LID is returned if obj on error or obj is NULL. Otherwise the LID offset is returned.
Return the LID offset associated with a the selection number of the passed-in LID parameter.

Returns:
VCDINFO_INVALID_LID is returned if obj on error or obj is NULL. Otherwise the LID offset is returned.

Definition at line 421 of file info.c.

References vcdinfo_offset_t::lid, vcdinfo_get_offset_t(), VCDINFO_INVALID_LID, VCDINFO_INVALID_OFFSET, vcdinfo_selection_get_lid(), and vcdinfo_selection_get_offset().

Referenced by vcdinfo_selection_get_lid().

{
  unsigned int offset;

  if (NULL == obj) return VCDINFO_INVALID_LID;

  offset = vcdinfo_selection_get_offset(obj, lid, selection);
  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