/** @file  pmFPAview.h
*
*  @brief Tools to manipulate the FPA structure elements.
*
*  @ingroup AstroImage
*
*  @author EAM, IfA
*
*  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
*  @date $Date: 2006-06-17 01:50:43 $
*
*  Copyright 2004-2005 Institute for Astronomy, University of Hawaii
*/

#ifndef PM_FPA_FILE_IO_H
#define PM_FPA_FILE_IO_H

// open the real file corresponding to the given pmFPAfile appropriate to the current view
bool pmFPAfileOpen (pmFPAfile *file, const pmFPAview *view, pmConfig *config);

// read from the real file corresponding to the given pmFPAfile for the current view
bool pmFPAfileRead (pmFPAfile *file, const pmFPAview *view, pmConfig *config);

bool pmFPAfileCreate (pmFPAfile *file, const pmFPAview *view);

// write to the real file corresponding to the given pmFPAfile for the current view
bool pmFPAfileWrite (pmFPAfile *file, const pmFPAview *view, pmConfig *config);

// close the real file corresponding to the given pmFPAfile appropriate to the current view
bool pmFPAfileClose (pmFPAfile *file, const pmFPAview *view);

// free the data at this level
bool pmFPAfileFreeData(pmFPAfile *file, const pmFPAview *view);

// set the state of the specified pmFPAfile to active (state == true) or inactive
// if name is NULL, set the state for all pmFPAfiles
bool pmFPAfileActivate (psMetadata *files, bool state, char *name);

// examine all pmFPAfiles listed in the files and perform the needed I/O operations (open,read,write,close)
bool pmFPAfileIOChecks (pmConfig *config, const pmFPAview *view, pmFPAfilePlace place);

# endif
