#ifndef _PEGASE_HPP
#define _PEGASE_HPP 1

                          /**************************************************/
                          /*                                                */
                          /*                   Pégase.hpp                   */
                          /*                                                */
                          /**************************************************/

/*
** $Revision: 1.3 $
** $State: Exp $
** $Date: 1998/08/16 19:03:35 $
**
** $Log: Pegase.hpp $
** Revision 1.3  1998/08/16 19:03:35  kakace
** Version Beta3+
**
** Revision 1.2  1998/08/02 15:17:01  kakace
** Fonctionnement OK (Layer 1/2 + Stereo/JStereo)
**
** Revision 1.1  1998/07/24 14:26:51  kakace
** Automatic global CheckIn
**
** Revision 1.11  1998/07/24 14:14:24  kakace
** Version intermédiaire (CheckIn global)
**
** Revision 1.9  1998/07/02 15:51:58  kakace
** Automatic global CheckIn
**
*/


//----------------------------------------------------------------------------------------------------

/// Includes

// C/C++

#ifndef  _INCLUDE_STDDEF_H
#include <stddef.h>
#endif

#ifndef  _INCLUDE_STDLIB_H
#include <stdlib.h>
#endif

#ifndef  _INCLUDE_IOSTREAM_H
#include <iostream.h>
#endif

#ifndef  _INCLUDE_IOMANIP_H
#include <iomanip.h>
#endif

#ifndef  _INCLUDE_STRING_H
#include <string.h>
#endif

// Don't include this otherwise the linker uses the functions defined
// in StormCStartupxxx.lib !
//
//#ifndef  _INCLUDE_WBSTARTUP_H
//#include <wbstartup.h>
//#endif

// OS

#ifndef  EXEC_MEMORY_H
#include <exec/memory.h>
#endif

#ifndef  WORKBENCH_STARTUP_H
#include <workbench/startup.h>
#endif

#ifndef  WORKBENCH_WORKBENCH_H
#include <workbench/workbench.h>
#endif

// Protos

#ifndef  CLIB_EXEC_PROTOS_H
#include <clib/exec_protos.h>
#endif

#ifndef  CLIB_INTUITION_PROTOS_H
#include <clib/intuition_protos.h>
#endif

#ifndef  CLIB_ICON_PROTOS_H
#include <clib/icon_protos.h>
#endif

#ifndef  CLIB_UTILITY_PROTOS_H
#include <clib/utility_protos.h>
#endif

#ifndef  CLIB_WB_PROTOS_H
#include <clib/wb_protos.h>
#endif

#ifndef  _ENCODERCONFIG_CLASS_HPP
#include "EncoderConfigC.hpp"
#endif

#ifndef  CLASSES_LISTS_HPP
#include "Lists.hpp"
#endif

#ifndef  _STRING_CLASS_HPP
#include "StringClass.hpp"
#endif

#ifndef  _AMIGAOS_HPP
#include "AmigaOS.hpp"
#endif

///


//----------------------------------------------------------------------------------------------------

struct CPegaseArgs{
    STRING *pa_From;            // Source(s).
    STRING  pa_To;              // Destination (directory or filename).
    LONG   *pa_Layer;           // Layer number.
    LONG   *pa_Frequency;       // Samples frequency.
    LONG   *pa_Bitrate;         // Total bitrate.
    LONG    pa_Mono;
    LONG    pa_JStereo;
    LONG    pa_Copyright;
    LONG    pa_Original;
    LONG    pa_CRC;
    LONG   *pa_Priority;        // Pegase's priority.
    LONG    pa_Verbose;
    LONG    pa_UseIntFmt;
    LONG    pa_UseMotFmt;
    STRING  pa_Pattern;         // Selection pattern used by the file requester.

    // File requester settings (ToolTypes only).
    STRING  pa_DefSource;
    LONG   *pa_FR_XPos;
    LONG   *pa_FR_YPos;
    LONG   *pa_FR_Width;
    LONG   *pa_FR_Height;
};


//----------------------------------------------------------------------------------------------------
//======================================= Classe PegaseConfigC =======================================
//----------------------------------------------------------------------------------------------------

class PegaseConfigC : public CMinList, public CStrArray, public EncoderConfigC
{
    public:

        // Constructeurs, destructeur et opérateurs.

        PegaseConfigC();
        ~PegaseConfigC();

        // Fonctions d'accès aux membres privés.

        void SetVerboseBit(int x)  {bVerbose = x;}
        int  IsVerbose()      const  {return bVerbose;}

        void  SetPattern(STRING cPattern)   {CopyString((char *) cPattern, &cfg_cPattern);}
        char *GetPattern() const            {return cfg_cPattern;}

        void  SetDestination(STRING cDest);
        char *GetDestination() const        {return GetOutputName();}

        LONG  ChangePriority()              {return ExecLib::SetTaskPri(iShellPri);}
        LONG  ChangePriority(LONG newPri)   {iShellPri = ExecLib::SetTaskPri(newPri);
                                             return iShellPri;}

        void operator = (STRING *array) {CStrArray::operator =(array);}

    protected:

        PegaseConfigC &operator =(PegaseConfigC &o);            // Non implémenté.
        PegaseConfigC(PegaseConfigC &o);                        // Non implémenté.

    private:

        char   *cfg_cPattern;           // Motif de sélection (encodage d'un répertoire complet).

        LONG   iShellPri;               // Priorité du Shell de démarrage.
        int    bVerbose;
};

#endif // _PEGASE_HPP

