#include <PlayListConverter.h>
Collaboration diagram for PlayListConverter:
Public Types | |
typedef std::list< FormatDesc > | FormatDescList |
Public Member Functions | |
PlayListConverter () | |
bool | load_config () |
load the config file | |
void | set_options (const Options &options) |
set the ooutput options | |
bool | process_rmp (const char *rmp_file) |
process the rmp file useing the current list of formats & options | |
Static Public Member Functions | |
int | get_formats (FormatDescList &formats) |
return a list of available formats & their descriptions | |
Private Member Functions | |
bool | parse_rmp (const char *filename) |
parse the emp file | |
bool | write_output (OutputFormat &format) |
generate the output file for the current format | |
bool | exec_output (const OutputFormat &format, bool wait) |
execute the action (if any) for this format | |
bool | process_format (const std::string &format_name) |
generate output for & exec a single format | |
bool | load_format (const char *format_name, OutputFormat &format) |
load the specified format | |
void | add_format_line (std::string &entry, const std::string newline) |
append a new line to a config entry | |
std::string | copy_format_name (std::string format) |
copy the format name into the local options | |
std::string | make_subs (const std::string &templ, const RmpSession &session, const RmpTrack &trk) |
given a template & info on the current session/track make all the special char substitutions | |
void | insert_subst (std::string &to_change, size_t &pos, const std::string &toinsert) |
fucntion to make a single escape char substitution | |
bool | is_command_modifier (char c) |
check if a character is a command modifier | |
void | change_working_dir () |
change to the working directory | |
void | open_output (std::ofstream &os) |
open the output stream, creating new directories as necessary | |
Static Private Member Functions | |
bool | get_config_file (std::string &filename) |
find the correct config file & return true on success | |
Private Attributes | |
TrackList | m_tracks |
the parsed list if tracks | |
RmpSession | m_session |
the parsed session info | |
Options | m_options |
the current set of options | |
xmlpp::DomParser | m_config |
A DOM tree containing the XML config file. |
Definition at line 36 of file PlayListConverter.h.
|
Definition at line 68 of file PlayListConverter.h. Referenced by list_formats(). |
|
Definition at line 40 of file PlayListConverter.cpp. |
|
append a new line to a config entry
Definition at line 230 of file PlayListConverter.cpp. Referenced by load_format(). |
|
change to the working directory
Definition at line 370 of file PlayListConverter.cpp. References expand_tilde(), m_options, make_dir(), and PlayListConverter::Options::workingdir. Referenced by process_rmp(), and set_options(). |
|
copy the format name into the local options if the fomrmat name begins with '<' its treated as the body of a elment and added to the parsed config file.
Definition at line 439 of file PlayListConverter.cpp. References addChild(), and m_config. |
|
execute the action (if any) for this format
Definition at line 162 of file PlayListConverter.cpp. References PlayListConverter::OutputFormat::exec. Referenced by process_format(). |
|
find the correct config file & return true on success
Definition at line 202 of file PlayListConverter.cpp. References expand_tilde(). Referenced by get_formats(), and load_config(). |
|
return a list of available formats & their descriptions
Definition at line 574 of file PlayListConverter.cpp. References PlayListConverter::FormatDesc::desc, get_config_file(), getChildContent(), getPropValue(), and PlayListConverter::FormatDesc::name. Referenced by list_formats(). |
|
fucntion to make a single escape char substitution
Definition at line 328 of file PlayListConverter.cpp. References escape_shell_chars(), is_command_modifier(), remove_shell_chars(), and replace_str(). Referenced by make_subs(). |
|
check if a character is a command modifier
Definition at line 392 of file PlayListConverter.cpp. Referenced by insert_subst(), and make_subs(). |
|
load the config file
Definition at line 52 of file PlayListConverter.cpp. References expand_tilde(), PlayListConverter::Options::formats, get_config_file(), getFirstChild(), getPropValue(), m_config, m_options, and PlayListConverter::Options::workingdir. Referenced by main(). |
|
load the specified format
Definition at line 509 of file PlayListConverter.cpp. References add_format_line(), PlayListConverter::OutputFormat::begin, PlayListConverter::OutputFormat::chained_formats, PlayListConverter::OutputFormat::clear(), PlayListConverter::OutputFormat::end, PlayListConverter::OutputFormat::exec, expand_tilde(), PlayListConverter::OutputFormat::filename, getChildContent(), getPropValue(), m_config, and PlayListConverter::OutputFormat::track. Referenced by process_format(). |
|
given a template & info on the current session/track make all the special char substitutions
Definition at line 244 of file PlayListConverter.cpp. References RmpTrack::artist, RmpTrack::channels, RmpTrack::cover, RmpTrack::duration, RmpSession::emp_file, RmpTrack::file_name, RmpTrack::format, RmpTrack::genre, insert_subst(), is_command_modifier(), m_options, m_session, RmpSession::output_file, RmpSession::package_artist, RmpSession::package_title, RmpSession::provider, RmpTrack::quality, RmpTrack::title, RmpTrack::track_id, RmpTrack::track_num, RmpTrack::url, and PlayListConverter::Options::workingdir. Referenced by write_output(). |
|
open the output stream, creating new directories as necessary
Definition at line 604 of file PlayListConverter.cpp. References m_session, make_dir(), and RmpSession::output_file. Referenced by write_output(). |
|
parse the emp file
Definition at line 95 of file PlayListConverter.cpp. References RmpSession::emp_file, m_session, and EmpParser::parse_file(). Referenced by process_rmp(). |
|
generate output for & exec a single format
Definition at line 494 of file PlayListConverter.cpp. References exec_output(), load_format(), m_options, PlayListConverter::Options::wait_for_child, and write_output(). Referenced by process_rmp(), and write_output(). |
|
process the rmp file useing the current list of formats & options
Definition at line 474 of file PlayListConverter.cpp. References change_working_dir(), PlayListConverter::Options::formats, m_options, parse_rmp(), and process_format(). Referenced by main(). |
|
set the ooutput options if the list of formats is empty the default set will we used
Definition at line 411 of file PlayListConverter.cpp. References change_working_dir(), PlayListConverter::Options::formats, m_options, PlayListConverter::Options::wait_for_child, and PlayListConverter::Options::workingdir. Referenced by main(). |
|
generate the output file for the current format
Definition at line 103 of file PlayListConverter.cpp. References PlayListConverter::OutputFormat::begin, PlayListConverter::OutputFormat::chained_formats, PlayListConverter::OutputFormat::end, PlayListConverter::OutputFormat::exec, PlayListConverter::OutputFormat::filename, m_session, m_tracks, make_subs(), open_output(), RmpSession::output_file, process_format(), and PlayListConverter::OutputFormat::track. Referenced by process_format(). |
|
A DOM tree containing the XML config file.
Definition at line 90 of file PlayListConverter.h. Referenced by copy_format_name(), load_config(), and load_format(). |
|
the current set of options
Definition at line 89 of file PlayListConverter.h. Referenced by change_working_dir(), load_config(), make_subs(), process_format(), process_rmp(), and set_options(). |
|
the parsed session info
Definition at line 88 of file PlayListConverter.h. Referenced by make_subs(), open_output(), parse_rmp(), and write_output(). |
|
the parsed list if tracks
Definition at line 87 of file PlayListConverter.h. Referenced by write_output(). |