The FaxStatusListener.java file sets integer values for the status of the Fax application.
Listing 6-6 shows the FaxStatusListener.java file:
Listing 6-6: The FaxStatusListener.java File
public interface FaxStatusListener { public abstract void faxProgress(int i, int j); public static final int ST_OPEN_PORT = 1; public static final int ST_INIT_MODEM = 2; public static final int ST_CONNECTING = 3; public static final int ST_SEND_PAGE = 4; public static final int ST_CLOSE = 5; public static final int ST_CONVERT_FIlES = 6; public static final int ST_REC_PAGE = 4; public static final int ST_REC_CALL = 7; public static final int ST_WAIT_CALL = 8; }
Download this listing.
In the above listing, the FaxStatusListener.java file declares an abstract method, faxProgress(). This method accepts two integer parameters. The first parameter indicates the status of the fax and the second parameter indicates the page to send as a fax. The PortFax.java file implements the FaxStatusListener interface to display the current status of the Fax application.