MythTV  master
Functions
remoteutil.cpp File Reference
#include "remoteutil.h"
#include <unistd.h>
#include <QFileInfo>
#include <QFile>
#include <QDir>
#include <QList>
#include "libmythbase/compat.h"
#include "libmythbase/mythcorecontext.h"
#include "libmythbase/mythevent.h"
#include "libmythbase/mythlogging.h"
#include "libmythbase/mythsocket.h"
#include "libmythbase/storagegroup.h"
#include "programinfo.h"
Include dependency graph for remoteutil.cpp:

Go to the source code of this file.

Functions

std::vector< ProgramInfo * > * RemoteGetRecordedList (int sort)
 
bool RemoteGetLoad (system_load_array &load)
 
bool RemoteGetUptime (std::chrono::seconds &uptime)
 
bool RemoteGetMemStats (int &totalMB, int &freeMB, int &totalVM, int &freeVM)
 
bool RemoteCheckFile (ProgramInfo *pginfo, bool checkSlaves)
 
bool RemoteDeleteRecording (uint recordingID, bool forceMetadataDelete, bool forgetHistory)
 
bool RemoteUndeleteRecording (uint recordingID)
 
void RemoteGetAllScheduledRecordings (std::vector< ProgramInfo * > &scheduledlist)
 
void RemoteGetAllExpiringRecordings (std::vector< ProgramInfo * > &expiringlist)
 
uint RemoteGetRecordingList (std::vector< ProgramInfo * > &reclist, QStringList &strList)
 
std::vector< ProgramInfo * > * RemoteGetConflictList (const ProgramInfo *pginfo)
 
QDateTime RemoteGetPreviewLastModified (const ProgramInfo *pginfo)
 
QDateTime RemoteGetPreviewIfModified (const ProgramInfo &pginfo, const QString &cachefile)
 Download preview & get timestamp if newer than cachefile's last modified time, otherwise just get the timestamp. More...
 
bool RemoteFillProgramInfo (ProgramInfo &pginfo, const QString &playbackhost)
 
QStringList RemoteRecordings (void)
 
int RemoteGetRecordingMask (void)
 
bool RemoteGetFileList (const QString &host, const QString &path, QStringList *list, QString sgroup, bool fileNamesOnly)
 
int RemoteCheckForRecording (const ProgramInfo *pginfo)
 Get recorder for a programme. More...
 
int RemoteGetRecordingStatus (const ProgramInfo *pginfo, int overrecsecs, int underrecsecs)
 Get status of an individual programme (with pre-post roll?). More...
 
std::vector< ProgramInfo * > * RemoteGetCurrentlyRecordingList (void)
 return list of currently recording shows More...
 
bool RemoteGetActiveBackends (QStringList *list)
 return list of backends currently connected to the master More...
 
static QString downloadRemoteFile (const QString &cmd, const QString &url, const QString &storageGroup, const QString &filename)
 
QString RemoteDownloadFile (const QString &url, const QString &storageGroup, const QString &filename)
 
QString RemoteDownloadFileNow (const QString &url, const QString &storageGroup, const QString &filename)
 

Function Documentation

◆ RemoteGetRecordedList()

std::vector<ProgramInfo *>* RemoteGetRecordedList ( int  sort)

◆ RemoteGetLoad()

bool RemoteGetLoad ( system_load_array load)

Definition at line 42 of file remoteutil.cpp.

Referenced by StatusBox::doMachineStatus().

◆ RemoteGetUptime()

bool RemoteGetUptime ( std::chrono::seconds &  uptime)

Definition at line 57 of file remoteutil.cpp.

Referenced by StatusBox::doMachineStatus().

◆ RemoteGetMemStats()

bool RemoteGetMemStats ( int &  totalMB,
int &  freeMB,
int &  totalVM,
int &  freeVM 
)

Definition at line 77 of file remoteutil.cpp.

Referenced by StatusBox::doMachineStatus().

◆ RemoteCheckFile()

bool RemoteCheckFile ( ProgramInfo pginfo,
bool  checkSlaves 
)

Definition at line 93 of file remoteutil.cpp.

Referenced by ProgramInfo::GetPlaybackURL(), and ProgramInfo::IsFileReadable().

◆ RemoteDeleteRecording()

bool RemoteDeleteRecording ( uint  recordingID,
bool  forceMetadataDelete,
bool  forgetHistory 
)

Definition at line 113 of file remoteutil.cpp.

Referenced by StatusBox::customEvent(), and PBHEventHandler::event().

◆ RemoteUndeleteRecording()

bool RemoteUndeleteRecording ( uint  recordingID)

Definition at line 142 of file remoteutil.cpp.

Referenced by StatusBox::customEvent(), and PBHEventHandler::event().

◆ RemoteGetAllScheduledRecordings()

void RemoteGetAllScheduledRecordings ( std::vector< ProgramInfo * > &  scheduledlist)

◆ RemoteGetAllExpiringRecordings()

void RemoteGetAllExpiringRecordings ( std::vector< ProgramInfo * > &  expiringlist)

Definition at line 171 of file remoteutil.cpp.

Referenced by StatusBox::doAutoExpireList().

◆ RemoteGetRecordingList()

uint RemoteGetRecordingList ( std::vector< ProgramInfo * > &  reclist,
QStringList &  strList 
)

◆ RemoteGetConflictList()

std::vector<ProgramInfo *>* RemoteGetConflictList ( const ProgramInfo pginfo)

Definition at line 205 of file remoteutil.cpp.

Referenced by ScheduleCommon::EditRecording().

◆ RemoteGetPreviewLastModified()

QDateTime RemoteGetPreviewLastModified ( const ProgramInfo pginfo)

Definition at line 217 of file remoteutil.cpp.

◆ RemoteGetPreviewIfModified()

QDateTime RemoteGetPreviewIfModified ( const ProgramInfo pginfo,
const QString &  cachefile 
)

Download preview & get timestamp if newer than cachefile's last modified time, otherwise just get the timestamp.

Definition at line 236 of file remoteutil.cpp.

Referenced by PreviewGeneratorQueue::GeneratePreviewImage().

◆ RemoteFillProgramInfo()

bool RemoteFillProgramInfo ( ProgramInfo pginfo,
const QString &  playbackhost 
)

Definition at line 359 of file remoteutil.cpp.

◆ RemoteRecordings()

QStringList RemoteRecordings ( void  )

Definition at line 378 of file remoteutil.cpp.

◆ RemoteGetRecordingMask()

int RemoteGetRecordingMask ( void  )

Definition at line 392 of file remoteutil.cpp.

Referenced by main(), and reloadTheme().

◆ RemoteGetFileList()

bool RemoteGetFileList ( const QString &  host,
const QString &  path,
QStringList *  list,
QString  sgroup,
bool  fileNamesOnly 
)

Definition at line 429 of file remoteutil.cpp.

Referenced by VideoDialog::GetCoverImage().

◆ RemoteCheckForRecording()

int RemoteCheckForRecording ( const ProgramInfo pginfo)

Get recorder for a programme.

Returns
recordernum if pginfo recording in progress, else 0

Definition at line 482 of file remoteutil.cpp.

Referenced by RemoteGetRecordingStatus().

◆ RemoteGetRecordingStatus()

int RemoteGetRecordingStatus ( const ProgramInfo pginfo,
int  overrecsecs,
int  underrecsecs 
)

Get status of an individual programme (with pre-post roll?).

Return values
0Not Recording
1Recording
2Under-Record
3Over-Record

Definition at line 501 of file remoteutil.cpp.

Referenced by StartPrompter::backendRunningPrompt(), isRecording(), WelcomeDialog::updateRecordingList(), LCDProcClient::updateRecordingList(), and IdleScreen::UpdateStatus().

◆ RemoteGetCurrentlyRecordingList()

std::vector<ProgramInfo *>* RemoteGetCurrentlyRecordingList ( void  )

return list of currently recording shows

Definition at line 531 of file remoteutil.cpp.

◆ RemoteGetActiveBackends()

bool RemoteGetActiveBackends ( QStringList *  list)

return list of backends currently connected to the master

Definition at line 572 of file remoteutil.cpp.

Referenced by VideoScanner::doScan(), and MetadataFactory::VideoScan().

◆ downloadRemoteFile()

static QString downloadRemoteFile ( const QString &  cmd,
const QString &  url,
const QString &  storageGroup,
const QString &  filename 
)
static

Definition at line 584 of file remoteutil.cpp.

Referenced by RemoteDownloadFile(), and RemoteDownloadFileNow().

◆ RemoteDownloadFile()

QString RemoteDownloadFile ( const QString &  url,
const QString &  storageGroup,
const QString &  filename 
)

◆ RemoteDownloadFileNow()

QString RemoteDownloadFileNow ( const QString &  url,
const QString &  storageGroup,
const QString &  filename 
)

Definition at line 612 of file remoteutil.cpp.