// $Header: https://oberon.oapd.inaf.it/shins/trunk/shins/src/data_mgr/dataManager.ice 3896 2022-04-13 13:24:17Z depa $

#ifndef __DATAMANAGER_ICE__
#define __DATAMANAGER_ICE__

#include <sharknir.ice>

module sharknir
{
    sequence<long> SeqLong;
    module dataManager
    {
        interface fitsFile
        {
            int createEmptyFile(string inFilename, optional(1) string instrumentMode, out string outFilename);
            int createEmptyAndPopulateHeader(string inFilename, int bitpix, int naxis, sharknir::SeqLong naxes);
            int printFITS(string key,
                          string value,
                          optional(1) string comment,
                          optional(2) string filenameSHINS);
            int printFITSMultipleKeys(sharknir::SeqString seqKey,
                                      sharknir::SeqString seqValue,
                                      sharknir::SeqString seqComment,
                                      optional(1) string filenameSHINS);
            int mergeHeaders(optional(1) string filenameSASHA,
                             optional(2) string filenameSHINS);
            int populateWithData(optional(1) string filenameSASHA,
                                 optional(2) string filenameSHINS);
            int fitsToArchive(optional(1) string filenameSASHA);

            string getCurrentFilenameSHINS();
            string getCurrentFilenameSASHA();
            int setCurrentFilenameSASHA(string filename);
            string saveSASHABLOB(byte BLOBptrAddress, optional(1) int counter);
        };
    };
};
#endif
