HTText callback functions for multiple HTRequests

"New Developer" <[email protected]> Thu, 10 Apr 2008 17:07:27 -0400
Newsgroups gmane.comp.lib.libwww
Message-ID <[email protected]>
------=_Part_24982_29482181.1207861647683
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi

I'm just starting to use libwww and had a question regarding multiple
requests. I am using libwww to parse data from websites and fill up my
internal data structures. I checked the sample codes that are up and
specifically I am using the techniques used in showtag.c and showtext.c.

What I a doing right now is registering the callback functions
beginElement(), endElement() and addText() with:
HText_registerElementCallback(beginElement, endElement);
HText_registerTextCallback(addText)

This achieves what I am trying to do. However, these callback functions are
not tied to a particular HTequest. What if I want to issue two separate
HTRequests (to different URLs, of course) and want two different sets of
callback functions to be called once the data start coming back?

Is there any way to tie the HTText_register*() functions with specific
requests? Or do I have to use the HTStream class to achieve what I am trying
to do? In case I have to use HTStream class, I'd really appreciate if
someone can give some high level pointers on how to get started.

Thanks in advance!

------=_Part_24982_29482181.1207861647683
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi<br><br>I&#39;m just starting to use libwww and had a question regarding multiple requests. I am using libwww to parse data from websites and fill up my internal data structures. I checked the sample codes that are up and specifically I am using the techniques used in showtag.c and showtext.c. <br>
<br>What I a doing right now is registering the callback functions beginElement(), endElement() and addText() with:<br>HText_registerElementCallback(beginElement, endElement);<br>HText_registerTextCallback(addText)<br><br>
This achieves what I am trying to do. However, these callback functions are not tied to a particular HTequest. What if I want to issue two separate HTRequests (to different URLs, of course) and want two different sets of callback functions to be called once the data start coming back? <br>
<br>Is there any way to tie the HTText_register*() functions with specific requests? Or do I have to use the HTStream class to achieve what I am trying to do? In case I have to use HTStream class, I&#39;d really appreciate if someone can give some high level pointers on how to get started.<br>
<br>Thanks in advance!<br><br><br>

------=_Part_24982_29482181.1207861647683--