#include <streamripper_base.h>
Public Slots | |
void | abortStreamripper () |
virtual void | startStreamripper () |
Signals | |
void | indexChanged (void *newIndex) |
Public Member Functions | |
streamripper_base (QObject *parent=0) | |
streamripper_base (QObject *parent, void *index) | |
virtual | ~streamripper_base () |
virtual void * | index () const |
virtual void | setIndex (void *index) |
Protected Member Functions | |
virtual QStringList | parameterList () const =0 |
virtual QString | streamripperCommand () const =0 |
Properties | |
void | index |
Private Attributes | |
void * | internal_index |
It provides only some minimalistic infrastructure. To do so, it inherits from console_reader.
Furthermore it implements the property index and the functions kill() and waitForFinished().
Definition at line 32 of file streamripper_base.h.
streamripper_base::streamripper_base | ( | QObject * | parent = 0 |
) |
Constructor of the class.
parent | Sets the parent of this object. |
Definition at line 24 of file streamripper_base.cpp.
References internal_index.
streamripper_base::streamripper_base | ( | QObject * | parent, | |
void * | index | |||
) |
Conveniance constructor of the class.
parent | Sets the parent of this object. | |
index | Initializes the property index. |
Definition at line 29 of file streamripper_base.cpp.
References setIndex().
streamripper_base::~streamripper_base | ( | ) | [virtual] |
The destructor.
Definition at line 39 of file streamripper_base.cpp.
void streamripper_base::abortStreamripper | ( | ) | [slot] |
Calls m_process
.kill()
and m_process
.waitForFinished()
. This takes usually only some milliseconds, but sometimes up to 20 sec.
Definition at line 67 of file streamripper_base.cpp.
References console_reader::m_process.
Referenced by settings_stream_widget_connection::helper_disconnect_m_process_and_kill(), get_streamripper_version::interpretate_console_output(), get_stream_info::setServerUri(), and get_streamripper_version::setStreamripperCommand().
virtual void* streamripper_base::index | ( | ) | const [virtual] |
See property index.
Referenced by ripping::emit_metaInterval_milliSecondsChanged(), radioStation::helper_write_properties_from_file_to_class_ripping(), ripping::refreshRelayPort(), ripping::setBitrate(), ripping::setDataSize(), ripping::setError(), ripping::setMetaInterval(), ripping::setServerName(), ripping::setSong(), ripping::setStatus(), and ripping::setStreamName().
void streamripper_base::indexChanged | ( | void * | newIndex | ) | [signal] |
virtual QStringList streamripper_base::parameterList | ( | ) | const [protected, pure virtual] |
This abstract function is called by startStreamripper() to determinate the parameters with which streamripper will be called.
QStringList
with the parameters. Implemented in get_stream_info, get_streamripper_version, radioStation, and ripping.
Referenced by startStreamripper().
void streamripper_base::setIndex | ( | void * | index | ) | [virtual] |
See property index.
Definition at line 48 of file streamripper_base.cpp.
References indexChanged(), and internal_index.
Referenced by stationlistModel::helper_createStreamItem(), radioStation::radioStation(), and streamripper_base().
void streamripper_base::startStreamripper | ( | ) | [virtual, slot] |
This slot starts a streamripper instance using m_process. It doesn't care about if m_process is yet running or not.
Uses:
streamripperCommand()
as command QStringList parameterList() const
as list of parameters Reimplemented in ripping.
Definition at line 56 of file streamripper_base.cpp.
References console_reader::m_process, parameterList(), and streamripperCommand().
Referenced by get_streamripper_version::setStreamripperCommand().
virtual QString streamripper_base::streamripperCommand | ( | ) | const [protected, pure virtual] |
This abstract function is called by startStreamripper() to determinate the command which is used to start streamripper.
QString
containing the command. Implemented in get_streamripper_version, and ripping.
Referenced by startStreamripper().
void* streamripper_base::internal_index [private] |
Used internally to store the property index.
Definition at line 97 of file streamripper_base.h.
Referenced by setIndex(), and streamripper_base().
void * streamripper_base::index [read, write] |
This property has no function in this class. You can use it for whatever purpose you want. It's default value is 0.
This property is quite useful when you have many objects of a child class of this class and you want to identify the sender of a signal - just emit index as parameter of the signal.
virtual qlonglong index() const
virtual void setIndex(const qlonglong value)
indexChanged(qlonglong newIndex)
qlonglong internal_index
Definition at line 48 of file streamripper_base.h.