home *** CD-ROM | disk | FTP | other *** search
/ Network Support Encyclopedia 96-1 / novell-nsepro-1996-1-cd2.iso / download / netware / os232.exe / INCLUDE / NWPRINT.H < prev    next >
C/C++ Source or Header  |  1995-05-09  |  12KB  |  518 lines

  1. /******************************************************************************
  2.  
  3.   $Workfile:   nwprint.h  $
  4.   $Revision:   1.14  $
  5.   $Modtime::   08 May 1995 16:28:12                        $
  6.   $Copyright:
  7.  
  8.   Copyright (c) 1989-1995 Novell, Inc.  All Rights Reserved.                      
  9.  
  10.   THIS WORK IS  SUBJECT  TO  U.S.  AND  INTERNATIONAL  COPYRIGHT  LAWS  AND
  11.   TREATIES.   NO  PART  OF  THIS  WORK MAY BE  USED,  PRACTICED,  PERFORMED
  12.   COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED,  ABRIDGED, CONDENSED,
  13.   EXPANDED,  COLLECTED,  COMPILED,  LINKED,  RECAST, TRANSFORMED OR ADAPTED
  14.   WITHOUT THE PRIOR WRITTEN CONSENT OF NOVELL, INC. ANY USE OR EXPLOITATION
  15.   OF THIS WORK WITHOUT AUTHORIZATION COULD SUBJECT THE PERPETRATOR TO
  16.   CRIMINAL AND CIVIL LIABILITY.$
  17.  
  18.  *****************************************************************************/
  19.  
  20. #if ! defined ( NWPRINT_H )
  21. #define NWPRINT_H
  22.  
  23. #if ! defined ( NWCALDEF_H )
  24. # include "nwcaldef.h"
  25. #endif
  26.  
  27. #include "npackon.h"
  28.  
  29. #ifdef __cplusplus
  30. extern "C" {
  31. #endif
  32.  
  33. #define LPT1 1
  34. #define LPT2 2
  35. #define LPT3 3
  36. #define LPT4 4
  37. #define LPT5 5
  38. #define LPT6 6
  39. #define LPT7 7
  40. #define LPT8 8
  41. #define LPT9 9
  42.  
  43. #define START_CAPTURE             1
  44. #define END_CAPTURE               2
  45. #define CANCEL_CAPTURE            3
  46. #define GET_PRINT_JOB_FLAGS       4
  47. #define SET_PRINT_JOB_FLAGS       5
  48. #define GET_BANNER_USER_NAME      6
  49. #define SET_BANNER_USER_NAME      7
  50. #define GET_PRINTER_SETUP_STRING  8
  51. #define SET_PRINTER_SETUP_STRING  9
  52. #define GET_PRINTER_RESET_STRING  10
  53. #define SET_PRINTER_RESET_STRING  11
  54.  
  55. typedef struct
  56. {
  57.   nuint8  clientStation;
  58.   nuint8  clientTask;
  59.   nuint32 clientID;
  60.   nuint32 targetServerID;
  61.   nuint8  targetExecutionTime[6];
  62.   nuint8  jobEntryTime[6];
  63.   nuint16 jobNumber;
  64.   nuint16 formType;
  65.   nuint8  jobPosition;
  66.   nuint8  jobControlFlags;
  67.   nuint8  jobFileName[14];
  68.   nuint8  jobFileHandle[6];
  69.   nuint8  servicingServerStation;
  70.   nuint8  servicingServerTask;
  71.   nuint32 servicingServerID;
  72.   nuint8  jobDescription[50];
  73.   nuint8  clientJobInfoVer;
  74.   nuint8  tabSize;
  75.   nuint16 numberCopies;
  76.   nuint16 printFlags;
  77.   nuint16 maxLines;
  78.   nuint16 maxChars;
  79.   nuint8  formName[16];
  80.   nuint8  reserved[6];    /* must be set to zeros */
  81.   nuint8  bannerUserName[13];
  82.   nuint8  bannerFileName[13];
  83.   nuint8  bannerHeaderFileName[14];
  84.   nuint8  filePathName[80];
  85. } PrintJobStruct;
  86.  
  87. typedef struct
  88. {
  89.   nuint32 clientStation;
  90.   nuint32 clientTask;
  91.   nuint32 clientID;
  92.   nuint32 targetServerID;
  93.   nuint8  targetExecutionTime[6];
  94.   nuint8  jobEntryTime[6];
  95.   nuint32 jobNumber;
  96.   nuint16 formType;
  97.   nuint16 jobPosition;
  98.   nuint16 jobControlFlags;
  99.   nuint8  jobFileName[14];
  100.   nuint32 jobFileHandle;
  101.   nuint32 servicingServerStation;
  102.   nuint32 servicingServerTask;
  103.   nuint32 servicingServerID;
  104.   nuint8  jobDescription[50];
  105.   nuint8  clientJobInfoVer;
  106.   nuint8  tabSize;
  107.   nuint16 numberCopies;
  108.   nuint16 printFlags;
  109.   nuint16 maxLines;
  110.   nuint16 maxChars;
  111.   nuint8  formName[16];
  112.   nuint8  reserved[6];      /* must be set to zeros */
  113.   nuint8  bannerUserName[13];
  114.   nuint8  bannerFileName[13];
  115.   nuint8  bannerHeaderFileName[14];
  116.   nuint8  filePathName[80];
  117. } NWPrintJobStruct;
  118.  
  119. typedef struct PRINTER_STATUS
  120. {
  121.   nuint8  printerHalted;
  122.   nuint8  printerOffline;
  123.   nuint8  currentFormType;
  124.   nuint8  redirectedPrinter;
  125. } PRINTER_STATUS;
  126.  
  127. typedef struct
  128. {
  129.   nuint8    jobDescription[ 50 ];   /* OS/2, VLM only                         */
  130.                                     /* VLM returns or sets only 12 characters */
  131.                                     /* plus the NULL -- a total of 13 nuint8's   */
  132.   nuint8    jobControlFlags;        /* OS/2, VLM only */
  133.   nuint8    tabSize;
  134.   nuint16   numCopies;
  135.   nuint16   printFlags;
  136.   nuint16   maxLines;
  137.   nuint16   maxChars;
  138.   nuint8    formName[ 13 ];
  139.   nuint8    reserved[ 9 ];
  140.   nuint16   formType;
  141.   nuint8    bannerText[ 13 ];
  142.   nuint8    reserved2;
  143.   nuint16   flushCaptureTimeout;    /* DOS/WIN only */
  144.   nuint8    flushCaptureOnClose;    /* DOS/WIN only */
  145. } NWCAPTURE_FLAGSRW;
  146.  
  147. #define NWCAPTURE_FLAGS1 NWCAPTURE_FLAGSRW
  148.  
  149. typedef struct
  150. {
  151.   NWCONN_HANDLE connID;
  152.   nuint32 queueID;
  153.   nuint16 setupStringMaxLen;
  154.   nuint16 resetStringMaxLen;
  155.   nuint8  LPTCaptureFlag;         /* DOS/WIN only */
  156.   nuint8  fileCaptureFlag;        /* DOS/WIN only */
  157.   nuint8  timingOutFlag;          /* DOS/WIN only */
  158.   nuint8  inProgress;             /* DOS/WIN only */
  159.   nuint8  printQueueFlag;         /* DOS/WIN only */
  160.   nuint8  printJobValid;          /* DOS/WIN only */
  161.   nstr8   queueName[ 65 ];        /* VLM only     */
  162. } NWCAPTURE_FLAGSRO;
  163.  
  164. #define NWCAPTURE_FLAGS2 NWCAPTURE_FLAGSRO
  165.  
  166. typedef struct
  167. {
  168.   nuint32 connRef;
  169.   nuint32 queueID;
  170.   nuint16 setupStringMaxLen;
  171.   nuint16 resetStringMaxLen;
  172.   nuint8  LPTCaptureFlag;         /* DOS/WIN only */
  173.   nuint8  fileCaptureFlag;        /* DOS/WIN only */
  174.   nuint8  timingOutFlag;          /* DOS/WIN only */
  175.   nuint8  inProgress;             /* DOS/WIN only */
  176.   nuint8  printQueueFlag;         /* DOS/WIN only */
  177.   nuint8  printJobValid;          /* DOS/WIN only */
  178.   nstr8   queueName[ 65 ];        /* VLM only     */
  179. } NWCAPTURE_FLAGSRO3;
  180.  
  181. #define NWCAPTURE_FLAGS3 NWCAPTURE_FLAGSRO3
  182.  
  183. #ifdef N_PLAT_OS2
  184.  
  185. #define N_APIPIPE                 "\\PIPE\\NWSPOOL\\API"  /*IPC to API*/
  186. #define NET_SPOOL_SEG             "\\sharemem\\nwspool\\seg1"
  187. #define NET_SPOOL_SEM1            "\\sem\\nwspool\\sem1"
  188. #define NET_SPOOL_SEM2            "\\sem\\nwspool\\sem2"
  189. #define NET_SPOOL_SEM3            "\\sem\\nwspool\\sem3"
  190.  
  191. typedef struct
  192. {
  193.   nuint32   targetServerID;
  194.   nuint8    targetExecutionTime[6];
  195.   nuint8    jobDescription[50];
  196.   nuint8    jobControlFlags;
  197.   nuint8    tabSize;
  198.   nuint16   numberCopies;
  199.   nuint16   printFlags;
  200.   nuint16   maxLines;
  201.   nuint16   maxChars;
  202.   nuint8    formName[16];
  203.   nuint8    reserved1[6];  /* must be set to zeros */
  204.   nuint16   formType;
  205.   nuint8    bannerFileName[13];
  206.   nuint8    reserved2;    /* must be set to zero */
  207.  
  208.   /* The following fields can be gotten, but not set */
  209.   NWCONN_HANDLE connID;
  210.   nuint32   queueID;
  211.   nuint16   setupStringMaxLength;
  212.   nuint16   resetStringMaxLength;
  213. } SpoolFlagsStruct;
  214.  
  215. typedef struct _NWPipeStruct
  216. {
  217.   nuint16 fwCommand;
  218.   nuint16 idSession;
  219.   nuint32 idQueue;
  220.   nuint16 idConnection;
  221.   nuint16 idDevice;
  222.   nuint16 fwMode;
  223.   nuint16 fwScope;
  224.   nuint16 cbBufferLength;
  225.   nuint8  fbValidBuffer;
  226.   SpoolFlagsStruct  nwsSpoolFlags;
  227.   nuint8  szBannerUserName[13];
  228.   nuint16 rc;
  229. } NWPipeStruct;
  230.  
  231. NWCCODE N_API NWSpoolGetPrintJobFlags
  232. (
  233.    nuint16     deviceID,
  234.    SpoolFlagsStruct N_FAR * flagsBuffer,
  235.    nuint16     mode,
  236.    pnuint16    scope
  237. );
  238.  
  239. NWCCODE N_API NWSpoolSetPrintJobFlags
  240. (
  241.   nuint16      deviceID,
  242.   SpoolFlagsStruct N_FAR * flagsBuffer,
  243.   nuint16      unused
  244. );
  245.  
  246. NWCCODE N_API NWSpoolGetPrinterSetupString
  247. (
  248.   nuint16      deviceID,
  249.   pnuint16     bufferLen,
  250.   pnstr8       buffer,
  251.   nuint16      mode,
  252.   pnuint16     scope
  253. );
  254.  
  255. NWCCODE N_API NWSpoolSetPrinterSetupString
  256. (
  257.   nuint16      deviceID,
  258.   nuint16      bufferLen,
  259.   pnstr8       buffer,
  260.   nuint16      scope
  261. );
  262.  
  263. NWCCODE N_API NWSpoolGetPrinterResetString
  264. (
  265.   nuint16      deviceID,
  266.   pnuint16     bufferLen,
  267.   pnstr8       buffer,
  268.   nuint16      mode,
  269.   pnuint16     scope
  270. );
  271.  
  272. NWCCODE N_API NWSpoolSetPrinterResetString
  273. (
  274.   nuint16      deviceID,
  275.   nuint16      bufferLen,
  276.   pnstr8       buffer,
  277.   nuint16      scope
  278. );
  279.  
  280. #else
  281.  
  282. typedef struct
  283. {
  284.   nuint8  status;
  285.   nuint8  flags;
  286.   nuint8  tabSize;
  287.   nuint8  serverPrinter;
  288.   nuint8  numberCopies;
  289.   nuint8  formType;
  290.   nuint8  reserved;
  291.   nuint8  bannerText[13];
  292.   nuint8  reserved2;
  293.   nuint8  localLPTDevice;
  294.   nuint16 captureTimeOutCount;
  295.   nuint8  captureOnDeviceClose;
  296. } CaptureFlagsStruct;
  297.  
  298. typedef struct
  299. {
  300.   nuint8  status;
  301.   nuint8  flags;
  302.   nuint8  tabSize;
  303.   nuint8  serverPrinter;
  304.   nuint8  numberCopies;
  305.   nuint8  formType;
  306.   nuint8  reserved;
  307.   nuint8  bannerText[13];
  308.   nuint8  reserved2;
  309.   nuint8  localLPTDevice;
  310.   nuint16 captureTimeOutCount;
  311.   nuint8  captureOnDeviceClose;
  312.   nuint16 maxLines;
  313.   nuint16 maxChars;
  314.   nuint8  formName[13];
  315.   nuint8  LPTCaptureFlag;
  316.   nuint8  fileCaptureFlag;
  317.   nuint8  timingOutFlag;
  318.   pnstr8  printerSetupBuffAddr;
  319.   pnstr8  printerResetBuffAddr;
  320.   nuint8  connID;
  321.   nuint8  captureInProgress;
  322.   nuint8  printQueueFlag;
  323.   nuint8  printJobValid;
  324.   nuint32 queueID;
  325.   nuint16 printJobNumber;
  326. } FlagBufferStruct;
  327.  
  328. /* Used by VLM code */
  329. typedef struct
  330. {
  331.   nuint32 nameNDSID;
  332.   nuint16 connHandle;
  333.   nstr8   queueName[ 65 ];
  334.   nuint32 targetServerID;
  335.   nuint8  targetExecutionTime[ 6 ];
  336.   nuint16 jobControlFlags;
  337.   nuint8  bannerName[ 13 ];
  338.   nuint8  jobDescription[ 13 ];
  339.   nuint32 reserved;
  340. } ExtendedCaptureFlags;
  341.  
  342. NWCCODE N_API NWGetPrinterDefaults
  343. (
  344.    pnuint8     status,
  345.    pnuint8     flags,
  346.    pnuint8     tabSize,
  347.    pnuint8     serverPrinter,
  348.    pnuint8     numberCopies,
  349.    pnuint8     formType,
  350.    pnstr8      bannerText,
  351.    pnuint8     localLPTDevice,
  352.    pnuint16    captureTimeOutCount,
  353.    pnuint8     captureOnDeviceClose
  354. );
  355.  
  356. NWCCODE N_API NWSetPrinterDefaults
  357. (
  358.    nuint8      flags,
  359.    nuint8      tabSize,
  360.    nuint8      serverPrinter,
  361.    nuint8      numberCopies,
  362.    nuint8      formType,
  363.    pnstr8      bannerText,
  364.    nuint8      localLPTDevice,
  365.    nuint16     captureTimeOutCount,
  366.    nuint8      captureOnDeviceClose
  367. );
  368.  
  369. NWCCODE N_API NWStartLPTCapture
  370. (
  371.    nuint16     deviceID
  372. );
  373.  
  374. NWCCODE N_API NWGetLPTCaptureStatus
  375. (
  376.    NWCONN_HANDLE N_FAR * conn
  377. );
  378.  
  379. NWCCODE N_API NWStartFileCapture
  380. (
  381.    NWCONN_HANDLE  conn,
  382.    nuint8         LPTDevice,
  383.    NWDIR_HANDLE   dirhandle,
  384.    pnstr8         filePath
  385.  
  386. );
  387.  
  388. #endif
  389.  
  390. NWCCODE N_API NWSpoolStartCapture
  391. (
  392.    nuint16        deviceID,
  393.    nuint32        queueID,
  394.    NWCONN_HANDLE  conn,
  395.    nuint16        scope
  396. );
  397.  
  398. NWCCODE N_API NWSpoolEndCapture
  399. (
  400.    nuint16        deviceID,
  401.    nuint16        scope
  402. );
  403.  
  404. NWCCODE N_API NWSpoolCancelCapture
  405. (
  406.    nuint16        deviceID,
  407.    nuint16        scope
  408. );
  409.  
  410. NWCCODE N_API NWSpoolGetBannerUserName
  411. (
  412.    pnstr8         username,
  413.    nuint16        mode,
  414.    pnuint16       scope
  415. );
  416.  
  417. NWCCODE N_API NWSpoolSetBannerUserName
  418. (
  419.    pnstr8         username,
  420.    nuint16        scope
  421. );
  422.  
  423. NWCCODE N_API NWGetPrinterStatus
  424. (
  425.    NWCONN_HANDLE  conn,
  426.    nuint16        printerNumber,
  427.    PRINTER_STATUS N_FAR * status
  428. );
  429.  
  430. NWCCODE N_API NWStartQueueCapture
  431. (
  432.    NWCONN_HANDLE  conn,
  433.    nuint8         LPTDevice,
  434.    nuint32        queueID,
  435.    pnstr8         queueName
  436. );
  437.  
  438. NWCCODE N_API NWGetCaptureStatus
  439. (
  440.    nuint8         LPTDevice
  441. );
  442.  
  443. NWCCODE N_API NWFlushCapture
  444. (
  445.    nuint8         LPTDevice
  446. );
  447.  
  448. NWCCODE N_API NWEndCapture
  449. (
  450.    nuint8         LPTDevice
  451. );
  452.  
  453. NWCCODE N_API NWCancelCapture
  454. (
  455.    nuint8         LPTDevice
  456. );
  457.  
  458. NWCCODE N_API NWGetBannerUserName
  459. (
  460.    pnstr8         userName
  461. );
  462.  
  463. NWCCODE N_API NWSetBannerUserName
  464. (
  465.    pnstr8         userName
  466. );
  467.  
  468. NWCCODE N_API NWGetCaptureFlags
  469. (
  470.    nuint8         LPTDevice,
  471.    NWCAPTURE_FLAGS1 N_FAR * captureFlags1,
  472.    NWCAPTURE_FLAGS2 N_FAR * captureFlags2
  473. );
  474.  
  475. NWCCODE N_API NWGetCaptureFlagsConnRef
  476. (
  477.    nuint8         LPTDevice,
  478.    NWCAPTURE_FLAGS1 N_FAR * captureFlags1,
  479.    NWCAPTURE_FLAGS3 N_FAR * captureFlags3
  480. );
  481.  
  482. NWCCODE N_API NWSetCaptureFlags
  483. (
  484.    NWCONN_HANDLE  conn,
  485.    nuint8         LPTDevice,
  486.    NWCAPTURE_FLAGS1 N_FAR * captureFlags1
  487. );
  488.  
  489. NWCCODE N_API NWGetPrinterStrings
  490. (
  491.    nuint8         LPTDevice,
  492.    pnuint16       setupStringLen,
  493.    pnstr8         setupString,
  494.    pnuint16       resetStringLen,
  495.    pnstr8         resetString
  496. );
  497.  
  498. NWCCODE N_API NWSetPrinterStrings
  499. (
  500.    nuint8         LPTDevice,
  501.    nuint16        setupStringLen,
  502.    pnstr8         setupString,
  503.    nuint16        resetStringLen,
  504.    pnstr8         resetString
  505. );
  506.  
  507. NWCCODE N_API NWGetMaxPrinters
  508. (
  509.    pnuint16       numPrinters
  510. );
  511.  
  512. #ifdef __cplusplus
  513. }
  514. #endif
  515.  
  516. #include "npackoff.h"
  517. #endif
  518.