NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 19 20 21 22 23 … 93 Next »
EventBus

 
  • 0 Vote(s) - 0 Average
EventBus
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#1
2010-07-31, 10:53 AM
sub,

I'd added the "Exit" option to the System plugin - it used Application.Exit()

Then when you posted the AeonLike main menu example, I noticed its exit functionality called EventBus.GetInstance().Notify("EXIT")

I was just wondering if you had a list of events that nPVR will respond to. I'm not looking for anything in particular, but thought it might be handy for us all to know (and might even spark ideas for future functionality for plugins).

Thanks

Iain
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#2
2010-07-31, 05:39 PM
"EXIT" is about the only one I'd really see you using. There are some others, but after looking at them, they're very much internal and their purpose wouldnt be obvious, and the names may change in the future - so, I'd rather people didnt build code that uses them.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,117
Threads: 957
Joined: May 2006
#3
2010-07-31, 05:50 PM
sub Wrote:"EXIT" is about the only one I'd really see you using. There are some others, but after looking at them, they're very much internal and their purpose wouldnt be obvious, and the names may change in the future - so, I'd rather people didnt build code that uses them.

If they are internal only that concerns me as a plugin developer Both Web Radio and Music Box depend upon certain Notify message looking at code I see these as crucial.

if (eventText == "EXITING")
else if (eventText == "PLAYING_AUDIO_ENDED")
else if (eventText == "NOW_PLAYING")

if (eventText == "PLAYING_AUDIO")
else if (eventText == "PLAYBACK_STOPPED")

Also I don't know how ACTCMS could do MLPanel or how anyone could do LCD/VFD display plugins without knowing the event.

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#4
2010-07-31, 06:12 PM
"NOW_PLAYING", "PLAYING_AUDIO" etc are notifications, and intended for plugin developers to use. What imilne is referring to is a select few messages used that can be sent to control the application, for example, sending "EXIT" to tell the application shutdown. There is only a very small handleful of these messages, and they're not documented.

ie, you can certainly look at any messages your plugin receives via the EventBus, which for the most part are just notifications of things happening, just dont start relying on sending messages that you know are used to control the internal functions of the application.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,117
Threads: 957
Joined: May 2006
#5
2010-07-31, 06:55 PM
My apologies sub, it was the EventBus subject that confused me.

Martin
imilne
Offline

Posting Freak

Posts: 2,423
Threads: 135
Joined: Feb 2008
#6
2010-07-31, 09:56 PM
sub Wrote:"EXIT" is about the only one I'd really see you using. There are some others, but after looking at them, they're very much internal and their purpose wouldnt be obvious, and the names may change in the future - so, I'd rather people didnt build code that uses them.

Ok, no worries.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode