var TOC = new Array(); var linkmap = new Array(); // maps tags to their parent
tag ID's TOCEntry.cntHeadings = 0 ; TOC.curDivLevel = 0 ; TOC.inDiv = false ; function TOCEntry ( title, url, parent, key, // a registry key that must return a non-null value in order for this entry to be displayed, unless... keyDefault // ... keyDefault is true and the registry key is missing ) { this.title = title ; this.url = url ; this.parent = parent ; this.key = key ; this.keyDefault = (keyDefault ? true : false); this.subEntries = new Array(); this.headingID = 0 ; if ( parent ) { parent.addSubEntry( this ); } else { TOC[ TOC.length ] = this ; } return this ; } TOCEntry.prototype.addSubEntry = function ( subEntry ) { this.subEntries[ this.subEntries.length ] = subEntry ; if ( this.headingID == 0 ) { this.headingID = ++TOCEntry.cntHeadings ; } } function makeFileBrowserSpecfic ( fileName ) { var browserTag = ( isIE ? "_ie" : "_nav" ); return fileName.replace( /\./, browserTag + "." ); } var targetMain = " target='Main'" ; TOCEntry.prototype.emit = function ( level ) { // no display if not licensed and/or none of its' children are licensed if ( ! this.isDisplayable() ) return ; if ( TOC.inDiv && (TOC.curDivLevel != level) ) { TOC.inDiv = false ; RMAOutput( '
\n' ); } if ( ! TOC.inDiv ) { TOC.inDiv = true ; TOC.curDivLevel = level ; var id = "" ; if ( level == 1 ) id = " ID='head" + this.headingID + "Parent'" ; else if( level == 2 ) id = " ID='head" + this.parent.headingID + "Child'" ; RMAOutput( '
\n' ); } var target = "", tagID = "" ; if ( this.url.search( /javascript/i ) == -1 ) { target = targetMain ; tagID = " ID=" + qVar( this.url ); } target = ( this.url.search( /javascript/i ) == -1 ? targetMain : "" ); if ( ! this.parent ) { RMAOutput( "" + this.title + "
\n" ); } else if ( this.subEntries.length ) { var url = this.url ? "'#'" : "\"" + this.url + "\"" ; RMAOutput( "\n" + "Expand/Collapse\n" + this.title + "\n" ); } else { if ( this.title ) { RMAOutput( "
  • " + this.title + "\n" ); } if ( level < 2 ) { TOC.inDiv = false ; RMAOutput( '
  • \n' ); } linkmap[ this.url ] = "head" + this.parent.headingID; } // now emit the children for ( var i = 0; i < this.subEntries.length; i++ ) { this.subEntries[ i ].emit( level + 1 ); } } // return true if the this entry and/or any of its children // will be displayed TOCEntry.prototype.isDisplayable = function () { if ( this.url ) { if ( ! this.key ) { return true ; } else { if ( typeof( this.key ) == "string" ) { // is key a piece of javascript? if ( 0 == this.key.indexOf( "eval:" ) ) { //strip off 'eval:' and execute if ( eval( this.key.slice( 5 ) ) ) return true ; } else // use key as registry property { // key must point to a registry var, not a list if ( RMAGetFirstProperty( this.key ) != null ) return this.keyDefault; var keyVal = RMAGetPropertyValue( this.key ); return (keyVal == null ? this.keyDefault : (keyVal != 0 ? true : false)); } } } } // now test the children for ( var i = 0; i < this.subEntries.length; i++ ) { if ( this.subEntries[ i ].isDisplayable() ) return true ; } return false; } var tmpParent ; // *** Welcome, Monitor, Configure *** var welcomePage = "welcome.html" ; new TOCEntry( "Welcome", "javascript:gotoPage( welcomePage )" ); new TOCEntry( "Monitor", "mongraph.nc.html" ); var config = new TOCEntry( "Configure", "configure.html" ); // *** General Setup *** tmpParent = new TOCEntry( "General Setup", "", config ); new TOCEntry( "Ports", "config_ports.html", tmpParent ); new TOCEntry( "Logging", "config_logging.html", tmpParent ); new TOCEntry( "HTTP Delivery", "config_delivery.nc.html", tmpParent ); new TOCEntry( "IP Binding", "config_binding.nc.html", tmpParent ); new TOCEntry( "MIME Types", "config_mimetypes.html", tmpParent ); new TOCEntry( "Mount Points", "config_localFS.html", tmpParent ); new TOCEntry( "Connection Control", "config_allow.nc.html", tmpParent ); var isUNIX = ( -1 == RMAGetPropertyValue( "server.platform" ).indexOf( "WinNT" ) ); /*! new TOCEntry( "Advanced", isUNIX ? "config_advanced_nx.html" : "config_advanced_nt.html", tmpParent); */ if ( isUNIX ) { new TOCEntry( "User/Group Name", "config_setid.html", tmpParent); } new TOCEntry( "ISP Hosting", "config_isp.html", tmpParent, "license.Summary.ISP-Hosting.Enabled" ); // *** Broadcasting *** tmpParent = new TOCEntry( "Broadcasting", "", config ); new TOCEntry( "Encoder", "config_broadFS.html", tmpParent ); new TOCEntry( "Pre-G2 Encoder", "config_broadFSpre.html", tmpParent ); new TOCEntry( "Live Archiving", "config_broad_archive.html", tmpParent ); new TOCEntry( "Redundancy", "config_broad_redun.html", tmpParent, "license.Summary.BroadcastRedundancy.Enabled", true ); new TOCEntry( "Quicktime", "config_broad_qt.html", tmpParent, "license.Summary.DataTypes.QuickTime.Enabled", true ); // *** Splitting *** tmpParent = new TOCEntry( "Splitting", "", config ); /*! removed per sethr new TOCEntry( "Push Source", "config_spl_push_src.html", tmpParent, "license.Summary.Splitter.Push.Source" ); new TOCEntry( "Push Splitter", "config_spl_push.html", tmpParent, "license.Summary.Splitter.Push.Receiver" ); new TOCEntry( "Pull Source", "config_spl_pull_src.html", tmpParent, "license.Summary.Splitter.Pull.Source" ); new TOCEntry( "Pull Splitter", "config_spl_pull.html", tmpParent, "license.Summary.Splitter.Pull.Receiver" ); */ new TOCEntry( "Transmitter", "config_spl_dist.html", tmpParent, "license.Summary.BroadcastDistribution.PushTransmissionEnabled" ); new TOCEntry( "Receiver", "config_spl_recv.html", tmpParent, "license.Summary.BroadcastDistribution.PushReceiveEnabled" ); // *** Multicasting *** tmpParent = new TOCEntry( "Multicasting", "", config ); new TOCEntry( "Back-Channel", "config_mc_rtsp-pna.html", tmpParent, "license.Summary.Multicast.General" ); new TOCEntry( "Scalable", "config_mc_scale.html", tmpParent, "license.Summary.Multicast.Scalable"); new TOCEntry( "SAP", "config_mc_sap.html", tmpParent, "license.Summary.Multicast.General" ); // *** Cache *** tmpParent = new TOCEntry( "Cache", "", config ); new TOCEntry( "Cache", "config_pc_cache.html", tmpParent ); // *** Security *** tmpParent = new TOCEntry( "Security", "", config ); new TOCEntry( "Access Control", "config_sec_ac.html", tmpParent ); new TOCEntry( "Databases", makeFileBrowserSpecfic( "config_sec_db.html" ), tmpParent ); new TOCEntry( "Authentication", "config_sec_uauth.html", tmpParent ); new TOCEntry( "Commerce", "config_sec_rules.html", tmpParent, "license.Summary.Authentication.Commerce.Access" ); new TOCEntry( "Encryption", "config_encrypt.html", tmpParent, "license.Summary.DataConversion.Enabled", true ); // *** Advertising *** // depart from license check shortcut since Advertising depends on multiple license keys if ( RMAGetPropertyValue( "license.Summary.Ad Serving.Enabled" ) && RMAGetPropertyValue( "license.Summary.Ad Serving.DisableTetheredAds" ) && RMAGetPropertyValue( "license.Summary.Ad Serving.FlexibleAdInsertion" ) && RMAGetPropertyValue( "license.Summary.Ad Serving.EmbeddedPlayersAllowed" ) ) { tmpParent = new TOCEntry( "Advertising", "", config ); new TOCEntry( "General", "config_admisc.html", tmpParent ); new TOCEntry( "Ad Serving", "config_adserv.html", tmpParent ); new TOCEntry( "Ad SMIL Generation", "config_smilgen.html", tmpParent ); } // *** ViewSource *** tmpParent = new TOCEntry( "View Source", "", config ); new TOCEntry( "Source Access", "config_viewsrc.html", tmpParent); new TOCEntry( "Content Access", "config_content_browsing.html", tmpParent ); new TOCEntry( "Browse Content Now", "Javascript:void window.open('browse_content.html', 'ContentBrowser')", tmpParent ); // *** Shared Licensing *** // depart from license check shortcut since licensing depends on multiple license keys var pubEnabled = RMAGetPropertyValue( "license.Summary.DistributedLicensing.Publisher.Enabled" ); var subEnabled = RMAGetPropertyValue( "license.Summary.DistributedLicensing.Subscriber.Enabled" ); if ( ((pubEnabled != null) && (pubEnabled != 0)) || ((subEnabled != null) && (subEnabled != 0)) ) { tmpParent = new TOCEntry( "License Group", "", config ); new TOCEntry( "Configure", "config_license.html", tmpParent ); new TOCEntry( "Monitor", "lic_mon0.html", tmpParent, "license.Summary.DistributedLicensing.Publisher.Enabled" ); } // *** Reports, Samples, Help *** /*! new TOCEntry( "Reports", "reports.html", null ); */ new TOCEntry( "Samples", "samples.html", null ); var help = new TOCEntry( "Help", "helpmain.html" ); new TOCEntry( "Documentation", "Javascript:launchHelp('Docs/Manual/realsrvr.htm')", help ); tmpParent = new TOCEntry( "Resources", "", help ); new TOCEntry( "RealSystem SDK", "Javascript:launchHome('http://proforma.real.com/mario/devzone/g2sdk.html')", tmpParent ); new TOCEntry( "Production Guide", "Javascript:launchHelp('Docs/Production/realpgd.htm')", tmpParent ); new TOCEntry( "RealTools", "Javascript:launchHome('http://www.real.com/products/tools/index.html')", tmpParent ); new TOCEntry( "DevZone", "Javascript:launchHome('http://www.real.com/devzone/index.html')", tmpParent ); new TOCEntry( "RealServers", "Javascript:launchHome('http://www.real.com/products/servers/index.html')", tmpParent ); new TOCEntry( "Tech Support", "Javascript:launchHome('http://service.real.com/index.html')", help ); // *** About *** // add the current hostname to the "About" link var hostname = RMAGetPropertyValue( "headers.Host" ).split( ":" )[ 0 ]; hostname = getMachineName( hostname ); new TOCEntry( "About " + hostname, "javascript:launchAbout()", help ); new TOCEntry( "Virtual Account Manager", "javascript:launchHome( 'http://service.real.com/pam/index.html' )", help ); // loop through top-level TOC entries and emit for ( var i = 0; i < TOC.length; i++ ) { TOC[ i ].emit( 0 ); } // need to close the last div RMAOutput( '\n' );