1 /* 2 * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 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 }