/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
#include "time.h"
#include "dispatch.h"
#include <syslog.h>
/**
** s_accept_dest()
**/
void
{
char *destination;
/*
* Have we seen this destination as a printer?
*/
else {
dump_pstatus ();
}
/*
* Have we seen this destination as a class?
*/
else {
dump_cstatus ();
}
else
return;
}
/**
** s_reject_dest()
**/
void
{
char *destination,
*reason;
/*
* Have we seen this destination as a printer?
*/
else {
dump_pstatus ();
}
/*
* Have we seen this destination as a class?
*/
else {
dump_cstatus ();
}
else
return;
}
/**
** s_enable_dest()
**/
void
{
char *printer;
/*
* Have we seen this printer before?
*/
else
else
return;
}
/**
** s_disable_dest()
**/
void
{
char *destination,
*reason,
*req_id = 0;
/*
* Have we seen this printer before?
*/
/*
* If we are to cancel a currently printing request,
* we will send back the request's ID.
* Save a copy of the ID before calling "disable()",
* in case the disabling loses it (e.g. the request
* might get attached to another printer). (Actually,
* the current implementation won't DETACH the request
* from this printer until the child process responds,
* but a future implementation might.)
*/
if (req_id) {
req_id = 0;
}
} else
} else
if (req_id)
return;
}
/**
** s_load_filter_table()
**/
void
{
trash_filters ();
if (Loadfilters((char *)0) == -1)
else {
/*
* This is what makes changing filters expensive!
*/
}
return;
}
/**
** s_unload_filter_table()
**/
void
{
trash_filters ();
/*
* This is what makes changing filters expensive!
*/
return;
}
/**
** s_load_user_file()
**/
void
{
/*
* The first call to "getuser()" will load the whole file.
*/
trashusers ();
return;
}
/**
** s_unload_user_file()
**/
void
{
trashusers (); /* THIS WON'T DO TRUE UNLOAD, SORRY! */
return;
}
/**
** s_shutdown()
**/
void
{
case MD_STREAM:
case MD_SYS_FIFO:
case MD_USR_FIFO:
/*NOTREACHED*/
default:
"Received S_SHUTDOWN on a type %d connection\n",
}
return;
}
/**
** s_quiet_alert()
**/
void
{
char *name;
/*
* We quiet an alert by cancelling it with "cancel_alert()"
* and then resetting the active flag. This effectively just
* terminates the process running the alert but tricks the
* rest of the Spooler into thinking it is still active.
* The alert will be reactivated only AFTER "cancel_alert()"
* has been called (to clear the active flag) and then "alert()"
* is called again. Thus:
*
* For printer faults the alert will be reactivated when:
* - a fault is found after the current fault has been
* cleared (i.e. after successful print or after manually
* enabled).
*
* For forms/print-wheels the alert will be reactivated when:
* - the form/print-wheel becomes mounted and then unmounted
* again, with too many requests still pending;
* - the number of requests falls below the threshold and
* then rises above it again.
*/
type);
if (!*name)
else switch (type) {
case QA_FORM:
else {
}
break;
case QA_PRINTER:
else {
}
break;
case QA_PRINTWHEEL:
else {
}
break;
}
return;
}
/**
** s_send_fault()
**/
void
{
long key;
} else {
}
}
/*
* s_clear_fault()
*/
void
{
long key;
} else {
}
}
/*
* s_paper_changed()
*/
void
{
short chgd = 0;
&pagesPrinted);
mode, pagesPrinted);
else {
if (pfs) {
chgd = 1;
} else
}
}
}
}
}