|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.easysw.cups.Cups
Constructor Summary | |
Cups()
Void constructor. |
|
Cups(java.net.URL p_url)
Constructor using a URL . |
Method Summary | |
int |
cupsCancelJob(java.lang.String printer_name,
int p_job_id,
java.lang.String p_user_name)
Cancel a job - send a job cancel request to the server. |
java.lang.String |
cupsGetDefault()
Get default destination. |
CupsJob[] |
cupsGetJobs(boolean showMyJobs,
boolean showCompleted)
Get a list of jobs. |
java.util.List |
cupsGetPrinterAttributes(java.lang.String printer_name)
Get printer attributes |
java.lang.String[] |
cupsGetPrinters()
Get a list of printers. |
java.util.List |
cupsGetPrinterStatus(java.lang.String printer_name)
|
CupsJob |
cupsPrintFile(java.lang.String p_filename,
IPPAttribute[] p_attrs)
Print a file. |
boolean |
doRequest()
Do a CUPS request to the server. |
boolean |
doRequest(java.io.File file)
Send a FILE to the CUPS server. |
boolean |
doRequest(java.lang.String from)
|
boolean |
getEncrypt()
Get the value of the encrypt member. |
void |
setDest(java.lang.String p_dest)
Set the value of the dest member. |
void |
setEncrypt(boolean p_encrypt)
Set the value of the encrypt member. |
void |
setInstance(java.lang.String p_instance)
Set the value of the instance member. |
void |
setPasswd(java.lang.String p_passwd)
Set the value of the passwd member. |
void |
setPath(java.lang.String p_path)
Set the value of the path member. |
void |
setPort(int p_port)
Set the value of the port member. |
void |
setProtocol(java.lang.String p_protocol)
Set the value of the protocol member. |
void |
setServer(java.lang.String p_server)
Set the value of the server member. |
void |
setUser(java.lang.String p_user)
Set the value of the user member. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Cups()
public Cups(java.net.URL p_url)
URL
.p_url
- A URL
object.Method Detail |
public void setProtocol(java.lang.String p_protocol)
protocol
member. Valid values
are ipp or http.p_protocol
- String with protocol.public void setServer(java.lang.String p_server)
server
member. This is an
IP address or a hostname.p_server
- IP address or hostname.public void setPort(int p_port)
port
member.p_port
- Port number.public void setUser(java.lang.String p_user)
user
member.p_user
- User name.public void setPasswd(java.lang.String p_passwd)
passwd
member.p_passwd
- Password.public void setDest(java.lang.String p_dest)
dest
member.p_dest
- Destination.public void setInstance(java.lang.String p_instance)
instance
member.p_instance
- Instance.public void setEncrypt(boolean p_encrypt)
encrypt
member.p_enrypt
- Yes or no.public boolean getEncrypt()
encrypt
member.boolean
Encryption on or off.public void setPath(java.lang.String p_path)
path
member. This is the
path that will be used in the POST method.p_path
- Path on server.public boolean doRequest(java.lang.String from) throws java.io.IOException
public boolean doRequest() throws java.io.IOException
p_dest
- Destination name.boolean
True on success, false otherwisepublic boolean doRequest(java.io.File file) throws java.io.IOException
file
- File to send.boolean
True on success, false otherwisepublic CupsJob[] cupsGetJobs(boolean showMyJobs, boolean showCompleted) throws java.io.IOException
showMyJobs
- Show only jobs for user.showCompleted
- Show completed OR active jobs.CupsJob[]
Array of job objects, or null.public java.lang.String[] cupsGetPrinters() throws java.io.IOException
String[]
Array of printers, or null.public java.lang.String cupsGetDefault() throws java.io.IOException
String
Name of default printer, or null.public java.util.List cupsGetPrinterAttributes(java.lang.String printer_name) throws java.io.IOException
printer_name
- Name of printer to get info for.List
List of attributes.CupsPrinter
public CupsJob cupsPrintFile(java.lang.String p_filename, IPPAttribute[] p_attrs) throws java.io.IOException
p_filename
- Path of file to print.p_attrs[]
- Array of print job attributes.CupsJob
Object with job info.CupsJob
public int cupsCancelJob(java.lang.String printer_name, int p_job_id, java.lang.String p_user_name) throws java.io.IOException
printer_name
- Destination.p_job_id
- ID of job.p_user_name
- Requesting user name.public java.util.List cupsGetPrinterStatus(java.lang.String printer_name) throws java.io.IOException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |