Index: trunk/ippdb/src/ippdb.h
===================================================================
--- trunk/ippdb/src/ippdb.h	(revision 15003)
+++ trunk/ippdb/src/ippdb.h	(revision 15343)
@@ -125,4 +125,205 @@
 );
 
+/** pzDataStoreRow data structure
+ *
+ * Structure for representing a single row of pzDataStore table data.
+ */
+
+typedef struct {
+    char            *camera;
+    char            *telescope;
+    char            *uri;
+} pzDataStoreRow;
+
+/** Creates a new pzDataStoreRow object
+ *
+ *  @return A new pzDataStoreRow object or NULL on failure.
+ */
+
+pzDataStoreRow *pzDataStoreRowAlloc(
+    const char      *camera,
+    const char      *telescope,
+    const char      *uri
+);
+
+/** Creates a new pzDataStore table
+ *
+ * @return true on success
+ */
+
+bool pzDataStoreCreateTable(
+    psDB            *dbh                ///< Database handle
+);
+
+/** Deletes a pzDataStore table
+ *
+ * @return true on success
+ */
+
+bool pzDataStoreDropTable(
+    psDB            *dbh                ///< Database handle
+);
+
+/** Insert a single row into a table
+ *
+ * This function constructs and inserts a single row based on it's parameters.
+ *
+ * @return true on success
+ */
+
+bool pzDataStoreInsert(
+    psDB            *dbh,               ///< Database handle
+    const char      *camera,
+    const char      *telescope,
+    const char      *uri
+);
+
+/** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
+ *
+ * @return A The number of rows removed or a negative value on error
+ */
+
+long long pzDataStoreDelete(
+    psDB            *dbh,               ///< Database handle
+    const psMetadata *where,            ///< Row match criteria
+    unsigned long long limit            ///< Maximum number of elements to delete 
+);
+
+/** Insert a single pzDataStoreRow object into a table
+ *
+ * This function constructs and inserts a single row based on it's parameters.
+ *
+ * @return true on success
+ */
+
+bool pzDataStoreInsertObject(
+    psDB            *dbh,               ///< Database handle
+    pzDataStoreRow  *object             ///< pzDataStoreRow object
+);
+
+/** Insert an array of pzDataStoreRow object into a table
+ *
+ * This function constructs and inserts multiple rows based on it's parameters.
+ *
+ * @return true on success
+ */
+
+bool pzDataStoreInsertObjects(
+    psDB            *dbh,               ///< Database handle
+    psArray         *objects            ///< array of pzDataStoreRow objects
+);
+
+/** Insert data from a binary FITS table pzDataStoreRow into the database
+ *
+ * This function expects a psFits object with a FITS table as the first
+ * extension.  The table must have at least one row of data in it, that is of
+ * the appropriate format (number of columns and their type).  All other
+ * extensions are ignored.
+ *
+ * @return true on success
+ */
+
+bool pzDataStoreInsertFits(
+    psDB            *dbh,               ///< Database handle
+    const psFits    *fits               ///< psFits object
+);
+
+/** Selects up to limit from the database and returns them in a binary FITS table
+ *
+ * This function assumes an empty psFits object and will create a FITS table
+ * as the first extension.
+ *
+ *  See psDBSelectRows() for documentation on the format of where.
+ *
+ * @return true on success
+ */
+
+bool pzDataStoreSelectRowsFits(
+    psDB            *dbh,               ///< Database handle
+    psFits          *fits,              ///< psFits object
+    const psMetadata *where,            ///< Row match criteria
+    unsigned long long limit            ///< Maximum number of elements to return
+);
+
+/** Convert a pzDataStoreRow into an equivalent psMetadata
+ *
+ * @return A psMetadata pointer or NULL on error
+ */
+
+psMetadata *pzDataStoreMetadataFromObject(
+    const pzDataStoreRow *object             ///< fooRow to convert into a psMetadata
+);
+
+/** Convert a psMetadata into an equivalent fooRow
+ *
+ * @return A pzDataStoreRow pointer or NULL on error
+ */
+
+pzDataStoreRow *pzDataStoreObjectFromMetadata(
+    psMetadata      *md                 ///< psMetadata to convert into a fooRow
+);
+/** Selects up to limit rows from the database and returns as pzDataStoreRow objects in a psArray
+ *
+ *  See psDBSelectRows() for documentation on the format of where.
+ *
+ * @return A psArray pointer or NULL on error
+ */
+
+psArray *pzDataStoreSelectRowObjects(
+    psDB            *dbh,               ///< Database handle
+    const psMetadata *where,            ///< Row match criteria
+    unsigned long long limit            ///< Maximum number of elements to return
+);
+/** Deletes a row from the database coresponding to an pzDataStore
+ *
+ *  Note that a 'where' search psMetadata is constructed from each object and
+ *  used to find rows to delete.
+ *
+ * @return A The number of rows removed or a negative value on error
+ */
+
+bool pzDataStoreDeleteObject(
+    psDB            *dbh,               ///< Database handle
+    const pzDataStoreRow *object    ///< Object to delete
+);
+/** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
+ *
+ *  Note that a 'where' search psMetadata is constructed from each object and
+ *  used to find rows to delete.
+ *
+ * @return A The number of rows removed or a negative value on error
+ */
+
+long long pzDataStoreDeleteRowObjects(
+    psDB            *dbh,               ///< Database handle
+    const psArray   *objects,           ///< Array of objects to delete
+    unsigned long long limit            ///< Maximum number of elements to delete 
+);
+/** Formats and prints an array of pzDataStoreRow objects
+ *
+ * When mdcf is set the formated output is in psMetadataConfig
+ * format, otherwise it is in a simple tabular format.
+ *
+ * @return true on success
+ */
+
+bool pzDataStorePrintObjects(
+    FILE            *stream,            ///< a stream
+    psArray         *objects,           ///< An array of pzDataStoreRow objects
+    bool            mdcf                ///< format as mdconfig or simple
+);
+/** Formats and prints an pzDataStoreRow object
+ *
+ * When mdcf is set the formated output is in psMetadataConfig
+ * format, otherwise it is in a simple tabular format.
+ *
+ * @return true on success
+ */
+
+bool pzDataStorePrintObject(
+    FILE            *stream,            ///< a stream
+    pzDataStoreRow *object,    ///< an pzDataStoreRow object
+    bool            mdcf                ///< format as mdconfig or simple
+);
 /** summitExpRow data structure
  *
@@ -8849,4 +9050,430 @@
     bool            mdcf                ///< format as mdconfig or simple
 );
+/** detCorrectedExpRow data structure
+ *
+ * Structure for representing a single row of detCorrectedExp table data.
+ */
+
+typedef struct {
+    psS64           det_id;
+    psS64           exp_id;
+    char            *uri;
+    psS64           corr_id;
+    char            *corr_type;
+    char            *recipe;
+    char            *path_base;
+    psS16           fault;
+} detCorrectedExpRow;
+
+/** Creates a new detCorrectedExpRow object
+ *
+ *  @return A new detCorrectedExpRow object or NULL on failure.
+ */
+
+detCorrectedExpRow *detCorrectedExpRowAlloc(
+    psS64           det_id,
+    psS64           exp_id,
+    const char      *uri,
+    psS64           corr_id,
+    const char      *corr_type,
+    const char      *recipe,
+    const char      *path_base,
+    psS16           fault
+);
+
+/** Creates a new detCorrectedExp table
+ *
+ * @return true on success
+ */
+
+bool detCorrectedExpCreateTable(
+    psDB            *dbh                ///< Database handle
+);
+
+/** Deletes a detCorrectedExp table
+ *
+ * @return true on success
+ */
+
+bool detCorrectedExpDropTable(
+    psDB            *dbh                ///< Database handle
+);
+
+/** Insert a single row into a table
+ *
+ * This function constructs and inserts a single row based on it's parameters.
+ *
+ * @return true on success
+ */
+
+bool detCorrectedExpInsert(
+    psDB            *dbh,               ///< Database handle
+    psS64           det_id,
+    psS64           exp_id,
+    const char      *uri,
+    psS64           corr_id,
+    const char      *corr_type,
+    const char      *recipe,
+    const char      *path_base,
+    psS16           fault
+);
+
+/** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
+ *
+ * @return A The number of rows removed or a negative value on error
+ */
+
+long long detCorrectedExpDelete(
+    psDB            *dbh,               ///< Database handle
+    const psMetadata *where,            ///< Row match criteria
+    unsigned long long limit            ///< Maximum number of elements to delete 
+);
+
+/** Insert a single detCorrectedExpRow object into a table
+ *
+ * This function constructs and inserts a single row based on it's parameters.
+ *
+ * @return true on success
+ */
+
+bool detCorrectedExpInsertObject(
+    psDB            *dbh,               ///< Database handle
+    detCorrectedExpRow *object             ///< detCorrectedExpRow object
+);
+
+/** Insert an array of detCorrectedExpRow object into a table
+ *
+ * This function constructs and inserts multiple rows based on it's parameters.
+ *
+ * @return true on success
+ */
+
+bool detCorrectedExpInsertObjects(
+    psDB            *dbh,               ///< Database handle
+    psArray         *objects            ///< array of detCorrectedExpRow objects
+);
+
+/** Insert data from a binary FITS table detCorrectedExpRow into the database
+ *
+ * This function expects a psFits object with a FITS table as the first
+ * extension.  The table must have at least one row of data in it, that is of
+ * the appropriate format (number of columns and their type).  All other
+ * extensions are ignored.
+ *
+ * @return true on success
+ */
+
+bool detCorrectedExpInsertFits(
+    psDB            *dbh,               ///< Database handle
+    const psFits    *fits               ///< psFits object
+);
+
+/** Selects up to limit from the database and returns them in a binary FITS table
+ *
+ * This function assumes an empty psFits object and will create a FITS table
+ * as the first extension.
+ *
+ *  See psDBSelectRows() for documentation on the format of where.
+ *
+ * @return true on success
+ */
+
+bool detCorrectedExpSelectRowsFits(
+    psDB            *dbh,               ///< Database handle
+    psFits          *fits,              ///< psFits object
+    const psMetadata *where,            ///< Row match criteria
+    unsigned long long limit            ///< Maximum number of elements to return
+);
+
+/** Convert a detCorrectedExpRow into an equivalent psMetadata
+ *
+ * @return A psMetadata pointer or NULL on error
+ */
+
+psMetadata *detCorrectedExpMetadataFromObject(
+    const detCorrectedExpRow *object             ///< fooRow to convert into a psMetadata
+);
+
+/** Convert a psMetadata into an equivalent fooRow
+ *
+ * @return A detCorrectedExpRow pointer or NULL on error
+ */
+
+detCorrectedExpRow *detCorrectedExpObjectFromMetadata(
+    psMetadata      *md                 ///< psMetadata to convert into a fooRow
+);
+/** Selects up to limit rows from the database and returns as detCorrectedExpRow objects in a psArray
+ *
+ *  See psDBSelectRows() for documentation on the format of where.
+ *
+ * @return A psArray pointer or NULL on error
+ */
+
+psArray *detCorrectedExpSelectRowObjects(
+    psDB            *dbh,               ///< Database handle
+    const psMetadata *where,            ///< Row match criteria
+    unsigned long long limit            ///< Maximum number of elements to return
+);
+/** Deletes a row from the database coresponding to an detCorrectedExp
+ *
+ *  Note that a 'where' search psMetadata is constructed from each object and
+ *  used to find rows to delete.
+ *
+ * @return A The number of rows removed or a negative value on error
+ */
+
+bool detCorrectedExpDeleteObject(
+    psDB            *dbh,               ///< Database handle
+    const detCorrectedExpRow *object    ///< Object to delete
+);
+/** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
+ *
+ *  Note that a 'where' search psMetadata is constructed from each object and
+ *  used to find rows to delete.
+ *
+ * @return A The number of rows removed or a negative value on error
+ */
+
+long long detCorrectedExpDeleteRowObjects(
+    psDB            *dbh,               ///< Database handle
+    const psArray   *objects,           ///< Array of objects to delete
+    unsigned long long limit            ///< Maximum number of elements to delete 
+);
+/** Formats and prints an array of detCorrectedExpRow objects
+ *
+ * When mdcf is set the formated output is in psMetadataConfig
+ * format, otherwise it is in a simple tabular format.
+ *
+ * @return true on success
+ */
+
+bool detCorrectedExpPrintObjects(
+    FILE            *stream,            ///< a stream
+    psArray         *objects,           ///< An array of detCorrectedExpRow objects
+    bool            mdcf                ///< format as mdconfig or simple
+);
+/** Formats and prints an detCorrectedExpRow object
+ *
+ * When mdcf is set the formated output is in psMetadataConfig
+ * format, otherwise it is in a simple tabular format.
+ *
+ * @return true on success
+ */
+
+bool detCorrectedExpPrintObject(
+    FILE            *stream,            ///< a stream
+    detCorrectedExpRow *object,    ///< an detCorrectedExpRow object
+    bool            mdcf                ///< format as mdconfig or simple
+);
+/** detCorrectedImfileRow data structure
+ *
+ * Structure for representing a single row of detCorrectedImfile table data.
+ */
+
+typedef struct {
+    psS64           det_id;
+    psS64           exp_id;
+    char            *class_id;
+    char            *uri;
+    char            *path_base;
+    psS16           fault;
+} detCorrectedImfileRow;
+
+/** Creates a new detCorrectedImfileRow object
+ *
+ *  @return A new detCorrectedImfileRow object or NULL on failure.
+ */
+
+detCorrectedImfileRow *detCorrectedImfileRowAlloc(
+    psS64           det_id,
+    psS64           exp_id,
+    const char      *class_id,
+    const char      *uri,
+    const char      *path_base,
+    psS16           fault
+);
+
+/** Creates a new detCorrectedImfile table
+ *
+ * @return true on success
+ */
+
+bool detCorrectedImfileCreateTable(
+    psDB            *dbh                ///< Database handle
+);
+
+/** Deletes a detCorrectedImfile table
+ *
+ * @return true on success
+ */
+
+bool detCorrectedImfileDropTable(
+    psDB            *dbh                ///< Database handle
+);
+
+/** Insert a single row into a table
+ *
+ * This function constructs and inserts a single row based on it's parameters.
+ *
+ * @return true on success
+ */
+
+bool detCorrectedImfileInsert(
+    psDB            *dbh,               ///< Database handle
+    psS64           det_id,
+    psS64           exp_id,
+    const char      *class_id,
+    const char      *uri,
+    const char      *path_base,
+    psS16           fault
+);
+
+/** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
+ *
+ * @return A The number of rows removed or a negative value on error
+ */
+
+long long detCorrectedImfileDelete(
+    psDB            *dbh,               ///< Database handle
+    const psMetadata *where,            ///< Row match criteria
+    unsigned long long limit            ///< Maximum number of elements to delete 
+);
+
+/** Insert a single detCorrectedImfileRow object into a table
+ *
+ * This function constructs and inserts a single row based on it's parameters.
+ *
+ * @return true on success
+ */
+
+bool detCorrectedImfileInsertObject(
+    psDB            *dbh,               ///< Database handle
+    detCorrectedImfileRow *object             ///< detCorrectedImfileRow object
+);
+
+/** Insert an array of detCorrectedImfileRow object into a table
+ *
+ * This function constructs and inserts multiple rows based on it's parameters.
+ *
+ * @return true on success
+ */
+
+bool detCorrectedImfileInsertObjects(
+    psDB            *dbh,               ///< Database handle
+    psArray         *objects            ///< array of detCorrectedImfileRow objects
+);
+
+/** Insert data from a binary FITS table detCorrectedImfileRow into the database
+ *
+ * This function expects a psFits object with a FITS table as the first
+ * extension.  The table must have at least one row of data in it, that is of
+ * the appropriate format (number of columns and their type).  All other
+ * extensions are ignored.
+ *
+ * @return true on success
+ */
+
+bool detCorrectedImfileInsertFits(
+    psDB            *dbh,               ///< Database handle
+    const psFits    *fits               ///< psFits object
+);
+
+/** Selects up to limit from the database and returns them in a binary FITS table
+ *
+ * This function assumes an empty psFits object and will create a FITS table
+ * as the first extension.
+ *
+ *  See psDBSelectRows() for documentation on the format of where.
+ *
+ * @return true on success
+ */
+
+bool detCorrectedImfileSelectRowsFits(
+    psDB            *dbh,               ///< Database handle
+    psFits          *fits,              ///< psFits object
+    const psMetadata *where,            ///< Row match criteria
+    unsigned long long limit            ///< Maximum number of elements to return
+);
+
+/** Convert a detCorrectedImfileRow into an equivalent psMetadata
+ *
+ * @return A psMetadata pointer or NULL on error
+ */
+
+psMetadata *detCorrectedImfileMetadataFromObject(
+    const detCorrectedImfileRow *object             ///< fooRow to convert into a psMetadata
+);
+
+/** Convert a psMetadata into an equivalent fooRow
+ *
+ * @return A detCorrectedImfileRow pointer or NULL on error
+ */
+
+detCorrectedImfileRow *detCorrectedImfileObjectFromMetadata(
+    psMetadata      *md                 ///< psMetadata to convert into a fooRow
+);
+/** Selects up to limit rows from the database and returns as detCorrectedImfileRow objects in a psArray
+ *
+ *  See psDBSelectRows() for documentation on the format of where.
+ *
+ * @return A psArray pointer or NULL on error
+ */
+
+psArray *detCorrectedImfileSelectRowObjects(
+    psDB            *dbh,               ///< Database handle
+    const psMetadata *where,            ///< Row match criteria
+    unsigned long long limit            ///< Maximum number of elements to return
+);
+/** Deletes a row from the database coresponding to an detCorrectedImfile
+ *
+ *  Note that a 'where' search psMetadata is constructed from each object and
+ *  used to find rows to delete.
+ *
+ * @return A The number of rows removed or a negative value on error
+ */
+
+bool detCorrectedImfileDeleteObject(
+    psDB            *dbh,               ///< Database handle
+    const detCorrectedImfileRow *object    ///< Object to delete
+);
+/** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
+ *
+ *  Note that a 'where' search psMetadata is constructed from each object and
+ *  used to find rows to delete.
+ *
+ * @return A The number of rows removed or a negative value on error
+ */
+
+long long detCorrectedImfileDeleteRowObjects(
+    psDB            *dbh,               ///< Database handle
+    const psArray   *objects,           ///< Array of objects to delete
+    unsigned long long limit            ///< Maximum number of elements to delete 
+);
+/** Formats and prints an array of detCorrectedImfileRow objects
+ *
+ * When mdcf is set the formated output is in psMetadataConfig
+ * format, otherwise it is in a simple tabular format.
+ *
+ * @return true on success
+ */
+
+bool detCorrectedImfilePrintObjects(
+    FILE            *stream,            ///< a stream
+    psArray         *objects,           ///< An array of detCorrectedImfileRow objects
+    bool            mdcf                ///< format as mdconfig or simple
+);
+/** Formats and prints an detCorrectedImfileRow object
+ *
+ * When mdcf is set the formated output is in psMetadataConfig
+ * format, otherwise it is in a simple tabular format.
+ *
+ * @return true on success
+ */
+
+bool detCorrectedImfilePrintObject(
+    FILE            *stream,            ///< a stream
+    detCorrectedImfileRow *object,    ///< an detCorrectedImfileRow object
+    bool            mdcf                ///< format as mdconfig or simple
+);
 /** magicRunRow data structure
  *
@@ -9863,4 +10490,205 @@
     bool            mdcf                ///< format as mdconfig or simple
 );
+/** magicSkyfileMaskRow data structure
+ *
+ * Structure for representing a single row of magicSkyfileMask table data.
+ */
+
+typedef struct {
+    psS64           magic_id;
+    psS64           diff_id;
+    char            *uri;
+} magicSkyfileMaskRow;
+
+/** Creates a new magicSkyfileMaskRow object
+ *
+ *  @return A new magicSkyfileMaskRow object or NULL on failure.
+ */
+
+magicSkyfileMaskRow *magicSkyfileMaskRowAlloc(
+    psS64           magic_id,
+    psS64           diff_id,
+    const char      *uri
+);
+
+/** Creates a new magicSkyfileMask table
+ *
+ * @return true on success
+ */
+
+bool magicSkyfileMaskCreateTable(
+    psDB            *dbh                ///< Database handle
+);
+
+/** Deletes a magicSkyfileMask table
+ *
+ * @return true on success
+ */
+
+bool magicSkyfileMaskDropTable(
+    psDB            *dbh                ///< Database handle
+);
+
+/** Insert a single row into a table
+ *
+ * This function constructs and inserts a single row based on it's parameters.
+ *
+ * @return true on success
+ */
+
+bool magicSkyfileMaskInsert(
+    psDB            *dbh,               ///< Database handle
+    psS64           magic_id,
+    psS64           diff_id,
+    const char      *uri
+);
+
+/** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
+ *
+ * @return A The number of rows removed or a negative value on error
+ */
+
+long long magicSkyfileMaskDelete(
+    psDB            *dbh,               ///< Database handle
+    const psMetadata *where,            ///< Row match criteria
+    unsigned long long limit            ///< Maximum number of elements to delete 
+);
+
+/** Insert a single magicSkyfileMaskRow object into a table
+ *
+ * This function constructs and inserts a single row based on it's parameters.
+ *
+ * @return true on success
+ */
+
+bool magicSkyfileMaskInsertObject(
+    psDB            *dbh,               ///< Database handle
+    magicSkyfileMaskRow *object             ///< magicSkyfileMaskRow object
+);
+
+/** Insert an array of magicSkyfileMaskRow object into a table
+ *
+ * This function constructs and inserts multiple rows based on it's parameters.
+ *
+ * @return true on success
+ */
+
+bool magicSkyfileMaskInsertObjects(
+    psDB            *dbh,               ///< Database handle
+    psArray         *objects            ///< array of magicSkyfileMaskRow objects
+);
+
+/** Insert data from a binary FITS table magicSkyfileMaskRow into the database
+ *
+ * This function expects a psFits object with a FITS table as the first
+ * extension.  The table must have at least one row of data in it, that is of
+ * the appropriate format (number of columns and their type).  All other
+ * extensions are ignored.
+ *
+ * @return true on success
+ */
+
+bool magicSkyfileMaskInsertFits(
+    psDB            *dbh,               ///< Database handle
+    const psFits    *fits               ///< psFits object
+);
+
+/** Selects up to limit from the database and returns them in a binary FITS table
+ *
+ * This function assumes an empty psFits object and will create a FITS table
+ * as the first extension.
+ *
+ *  See psDBSelectRows() for documentation on the format of where.
+ *
+ * @return true on success
+ */
+
+bool magicSkyfileMaskSelectRowsFits(
+    psDB            *dbh,               ///< Database handle
+    psFits          *fits,              ///< psFits object
+    const psMetadata *where,            ///< Row match criteria
+    unsigned long long limit            ///< Maximum number of elements to return
+);
+
+/** Convert a magicSkyfileMaskRow into an equivalent psMetadata
+ *
+ * @return A psMetadata pointer or NULL on error
+ */
+
+psMetadata *magicSkyfileMaskMetadataFromObject(
+    const magicSkyfileMaskRow *object             ///< fooRow to convert into a psMetadata
+);
+
+/** Convert a psMetadata into an equivalent fooRow
+ *
+ * @return A magicSkyfileMaskRow pointer or NULL on error
+ */
+
+magicSkyfileMaskRow *magicSkyfileMaskObjectFromMetadata(
+    psMetadata      *md                 ///< psMetadata to convert into a fooRow
+);
+/** Selects up to limit rows from the database and returns as magicSkyfileMaskRow objects in a psArray
+ *
+ *  See psDBSelectRows() for documentation on the format of where.
+ *
+ * @return A psArray pointer or NULL on error
+ */
+
+psArray *magicSkyfileMaskSelectRowObjects(
+    psDB            *dbh,               ///< Database handle
+    const psMetadata *where,            ///< Row match criteria
+    unsigned long long limit            ///< Maximum number of elements to return
+);
+/** Deletes a row from the database coresponding to an magicSkyfileMask
+ *
+ *  Note that a 'where' search psMetadata is constructed from each object and
+ *  used to find rows to delete.
+ *
+ * @return A The number of rows removed or a negative value on error
+ */
+
+bool magicSkyfileMaskDeleteObject(
+    psDB            *dbh,               ///< Database handle
+    const magicSkyfileMaskRow *object    ///< Object to delete
+);
+/** Deletes up to limit rows from the database and returns the number of rows actually deleted. 
+ *
+ *  Note that a 'where' search psMetadata is constructed from each object and
+ *  used to find rows to delete.
+ *
+ * @return A The number of rows removed or a negative value on error
+ */
+
+long long magicSkyfileMaskDeleteRowObjects(
+    psDB            *dbh,               ///< Database handle
+    const psArray   *objects,           ///< Array of objects to delete
+    unsigned long long limit            ///< Maximum number of elements to delete 
+);
+/** Formats and prints an array of magicSkyfileMaskRow objects
+ *
+ * When mdcf is set the formated output is in psMetadataConfig
+ * format, otherwise it is in a simple tabular format.
+ *
+ * @return true on success
+ */
+
+bool magicSkyfileMaskPrintObjects(
+    FILE            *stream,            ///< a stream
+    psArray         *objects,           ///< An array of magicSkyfileMaskRow objects
+    bool            mdcf                ///< format as mdconfig or simple
+);
+/** Formats and prints an magicSkyfileMaskRow object
+ *
+ * When mdcf is set the formated output is in psMetadataConfig
+ * format, otherwise it is in a simple tabular format.
+ *
+ * @return true on success
+ */
+
+bool magicSkyfileMaskPrintObject(
+    FILE            *stream,            ///< a stream
+    magicSkyfileMaskRow *object,    ///< an magicSkyfileMaskRow object
+    bool            mdcf                ///< format as mdconfig or simple
+);
 
 /// @}
@@ -9870,3 +10698,3 @@
 #endif
 
-#endif // MAGICMASK_DB_H
+#endif // MAGICSKYFILEMASK_DB_H
