Permalink
Browse files

Add general methods for emitting and retrieving TV playback status vi…

…a Qt signals.

Those methods will be used in order to retrieve TV playback status in a synchronous fashion by AirPlay.
Ultimately, all current status events should have their signals equivalent

Make distclean && configure is required
  • Loading branch information...
jyavenard committed Jul 14, 2012
1 parent 248947a commit 1216d2a02df2389e5d8bc0034c461bb69c4e6a32
Showing with 19 additions and 2 deletions.
  1. +19 −2 mythtv/libs/libmythbase/mythcorecontext.h
@@ -45,8 +45,9 @@ class MythScheduler;
* It also contains support for database error printing, and
* database message logging.
*/
-class MBASE_PUBLIC MythCoreContext : public MythObservable, public MythSocketCBs
+class MBASE_PUBLIC MythCoreContext : public QObject, public MythObservable, public MythSocketCBs
{
+ Q_OBJECT
public:
MythCoreContext(const QString &binversion, QObject *eventHandler);
virtual ~MythCoreContext();
@@ -167,7 +168,23 @@ class MBASE_PUBLIC MythCoreContext : public MythObservable, public MythSocketCBs
QString GetLanguage(void);
QString GetLanguageAndVariant(void);
void ResetLanguage(void);
-
+
+ // signal related methods
+ void emitTVPlaybackStarted(void) { emit TVPlaybackStarted(); }
+ void emitTVPlaybackStopped(void) { emit TVPlaybackStopped(); }
+ void emitTVPlaybackSought(qint64 position) { emit TVPlaybackSought(position); }
+ void emitTVPlaybackPaused(void) { emit TVPlaybackPaused(); }
+ void emitTVPlaybackUnpaused(void) { emit TVPlaybackUnpaused(); }
+ void emitTVPlaybackAborted(void) { emit TVPlaybackAborted(); }
+
+ signals:
+ void TVPlaybackStarted(void);
+ void TVPlaybackStopped(void);
+ void TVPlaybackSought(qint64 position);
+ void TVPlaybackPaused(void);
+ void TVPlaybackUnpaused(void);
+ void TVPlaybackAborted(void);
+
private:
MythCoreContextPrivate *d;

0 comments on commit 1216d2a

Please sign in to comment.