W3C home > Mailing lists > Public > www-lib@w3.org > April to June 2000

Implementing HTXParse callback function

From: Yovav Meydad <yovavm@contact.com>
Date: Thu, 27 Apr 2000 14:27:48 +0200
To: <www-lib@w3.org>
Message-ID: <001401bfb043$fffef6a0$1c44a8c0@yovavm>
I am trying to use the HTXParse module. I have registered it as a converter,
using this code :

	HTList* pConvList = HTList_new();
	HTConversion_add(pConvList,"application/octet-stream","*/*",HTXParse,1.0,
0.0, 0.0);
	HTRequest_setConversion(pRequest, pConvList, YES);

HTRequest_setOutputStream(pRequest,HTXParse(pRequest,NULL,WWW_SOURCE,WWW_BIN
ARY,NULL));

As I understand I have to overwrite the callback method which has en empty
implementation in HTEPtoCl.c
This method is declared as :

PUBLIC void HTCallClient (HTStream* me)
{
	return;
}

I thought the input parameter of this callback should be HTXParseStream, So
I can access the structure members regarding the buffer read (length, is
Finished, buffer, content_type etc).

If the parameter is HTStream, How can I access this structure members in
this callback ?
Some sample lines of code implementing this callback, and accessing the
buffer, would be great.

thanks much
Yovav
Received on Thursday, 27 April 2000 07:29:50 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:36 GMT