PlayListFile Class Reference

Class for containing the info of a pls or m3u file. More...

#include <pls.h>

List of all members.

Public Member Functions

 PlayListFile (void)
 ~PlayListFile (void)
int size (void) const
 Get the number of entries in the pls file.
PlayListFileEntryget (int i)
 Get a file entry.
int version (void) const
 Version of the parsed pls file.
void add (PlayListFileEntry *e)
 Add a entry to the playlist.
void clear (void)
 Clear out all the entries.

Static Public Member Functions

static int parse (PlayListFile *pls, QTextStream *stream, const QString &extension)
 Parse a pls or m3u playlist file.
static int parsePLS (PlayListFile *pls, QTextStream *stream)
 Parse a pls file.
static int parseM3U (PlayListFile *pls, QTextStream *stream)
 Parse a m3u file.

Private Attributes

QList< PlayListFileEntry * > m_entries
int m_version

Detailed Description

Class for containing the info of a pls or m3u file.

Definition at line 40 of file pls.h.


Constructor & Destructor Documentation

PlayListFile::PlayListFile ( void   ) 

Definition at line 195 of file pls.cpp.

PlayListFile::~PlayListFile ( void   ) 

Definition at line 199 of file pls.cpp.


Member Function Documentation

int PlayListFile::size ( void   )  const [inline]

Get the number of entries in the pls file.

This returns the number of actual parsed entries, not the numberofentries field.

Returns:
the number of entries

Definition at line 53 of file pls.h.

Referenced by DecoderHandler::createPlaylistForSingleFile(), DecoderHandler::createPlaylistFromFile(), DecoderHandler::done(), DecoderHandler::next(), parseM3U(), and DecoderHandler::start().

PlayListFileEntry* PlayListFile::get ( int  i  )  [inline]

Get a file entry.

Parameters:
i which entry to get, between 0 and the value returned by calling PlayListParser::size
Returns:
a pointer to a PlayListEntry

Definition at line 59 of file pls.h.

Referenced by DecoderHandler::next(), and DecoderHandler::start().

int PlayListFile::version ( void   )  const [inline]

Version of the parsed pls file.

Returns the version number specified in the version field of the pls file.

Returns:
the version number

Definition at line 74 of file pls.h.

void PlayListFile::add ( PlayListFileEntry e  )  [inline]

Add a entry to the playlist.

Parameters:
e a PlayListFileEntry object

Definition at line 79 of file pls.h.

Referenced by DecoderHandler::createPlaylistForSingleFile(), parseM3U(), and parsePLS().

void PlayListFile::clear ( void   )  [inline]

Clear out all the entries.

Definition at line 82 of file pls.h.

Referenced by DecoderHandler::start(), and ~PlayListFile().

int PlayListFile::parse ( PlayListFile pls,
QTextStream *  stream,
const QString &  extension 
) [static]

Parse a pls or m3u playlist file.

Parameters:
pls the PlaylistFile to add the entries to
stream the playlist file in a QTextStream
extension the file extension of the original playlist file
Returns:
the number of entries parsed

Definition at line 204 of file pls.cpp.

Referenced by DecoderHandler::createPlaylistFromFile(), and DecoderHandler::createPlaylistFromRemoteUrl().

int PlayListFile::parsePLS ( PlayListFile pls,
QTextStream *  stream 
) [static]

Parse a pls file.

Parameters:
pls the PlaylistFile to add the entries to
stream the playlist file in a QTextStream
Returns:
the number of entries parsed

Definition at line 216 of file pls.cpp.

Referenced by parse().

int PlayListFile::parseM3U ( PlayListFile pls,
QTextStream *  stream 
) [static]

Parse a m3u file.

Parameters:
pls the PlaylistFile to add the entries to
stream the playlist file in a QTextStream
Returns:
the number of entries parsed

Definition at line 250 of file pls.cpp.

Referenced by parse().


Member Data Documentation

Definition at line 111 of file pls.h.

Referenced by add(), clear(), get(), and size().

int PlayListFile::m_version [private]

Definition at line 112 of file pls.h.

Referenced by version().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends
Generated on Fri Feb 10 06:42:15 2012 for MythTV by  doxygen 1.6.3