MythTV  master
Public Member Functions | Private Attributes | List of all members
ActiveGame Class Reference

#include <mythbackend/recordingextender.h>

Collaboration diagram for ActiveGame:
[legend]

Public Member Functions

 ActiveGame (int recordedid, QString title)
 
 ActiveGame (int recordedid, QString title, SportInfo info)
 
int getRecordedId () const
 
QString getTitle () const
 
SportInfo getInfo () const
 
QString getTeam1 () const
 
QString getTeam2 () const
 
QString getTeam1Norm () const
 
QString getTeam2Norm () const
 
QString getAbbrev1 () const
 
QString getAbbrev2 () const
 
QUrl getInfoUrl () const
 
QUrl getGameUrl () const
 
QDateTime getStartTime () const
 
QString getStartTimeAsString () const
 
void setInfo (const SportInfo &info)
 
void setTeams (QString team1, QString team2)
 
void setTeamsNorm (QString team1, QString team2)
 
void setAbbrev1 (const QString &abbrev)
 
void setAbbrev2 (const QString &abbrev)
 
void setAbbrevs (QStringList abbrevs)
 
void setInfoUrl (QUrl url)
 Set the game scheduling information URL. More...
 
void setGameUrl (QUrl url)
 Set the game status information URL. More...
 
void setStartTime (const QDateTime &time)
 
bool isValid () const
 
bool teamsMatch (const QStringList &names, const QStringList &abbrevs) const
 Do the supplied team names/abbrevs match this game. More...
 

Private Attributes

int m_recordedid {0}
 
QString m_title
 
SportInfo m_info
 
QString m_team1
 
QString m_team2
 
QString m_team1Normalized
 
QString m_team2Normalized
 
QString m_abbrev1
 
QString m_abbrev2
 
QUrl m_infoUrl
 
QUrl m_gameUrl
 
QDateTime m_startTime
 

Detailed Description

Definition at line 49 of file recordingextender.h.

Constructor & Destructor Documentation

◆ ActiveGame() [1/2]

ActiveGame::ActiveGame ( int  recordedid,
QString  title 
)
inline

Definition at line 52 of file recordingextender.h.

◆ ActiveGame() [2/2]

ActiveGame::ActiveGame ( int  recordedid,
QString  title,
SportInfo  info 
)
inline

Definition at line 54 of file recordingextender.h.

Member Function Documentation

◆ getRecordedId()

int ActiveGame::getRecordedId ( ) const
inline

Definition at line 57 of file recordingextender.h.

Referenced by RecordingExtender::processActiveRecordings().

◆ getTitle()

QString ActiveGame::getTitle ( ) const
inline

◆ getInfo()

SportInfo ActiveGame::getInfo ( ) const
inline

◆ getTeam1()

QString ActiveGame::getTeam1 ( ) const
inline

◆ getTeam2()

QString ActiveGame::getTeam2 ( ) const
inline

◆ getTeam1Norm()

QString ActiveGame::getTeam1Norm ( ) const
inline

Definition at line 62 of file recordingextender.h.

◆ getTeam2Norm()

QString ActiveGame::getTeam2Norm ( ) const
inline

Definition at line 63 of file recordingextender.h.

◆ getAbbrev1()

QString ActiveGame::getAbbrev1 ( ) const
inline

◆ getAbbrev2()

QString ActiveGame::getAbbrev2 ( ) const
inline

◆ getInfoUrl()

QUrl ActiveGame::getInfoUrl ( ) const
inline

◆ getGameUrl()

QUrl ActiveGame::getGameUrl ( ) const
inline

◆ getStartTime()

QDateTime ActiveGame::getStartTime ( ) const
inline

Definition at line 68 of file recordingextender.h.

Referenced by RecExtMlbDataPage::findGameInfo().

◆ getStartTimeAsString()

QString ActiveGame::getStartTimeAsString ( ) const
inline

◆ setInfo()

void ActiveGame::setInfo ( const SportInfo info)
inline

Definition at line 72 of file recordingextender.h.

Referenced by RecordingExtender::processNewRecordings().

◆ setTeams()

void ActiveGame::setTeams ( QString  team1,
QString  team2 
)
inline

Definition at line 73 of file recordingextender.h.

Referenced by RecordingExtender::processNewRecordings().

◆ setTeamsNorm()

void ActiveGame::setTeamsNorm ( QString  team1,
QString  team2 
)
inline

Definition at line 75 of file recordingextender.h.

Referenced by RecordingExtender::processNewRecordings().

◆ setAbbrev1()

void ActiveGame::setAbbrev1 ( const QString &  abbrev)
inline

Definition at line 77 of file recordingextender.h.

◆ setAbbrev2()

void ActiveGame::setAbbrev2 ( const QString &  abbrev)
inline

Definition at line 78 of file recordingextender.h.

◆ setAbbrevs()

void ActiveGame::setAbbrevs ( QStringList  abbrevs)
inline

◆ setInfoUrl()

void ActiveGame::setInfoUrl ( QUrl  url)

Set the game scheduling information URL.

The schedule pages contain the team names, starting time, and game ID (which can be use to create the game status link.)

Parameters
[in]namesThe new URL.

Definition at line 73 of file recordingextender.cpp.

Referenced by RecExtEspnDataSource::findInfoUrl(), and RecExtMlbDataSource::findInfoUrl().

◆ setGameUrl()

void ActiveGame::setGameUrl ( QUrl  url)

Set the game status information URL.

The game status page provides the current games state/statistics, which can be used to tell when the game has finished.

Parameters
[in]namesThe new URL.

Definition at line 85 of file recordingextender.cpp.

Referenced by RecExtEspnDataPage::findGameInfo(), and RecExtMlbDataPage::parseGameObject().

◆ setStartTime()

void ActiveGame::setStartTime ( const QDateTime &  time)
inline

◆ isValid()

bool ActiveGame::isValid ( ) const
inline

Definition at line 85 of file recordingextender.h.

◆ teamsMatch()

bool ActiveGame::teamsMatch ( const QStringList &  names,
const QStringList &  abbrevs 
) const

Do the supplied team names/abbrevs match this game.

First try an exact match of names, and then look for whether the class variable names contain the argument names or vice versa. (I.E. TV listing says 'Chorrera' but ESPN has 'Independiente de la Chorrera'.) Lastly compare the abbreviations.

Parameters
[in]namesThe names of the two teams.
[in]abbrevsThe abbreviations of the two teams.
Returns
whether or not a match was found.

Definition at line 101 of file recordingextender.cpp.

Referenced by RecExtEspnDataPage::findGameInfo(), and RecExtMlbDataPage::parseGameObject().

Member Data Documentation

◆ m_recordedid

int ActiveGame::m_recordedid {0}
private

Definition at line 94 of file recordingextender.h.

Referenced by getRecordedId().

◆ m_title

QString ActiveGame::m_title
private

Definition at line 95 of file recordingextender.h.

Referenced by getTitle().

◆ m_info

SportInfo ActiveGame::m_info
private

Definition at line 96 of file recordingextender.h.

Referenced by getInfo(), and setInfo().

◆ m_team1

QString ActiveGame::m_team1
private

Definition at line 98 of file recordingextender.h.

Referenced by getTeam1(), isValid(), setTeams(), and teamsMatch().

◆ m_team2

QString ActiveGame::m_team2
private

Definition at line 99 of file recordingextender.h.

Referenced by getTeam2(), isValid(), setTeams(), and teamsMatch().

◆ m_team1Normalized

QString ActiveGame::m_team1Normalized
private

Definition at line 100 of file recordingextender.h.

Referenced by getTeam1Norm(), setTeamsNorm(), and teamsMatch().

◆ m_team2Normalized

QString ActiveGame::m_team2Normalized
private

Definition at line 101 of file recordingextender.h.

Referenced by getTeam2Norm(), setTeamsNorm(), and teamsMatch().

◆ m_abbrev1

QString ActiveGame::m_abbrev1
private

Definition at line 102 of file recordingextender.h.

Referenced by getAbbrev1(), setAbbrev1(), and setAbbrevs().

◆ m_abbrev2

QString ActiveGame::m_abbrev2
private

Definition at line 103 of file recordingextender.h.

Referenced by getAbbrev2(), setAbbrev2(), and setAbbrevs().

◆ m_infoUrl

QUrl ActiveGame::m_infoUrl
private

Definition at line 104 of file recordingextender.h.

Referenced by getInfoUrl(), isValid(), and setInfoUrl().

◆ m_gameUrl

QUrl ActiveGame::m_gameUrl
private

Definition at line 105 of file recordingextender.h.

Referenced by getGameUrl(), and setGameUrl().

◆ m_startTime

QDateTime ActiveGame::m_startTime
private

Definition at line 106 of file recordingextender.h.

Referenced by getStartTime(), getStartTimeAsString(), isValid(), and setStartTime().


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