Questions tagged [xpcom]

XPCOM (Cross Platform Component Object Model) is a cross-platform component model from Mozilla. It is similar to Microsoft COM and CORBA.

XPCOM (Cross Platform Component Object Model) is a cross-platform component model from Mozilla. It is similar to Microsoft COM and CORBA.

It has multiple language bindings, allowing XPCOM components to be used and implemented in JavaScript, Java, and Python in addition to C++. Interfaces in XPCOM are defined in a dialect of IDL called XPIDL.

409 questions
1
vote
1 answer

How can we identify a unique nsHTTPChannel?

I am doing some development on the firefox both with javascript and C++ for some XPCOM components. I am trying to monitor the http activity with nsIHttpActivityDistributor. The problem now is , is there any flag or id that belong to nsIHttpChannel…
winterTTr
  • 1,739
  • 1
  • 10
  • 30
1
vote
1 answer

XPCOM Encrypt/Decrypt operation on file in Firefox Extension

My Firefox extension needs to; store user credentials in a file that will be stored in users local filesystem. when credentials are needed, decrypt file read values and encrypt it again. sometimes send encrypted file over http to a server. I…
yuceel
  • 1,943
  • 2
  • 18
  • 27
1
vote
1 answer

Create tab/window with DOM document instead of URI?

I have a web service that requires special headers to be sent in the request. I am able to retrieve expected responseXMLs using an XMLHttpRequest and setRequestHeader(). Now I would like to create a new tab (or window) containing the response…
steamer25
  • 9,278
  • 1
  • 33
  • 38
1
vote
3 answers

XPCOM FileOutptStream append does not work

Has anyone managed to persuade XPCOM to do an append write to a local file? The code block below works fine with 0x08 (create if not exists) in the flags. But 0x10, append to the end of existing file just, plane don't work! Also the privilege bits…
Brad
  • 11
  • 1
  • 1
1
vote
1 answer

XPJS (Javascript XPCOM) Documentation?

Anyone know where is some usable XPJS, or XPCOM in JS, documentation for recent versions of Firefox/Gecko? And sample code/ tutorials would be great too. I need to write my own Component, but without .IDL (no C++ compiled interface), so I could…
Marek Sebera
  • 39,650
  • 37
  • 158
  • 244
1
vote
1 answer

Parse DOM in XPCOM autocomplete component

I know we should use JSON when receiving remote "autocomplete suggestions", but I'm forced to use standard DOM valid XHTML I have registered component of interface nsIAutoCompleteSearch and using this code, to get remote XHTML via XmlHttpRequest var…
Marek Sebera
  • 39,650
  • 37
  • 158
  • 244
1
vote
2 answers

How to get reliable HTTP messages via Firefox XPCOM in Javascript

I am trying to program a small server+client in Javascript on Firefox, using XPCOM. To get the HTTP message in Javascript, I am using the nsIScriptableInputStream interface. This f**ing component through the read() method randomly cut the message…
Julien Boyreau
1
vote
2 answers

Firefox 6 :Problem with QueryInterface(nsIDOMWindow::GetIID() in XPCOM component, for browser content window passed from js

I am working on adding support for Firefox 6 for my add-on on Mac OS, where the following logic is working in Firefox 4,5 versions but fails in Firefox 6. XPCOM component has subclass of IObserverClient and which adds itself as observer for a custom…
Swetha
  • 115
  • 1
  • 7
1
vote
1 answer

Intercept file uploads from a Firefox addon

I am developing an addon that shall intercept all file uploads and continue or abort them according to a user confirmation dialog. Doing this with javascript DOM handling does not seem to fetch all possible ways of uploading files for arbitrary…
leinz
  • 147
  • 1
  • 10
1
vote
2 answers

IPC between Firefox extension and COM component

I need to make a synchronous call between a JavaScript XPCOM component and a COM component (native WIN32 process). I know, options are: 1) Open up sockets and use TCP/IP 2) Have an NPAPI plugin, and load the plugin in the extensions XUL 3) Use…
atVelu
  • 815
  • 1
  • 12
  • 24
1
vote
1 answer

Need a working example of Firefox ctypes output string parameter

Hi I have an XPCOM component which I'm now converting to use ctypes. I was able to create functions that take a wchar_t* and I define the functions using ctypes.jschar.ptr. This all works great, but how do I use output parameters when I need to…
Dory
  • 41
  • 3
1
vote
1 answer

Javascript - callCom method blocks animated gif and timers in Firefox

I have a Firefox extension that pops up a log-in form (it's a c++ winform, not that it matters...). It is done using callCom technique - meaning the c++ client is integrated, initializing Components.classes, then createInstance(), query interface…
Nili
  • 1,963
  • 3
  • 20
  • 39
1
vote
1 answer

How to open .EXE with Javascript/XPCOM as Windows "Run..."?

I have an intranet web application who needs to run some external applications, like Word, Notepad and other particular ones... My code allow the access with IE (ActiveX) and Firefox (XPCOM). When I use the whole path (like "C:\windows\notepad.exe")…
thiagoprzy
  • 411
  • 2
  • 8
  • 21
1
vote
1 answer

Progress Meter and XPCOM

I'm developing a Firefox extension that uses PyXPCOM to run a process. I would like to have a progress meter that is shown when the process is started and gives feedback to the user. In the javascript I have called the Thread Manager to run the…
sgres
  • 11
  • 1
1
vote
1 answer

XulRunner exit code

I was wondering how someone can specify an exit code when shutting a XULRunner application. I currently use nsIAppStartup.quit() described in MDC nsIAppStartup reference to shutdown the application, but I can't figure out how to specify a process…
sitifensys
  • 2,024
  • 16
  • 29