Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88 lines
3.0 KiB

  1. BOOL InitializeMonitor(VOID)
  2. This routine is called once by the print manager to start the monitor.
  3. Any one time only initializition by the monitor is done here. For
  4. the AppleTalk Monitor, we start a thread to capture networked printers.
  5. BOOL AddPort()
  6. This routine is called when the user selects 'other...' from the list
  7. of ports. The AppleTalk Monitor presents a browse dialog to allow
  8. the user to choose an AppleTalk printer. This dialog is modeled
  9. after the Macintosh Chooser.
  10. BOOL EnumPorts()
  11. This routine is called whenever the print manager needs to determine
  12. a list of available ports. We gather the data concerning each
  13. configured port and pass it back.
  14. BOOL DeletePort()
  15. This routine is called when the print manager user selects 'Delete'
  16. from the Details... dialog of the print manager. We remove the
  17. selected port from the list and release the printer if it is
  18. captured.
  19. ISSUE: Can we guarantee that a job is not in progress for this
  20. port when the call is made? How long can we take for this call?
  21. If we have to release the printer, should we queue up a request
  22. to our captive thread?
  23. BOOL ConfigurePort()
  24. This routine is called whenever the print manager user presses the
  25. configure button for one of our ports. The AppleTalk Monitor
  26. presents a dialog to allow the user to capture or not capture
  27. the specified printer.
  28. OpenPort()
  29. Called by the print manager to establish a connection and to generate
  30. a handle to the port. The AppleTalk Monitor attempts to PAPOpen the
  31. printer, and if successful, returns a handle for the port.
  32. ISSUES: What should the handle value be? Do we return false if
  33. someone else has the printer open already? What happens if someone
  34. tries to open the printer while it's being captured?
  35. ClosePort()
  36. Not sure the diff between close port and enddocport
  37. ReadPort()
  38. This routine is called when the print manager wants to read data
  39. from the printer. Not sure if this is synchronous or not,
  40. what we are supposed to do if there is no data to be read, or
  41. what we are to do if there is more data to be read than the
  42. specified buffer can hold.
  43. WritePort()
  44. This routine is called when the print manager wants to send data
  45. to a printer. Is it synchronous or asynchronous? What are the
  46. limits on the buffer sizes? What errors can be returned?
  47. StartDocPort()
  48. Called by the print manager at the beginning of a print job.
  49. The AppleTalk Monitor should reset any job performance counts,
  50. save a handle to the printer object (and job?) so that job
  51. status can be updated and that the job can be deleted when
  52. finished.
  53. EndDocPort()
  54. Called by the print manager at the end of the print job.
  55. The AppleTalk Monitor should mark performance counts as
  56. valid and store them somewhere as well as change the job
  57. status to complete and delete the print job.