RingTone::RtttlParser Class Reference

Class to parse RTTTL files RTTTL (RingTone Text Transfer Language) format. More...

#include <RtttlParser.h>

Inheritance diagram for RingTone::RtttlParser:
Collaboration diagram for RingTone::RtttlParser:

Public Member Functions

bool begin (IDataSourceStream *source)
 Initialise the parser with the given stream. More...
 
void end ()
 Release the source stream. More...
 
bool nextTune ()
 Locate next tune and read header. More...
 
bool seekTune (unsigned index)
 Find a tune by index, starting at #0. More...
 
unsigned getIndex ()
 Get the current tune index. More...
 
unsigned getCount ()
 Get the number of tunes in this file. More...
 
const StringgetTitle ()
 Get the current tune title. More...
 
String getCaption ()
 Get a display caption for the current tune. More...
 
bool rewind ()
 Rewind to start of tune. More...
 
bool readNextNote (RingTone::NoteDef &note)
 Fetch the next note for this tune. More...
 
const RtttlHeadergetHeader ()
 
RtttlParserState getState ()
 
void setState (const RtttlParserState &state)
 
- Public Member Functions inherited from RingTone::Parser
virtual ~Parser ()
 

Detailed Description

Class to parse RTTTL files RTTTL (RingTone Text Transfer Language) format.

See also
See https://en.wikipedia.org/wiki/Ring_Tone_Transfer_Language

Member Function Documentation

◆ begin()

bool RingTone::RtttlParser::begin ( IDataSourceStream source)

Initialise the parser with the given stream.

◆ end()

void RingTone::RtttlParser::end ( )

Release the source stream.

◆ getCaption()

String RingTone::RtttlParser::getCaption ( )
inline

Get a display caption for the current tune.

◆ getCount()

unsigned RingTone::RtttlParser::getCount ( )

Get the number of tunes in this file.

◆ getHeader()

const RtttlHeader& RingTone::RtttlParser::getHeader ( )
inline

◆ getIndex()

unsigned RingTone::RtttlParser::getIndex ( )
inline

Get the current tune index.

◆ getState()

RtttlParserState RingTone::RtttlParser::getState ( )
inline

◆ getTitle()

const String& RingTone::RtttlParser::getTitle ( )
inline

Get the current tune title.

◆ nextTune()

bool RingTone::RtttlParser::nextTune ( )

Locate next tune and read header.

◆ readNextNote()

bool RingTone::RtttlParser::readNextNote ( RingTone::NoteDef note)
virtual

Fetch the next note for this tune.

Parameters
note
Return values
booltrue on success, false if no more notes available

Implements RingTone::Parser.

◆ rewind()

bool RingTone::RtttlParser::rewind ( )
inline

Rewind to start of tune.

◆ seekTune()

bool RingTone::RtttlParser::seekTune ( unsigned  index)

Find a tune by index, starting at #0.

◆ setState()

void RingTone::RtttlParser::setState ( const RtttlParserState state)
inline

The documentation for this class was generated from the following file: