Logo Search packages:      
Sourcecode: f-spot version File versions  Download package

override TagLib.Tag TagLib::Mpeg::AudioFile::GetTag ( TagTypes  type,
bool  create 
) [inline, virtual]

Gets a tag of a specified type from the current instance, optionally creating a new tag if possible.

type A TagLib.TagTypes value indicating the type of tag to read.
create A bool value specifying whether or not to try and create the tag if one is not found.
A Tag object containing the tag that was found in or added to the current instance. If no matching tag was found and none was created, is returned.

If a TagLib.Id3v2.Tag is added to the current instance, it will be placed at the start of the file. On the other hand, TagLib.Id3v1.Tag TagLib.Ape.Tag will be added to the end of the file. All other tag types will be ignored.

Implements TagLib::File.

Definition at line 184 of file AudioFile.cs.

                  Tag t = (Tag as TagLib.NonContainer.Tag).GetTag (type);
                  if (t != null || !create)
                        return t;
                  switch (type)
                  case TagTypes.Id3v1:
                        return EndTag.AddTag (type, Tag);
                  case TagTypes.Id3v2:
                        return StartTag.AddTag (type, Tag);
                  case TagTypes.Ape:
                        return EndTag.AddTag (type, Tag);
                        return null;

Generated by  Doxygen 1.6.0   Back to index