/*
* 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
*/
/*
* ident "%Z%%M% %I% %E% SMI"
*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* DoPrinterUtil class
* Worker utility class.
*/
public class DoPrinterUtil {
{
if (o == null) {
return (null);
}
int i = o.indexOf("use=");
if (i == -1) {
return (null);
}
o = o.substring(i);
}
{
int i = 0;
"e", "f", "g", "h", "i", "j", "k", "l", "m",
"n", "o", "p", "q", "r", "s", "t", "u", "v",
"w", "x", "y", "z"};
throw new pmCmdFailedException(errstr);
}
if (o == null) {
return (null);
}
o = o.concat("\n");
}
}
// sparc bpp parallel ports
for (i = 0; i < 100; i++) {
}
}
// sparc ecpp parallel ports
for (i = 0; i < 100; i++) {
}
}
// intel parallel ports
for (i = 0; i < 100; i++) {
}
}
// USB
for (i = 0; i < 100; i++) {
}
}
// SunPics
}
o = null;
return (null);
}
return (null);
} else {
}
}
return (ret);
}
{
int i;
throw new pmCmdFailedException(errstr);
}
return (null);
} else {
}
}
return (ret);
}
{
int i;
return (null);
}
// Make call for models for this make
throw new pmCmdFailedException(errstr);
}
return (null);
} else {
}
}
return (ret);
} else
return (null);
}
{
int i;
return null;
}
throw new pmCmdFailedException(errstr);
}
return (null);
} else {
}
}
return (ret);
}
{
int i;
if (ppdfilename == null) {
return (null);
}
throw new pmCmdFailedException(errstr);
}
return (null);
} else {
}
}
}
return (ret);
}
{
int i;
return (null);
}
throw new pmCmdFailedException(errstr);
}
return (ppdfile);
}
{
int i;
return (null);
// Get Manufacturer and Model for printer in this port
try {
} catch (Exception e) {
}
return (null);
}
int numtokens;
return (null);
} else {
}
}
for (i = 0; i < numtokens; i++) {
}
}
return (ret);
}
return (null);
}
public static boolean isMakeModel(
{
int exitvalue;
if (exitvalue == 0) {
return (true);
}
return (false);
}
throws Exception
{
int i = 0;
int j = 0;
int listi = 0;
throw new pmCmdFailedException(errstr);
}
if (o == null) {
return (null);
}
// Count entries
int index = 0;
i++;
}
if (i <= 0)
return (null);
int colon = 0;
int nextcolon = 0;
if (nextcolon == -1)
// Extract printername
i = colon;
i--;
}
if (i == 0)
else
// Skip _all and _default keywords
continue;
}
continue;
}
// Extract servername
if ((i != -1) && (i < nextcolon)) {
j = o.indexOf(",", i);
if (j != -1)
}
// Skip entries without a server.
"SVR: printer does not have a server: "
+ printername);
continue;
}
// Extract description
if ((i != -1) && (i < nextcolon)) {
j = i;
while (j < o.length()) {
if (o.charAt(j) == '\n')
break;
j++;
}
}
printername = "";
printserver = "";
comment = "";
}
return (list);
}
public static boolean exists(
{
int exitvalue;
if (exitvalue == 0) {
return (true);
}
return (false);
}
public static boolean isLocal(
{
int exitvalue;
if (exitvalue != 0) {
return (false);
}
return (true);
}
public static boolean isLocalhost(
{
int exitvalue;
if (exitvalue != 0) {
"SVR:DoPrinterUtil:isLocalhost:failed:queue: " + queue);
return (false);
}
return (true);
else
return (false);
}
}