diff --git a/ipp-client.go b/ipp-client.go index 7b68937..a5d7008 100644 --- a/ipp-client.go +++ b/ipp-client.go @@ -360,7 +360,7 @@ func (c *IPPClient) CancelJob(jobID int, purge bool) error { return err } -// CancelJob cancels all jobs for a specified printer. if purge is true, the jobs will also be removed +// CancelAllJob cancels all jobs for a specified printer. if purge is true, the jobs will also be removed func (c *IPPClient) CancelAllJob(printer string, purge bool) error { req := NewRequest(OperationCancelJobs, 1) req.OperationAttributes[AttributePrinterURI] = c.getPrinterUri(printer) @@ -379,7 +379,7 @@ func (c *IPPClient) RestartJob(jobID int) error { return err } -// RestartJob holds a job +// HoldJobUntil holds a job func (c *IPPClient) HoldJobUntil(jobID int, holdUntil string) error { req := NewRequest(OperationRestartJob, 1) req.OperationAttributes[AttributeJobURI] = c.getJobUri(jobID) diff --git a/response.go b/response.go index eb61a3a..7b10c7b 100644 --- a/response.go +++ b/response.go @@ -41,7 +41,7 @@ func (r *Response) CheckForErrors() error { return nil } -// NewRequest creates a new ipp response +// NewResponse creates a new ipp response func NewResponse(statusCode int16, reqID int32) *Response { return &Response{ ProtocolVersionMajor: ProtocolVersionMajor, diff --git a/utils.go b/utils.go index 9f78a63..62689a3 100644 --- a/utils.go +++ b/utils.go @@ -6,6 +6,7 @@ import ( "path" ) +// ParseControlFile reads and decodes a cups control file into a response func ParseControlFile(jobID int, spoolDirectory string) (*Response, error) { if spoolDirectory == "" { spoolDirectory = "/var/spool/cups"