home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Amiga 14 / MA_Cover_14.iso / source / c / pegase_src / pegase.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1999-08-14  |  4.8 KB  |  195 lines

  1. #ifndef _PEGASE_HPP
  2. #define _PEGASE_HPP 1
  3.  
  4.                           /**************************************************/
  5.                           /*                                                */
  6.                           /*                   Pégase.hpp                   */
  7.                           /*                                                */
  8.                           /**************************************************/
  9.  
  10. /*
  11. ** $Revision: 1.3 $
  12. ** $State: Exp $
  13. ** $Date: 1998/08/16 19:03:35 $
  14. **
  15. ** $Log: Pegase.hpp $
  16. ** Revision 1.3  1998/08/16 19:03:35  kakace
  17. ** Version Beta3+
  18. **
  19. ** Revision 1.2  1998/08/02 15:17:01  kakace
  20. ** Fonctionnement OK (Layer 1/2 + Stereo/JStereo)
  21. **
  22. ** Revision 1.1  1998/07/24 14:26:51  kakace
  23. ** Automatic global CheckIn
  24. **
  25. ** Revision 1.11  1998/07/24 14:14:24  kakace
  26. ** Version intermédiaire (CheckIn global)
  27. **
  28. ** Revision 1.9  1998/07/02 15:51:58  kakace
  29. ** Automatic global CheckIn
  30. **
  31. */
  32.  
  33.  
  34. //----------------------------------------------------------------------------------------------------
  35.  
  36. /// Includes
  37.  
  38. // C/C++
  39.  
  40. #ifndef  _INCLUDE_STDDEF_H
  41. #include <stddef.h>
  42. #endif
  43.  
  44. #ifndef  _INCLUDE_STDLIB_H
  45. #include <stdlib.h>
  46. #endif
  47.  
  48. #ifndef  _INCLUDE_IOSTREAM_H
  49. #include <iostream.h>
  50. #endif
  51.  
  52. #ifndef  _INCLUDE_IOMANIP_H
  53. #include <iomanip.h>
  54. #endif
  55.  
  56. #ifndef  _INCLUDE_STRING_H
  57. #include <string.h>
  58. #endif
  59.  
  60. // Don't include this otherwise the linker uses the functions defined
  61. // in StormCStartupxxx.lib !
  62. //
  63. //#ifndef  _INCLUDE_WBSTARTUP_H
  64. //#include <wbstartup.h>
  65. //#endif
  66.  
  67. // OS
  68.  
  69. #ifndef  EXEC_MEMORY_H
  70. #include <exec/memory.h>
  71. #endif
  72.  
  73. #ifndef  WORKBENCH_STARTUP_H
  74. #include <workbench/startup.h>
  75. #endif
  76.  
  77. #ifndef  WORKBENCH_WORKBENCH_H
  78. #include <workbench/workbench.h>
  79. #endif
  80.  
  81. // Protos
  82.  
  83. #ifndef  CLIB_EXEC_PROTOS_H
  84. #include <clib/exec_protos.h>
  85. #endif
  86.  
  87. #ifndef  CLIB_INTUITION_PROTOS_H
  88. #include <clib/intuition_protos.h>
  89. #endif
  90.  
  91. #ifndef  CLIB_ICON_PROTOS_H
  92. #include <clib/icon_protos.h>
  93. #endif
  94.  
  95. #ifndef  CLIB_UTILITY_PROTOS_H
  96. #include <clib/utility_protos.h>
  97. #endif
  98.  
  99. #ifndef  CLIB_WB_PROTOS_H
  100. #include <clib/wb_protos.h>
  101. #endif
  102.  
  103. #ifndef  _ENCODERCONFIG_CLASS_HPP
  104. #include "EncoderConfigC.hpp"
  105. #endif
  106.  
  107. #ifndef  CLASSES_LISTS_HPP
  108. #include "Lists.hpp"
  109. #endif
  110.  
  111. #ifndef  _STRING_CLASS_HPP
  112. #include "StringClass.hpp"
  113. #endif
  114.  
  115. #ifndef  _AMIGAOS_HPP
  116. #include "AmigaOS.hpp"
  117. #endif
  118.  
  119. ///
  120.  
  121.  
  122. //----------------------------------------------------------------------------------------------------
  123.  
  124. struct CPegaseArgs{
  125.     STRING *pa_From;            // Source(s).
  126.     STRING  pa_To;              // Destination (directory or filename).
  127.     LONG   *pa_Layer;           // Layer number.
  128.     LONG   *pa_Frequency;       // Samples frequency.
  129.     LONG   *pa_Bitrate;         // Total bitrate.
  130.     LONG    pa_Mono;
  131.     LONG    pa_JStereo;
  132.     LONG    pa_Copyright;
  133.     LONG    pa_Original;
  134.     LONG    pa_CRC;
  135.     LONG   *pa_Priority;        // Pegase's priority.
  136.     LONG    pa_Verbose;
  137.     LONG    pa_UseIntFmt;
  138.     LONG    pa_UseMotFmt;
  139.     STRING  pa_Pattern;         // Selection pattern used by the file requester.
  140.  
  141.     // File requester settings (ToolTypes only).
  142.     STRING  pa_DefSource;
  143.     LONG   *pa_FR_XPos;
  144.     LONG   *pa_FR_YPos;
  145.     LONG   *pa_FR_Width;
  146.     LONG   *pa_FR_Height;
  147. };
  148.  
  149.  
  150. //----------------------------------------------------------------------------------------------------
  151. //======================================= Classe PegaseConfigC =======================================
  152. //----------------------------------------------------------------------------------------------------
  153.  
  154. class PegaseConfigC : public CMinList, public CStrArray, public EncoderConfigC
  155. {
  156.     public:
  157.  
  158.         // Constructeurs, destructeur et opérateurs.
  159.  
  160.         PegaseConfigC();
  161.         ~PegaseConfigC();
  162.  
  163.         // Fonctions d'accès aux membres privés.
  164.  
  165.         void SetVerboseBit(int x)  {bVerbose = x;}
  166.         int  IsVerbose()      const  {return bVerbose;}
  167.  
  168.         void  SetPattern(STRING cPattern)   {CopyString((char *) cPattern, &cfg_cPattern);}
  169.         char *GetPattern() const            {return cfg_cPattern;}
  170.  
  171.         void  SetDestination(STRING cDest);
  172.         char *GetDestination() const        {return GetOutputName();}
  173.  
  174.         LONG  ChangePriority()              {return ExecLib::SetTaskPri(iShellPri);}
  175.         LONG  ChangePriority(LONG newPri)   {iShellPri = ExecLib::SetTaskPri(newPri);
  176.                                              return iShellPri;}
  177.  
  178.         void operator = (STRING *array) {CStrArray::operator =(array);}
  179.  
  180.     protected:
  181.  
  182.         PegaseConfigC &operator =(PegaseConfigC &o);            // Non implémenté.
  183.         PegaseConfigC(PegaseConfigC &o);                        // Non implémenté.
  184.  
  185.     private:
  186.  
  187.         char   *cfg_cPattern;           // Motif de sélection (encodage d'un répertoire complet).
  188.  
  189.         LONG   iShellPri;               // Priorité du Shell de démarrage.
  190.         int    bVerbose;
  191. };
  192.  
  193. #endif // _PEGASE_HPP
  194.  
  195.