Lines Matching refs:printer

73 	name of the default printer from storage, caches the icons for
74 a selected printer.
113 // Cache icons for selected printer
145 Printer* printer;
146 while ((printer = Printer::At(0)) != NULL) {
147 printer->AbortPrintThread();
148 UnregisterPrinter(printer);
182 PrintServerApp::RegisterPrinter(BDirectory* printer)
186 if (printer->ReadAttrString(PSRV_PRINTER_ATTR_TRANSPORT, &transport) == B_OK
187 && printer->ReadAttrString(PSRV_PRINTER_ATTR_TRANSPORT_ADDR, &address)
189 && printer->ReadAttrString(PSRV_PRINTER_ATTR_CNX, &connection) == B_OK
190 && printer->ReadAttrString(PSRV_PRINTER_ATTR_STATE, &state) == B_OK
194 // check if printer is already registered
196 if (printer->GetNodeRef(&node) != B_OK)
202 // register new printer
205 AddHandler(new Printer(printer, resource));
213 PrintServerApp::UnregisterPrinter(Printer* printer)
215 RemoveHandler(printer);
216 Printer::Remove(printer);
217 printer->Release();
222 PrintServerApp::NotifyPrinterDeletion(Printer* printer)
226 fResourceManager.Free(printer->GetResource());
235 BEntry printer(entry);
236 if (printer.InitCheck() == B_OK && printer.IsDirectory()) {
237 BDirectory dir(&printer);
246 Printer* printer = Printer::Find(node);
247 if (printer) {
248 if (printer == fDefaultPrinter)
250 UnregisterPrinter(printer);
258 BDirectory printer(node);
259 if (printer.InitCheck() == B_OK)
260 RegisterPrinter(&printer);
273 // Find directory containing printer definition nodes
288 // Register printer definition nodes
345 /*! Creates printer definition/spool directory. It sets the
350 @param printerName Name of printer to create.
351 @param driverName Name of driver to use for this printer.
361 // Find directory containing printer definitions
368 // Create our printer definition/spool directory
370 BDirectory printer;
372 status = printersDir.CreateDirectory(printerName, &printer);
374 printer.SetTo(&printersDir, printerName);
378 BNodeInfo(&printer).GetType(type);
383 // the printer exists, but is not the default printer
388 // the printer exists, but no default at all
392 "A printer with that name already exists, "
397 "A printer with that name already exists, "
412 // Set its type to a printer
413 BNodeInfo info(&printer);
417 printer.WriteAttr(PSRV_PRINTER_ATTR_PRT_NAME, B_STRING_TYPE, 0, printerName,
419 printer.WriteAttr(PSRV_PRINTER_ATTR_DRV_NAME, B_STRING_TYPE, 0, driverName,
421 printer.WriteAttr(PSRV_PRINTER_ATTR_TRANSPORT, B_STRING_TYPE, 0,
423 printer.WriteAttr(PSRV_PRINTER_ATTR_TRANSPORT_ADDR, B_STRING_TYPE, 0,
425 printer.WriteAttr(PSRV_PRINTER_ATTR_CNX, B_STRING_TYPE, 0, connection,
430 // Notify printer driver that a new printer definition node
432 printer.WriteAttr(PSRV_PRINTER_ATTR_STATE, B_STRING_TYPE, 0, "free",
438 if (printer.GetEntry(&entry) == B_OK)
446 /*! Makes a new printer the active printer. This is done simply
448 the icon of the BNode for the printer. Ofcourse, we need to
449 change the icon of the "old" default printer first back to a
450 "non-active" printer icon first.
452 @param printerName Name of the new active printer.
458 // Find the node of the "old" default printer
468 // Find the node for the new default printer
485 //! Handles calling the printer drivers for printing a spooled job.
491 Printer* printer = Printer::At(i);
492 printer->HandleSpooledJob();
497 /*! Loads the currently selected printer from a private settings
510 /*! Stores the currently selected printer in a private settings
526 /*! Find the BNode representing the specified printer. It searches
527 *only* in the users printer definitions.
529 @param name Name of the printer to look for.
530 @param node BNode to set to the printer definition node.
536 // Find directory containing printer definitions