Datasource notifications via nsIRDFXMLParser
Neil Stansbury <neil.stansbury@REPLY_redbacksystems.com> Tue, 24 May 2005 17:46:34 +0100
| Newsgroups | gmane.comp.mozilla.devel.rdf |
|---|---|
| Organization | Another Netscape Collabra Server User |
| Message-ID | <[email protected]> |
I am loading remote rdf into an In-Mem-DS with the nsIRDFXMLParser.parseAsync() method where I pass the returned nsIStreamListener into an nsIHttpChannel.asyncOpen() method: var nsIStreamListener = nsIRDFXMLParser.parseAsync( Ds, baseUri ); [...] nsIHttpChannel.requestMethod = "GET"; nsIHttpChannel.notificationCallbacks = nsIRequestor; nsIHttpChannel.asyncOpen( nsIStreamListener, null ); My nsIProgressEventSink methods on the channel gets called fine, but I need to get some form of "onEndLoad()" notification when the data has been retrieved and parsed by the Ds. The only way I can see is by wrapping the nsIStreamListener and forwarding the calls - but there must be a better way?? I can't use a composite-ds's GetDataSource() (and thus sinkObserver) as the request Uri has arguments encoded in it, and so generates a new ds for each request. Cheers,