Monday, April 04, 2011 at 1:05 AM.

feedhoseSuite.init

on init () {
	<<Changes
		<<12/1/10; 7:10:46 PM by DW
			<<Init adrdata^.server.stats.ctNewItemsLastScan.
		<<9/24/10; 4:37:11 AM by DW
			<<Created. 
	local (adrdata = @config.feedhose);
	if not defined (adrdata^) {
		new (tabletype, adrdata)};
	bundle { //server
		if not defined (adrdata^.server) {
			new (tabletype, @adrdata^.server)};
		<<if not defined (adrdata^.server.calendar)
			<<new (tabletype, @adrdata^.server.calendar)
		if not defined (adrdata^.server.hoses) {
			new (tabletype, @adrdata^.server.hoses)};
		if not defined (adrdata^.server.titles) {
			new (tabletype, @adrdata^.server.titles)};
		bundle { //prefs
			if not defined (adrdata^.server.prefs) {
				new (tabletype, @adrdata^.server.prefs)};
			if not defined (adrdata^.server.prefs.enabled) {
				adrdata^.server.prefs.enabled = false};
			if not defined (adrdata^.server.prefs.maxHoseItems) {
				adrdata^.server.prefs.maxHoseItems = 25};
			if not defined (adrdata^.server.prefs.timeoutSecs) {
				adrdata^.server.prefs.timeoutSecs = 60 * 2};
			if not defined (adrdata^.server.prefs.defaultHose) {
				adrdata^.server.prefs.defaultHose = ""}};
		bundle { //stats
			if not defined (adrdata^.server.stats) {
				new (tabletype, @adrdata^.server.stats)};
			if not defined (adrdata^.server.stats.ctCallbackCalls) {
				adrdata^.server.stats.ctCallbackCalls = 0};
			if not defined (adrdata^.server.stats.ctEveryMinutes) {
				adrdata^.server.stats.ctEveryMinutes = 0};
			if not defined (adrdata^.server.stats.ctScans) {
				adrdata^.server.stats.ctScans = 0};
			if not defined (adrdata^.server.stats.ctTitlesCollected) {
				adrdata^.server.stats.ctTitlesCollected = 0};
			if not defined (adrdata^.server.stats.ctDuplicateTitles) {
				adrdata^.server.stats.ctDuplicateTitles = 0};
			if not defined (adrdata^.server.stats.ctNewItemsLastScan) {
				adrdata^.server.stats.ctNewItemsLastScan = 0}};
		bundle { //temp table
			if not defined (system.temp.feedHose) {
				new (tabletype, @system.temp.feedHose)};
			bundle { //server
				if not defined (system.temp.feedHose.server) {
					new (tabletype, @system.temp.feedHose.server)};
				if not defined (system.temp.feedHose.server.waitingThreads) {
					new (tabletype, @system.temp.feedHose.server.waitingThreads)}}}};
	bundle { //client
		if not defined (adrdata^.client) {
			new (tabletype, @adrdata^.client)};
		<<if not defined (adrdata^.client.calendar)
			<<new (tabletype, @adrdata^.client.calendar)
		if not defined (adrdata^.client.hoses) {
			new (tabletype, @adrdata^.client.hoses)};
		bundle { //prefs
			if not defined (adrdata^.client.prefs) {
				new (tabletype, @adrdata^.client.prefs)};
			if not defined (adrdata^.client.prefs.enabled) {
				adrdata^.client.prefs.enabled = false};
			if not defined (adrdata^.client.prefs.timeoutsecs) {
				adrdata^.client.prefs.timeoutSecs = 180}};
			<<if not defined (adrdata^.client.prefs.server)
				<<adrdata^.client.prefs.server = "hose.scripting.com"
			<<if not defined (adrdata^.client.prefs.fHtml)
				<<adrdata^.client.prefs.fHtml = ""
		bundle { //stats
			if not defined (adrdata^.client.stats) {
				new (tabletype, @adrdata^.client.stats)}};
			<<if not defined (adrdata^.client.stats.ctLoops)
				<<adrdata^.client.stats.ctLoops = 0
			<<if not defined (adrdata^.client.stats.flWrite)
				<<adrdata^.client.stats.flWrite = false
			<<if not defined (adrdata^.client.stats.ctWrites)
				<<adrdata^.client.stats.ctWrites = 0
			<<if not defined (adrdata^.client.stats.ctLaunches)
				<<adrdata^.client.stats.ctLaunches = 0
		bundle { //temp
			if not defined (system.temp.feedHose.client) {
				new (tabletype, @system.temp.feedHose.client)}}};
			<<if not defined (system.temp.feedHose.client.idThread)
				<<system.temp.feedHose.client.idThread = 0
	bundle { //misc
		if not defined (config.river2.callbacks.newItem.feedHose) {
			config.river2.callbacks.newItem.feedHose = @feedHoseSuite.newItemCallback};
		if not defined (config.river2.callbacks.beforeScan.feedHose) {
			config.river2.callbacks.beforeScan.feedHose = @feedHoseSuite.beforeScanCallback};
		if not defined (config.river2.callbacks.afterScan.feedHose) {
			config.river2.callbacks.afterScan.feedHose = @feedHoseSuite.afterScanCallback}};
	return (adrdata)};
bundle { //test code
	init ()}



This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.