home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ocl150a.zip / OCL / Samples / GTakPM / Source / Tape.cpp < prev    next >
C/C++ Source or Header  |  1996-08-12  |  3KB  |  167 lines

  1. // GTakPM
  2. // (c) Benjamin Stein 1994
  3. // All Rights Reserved
  4. // Tape.cpp
  5.  
  6. //  $Header: W:/Projects/OCL/Samples/GTakPM/Source/rcs/Tape.cpp 1.50 1996/08/11 23:48:13 B.STEIN Release $
  7.  
  8. #include "..\Source\GTakPM.hpp"
  9.  
  10.  
  11.  
  12. Tape::Tape(pOPMPipeTool currentTool, PSZ tape_description, ULONG tape_blocksize)
  13.   : tool(currentTool),
  14.     bsize(tape_blocksize),
  15.     device(tape_description)
  16.   {}
  17.  
  18. Tape::~Tape()
  19.   {}
  20.  
  21.  
  22. void Tape::prepare()
  23. {
  24.  throw GTPMException(ERROR_NOT_YET_SUPPORTED);
  25.  
  26. /*
  27.  system("TAPE.EXE ST >NUL 2>&1");
  28. */
  29. }
  30.  
  31. void Tape::blocksize(ULONG size)
  32. {
  33.  throw GTPMException(ERROR_NOT_YET_SUPPORTED);
  34.  
  35. /*
  36.  
  37.  CHAR    str[10];
  38.  OString command("TAPE.EXE BLOCKSIZE=");
  39.  
  40.  _itoa(size, str, 10);
  41.  command + str;
  42.  command + " >NUL 2>&1";
  43.  system(command);
  44. */
  45. }
  46.  
  47.  
  48. void Tape::status()
  49. {
  50.  throw GTPMException(ERROR_NOT_YET_SUPPORTED);
  51.  
  52. /*
  53.  prepare();
  54.  tool->childName  << "TAPE.EXE";
  55.  tool->childParms << "ST";
  56.  tool->detachChild();
  57. */
  58. }
  59.  
  60. void Tape::load()
  61. {
  62.  throw GTPMException(ERROR_NOT_YET_SUPPORTED);
  63.  
  64. /*
  65.  tool->childName  << "TAPE.EXE";
  66.  tool->childParms << "ST LOAD";
  67.  tool->detachChild();
  68. */
  69. }
  70.  
  71. void Tape::unload()
  72. {
  73.  throw GTPMException(ERROR_NOT_YET_SUPPORTED);
  74.  
  75. /*
  76.  tool->childName  << "TAPE.EXE";
  77.  tool->childParms << "ST UNLOAD";
  78.  tool->detachChild();
  79. */
  80. }
  81.  
  82. void Tape::rewind()
  83. {
  84.  throw GTPMException(ERROR_NOT_YET_SUPPORTED);
  85.  
  86. /*
  87.  tool->childName  << "TAPE.EXE";
  88.  tool->childParms << "ST REW";
  89.  tool->detachChild();
  90. */
  91. }
  92.  
  93. void Tape::part(OString& command)
  94. {
  95.  throw GTPMException(ERROR_NOT_YET_SUPPORTED);
  96.  
  97. /*
  98.  tool->childName  << "TAPE.EXE";
  99.  tool->childParms << "ST ";
  100.  tool->childParms + command;
  101.  tool->detachChild();
  102. */
  103. }
  104.  
  105. void Tape::format()
  106. {
  107.  throw OPMException("Tape: operation not supported for SCSI-devices", 0);
  108. }
  109.  
  110. void Tape::erase()
  111. {
  112.  throw GTPMException(ERROR_NOT_YET_SUPPORTED);
  113.  
  114. /*
  115.  tool->childName  << "TAPE.EXE";
  116.  tool->childParms << "ST ERASE";
  117.  tool->detachChild();
  118. */
  119. }
  120.  
  121. void Tape::eraseq()
  122. {
  123.  throw GTPMException(ERROR_NOT_YET_SUPPORTED);
  124.  
  125. /*
  126.  tool->childName  << "TAPE.EXE";
  127.  tool->childParms << "ST ERASEQ";
  128.  tool->detachChild();
  129. */
  130. }
  131.  
  132. void Tape::lock()
  133. {
  134.  throw GTPMException(ERROR_NOT_YET_SUPPORTED);
  135.  
  136. /*
  137.  tool->childName  << "TAPE.EXE";
  138.  tool->childParms << "ST RESERVE";
  139.  tool->detachChild();
  140. */
  141. }
  142.  
  143. void Tape::unlock()
  144. {
  145.  throw GTPMException(ERROR_NOT_YET_SUPPORTED);
  146.  
  147. /*
  148.  tool->childName  << "TAPE.EXE";
  149.  tool->childParms << "ST RELEASE";
  150.  tool->detachChild();
  151. */
  152. }
  153.  
  154. void Tape::batch(PSZ batchfile)
  155. {
  156.  throw GTPMException(ERROR_NOT_YET_SUPPORTED);
  157.  
  158. /*
  159.  tool->childName  << "CMD.EXE";
  160.  tool->childParms << "/c ";
  161.  tool->childParms  + batchfile;
  162.  tool->detachChild();
  163. */
  164. }
  165.  
  166. // end of source
  167.