> Is there any documentation and/or sample source that shows how to monitor
> file downloads under Gecko-based browsers using C++ ?
>
Doubt that. Since you seem to be working on an NPAPI plugin, I suggest
asking in mozilla.dev.tech.plugins and then in #developers on
irc.mozilla.org.
I'm not an expert in this, but some general observations:
1) Using this XPCOM component, even if it's possible, restricts this code to
the applications that have this component. I'm not sure all "Gecko-based
browsers" have it, likely only Firefox 3+ at this point.
2) indicate what browser are you testing this, since as I said above the
component may just not be there in some browsers that support NPAPI.
3) From reading https://developer.mozilla.org/en/XPCOM_Glue it seems the
only option you might have is using the "dependent glue" (in order to access
XPCOM already running in Firefox). Did the NS_ERROR_NO_INTERFACE error
happen using this option?
4) I expect this would break when plugins are separated into their own
processes in the next Gecko versions.
Nickolay
OK. Will do.
> 1) Using this XPCOM component, even if it's possible, restricts this
> code to the applications that have this component. I'm not sure all
> "Gecko-based browsers" have it, likely only Firefox 3+ at this point.
You've confirmed what I suspected.
> 2) indicate what browser are you testing this, since as I said above
> the component may just not be there in some browsers that support NPAPI.
Firefox, Chrome, Safari and Opera.
> 3) From reading https://developer.mozilla.org/en/XPCOM_Glue it seems
> the only option you might have is using the "dependent glue" (in order
> to access XPCOM already running in Firefox). Did the NS_ERROR_NO_INTERFACE
> error happen using this option?
Yes.
> 4) I expect this would break when plugins are separated into their own
> processes in the next Gecko versions.
OK.
It sounds as though using the XPCOM component mechanism isn't going to be
suitable.
I have a progress bar working on Internet Explorer in my ActiveX Control
using IBindStatusCallback to monitor the file download status, and want
to implement the equivalent functionality in my NPAPI Plugin to run on
Firefox, Chrome, Safari and Opera.
Do you know if there is a recommended mechanism for achieving this ?
If not, I'll post on the forums that you suggested.
Thanks ... Kevin
On Tue, Aug 11, 2009 at 5:02 PM, Kevin Raine <kevin...@antixlabs.com>wrote:
> > 2) indicate what browser are you testing this, since as I said above
> > the component may just not be there in some browsers that support NPAPI.
>
> Firefox, Chrome, Safari and Opera.
>
I wanted to know the Firefox version. The error might mean you've asked for
an interface with the IID specified in your SDK, while the target browser
was Firefox 3.5, in which the interface (and the IID) had changed, so you
have to ask for a different IID.
I have a progress bar working on Internet Explorer in my ActiveX Control
> using IBindStatusCallback to monitor the file download status, and want
> to implement the equivalent functionality in my NPAPI Plugin to run on
> Firefox, Chrome, Safari and Opera.
> Do you know if there is a recommended mechanism for achieving this ?
>
I know only a little bit about NPAPI, so check in the other mailing lists I
pointed to, but I wouldn't be surprised if you had to write custom code for
each version of each browser if the thing you're trying to do is not
supported in NPAPI itself.
The XPCOM way might be a viable solution for Firefox.
You might know that, but you said "Gecko-based" in your previous mail and
now you mention Chrome, Safari, Opera, which are not Gecko-based, only
implement NPAPI for plugins.
XPCOM is only used in Gecko-based applications and even in those
applications the available components, interfaces and linkage strategies may
vary.
(We better stop off-topic non-documentation discussion in this list.)
Nickolay