/**@class android.printservice.PrintJob @extends java.lang.Object This class represents a print job from the perspective of a print service. It provides APIs for observing the print job state and performing operations on the print job. <p> <strong>Note: </strong> All methods of this class must be invoked on the main application thread. </p> */ var PrintJob = { /**Gets the unique print job id. @return {Object {android.print.PrintJobId}} The id. */ getId : function( ) {}, /**Gets the {@link android.printservice.PrintJobInfo} that describes this job. <p> <strong>Node:</strong>The returned info object is a snapshot of the current print job state. Every call to this method returns a fresh info object that reflects the current print job state. </p> @return {Object {android.print.PrintJobInfo}} The print job info. */ getInfo : function( ) {}, /**Gets the printed document. @return {Object {android.printservice.PrintDocument}} The document. */ getDocument : function( ) {}, /**Gets whether this print job is queued. Such a print job is ready to be printed and can be started or cancelled. @return {Boolean} Whether the print job is queued. @see #start() @see #cancel() */ isQueued : function( ) {}, /**Gets whether this print job is started. Such a print job is being printed and can be completed or canceled or failed. @return {Boolean} Whether the print job is started. @see #complete() @see #cancel() @see #fail(String) */ isStarted : function( ) {}, /**Gets whether this print job is blocked. Such a print job is halted due to an abnormal condition and can be started or canceled or failed. @return {Boolean} Whether the print job is blocked. @see #start() @see #cancel() @see #fail(String) */ isBlocked : function( ) {}, /**Gets whether this print job is completed. Such a print job is successfully printed. This is a final state. @return {Boolean} Whether the print job is completed. @see #complete() */ isCompleted : function( ) {}, /**Gets whether this print job is failed. Such a print job is not successfully printed due to an error. This is a final state. @return {Boolean} Whether the print job is failed. @see #fail(String) */ isFailed : function( ) {}, /**Gets whether this print job is cancelled. Such a print job was cancelled as a result of a user request. This is a final state. @return {Boolean} Whether the print job is cancelled. @see #cancel() */ isCancelled : function( ) {}, /**Starts the print job. You should call this method if {@link #isQueued}() or {@link #isBlocked}() returns true and you started resumed printing. <p> This resets the print status to null. Set the new status by using {@link #setStatus}. </p> @return {Boolean} Whether the job was started. @see #isQueued() @see #isBlocked() */ start : function( ) {}, /**Blocks the print job. You should call this method if {@link #isStarted}() returns true and you need to block the print job. For example, the user has to add some paper to continue printing. To resume the print job call {@link #start}(). To change the reason call {@link #setStatus}(CharSequence). @param {String} reason The human readable, short, and translated reason why the print job is blocked. @return {Boolean} Whether the job was blocked. @see #isStarted() @see #isBlocked() */ block : function( ) {}, /**Completes the print job. You should call this method if {@link #isStarted}() returns true and you are done printing. @return {Boolean} Whether the job as completed. @see #isStarted() */ complete : function( ) {}, /**Fails the print job. You should call this method if {@link #isQueued}() or {@link #isStarted}() or {@link #isBlocked}() returns true you failed while printing. @param {String} error The human readable, short, and translated reason for the failure. @return {Boolean} Whether the job was failed. @see #isQueued() @see #isStarted() @see #isBlocked() */ fail : function( ) {}, /**Cancels the print job. You should call this method if {@link #isQueued}() or {@link #isStarted() or #isBlocked()} returns true and you canceled the print job as a response to a call to {@link android.printservice.PrintService#onRequestCancelPrintJob(PrintJob)}. @return {Boolean} Whether the job is canceled. @see #isStarted() @see #isQueued() @see #isBlocked() */ cancel : function( ) {}, /**Sets the progress of this print job as a fraction of 1. @param {Number} progress The new progress */ setProgress : function( ) {}, /**Sets the status of this print job. This should be a human readable, short, and translated description of the current state of the print job. <p /> This overrides any previously set status set via {@link #setStatus}(CharSequence), {@link #setStatus}(int), {@link #block}(String), or {@link #fail}(String), @param {Object {CharSequence}} status The new status. If null the status will be empty. */ setStatus : function( ) {}, /**Sets the status of this print job as a string resource. <p /> This overrides any previously set status set via {@link #setStatus}(CharSequence), {@link #setStatus}(int), {@link #block}(String), or {@link #fail}(String), @param {Number} statusResId The new status as a String resource. If 0 the status will be empty. */ setStatus : function( ) {}, /**Sets a tag that is valid in the context of a {@link android.printservice.PrintService} and is not interpreted by the system. For example, a print service may set as a tag the key of the print job returned by a remote print server, if the printing is off handed to a cloud based service. @param {String} tag The tag. @return {Boolean} True if the tag was set, false otherwise. */ setTag : function( ) {}, /**Gets the print job tag. @return {String} The tag or null. @see #setTag(String) */ getTag : function( ) {}, /**Gets the value of an advanced (printer specific) print option. @param {String} key The option key. @return {String} The option value. */ getAdvancedStringOption : function( ) {}, /**Gets whether this job has a given advanced (printer specific) print option. @param {String} key The option key. @return {Boolean} Whether the option is present. */ hasAdvancedOption : function( ) {}, /**Gets the value of an advanced (printer specific) print option. @param {String} key The option key. @return {Number} The option value. */ getAdvancedIntOption : function( ) {}, /** */ equals : function( ) {}, /** */ hashCode : function( ) {}, };