Hi,

I am trying to develope an extension similar to XmlHttpRequest but for
a different protocol than Http. The main functionality of
XmlHttpRequest that I want to emulate is its asynchronous aspect. After
looking inside XmlHttpRequest and its lower layers I know understand
how to do it. I took the path of implementing the protocol handler for
my protocol using an example from
http://www.mozilla.org/projects/netlib/new-handler.html.

Since I want my extension to be compatibile with versions of Firefox
which are 1.5+ I intend to use only frozen interfaces i.e do not want
to use MOZILLA_INTERNAL_API pre-processor. First I made my  protocol
handler implementation compile with out using MOZILLA_INTERNAL_API by
using correct string APIs and even copied some utility functions from
nsNetUtil.h (which further includes nsString.h and hence internal
linkage) as its inclusion required the MOZILLA_INTERNAL_API
pre-processor.

But now emulating XmlHttpRequest implementation is giving me similar
problems and I am stuck with no solution for the moment. I am trying to
use nsIDocument.h whose inclusion require MOZIILA_INTERNAL_API and fail
with error message <quote>Cannot use internal string classes without
MOZILLA_INTERNAL_API defined. Use the frozen header nsStringAPI.h
instead</quote>, the same message which I removed earlier from my
handler implementation.

Since Gecko SDK anyway does not provide the headers that I require I am
using the SDK (dist folder) generated by compiling sources of
firefox-1.5.0.4. I have compiled it in debug mode. I am developing my
extension on windows (but would port it on Linux and Mac as well) using
Visual Studio 2003.

I would appreciate if firefox gurus would help me out on this.

Regards & thanks
Kapil

_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to