Index: trunk/psModules/src/config/pmConfig.h
===================================================================
--- trunk/psModules/src/config/pmConfig.h	(revision 6297)
+++ trunk/psModules/src/config/pmConfig.h	(revision 6872)
@@ -3,6 +3,6 @@
  *  @author PAP, IfA
  *
- *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-02-02 04:51:14 $
+ *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-04-17 18:01:05 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -15,7 +15,24 @@
 
 
+// Configuration information
+typedef struct
+{
+    psMetadata *site;                   // Site configuration
+    psMetadata *camera;                 // Camera specification
+    psMetadata *recipes;                // Recipes for processing
+    psMetadata *arguments;              // Command-line arguments
+    psMetadata *files;                  // pmFPAfiles used for analysis
+    //    psMetadata *format;   // camera format for primary image
+    psDB *database;                     // Database handle
+}
+pmConfig;
+
+pmConfig *pmConfigAlloc(void);
+
+// Free static variables
+void pmConfigDone(void);
 
 /** pmConfigRead
- * 
+ *
  * pmConfigRead shall load the site configuration (according to the above rule
  * for determining the source). The camera configuration shall also be loaded if
@@ -32,62 +49,57 @@
  *
  */
-bool pmConfigRead(
-    psMetadata **site,
-    psMetadata **camera,
-    psMetadata **recipe,
+pmConfig *pmConfigRead(
     int *argc,
-    char **argv,
-    const char *recipeName
+    char **argv);
+
+/** we need this elsewhere; make it public **/
+bool readConfig(
+    psMetadata **config,                // Config to output
+    const char *name,                   // Name of file
+    const char *description             // Description of file
 );
 
-
-
 /** pmConfigValidateCamera
- * 
+ *
  * This function, used by pmConfigCameraFromHeader, shall return true if the
  * FITS header matches the rule contained in the camera configuration (see
  * x2.2.2.3); otherwise it shall return false.
- * 
+ *
  */
-bool pmConfigValidateCamera(
-    const psMetadata *camera,
-    const psMetadata *header
-);
-
+bool pmConfigValidateCameraFormat(
+    const psMetadata *cameraFormat,
+    const psMetadata *header);
 
 
 /** pmConfigCameraFromHeader
- * 
+ *
  * pmConfigCameraFromHeader shall load the camera configuration based on the
  * contents of the FITS header, using the list of known cameras contained in the
  * site configuration. If more than one camera matches the FITS header, a warning
  * shall be generated and the first matching camera returned.
- * 
+ *
  */
-psMetadata *pmConfigCameraFromHeader(
-    const psMetadata *site,
-    const psMetadata *header
+psMetadata *pmConfigCameraFormatFromHeader(
+    pmConfig *config,                   // The configuration
+    const psMetadata *header           // The FITS header
 );
 
 
-
 /** pmConfigRecipeFromCamera
- * 
- * pmConfigRecipeFromCamera shall load the recipe configuration based on the
- * recipeName and the list of known recipes contained in the camera 
+ *
+ * pmConfigRecipeFromCamera shall load the recipes from the list of known recipes contained in the camera
  * configuration.
- * 
+ *
  */
-psMetadata *pmConfigRecipeFromCamera(
-    const psMetadata *camera,
-    const char *recipeName
+bool pmConfigReadRecipes(
+    pmConfig *config
 );
 
 /** pmConfigDB
- * 
+ *
  * pmConfigDB shall use the site configuration data to open a database handle.
  * This is fairly straightforward at the moment, but will change when we beef up
  * security. (TBD)
- * 
+ *
  */
 #ifdef DOMIT_PSDB
@@ -99,4 +111,16 @@
 );
 
+/** pmConfigConformHeader
+ *
+ * Make the supplied header conform to the nominated camera format.
+ */
+bool pmConfigConformHeader(psMetadata *header, // Header to conform
+                           const psMetadata *format // Camera format
+                          );
+
+
+psArray *pmConfigFileSets (int *argc, char **argv, char *file, char *list);
+bool pmConfigFileSetsMD (psMetadata *metadata, int *argc, char **argv, char *name, char *file, char *list);
+
 
 #endif
