Notes:

1) Called after printer is created:
	char* add_printer(char* printer_name);

2) Called by print_server if app uses page setup settings before calling
	ConfigPage(). 

	BMessage* default_settings(BNode* printer);
	
		BNode is the spool dir where attributes exist
		BMessage contains the attribute default settings

3) Called by BPrintJob::ConfigPage() 

	BMessage* config_page(BNode* printer, BMessage* settings);

		BMessage* settings is the current settings
		returns the settings specified in the dialog

4) Called by print_server to start printing

	BMessage* take_job(BFile* spool, BNode* printer, BMessage* msg);

- there is always a config_page() before a config_job()
- if settings passed to config_job is empty the print_server will call 
	config_page() 

Path for settings:
	1) default_settings() should write the attributes to the BNode and return
		them in the BMessage
	2) config_page() could be called with an empty settings BMessage, which 
		should then call default_settings()?

- default_settings does not exist

=====================================================
Simon 02/01/2002: 
=====================================================
1) Added default_settings() to Driver.cpp to use PrinterSettings class that controls settings

- accorting to the scheme above I have found no code that calls page setup before calling ConfigPage(), so the default_settings() function never gets called resulting in a badly formated message (has the wrong set of data fields we need) being sent to PageSetupWindow constructor. Therefore, on the council of Philippe, I have added a Validate() method to the PrinterSettings class that validates the structure of the message and adds constructs the message to be correct for PageSetupWindow. This means that PageSetupWindow will always get a good message, and I have taken out the code in the PageSetupWindow constructor to check for the presence of the data fields it needs. However, the result of the initial problem, that default_settings() is not called, resulted in my adding these Validate calls to both config_page() and config_job() functions, which really they should not be there... 

- what is really needed is a test app with a bunch of test harnesses to check all combination of app based printing scenarios, and also test for bad coding errors that an app may perform, rather than using StyleEdit and Gobe to test the driver.

NOTE: depending on the app that causes config_page() to be called, the message will have different configurations of data fields. StyledEdit passes only a single field, while Gobe passes a bunch. The issue is that config_page() cannot simply call default_settings() in the case where the message does not have the data fields we want, since we will wipe them out with the new default one. So rather than calling default_settings() from config_page(), I just add the data fields we need with a call to PrinterSettings::ReadSettings(), or PrinterSettings::GetDefaults() if there are no previously saved settings.

2) Code now does the following:

a) Reads BNode to check if there is a previous BFS attibute called printer_settings that has the latest default settings

b) If no attib printer_settings, then reads pdf_default_settings file in /home/config/settings for initial defaults. If pdf_default_settings not there, it uses hard coded values, writes the pdf_default_settings file and saves BMessage to spool BNode as a BFS attribute called printer_settings

c) If pdf_default_settings are there it uses these values, then saves BMessage to spool BNode as a BFS attribute called printer_settings

d) PageSetupWindow::UpdateSetupMessage() will call the PrinterSettings class to write the new settings created in the dialog to the spooler BNode attribute printer_settings

3) Added a debug MessagePrinter class that prints the contents of a BMessage to a text file on the desktop with the name of the message as the name of the file. If there are BMessages in the BMessage it will print these too, but in seperate files. You can see the use of this class in the code commented out in Driver.cpp, which should be removed at some later time, and perhaps put in a printer testing app.

