Subversion Repositories filter_foundry

Rev

Rev 193 | Go to most recent revision | Blame | Last modification | View Log | RSS feed

  1. /*
  2.         This file is part of a common library
  3.     Copyright (C) 1990-2009 Toby Thain, toby@telegraphics.com.au
  4.  
  5.     This program is free software; you can redistribute it and/or modify
  6.     it under the terms of the GNU General Public License as published by
  7.     the Free Software Foundation; either version 2 of the License, or
  8.     (at your option) any later version.
  9.  
  10.     This program is distributed in the hope that it will be useful,
  11.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.     GNU General Public License for more details.
  14.  
  15.     You should have received a copy of the GNU General Public License
  16.     along with this program; if not, write to the Free Software
  17.     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  18. */
  19.  
  20. #include <AppleTalk.h> // for AddrBlock
  21. #include <types.h>
  22.  
  23. typedef struct{
  24.     long    systemStuff;
  25.     Str255  statusStr;
  26. } PAPStatusRec;
  27.  
  28. enum{
  29.         PAP_FLOW_QUANTUM=1,
  30.         PAP_BUFFER_SIZE=512*PAP_FLOW_QUANTUM
  31. };
  32.  
  33. OSErr PAPLoad(Handle*printer_name,Handle*PAP_code);
  34.  
  35. /*********************************************************************
  36. Project :       GUSI                            -       Grand Unified Socket Interface
  37. File            :       GUSIPAP.cp              -       Printer Access Protocol Sockets
  38. Author  :       Matthias Neeracher
  39.  
  40.         Based on code from
  41.                 Sak Wathanasin <sw@nan.co.uk>
  42.                 David A. Holzgang, _Programming the LaserWriter_, Addison-Wesley 1991
  43.                 Apple's Q&A stack
  44. *********************************************************************/
  45. pascal short PAPOpen(short *refNum,char *printerName,short flowQuantum,PAPStatusRec *statusBuf,short *compState,Ptr papCode) = {0x205F,0x4EA8,0x0000};
  46. pascal short PAPRead(short refNum,char *buffer,short *length,short *eof,short *compState,Ptr papCode) = {0x205F,0x4EA8,0x0004};
  47. pascal short PAPWrite(short refNum,char *buffer,short length,short eof,short *compState,Ptr papCode) = {0x205F,0x4EA8,0x0008};
  48. pascal short PAPStatus(char *printerName,PAPStatusRec *statusBuff,AddrBlock *netAddr,Ptr papCode) = {0x205F,0x4EA8,0x000C};
  49. pascal short PAPClose(short refNum,Ptr papCode) = {0x205F,0x4EA8,0x0010};
  50. pascal short PAPUnload(Ptr papCode) = {0x205F,0x4EA8,0x0014};
  51.