gecko-dev/java/webclient/src_share
edburns%acm.org 8484d431af This checkin implements a response header listener feature.
I have changed the usage contract of the DocumentLoadListener slightly.
Prior to this checkin, calling getEventData() on the DocumentLoadEvent
passed in to your eventDispatched() method returned the URI to which the
event applies.

Now the getEventData() returns a Map.  You must look up the "URI" key to
find the URI to which the event applies.  If your listener is an
instance of PageInfoListener, and your event mask is
END_URL_LOAD_EVENT_MASK, your Map will have an additional entry under
the key "headers".  This entry is another Map representing the response
headers.

DocumentLoadListener:

 * <p>The <code>eventDispatched()</code> method is passed a {@link
 * DocumentLoadEvent} instance.  The <code>type</code> property of the
 * event will be one of the types defined as a <code>public static final
 * int</code> in <code>DocumentLoadEvent</code>.</p>
 *
 * <p>The <code>eventData</code> property of the
 * <code>DocumentLoadEvent</code> instance will be a
 * <code>java.util.Map</code>.  For all <code>EVENT_MASK</code> types in
 * <code>DocumentLoadEvent</code> the map will contain an entry under
 * the key "<code>URI</code>" without the quotes.  This will be the
 * fully qualified URI for the event.</p>
 *
 * <p>For the <code>PROGRESS_URL_LOAD_EVENT_MASK</code> there will be an
 * entry in the map for the key "<code>message</code>".  This will be
 * the progress message from the browser.</p>

PageInfoListener:

 * <p>This {@link DocumentLoadListener} subclass adds the ability to get
 * detailed information on each event. </p>
 *
 * <p>The <code>eventDispatched()</code> method is passed the same thing
 * as in the {@link DocumentLoadListener}.</p>
 *
 * <p>The <code>eventData</code> property of the
 * <code>DocumentLoadEvent</code> instance will be a
 * <code>java.util.Map</code>.  For the
 * <code>END_URL_LOAD_EVENT_MASK</code> type in
 * <code>DocumentLoadEvent</code> the map will contain an entry under
 * the key "<code>URI</code>" without the quotes.  This will be the
 * fully qualified URI for the event.  The map will also contain an
 * entry under the key "<code>headers</code>".  This entry will be a
 * <code>Map</code> of all the response headers.</p>


The next step will be to allow the same procedure to work to discover
the request headers.

Ed

A classes_spec/org/mozilla/webclient/PageInfoListener.java

- marker class for listenening for high fidelity page information.

A src_moz/EventRegistrationImpl.cpp

- add boolean property, capturePageInfo to turn on or off high fidelity
  page information collection.

M build-tests.xml

- add new test, DocumentLoadListenerTest

M build.xml

- added new JNI class, EventRegistrationImpl

M classes_spec/org/mozilla/webclient/CurrentPage2.java
M classes_spec/org/mozilla/webclient/impl/wrapper_native/CurrentPageImpl.java

- rollback previous API for headers discovery

M classes_spec/org/mozilla/webclient/impl/wrapper_native/EventRegistrationImpl.java

- pass thru the capturePageInfo property

- add URIToStringMap, currently not working.

M classes_spec/org/mozilla/webclient/test/EMWindow.java

- call toString() on the eventData, don't cast it to a String.

M src_moz/EmbedProgress.cpp
M src_moz/EmbedProgress.h

- leverage the nsIHttpHeaderVisitor interface to discover the response
  headers.

- add boolean property capturePageInfo

A src_moz/HttpHeaderVisitorImpl.cpp
A src_moz/HttpHeaderVisitorImpl.h

- copy the headers to a Properties object.

M src_moz/Makefile.in

- compile two new files:

+	EventRegistrationImpl.cpp \
+	HttpHeaderVisitorImpl.cpp \

M src_moz/NativeBrowserControl.cpp
M src_moz/NativeBrowserControl.h

- pass the NativeWrapperFactory to our Init() method

- add wrapperFactory getter.

M src_moz/WrapperFactoryImpl.cpp

- pass the nativeWrapperFactory to the NativeBrowserControl's Init method.

M src_share/jni_util.cpp
M src_share/jni_util.h

- new constants: URI, headers

R test/automated/src/classes/org/mozilla/webclient/CurrentPageTest.java

- not yet time for this one
A test/automated/src/classes/org/mozilla/webclient/DocumentLoadListenerTest.java

- exercise bare minimum functionality of PageInfoListener

M test/manual/src/classes/org/mozilla/webclient/test/TestBrowser.java

- print out headers.
2004-09-09 20:17:18 +00:00
..
.cvsignore
Makefile.in Webclient compiles with 1.3A but does not yet link. 2003-01-13 07:41:00 +00:00
bal_util.cpp
bal_util.h
jni_util.cpp This checkin implements a response header listener feature. 2004-09-09 20:17:18 +00:00
jni_util.h This checkin implements a response header listener feature. 2004-09-09 20:17:18 +00:00
jni_util_export.cpp This is a checkpoint milestone for webclient 2.0. Webclient currently 2003-09-28 06:29:22 +00:00
jni_util_export.h This is a checkpoint milestone for webclient 2.0. Webclient currently 2003-09-28 06:29:22 +00:00
runem.pl
runem_commercial.pl
runem_solaris