hopefully, everyone is reading this....
web admin...
notice that when i told you to do a send command, and select display alert.. there was a command...
go to advanced > dce > commands
do a find on the page, for 809
it should be, display alert
you'll notice that it will show which devices use this command etc...
click on display alert.
you will see the parameters that this command can send... normally, the comments section would have a list of what each parameter can take.. in this case, it's not specified.. only that it's an integer for Interruption...
searching through the source code, we find a function, okayToInterrupt... we see a reference to several constants:
bool Orbiter::OkayToInterrupt( int iInterruption )
{
if( iInterruption==interuptAlways )
return true;
if( m_dwPK_Device_NowPlaying )
// If it's video it's always false. If it's audio only, it's true only if there's no video
return m_bContainsVideo ? false : iInterruption==interuptOnlyAudio;
// Nothing is playing. So unless it's interuptNever and there's an outside application we're ok
if( (iInterruption==interuptNever || iInterruption==interuptOnlyAudio) && m_sActiveApplication_Window.empty()==false )
return false;
return true;
}
looking further, I do a grep inside src/
grep -rin "interuptOnlyAudio" *
Gen_Devices/AllScreens.h:37: interuptOnlyAudio=3 /* will not interrupt a web browser, only when audio is playing */
ah, here we go.. a variable. odd.. not a constant... but at least we know now.. looking around that area, we see:
enum eInterruption {interuptAlways=0, /* always interupt his activity and change screens */
interuptNever=1, /* never interupt, only change the screen if the system is idle */
interuptNoVideo=2, /* will interrupt a web browser but not a movie */
interuptOnlyAudio=3 /* will not interrupt a web browser, only when audio is playing */
};
So there you go. Four values that you can put into interruption, to trigger how the alert is displayed.
This concludes tonight's lesson on code forensics and analysis.
-Thom