/************************************************************************** * * @@@BUILDINFO@@@ 03broadcaster-2.jsx 2.0.0.54 08-Feb-2007 * Copyright 2006-2007 Adobe Systems Incorporated * All Rights Reserved. * * NOTICE: All information contained herein is, and remains the property of * Adobe Systems Incorporated and its suppliers, if any. The intellectual * and technical concepts contained herein are proprietary to Adobe Systems * Incorporated and its suppliers and may be covered by U.S. and Foreign * Patents,patents in process,and are protected by trade secret or copyright * law. Dissemination of this information or reproduction of this material * is strictly forbidden unless prior written permission is obtained from * Adobe Systems Incorporated. **************************************************************************/ function Broadcaster() { this.clients = []; this.inBroadcast = false; this.delayedRemove = []; } //----------------------------------------------------------------------------- // // registerClient(...) // // Purpose: un/register client object to receive notifications // (client objects have to support a function "onNotify(reason)" ) // //----------------------------------------------------------------------------- Broadcaster.prototype.registerClient = function( clientObj ) { if( clientObj && clientObj.onNotify ) { for( var i=0; i 0 ) this.clients.pop(); } //----------------------------------------------------------------------------- // // notifyClients(...) // // Purpose: notify registered client object about changes related to the // targets list // //----------------------------------------------------------------------------- Broadcaster.prototype.notifyClients = function( reason, param01, param02, param03, param04, param05 ) { if( appInShutDown && reason != 'shutdown' ) return; this.inBroadcast = true; for( var i=0; i 0 ) { for( var r=0; r 0 ) { while( this.delayedRemove.length > 0 ) { this.unregisterClient( this.delayedRemove[0] ); this.delayedRemove.splice( 0, 1 ); } } }