firefox extension: use XPCOM instead of communicating via files

Bug #488656 reported by Markus Korn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zeitgeist Data-Sources
Fix Released
Undecided
Markus Korn

Bug Description

Due to a missing pyxpcom package in ubuntu karmic the firefox extension was hacked by files in the dbus communication process. this is VERY inefficient. We should use XPCOM instead.

Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

How can you talk to Zeitgeist over XPCOM? Is there some bridging mechanism? Otherwise it might be useful to use a real DBus impl. for Xulrunner http://wiki.github.com/FireRabbit/mozjs-dbus

Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

Ah, now I get it. You want to load a Zeitgeist XPCOM component, written in Python, into Firefox, and then from that component import DBus (or simply zeitgeist.client.ZeitgeistClient). This component is then used to implement the extension in Javscript, or am I out on a limb?

Revision history for this message
Markus Korn (thekorn) wrote :

Right, this was my initial idea.
But maybe using mozjs-dbus is much easier, I will try it later today.
Thanks for the link.

Revision history for this message
Markus Korn (thekorn) wrote :
Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

browser-dbus-bridge seems like a great OS library that is even documented! :-)

Only problem is that I can't seem to find a Debian/Ubuntu package anywhere, so if we are serious about using this as a dep. we need to package it our selves - which seem like a small task compared to writing a full extension in C/XPCOM. It also has the great advantage that we can keep it a pure Javascript extension.

If anyone starts looking at packaging of browser-dbus-bridge please ping in on this bug. I migfht look at it myself when we have Zeitgeist 0.3.1 out the door.

Revision history for this message
Laszlo Pandy (laszlok) wrote :

There is an extension called DBusBird for songbird (the music player based on mozilla), which starts a DBus server so scripts can query the currently playing song info. This extension uses IDL to describe an interface which the mozilla JavaScript API can use to call into C++ code. The compiled extension contains a Javascript file and a .so binary which is loaded when the JavaScript requests the interface name ("@mozilla.org/DBusbird;1"). The C++ module links to the dbus glib bindings, and does all the dbus stuff with the info it gets from JavaScript.

If the browser dbus bridge is stable enough we could do everything in JavaScript. Otherwise a simple wrapper in C++ based on the dbusbird code might be the best way to go.

Extension page: http://addons.songbirdnest.com/addon/181
Project page: http://code.google.com/p/dbus-bird/
Source code: svn checkout http://dbus-bird.googlecode.com/svn/trunk/ dbus-bird

Revision history for this message
Markus Korn (thekorn) wrote :

FIXED!

------------------------------------------------------------
revno: 43
committer: Michal Hruby <email address hidden>
branch nick: trunk
timestamp: Tue 2010-05-11 18:51:49 +0300
message:
  Add the new XPCOM firefox extension
------------------------------------------------------------

Changed in zeitgeist-dataproviders:
assignee: nobody → Markus Korn (thekorn)
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.