001/*
002 * Copyright (c) 2004 World Wide Web Consortium,
003 *
004 * (Massachusetts Institute of Technology, European Research Consortium for
005 * Informatics and Mathematics, Keio University). All Rights Reserved. This
006 * work is distributed under the W3C(r) Software License [1] in the hope that
007 * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
008 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
009 *
010 * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
011 */
012
013package org.w3c.dom.ls;
014
015import org.w3c.dom.events.Event;
016
017/**
018 *  This interface represents a progress event object that notifies the 
019 * application about progress as a document is parsed. It extends the 
020 * <code>Event</code> interface defined in [<a href='http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107'>DOM Level 3 Events</a>]
021 * . 
022 * <p> The units used for the attributes <code>position</code> and 
023 * <code>totalSize</code> are not specified and can be implementation and 
024 * input dependent. 
025 * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>Document Object Model (DOM) Level 3 Load
026and Save Specification</a>.
027 */
028public interface LSProgressEvent extends Event {
029    /**
030     * The input source that is being parsed.
031     */
032    public LSInput getInput();
033
034    /**
035     * The current position in the input source, including all external 
036     * entities and other resources that have been read.
037     */
038    public int getPosition();
039
040    /**
041     * The total size of the document including all external resources, this 
042     * number might change as a document is being parsed if references to 
043     * more external resources are seen. A value of <code>0</code> is 
044     * returned if the total size cannot be determined or estimated.
045     */
046    public int getTotalSize();
047
048}