Changeset 12


Ignore:
Timestamp:
Apr 22, 2013, 12:18:17 AM (12 years ago)
Author:
Alex Taylor
Message:

RPUEnumPrinters: Do not attempt to read the remote printer queue of LAN printers.
RPUPrinterQuery: Return additional job flags.

Location:
rxprtutl/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • rxprtutl/trunk/rxprtutl.c

    r11 r12  
    523523    PSZ          pszToken;
    524524    HOBJECT      hObj;                  // printer WPS object handle
    525     ULONG        flType     = SPL_PR_QUEUE | SPL_PR_DIRECT_DEVICE,
     525    ULONG        flType     = SPL_PR_QUEUE | SPL_PR_DIRECT_DEVICE | SPL_PR_LOCAL_ONLY,
    526526                 cbBuf      = 0,
    527527                 cTotal     = 0,
     
    631631                WriteCompoundVariable( szStemNode, "!description",
    632632                                       pPInfo->pszDescription );
    633                 WriteCompoundVariable( szStemNode, "!queue", "");
     633                WriteCompoundVariable( szStemNode, "!queue",
     634                                       pPInfo->pszPrintDestinationName);
    634635                WriteCompoundVariable( szStemNode, "!flags", "");
    635636                WriteCompoundVariable( szStemNode, "!handle", "");
    636 
    637637                WriteCompoundVariable( szStemNode, "!host",
    638638                                       pPInfo->pszComputerName );
     
    12791279 *   (stem).i.!port         Name of the port the printer is using            *
    12801280 *   (stem).i.!driver       List of the drivers used by this printer         *
    1281  * TODO:                                                                     *
    1282  *   (stem).i.!flags        Zero or more of the following flags (any order): *
     1281 *   (stem).i.!jobflags     Zero or more of the following flags (any order): *
    12831282 *                            E  A printer error has occurred                *
    1284  *                            H  Printer destination is paused               *
     1283 *                            H  Printer destination is paused (held)        *
    12851284 *                            I  Intervention required                       *
    12861285 *                            N  Printer has raised a notification alert     *
    12871286 *                            O  Printer is offline                          *
    12881287 *                            P  Printer is out of paper                     *
    1289  *                            X  Printer is not processing/paused            *
    12901288 *                                                                           *
    12911289 * REXX ARGUMENTS:                                                           *
     
    13031301              cbNeeded   = 0;
    13041302    PSZ       pszDeviceName;
    1305     CHAR      szStem[ US_STEM_MAXZ ];   // compound variable stem name
     1303    CHAR      szFlags[ 8 ] = {0},
     1304              szStem[ US_STEM_MAXZ ];   // compound variable stem name
    13061305    SPLERR    rc;
    13071306
     
    13491348        WriteCompoundVariable( szStem, "!description", pInfo->pszComment );
    13501349        WriteCompoundVariable( szStem, "!drivers", pInfo->pszDrivers );
     1350        if ( pInfo->fsStatus & PRJ_ERROR  )      strcat( szFlags, "E");
     1351        if ( pInfo->fsStatus & PRJ_DESTPAUSED )  strcat( szFlags, "H");
     1352        if ( pInfo->fsStatus & PRJ_INTERV )      strcat( szFlags, "I");
     1353        if ( pInfo->fsStatus & PRJ_NOTIFY )      strcat( szFlags, "N");
     1354        if ( pInfo->fsStatus & PRJ_DESTOFFLINE ) strcat( szFlags, "O");
     1355        if ( pInfo->fsStatus & PRJ_DESTNOPAPER ) strcat( szFlags, "P");
     1356        WriteCompoundVariable( szStem, "!jobflags", szFlags );
    13511357        MAKERXSTRING( *prsResult, "1", 1 );
    13521358    }
  • rxprtutl/trunk/rxprtutl.def

    r11 r12  
    11LIBRARY     RXPRTUTL INITINSTANCE TERMINSTANCE
    22DATA        MULTIPLE NONSHARED
    3 DESCRIPTION '@#Alex Taylor:0.2.1#@##1## 21 Apr 2013 15:09:29     REINFORCE::::::@@REXX Printer Management Utilities'
     3DESCRIPTION '@#Alex Taylor:0.2.1#@##1## 21 Apr 2013 18:10:57     REINFORCE::::::@@REXX Printer Management Utilities'
    44
    55EXPORTS     RPULoadFuncs
  • rxprtutl/trunk/testlib.cmd

    r5 r12  
    5858            SAY '  Driver:' details.!drivers
    5959            SAY '  Port:  ' details.!port
     60            SAY '  Status:' details.!jobflags
    6061        END
    6162        SAY
Note: See TracChangeset for help on using the changeset viewer.