Main Page   Namespace List   Alphabetical List   Compound List   File List   Compound Members   File Members  

EmpParser Class Reference

class to parse an emp file More...

#include <EmpParser.h>

List of all members.

Public Member Functions

bool parse_file (const char *emp_file, RmpSession &sess, TrackList &tracks)
 parse the file & fill in the session/track info


Private Member Functions

bool get_session_info (xmlpp::Node *root, RmpSession &sess)
 extract all the session related info from the xml document

bool get_track_info (xmlpp::Node *root, const RmpSession &sess, TrackList &tracks)
 exvtract all the tracks from the document

std::string build_track_url (const RmpSession &sess, const RmpTrack &track)
 build a complete url from the session info & track details


Detailed Description

class to parse an emp file

Definition at line 31 of file EmpParser.h.


Member Function Documentation

string EmpParser::build_track_url const RmpSession   sess,
const RmpTrack   track
[private]
 

build a complete url from the session info & track details

Parameters:
sess session info
track track information
Returns:
the fully qualified url

Definition at line 152 of file EmpParser.cpp.

References RmpSession::base_url, RmpTrack::file_name, RmpSession::location_template, replace_str(), and RmpTrack::track_id.

Referenced by get_track_info().

bool EmpParser::get_session_info xmlpp::Node *    root,
RmpSession   sess
[private]
 

extract all the session related info from the xml document

Parameters:
root the root of the document
sess the extracted session information
Returns:
true on success

Definition at line 76 of file EmpParser.cpp.

References RmpSession::base_url, getChildContent(), getFirstChild(), RmpSession::location_template, RmpSession::package_title, and RmpSession::provider.

Referenced by parse_file().

bool EmpParser::get_track_info xmlpp::Node *    root,
const RmpSession   sess,
TrackList   tracks
[private]
 

exvtract all the tracks from the document

Parameters:
root the root of teh emp document
sess the session information for this document
tracks the list of extracted tracks
Returns:
true on success

< a - artist

< a - artist

< n - track number

< f - file name

< d - id of the current track

< g - genre

< F - format

< q - quality

< c - album art (cover picture) url

< D - the duration in seconds

< C - the number of channels

Definition at line 112 of file EmpParser.cpp.

References RmpTrack::artist, build_track_url(), RmpTrack::channels, RmpTrack::cover, RmpTrack::duration, RmpTrack::file_name, RmpTrack::format, RmpTrack::genre, getChildContent(), getFirstChild(), RmpTrack::quality, RmpTrack::title, RmpTrack::track_id, RmpTrack::track_num, and RmpTrack::url.

Referenced by parse_file().

bool EmpParser::parse_file const char *    emp_file,
RmpSession   sess,
TrackList   tracks
 

parse the file & fill in the session/track info

Parameters:
emp_file the file to parse
sess the extracted session information
tracks the extracted track information
Returns:
true on success

Definition at line 47 of file EmpParser.cpp.

References get_session_info(), get_track_info(), and RmpSession::package_artist.

Referenced by PlayListConverter::parse_rmp().


The documentation for this class was generated from the following files:
Generated on Sat May 3 09:16:16 2003 for empxform by doxygen1.3-rc3