Difference between revisions of "Global notification specification"

From MythTV Official Wiki
Jump to: navigation, search
m (Implementation)
m
Line 30: Line 30:
 
   then identifier will return 0.
 
   then identifier will return 0.
 
* NEED a way to query which button was pressed and some code to do it.  Ideas?
 
* NEED a way to query which button was pressed and some code to do it.  Ideas?
 +
 +
 +
== Resources ==
 +
See [[http://www.gossamer-threads.com/lists/mythtv/dev/284692 http://www.gossamer-threads.com/lists/mythtv/dev/284692]] for a discussion on this.

Revision as of 12:52, 23 August 2007

Currently MythNotify and MythTVOSD allow for notifications to be sent around the network and display as an OSD when using the internal player.

There is no facility built into MythTV for displaying notifications anywhere else.


Use Cases

  • Mythshutdown -x tries to shutdown but cannot. It pops up a dialog telling the user why it can't shutdown and asking if they want to override and shutdown anyway.
  • Mytharchive needs a blank dvd inserting to continue. It pops up a dialog asking for the user to insert a blank dvd. The dialog automatically disappears when the dvd is inserted.


Requirements

  • Must be well integrated into mythtv - it must be themed correctly, and be controllable via LIRC etc.
  • Must be configurable for number of buttons and message displayed (also specify which button has focus).
  • Configurable timeout to automatically dismiss the dialog.
  • Easy to execute/display.

Implementation

  • Use Mythfrontend network control interface to create/manage dialogs.
POPUP message defaultButton timeout button1 button2 buttonN - Creates popup
 Note: Use underscores ("_") instead of spaces for message and button text!
 * defaultButton: integer (starts at 0 for first button).
 * timeout: integer (seconds).
 returns identifier OK
POPUP status - Gets status of popup
 returns identifier ACTIVE|CLOSED
POPUP close - Closes active popup
 returns identifier CLOSED
* If there is no popup identifier (eg. popup close called when there is no popup)
  then identifier will return 0.
  • NEED a way to query which button was pressed and some code to do it. Ideas?


Resources

See [http://www.gossamer-threads.com/lists/mythtv/dev/284692] for a discussion on this.