views:

243

answers:

4

I'm thinking of creating an application that can use Firefox as a download manager. Is there any way to control Firefox (add downloads, start/stop downloads, etc) from an external program in C/C++?

If that is not possible, then perhaps an extension that can do that? If an extension is the only way, then how do I communicate with the extension from outside of Firefox?

+2  A: 

First of all I suggest that you familiarize yourself with developer.mozilla.org

As far as I understand, most Mozilla platform functions are available through a cross language API known as XPCOM. There's also a plugin API but it's primary aim is to visualize stuff (used by Flash, etc.).

UncleZeiv
+2  A: 

Take a look at Gecko API. It allows third party developers to use the same technology as found in Mozilla.

For downloading files no need to use Firefox. Consider using libcurl.

Kirill V. Lyadvinsky
+2  A: 

You're starting with a solution, not a problem. The easier idea is to use XulRunner, the platform on which FireFox is built. You'd effectively implement your own application as a XulRunner plugin and use Necko (the network layer of XulRunner and FireFox) from there.

MSalters
+1  A: 

Take a look at wget.