Monday, November 08, 2010 at 12:04 AM.

system.verbs.builtins.radio.backup.backupAllPrefs

on backupAllPrefs (adrStatusMsgCallback=nil) {
	<<Changes
		<<1/23/03; 7:00:50 PM by JES
			<<New optional parameter, adrStatusMsgCallback -- called with the name of the file currently being backed up.
		<<11/14/02; 12:08:47 PM by DW
			<<Add the following to backups:
				<<user.prefs (but not user.prefs.serialnumber)
				<<user.im
		<<11/13/02; 11:15:45 AM by DW
			<<Created.
	on statusMsg (s) {
		if adrStatusMsgCallback != nil {
			try {adrStatusMsgCallback^ (s)}}};
	on backupPrefTable (adr, fname, message) {
		statusMsg (message);
		radio.backup.backupPrefTable (adr, fname)};
	
	local (adrblog = radio.weblog.init ());
	backupPrefTable (@weblogData.prefs, "weblogPrefs", "weblog preferences...");
	backupPrefTable (@adrblog^.categories, "weblogCategories", "weblog categories...");
	backupPrefTable (@adrblog^.shortcuts, "weblogShortcuts", "shortcuts...");
	backupPrefTable (@adrblog^.stats, "weblogStats", "weblog stats...");
	
	local (adraggdata = xml.aggregator.init ());
	backupPrefTable (@adraggdata^.prefs, "aggregatorPrefs", "aggregator preferences...");
	backupPrefTable (@adraggdata^.settings, "aggregatorSettings", "aggregator settings...");
	backupPrefTable (@adraggdata^.stats, "aggregatorStats", "aggregator stats...");
	bundle { //special code for services
		local (services, adr);
		new (tabletype, @services);
		for adr in @adraggdata^.services {
			new (tabletype, @services.[nameof (adr^)])};
		backupPrefTable (@services, "aggregatorServices", "aggregator subscriptions...")};
	
	bundle { //special code for user.prefs
		local (prefs = user.prefs);
		prefs.serialNumber = "";
		backupPrefTable (@user.prefs, "userPrefs", "user preferences...")};
	
	backupPrefTable (@user.im, "userIm", "instant messaging preferences...");
	backupPrefTable (@user.bookmarksMenu, "userBookmarksMenu", "Bookmarks menu...");
	
	backupPrefTable (@user.radio.outliner, "userRadioOutliner", "instant outliner preferences...");
	backupPrefTable (@user.radio.stats, "userRadioStats", "Radio stats...");
	bundle { //special code for prefs
		local (prefs = user.radio.prefs);
		prefs.serialNumber = "";
		backupPrefTable (@prefs, "userRadioPrefs", "Radio preferences...")};
	
	local (adrweblogcomdata = weblogsCom.init ());
	backupPrefTable (@adrweblogcomdata^.favorites, "weblogsComFavorites", "Weblogs.com favorites...");
	backupPrefTable (@adrweblogcomdata^.prefs, "weblogsComPrefs", "Weblogs.com preferences...")};
bundle { //test code
	backupAllPrefs ()}



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.