Go to the documentation of this file.
29 #include "libmythbase/mythconfig.h"
31 #include <QScriptEngine>
51 QStringList
GetKeys ( )
override;
54 const QString &HostName )
override;
57 const QString &DirName,
58 const QString &HostName )
override;
61 const QString &DirName,
62 const QString &HostName )
override;
67 bool ShortDate )
override;
69 bool ShortDate )
override;
74 const QString &Application,
77 const QString &Thread,
78 const QString &Filename,
80 const QString &Function,
81 const QDateTime &FromTime,
82 const QDateTime &ToTime,
84 const QString &MsgContains
92 const QString &Default )
override;
98 const QString &Value )
override;
101 const QString &OldPassword,
102 const QString &NewPassword )
override;
105 const QString &UserName,
107 const QString &DBName,
108 int dbPort)
override;
111 const QString &Address,
113 int Timeout)
override;
117 const QString &Message,
118 const QString &Origin,
119 const QString &Description,
120 const QString &
Image,
121 const QString &Extra,
122 const QString &ProgressText,
128 const QString &Address,
129 int udpPort )
override;
150 const QString &UserName,
152 const QString &NewPassword,
153 const QString &AdminPassword )
override;
156 const QString &AdminPassword )
override;
175 class ScriptableMyth :
public QObject
182 QScriptEngine *m_pEngine;
186 Q_INVOKABLE
explicit ScriptableMyth( QScriptEngine *pEngine, QObject *parent =
nullptr )
187 : QObject( parent ), m_pEngine(pEngine)
193 QObject* GetConnectionInfo (
const QString &Pin )
200 QString GetHostName()
207 QStringList GetHosts()
214 QStringList GetKeys()
221 QObject* GetStorageGroupDirs (
const QString &GroupName,
222 const QString &HostName )
229 bool AddStorageGroupDir (
const QString &GroupName,
230 const QString &DirName,
231 const QString &HostName )
238 bool RemoveStorageGroupDir (
const QString &GroupName,
239 const QString &DirName,
240 const QString &HostName )
247 QObject* GetTimeZone()
254 QString GetFormatDate(
const QDateTime& Date,
255 bool ShortDate =
false )
262 QString GetFormatDateTime(
const QDateTime& DateTime,
263 bool ShortDate =
false )
270 QString GetFormatTime(
const QDateTime& Time )
277 QDateTime ParseISODateString(
const QString &DateTime )
284 QObject* GetLogs(
const QString &HostName,
285 const QString &Application,
288 const QString &Thread,
289 const QString &Filename,
291 const QString &Function,
292 const QDateTime &FromTime,
293 const QDateTime &ToTime,
294 const QString &Level,
295 const QString &MsgContains )
298 return m_obj.
GetLogs( HostName, Application,
PID, TID, Thread,
299 Filename, Line, Function, FromTime, ToTime,
300 Level, MsgContains );
304 QObject* GetFrontends(
bool OnLine )
311 QString GetSetting (
const QString &HostName,
313 const QString &Default )
316 return m_obj.
GetSetting( HostName, Key, Default );
320 QObject* GetSettingList (
const QString &HostName )
327 bool PutSetting(
const QString &HostName,
329 const QString &Value )
332 return m_obj.
PutSetting( HostName, Key, Value );
336 bool TestDBSettings(
const QString &HostName,
337 const QString &UserName,
339 const QString &DBName,
349 const QString &Address,
354 return m_obj.
SendMessage( Message, Address, udpPort, Timeout );
358 bool BackupDatabase(
void )
365 bool CheckDatabase(
bool Repair )
372 bool DelayShutdown(
void )
379 bool ProfileSubmit(
void )
386 bool ProfileDelete(
void )
393 QString ProfileURL(
void )
400 QString ProfileUpdated(
void )
407 QString ProfileText(
void )
414 QObject* GetBackendInfo(
void )
420 bool ManageDigestUser(
const QString &
Action,
421 const QString &UserName,
423 const QString &NewPassword,
424 const QString &AdminPassword )
434 bool ManageUrlProtection(
const QString &Services,
435 const QString &AdminPassword )
static StandardSetting * Password(bool enabled)
Setting for changing password.
DTC::BackendInfo * GetBackendInfo(void) override
bool BackupDatabase(void) override
bool DelayShutdown(void) override
DTC::StorageGroupDirList * GetStorageGroupDirs(const QString &GroupName, const QString &HostName) override
bool RemoveStorageGroupDir(const QString &GroupName, const QString &DirName, const QString &HostName) override
QString GetSetting(const QString &HostName, const QString &Key, const QString &Default) override
bool ProfileSubmit(void) override
bool AddStorageGroupDir(const QString &GroupName, const QString &DirName, const QString &HostName) override
QString GetHostName() override
bool SendMessage(const QString &Message, const QString &Address, int udpPort, int Timeout) override
QString GetFormatDate(const QDateTime &Date, bool ShortDate) override
An action (for this plugin) consists of a description, and a set of key sequences.
bool TestDBSettings(const QString &HostName, const QString &UserName, const QString &Password, const QString &DBName, int dbPort) override
DTC::ConnectionInfo * GetConnectionInfo(const QString &Pin) override
DTC::TimeZoneInfo * GetTimeZone() override
static int SendMessage(const MythUtilCommandLineParser &cmdline)
QString GetFormatDateTime(const QDateTime &DateTime, bool ShortDate) override
QString ProfileUpdated(void) override
bool ProfileDelete(void) override
#define Q_SCRIPT_DECLARE_QMETAOBJECT_MYTHTV(T, _Arg1)
bool PutSetting(const QString &HostName, const QString &Key, const QString &Value) override
Contains Packet Identifier numeric values.
bool SendNotification(bool Error, const QString &Type, const QString &Message, const QString &Origin, const QString &Description, const QString &Image, const QString &Extra, const QString &ProgressText, float Progress, int Duration, bool Fullscreen, uint Visibility, uint Priority, const QString &Address, int udpPort) override
#define SCRIPT_CATCH_EXCEPTION(default, code)
QStringList GetKeys() override
bool CheckDatabase(bool Repair) override
bool ManageDigestUser(const QString &Action, const QString &UserName, const QString &Password, const QString &NewPassword, const QString &AdminPassword) override
DTC::LogMessageList * GetLogs(const QString &HostName, const QString &Application, int PID, int TID, const QString &Thread, const QString &Filename, int Line, const QString &Function, const QDateTime &FromTime, const QDateTime &ToTime, const QString &Level, const QString &MsgContains) override
Q_INVOKABLE Myth(QObject *parent=nullptr)
QDateTime ParseISODateString(const QString &DateTime) override
DTC::SettingList * GetSettingList(const QString &HostName) override
bool ChangePassword(const QString &UserName, const QString &OldPassword, const QString &NewPassword) override
QStringList GetHosts() override
bool ManageUrlProtection(const QString &Services, const QString &AdminPassword) override
QString ProfileText(void) override
QString ProfileURL(void) override
QString GetFormatTime(const QDateTime &Time) override
DTC::FrontendList * GetFrontends(bool OnLine) override