3.1.1 Abstract Data Model
This section describes a conceptual model of a possible data organization that a print server implementation might need to maintain in order to participate in this protocol. The described organization is provided to facilitate the explanation of how the protocol behaves. This specification does not mandate that implementations adhere to this model as long as their external behavior is consistent with that described in this specification.
This protocol depends on an abstract data model that maintains information about printers and related objects. These objects represent physical output devices, and they are used in the protocol to communicate with those devices, to print to them, and to manage their configurations.
A print server has a SECURITY_DESCRIPTOR controlling access to the server object. By default, the SECURITY_DESCRIPTOR allows SERVER_ALL_ACCESS to members of the Administrators group and SERVER_EXECUTE access to all other users.
A print server behaves as if it hosted the following objects in the following hierarchy.
Note The abstract data model specified for this protocol is identical to that specified for the Print System Asynchronous Remote Protocol [MS-PAR]. A print server maintains only one copy of the data underlying the implementation that exposes this protocol or [MS-PAR].
List of Print Server Names: It is assumed that a client of this protocol has obtained the name of at least one print server that supports this protocol before it is invoked. There are various ways a client can build a List of Print Server Names [MS-ADLS] [MS-ADSC] [MS-RAP] [MS-SMB2].
The server name that is passed to the print server by the client can differ from the server name that the print server determined upon its own initialization; for example, when aliasing of server names via DNS or directory services (DS) takes place.
Other methods, such as RpcAddPerMachineConnection (section 18.104.22.168.24), pass in an additional server name parameter that identifies a print server that is different from the one handling the API call. To correctly resolve server names, each print server maintains a mapping between server names and server addresses. When composing a response to the client, the print server that handles the API call uses the same server name that the client passed as the parameter in this call.
A print server does not persist the List of Print Server Names between server restarts.
List of Form Objects: Form objects represent information about units of physical media on output devices, which are available to print clients. Examples are printer forms, such as sheets of paper. Each form object also contains a data element indicating whether the form object was added by a user and if the form object is specific to a printer.
Form objects are added, removed, accessed, and enumerated using Form Management Methods (section 22.214.171.124).
A print server initializes the List of Form Objects to contain an implementation-specific set of built-in form objects. A print server persists the List of Form Objects between server restarts.
List of Printers: Each printer, also referred to as a print queue, represents a physical print device or a number of homogeneous physical devices installed on the print server. Each printer object maintains the following data elements:
A name that uniquely identifies the printer.
A reference to a printer driver object for the printer.
A reference to a print processor object.
A list of queued or printing print jobs, where each print job has a SECURITY_DESCRIPTOR controlling access to the print job and a data type, which specifies the type of data provided by the printing application to the printer during the print job. By default, the SECURITY_DESCRIPTOR allows JOB_ALL_ACCESS to members of the Administrators group and to the client who created the print job, as well as a separate JOB_READ access to the client who created the job. Each print job can also have zero or more Job Named Properties.<223><224>
Global _DEVMODE settings.
Per-user _DEVMODE settings.
A SECURITY_DESCRIPTOR controlling access to the printer object. By default, the SECURITY_DESCRIPTOR allows PRINTER_ALL_ACCESS to members of the Administrators group and PRINTER_ACCESS_USE to all other users.
The name of the default data type for the printer.
A list of clients to be notified by the server about printer changes. Each entry in this list contains the change notifications requested by one client (the notification filter settings from the client), the mechanism used to send notifications to this client, and the information about the client destination where the server sends these notifications. Clients can request printer change notifications using Notification Methods (section 126.96.36.199).
A print server initializes the List of Printers to the persisted List of Printers. The server does not persist the List of Printers between server restarts.
Persisted List of Printers: A print server maintains a Persisted List of Printers in persistent storage, which is identical to the List of Printers. A print server updates the Persisted List of Printers whenever it updates the List of Printers.
List of Printer Drivers: Each printer driver represents the software component responsible for converting print content submitted by applications into device-specific commands. Each printer driver object maintains the following data elements:
A name that uniquely identifies the printer driver.
A rendering module, a configuration module, and a data module.
In addition, each printer driver object can maintain a list of Boolean values indicating whether the manufacturer of the printer driver declares it to have any of the following attributes, where a Boolean value of TRUE indicates that the printer driver has that attribute:
The printer driver is a class printer driver.
The printer driver is a derived printer driver.
Printers using the printer driver cannot be shared from the print server to print clients.
The printer driver is intended for use with fax printers.
The printer driver is intended for use with file printers.
The printer driver is intended for use with service printers.
The printer driver is intended for use with virtual printers.
In addition, each printer driver object maintains the following optional data elements:
A list of dependent files.
Information about the printer driver manufacturer, timestamp, and driver version.<225>
Drivers are added, removed, enumerated, and managed using Printer Driver Management Methods (section 188.8.131.52).
A print server initializes the List of Printers to an empty list. The server persists the list of drivers between server restarts.
List of Language Monitors: A language monitor is a module that is tightly coupled to a printer driver and is part of the printer driver installation. It filters RAW format data as it is being sent from the printer driver to a port monitor, which then sends the data to the port. Language monitors add control information to the data stream, such as commands defined by a page description language (PDL). Language monitors are optional and are only associated with a particular type of printer if specified in the INF file for the printer.
Language monitors are added, removed, and enumerated using Port Monitor Management Methods (section 184.108.40.206).
A print server initializes the List of Language Monitors to an empty list. The server persists the List of Language Monitors between server restarts.
List of Port Monitors: A port monitor is a component that can send buffers of data to devices using supported protocols. Port monitors can manage extended communication with the device, such as collection status information from the device. Port monitors can expose zero or more ports.
Port monitor modules are implementation-specific for a given port type. A printer port identifies a device connected to the machine via an implementation-specific protocol understood by its parent port monitor.
Port monitors are added, removed, and enumerated using Port Monitor Management Methods (section 220.127.116.11).
A print server initializes the list of port monitors to an empty list.<226> The server persists the list of port monitors between server restarts.
List of Ports: A port represents a connection to an actual print device. Ports are exposed and managed by port monitors.
Each port monitor can persist the list of ports it manages between server restarts.
List of Print Providers: A print provider performs transparent routing of print system calls to a local or remote spooler. When RpcEnumPrinters (section 18.104.22.168.1) is called, an implementation-defined print provider name can be returned.<227>
A print server initializes the list of print providers to contain an implementation-specific set of included print providers. A print server persists the list of print providers between server restarts.<228>
List of Print Processors: Print processors, provided by device manufacturers or generic suppliers, perform additional manipulation of print content before it is sent to the device.
A print server persists the list of print processors between server restarts.
List of Known Printers: The server can maintain a list of known printers that includes printers not installed on the print server but installed on other print servers reachable on the network. The printers in this list are only used when composing a response for RpcEnumPrinters with the appropriate flags set, as specified in RpcEnumPrinters. This list facilitates printer detection in networks without directory services.
A print server does not persist the list of known printers between server restarts.
List of Warned Printer Drivers: The server can maintain a List of Printers that cannot be added through calls to RpcAddPrinterDriverEx (section 22.214.171.124.8) unless the appropriate flag is set, as specified in RpcAddPrinterDriverEx.<229>
If a print server maintains a list of List of Warned Printer Drivers, it is persisted between server restarts.<230>
List of Notification Clients: A print server maintains a list of print clients that are notified upon server changes. Each entry in this list contains the change notifications requested by one client (the notification filter settings from the client), the mechanism used to send notifications to that client, and the information about the client destination where the server sends these notifications. Clients can request server change notifications by using Notification Methods (section 126.96.36.199).
A print server does not persist the list of notification clients between server restarts.
Job Named Properties: Each print job in a print queue can have zero or more Job Named Properties (also referred to as named properties or properties). The Job Named Properties are created, written, read, and deleted by the client. Each Job Named Property contains a name and a value. Unless deleted by the client, the Job Named Properties of a print job persist as long as the respective print job exists in the print queue.<231>
List of Per-Machine Connections: The server maintains a list of shared printers on other print servers. When a print server is used as a print client, all users logging on to the machine can use printers in this list without explicitly specifying the print server name or printer name of the shared printer.
A print server persists the list of per-machine connections between server restarts.
Branch Office Print Remote Log Entries: Each shared printer on a print server can be configured to operate in branch office print mode.<232> This mode enables a print client to print documents directly to a print device as defined by the print server, instead of routing print data to the server and then to the print device.
When in branch office print mode, if branch office print remote logging is enabled, the print client creates certain event channel entries on the print server in response to Windows Events while processing a print job. To do this, the client creates a structure that contains a Branch Office Print Remote Log Entry with the information needed to create the event ID in the correct event channel on the server, and it sends it to the server by using RpcLogJobInfoForBranchOffice (section 188.8.131.52.1).
If the print server cannot be contacted when the print job is being processed, the print client writes remote log entries to a Branch Office Print Remote Log Offline Archive (section 3.2.1) for transmission at a later time.
The abstract data model associates each printer with a single printer driver, one or more printer ports, and exactly one print processor. Every object stored in the abstract data model defines an associated set of attributes, as specified in IDL Data Types (section 2.2.1) and Custom-Marshaled Data Types (section 2.2.2).
The server is responsible for ensuring consistency among persistently stored objects and their transient copies.<234> The server is also responsible for managing any resources, including memory, disk space, locks, and physical ports, that are used for object representations, throughout the lifetimes of the objects.
Note: The previous conceptual data can be implemented using a variety of techniques. A print server can implement such data as needed.