8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package com.sun.webkit;
27
28 public interface LoadListenerClient {
29 public final static int PAGE_STARTED = 0;
30 public final static int PAGE_FINISHED = 1;
31 public final static int PAGE_REDIRECTED = 2;
32 public final static int LOAD_FAILED = 5;
33 public final static int LOAD_STOPPED = 6;
34 public final static int CONTENT_RECEIVED = 10;
35 public final static int TITLE_RECEIVED = 11;
36 public final static int ICON_RECEIVED = 12;
37 public final static int CONTENTTYPE_RECEIVED = 13;
38 public final static int DOCUMENT_AVAILABLE = 14;
39 public final static int RESOURCE_STARTED = 20;
40 public final static int RESOURCE_REDIRECTED = 21;
41 public final static int RESOURCE_FINISHED = 22;
42 public final static int RESOURCE_FAILED = 23;
43 public final static int PROGRESS_CHANGED = 30;
44
45
46 // -- Error Code values
47 /**
48 * An error code indicating that the host name couldn't be resolved.
49 */
50 public final static int UNKNOWN_HOST = 1;
51 /**
52 * An error code indicating that the URL was malformed or illegal.
53 */
54 public final static int MALFORMED_URL = 2;
55 /**
56 * An error code indicating that the SSL handshake failed.
57 */
58 public final static int SSL_HANDSHAKE = 3;
59 /**
60 * An error code indicating that the connection was refused by the server.
61 */
62 public final static int CONNECTION_REFUSED = 4;
63 /**
64 * An error code indicating that the connection was reset by the server.
65 */
66 public final static int CONNECTION_RESET = 5;
67 /**
68 * An error code indicating that there was no route to the host.
69 */
70 public final static int NO_ROUTE_TO_HOST = 6;
71 /**
72 * An error code indicating that the connection timed out.
73 */
74 public final static int CONNECTION_TIMED_OUT = 7;
75 /**
76 * An error code indicating that the client was denied permission
77 * to initiate connection to the server.
78 */
79 public final static int PERMISSION_DENIED = 8;
80 /**
81 * An error code indicating that the server response was invalid.
82 */
83 public final static int INVALID_RESPONSE = 9;
84 /**
85 * An error code indicating that too many redirects were encountered
86 * while processing the request.
87 */
88 public final static int TOO_MANY_REDIRECTS = 10;
89 /**
90 * An error code indicating that the requested local file was not found.
91 */
92 public final static int FILE_NOT_FOUND = 11;
93 /**
94 * An error code indicating that an unknown error occurred.
95 */
96 public final static int UNKNOWN_ERROR = 99;
97
98
99 public void dispatchLoadEvent(long frame, int state,
100 String url, String contentType,
101 double progress, int errorCode);
102
103 public void dispatchResourceLoadEvent(long frame, int state,
104 String url, String contentType,
105 double progress, int errorCode);
106 }
|
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package com.sun.webkit;
27
28 import java.lang.annotation.Native;
29
30 public interface LoadListenerClient {
31 @Native public final static int PAGE_STARTED = 0;
32 @Native public final static int PAGE_FINISHED = 1;
33 @Native public final static int PAGE_REDIRECTED = 2;
34 @Native public final static int LOAD_FAILED = 5;
35 @Native public final static int LOAD_STOPPED = 6;
36 @Native public final static int CONTENT_RECEIVED = 10;
37 @Native public final static int TITLE_RECEIVED = 11;
38 @Native public final static int ICON_RECEIVED = 12;
39 @Native public final static int CONTENTTYPE_RECEIVED = 13;
40 @Native public final static int DOCUMENT_AVAILABLE = 14;
41 @Native public final static int RESOURCE_STARTED = 20;
42 @Native public final static int RESOURCE_REDIRECTED = 21;
43 @Native public final static int RESOURCE_FINISHED = 22;
44 @Native public final static int RESOURCE_FAILED = 23;
45 @Native public final static int PROGRESS_CHANGED = 30;
46
47
48 // -- Error Code values
49 /**
50 * An error code indicating that the host name couldn't be resolved.
51 */
52 @Native public final static int UNKNOWN_HOST = 1;
53 /**
54 * An error code indicating that the URL was malformed or illegal.
55 */
56 @Native public final static int MALFORMED_URL = 2;
57 /**
58 * An error code indicating that the SSL handshake failed.
59 */
60 @Native public final static int SSL_HANDSHAKE = 3;
61 /**
62 * An error code indicating that the connection was refused by the server.
63 */
64 @Native public final static int CONNECTION_REFUSED = 4;
65 /**
66 * An error code indicating that the connection was reset by the server.
67 */
68 @Native public final static int CONNECTION_RESET = 5;
69 /**
70 * An error code indicating that there was no route to the host.
71 */
72 @Native public final static int NO_ROUTE_TO_HOST = 6;
73 /**
74 * An error code indicating that the connection timed out.
75 */
76 @Native public final static int CONNECTION_TIMED_OUT = 7;
77 /**
78 * An error code indicating that the client was denied permission
79 * to initiate connection to the server.
80 */
81 @Native public final static int PERMISSION_DENIED = 8;
82 /**
83 * An error code indicating that the server response was invalid.
84 */
85 @Native public final static int INVALID_RESPONSE = 9;
86 /**
87 * An error code indicating that too many redirects were encountered
88 * while processing the request.
89 */
90 @Native public final static int TOO_MANY_REDIRECTS = 10;
91 /**
92 * An error code indicating that the requested local file was not found.
93 */
94 @Native public final static int FILE_NOT_FOUND = 11;
95 /**
96 * An error code indicating that an unknown error occurred.
97 */
98 @Native public final static int UNKNOWN_ERROR = 99;
99
100
101 public void dispatchLoadEvent(long frame, int state,
102 String url, String contentType,
103 double progress, int errorCode);
104
105 public void dispatchResourceLoadEvent(long frame, int state,
106 String url, String contentType,
107 double progress, int errorCode);
108 }
|