MythTV
master
|
#include <mythbackend/recordingextender.h>
Public Member Functions | |
RecExtEspnDataPage (QObject *parent, QJsonDocument doc) | |
bool | findGameInfo (ActiveGame &game) override |
Parse a previously downloaded data page for a given sport. More... | |
GameState | findGameScore (ActiveGame &game) override |
Parse the previously downloaded data page for a given game. More... | |
Public Member Functions inherited from RecExtDataPage | |
RecExtDataSource * | getSource () |
virtual QDateTime | getNow () |
Get the current time. Overridden by the testing code. More... | |
virtual bool | timeIsClose (const QDateTime &eventStart) |
Base Classes ///. More... | |
QJsonDocument | getDoc () |
Get the JSON document associated with this object. More... | |
RecExtDataPage (QObject *parent, QJsonDocument doc) | |
Create a new RecExtDataPage object. More... | |
Private Types | |
enum | GameStatus : std::uint8_t { TBD = 0, SCHEDULED = 1, INPROGRESS = 2, FINAL = 3, FORFEIT = 4, CANCELLED = 5, POSTPONED = 6, DELAYED = 7, SUSPENDED = 8, FORFEIT_HOME_TEAM = 9, FORFEIT_AWAY_TEAM = 10, RAIN_DELAY = 17, BEGINNING_OF_PERIOD = 21, END_OF_PERIOD = 22, HALFTIME = 23, OVERTIME = 24, FIRST_HALF = 25, SECOND_HALF = 26, ABANDONED = 27, FULL_TIME = 28, RESCHEDULED = 29, START_LIST = 30, INTERMEDIATE = 31, UNOFFICIAL = 32, MEDAL_OFFICIAL = 33, GROUPINGS_OFFICIAL = 34, PLAY_COMPLETE = 35, OFFICIAL_EVENT_SHORTENED = 36, CORRECTED_RESULT = 37, RETIRED = 38, BYE = 39, WALKOVER = 40, ESPNVOID = 41, PRELIMINARY = 42, GOLDEN_TIME = 43, SHOOTOUT = 44, FINAL_SCORE_AFTER_EXTRA_TIME = 45, FINAL_SCORE_AFTER_GOLDEN_GOAL = 46, FINAL_SCORE_AFTER_PENALTIES = 47, END_EXTRA_TIME = 48, EXTRA_TIME_HALF_TIME = 49, FIXTURE_NO_LIVE_COVERAGE = 50, FINAL_SCORE_ABANDONED = 51 } |
Static Private Attributes | |
static const QList< GameStatus > | kFinalStatuses |
A list of the ESPN status that mean the game is over. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from RecExtDataPage | |
static QJsonObject | walkJsonPath (QJsonObject &object, const QStringList &path) |
Iterate through a json object and return the specified object. More... | |
static bool | getJsonInt (const QJsonObject &object, QStringList &path, int &value) |
Retrieve the specified integer from a json object. More... | |
static bool | getJsonInt (const QJsonObject &object, const QString &key, int &value) |
Retrieve the specified integer from a json object. More... | |
static bool | getJsonString (const QJsonObject &object, QStringList &path, QString &value) |
Retrieve the specified string from a json object. More... | |
static bool | getJsonString (const QJsonObject &object, const QString &key, QString &value) |
Retrieve the specified string from a json object. More... | |
static bool | getJsonObject (const QJsonObject &object, QStringList &path, QJsonObject &value) |
Retrieve a specific object from another json object. More... | |
static bool | getJsonObject (const QJsonObject &object, const QString &key, QJsonObject &value) |
Retrieve a specific object from another json object. More... | |
static bool | getJsonArray (const QJsonObject &object, const QString &key, QJsonArray &value) |
Retrieve the specified array from a json object. More... | |
Protected Attributes inherited from RecExtDataPage | |
QJsonDocument | m_doc |
Definition at line 192 of file recordingextender.h.
|
private |
Definition at line 195 of file recordingextender.h.
|
inline |
Definition at line 243 of file recordingextender.h.
|
overridevirtual |
Parse a previously downloaded data page for a given sport.
Find an entry that matches the specified team names, and update the game information with the starting time and a URL for retrieving the score for this game.
game[in,out] | A description of the desired game. The team names must be valid on input. |
Implements RecExtDataPage.
Definition at line 420 of file recordingextender.cpp.
|
overridevirtual |
Parse the previously downloaded data page for a given game.
Find the current state of the game, and the current period. Unfortunately for us the "completed" field on this page can't be used, as it indicates that the final score of the game has gone into the record books. If the game has been suspended/postponed/whatever but not gone the required length of time to be considered "complete", this field remains false.
[in] | game | A description of the desired game. The team names and the URL must be valid on input. |
Implements RecExtDataPage.
Definition at line 516 of file recordingextender.cpp.
|
staticprivate |
A list of the ESPN status that mean the game is over.
Definition at line 240 of file recordingextender.h.
Referenced by findGameScore().