[maemo-developers] [Fwd: Looking for npapi microb-engine header files]

From: josh.soref at nokia.com josh.soref at nokia.com
Date: Fri Nov 30 14:50:04 EET 2007
Jean-Sébastien Légaré wrote on November 28, 2007 10:34 AM
To: maemo-developers at maemo.org
Subject: Looking for npapi microb-engine header files
> I would like to port an existing mozilla plugin to the microb browser
> on the N800 running the latest OS2007. The whitepaper on the
> microb-engine available at browser.garage.maemo.org doesn't say much
> about their implementation of NPAPI and NPRuntime.

It's standard gecko from a certain time period, but you shouldn't need to ask, NPAPI has functions you can call to ask if features.


> Where could I get the set of header files, specific to the
> microb-engine on the n800 that I need to include in my plugin code?

NPAPI is designed such that you should not need to get some "specific" version. Use the version you're using, and the run it. If you write your plugin correctly so that it asks for features then it will just work.

> I
> am referring to the header files that we normally find in the
> gecko-sdk, such as npapi.h and npupp.h.

Shows that chinook has a package whose source includes the files of interest.

Reading through:
It seems that the only likely candidate is
  68 Package: microb-engine-dev

> Also, once I manage to compile the plugin as a shared object, how can
> I register it in the browser ? e.g. Can I install it with xpi from the
> browser?


How to create an extension package for Mozilla based browser for maemo

Clearly shows conversion from xpi to debian package

clearly says:

How can I extend the browser?

Thanks to the open standards support and a code base shared with Firefox, developers are able to easily port add-ons and extensions available from addons.mozilla.org. Firefox extensions can not be installed directly.

There is a project to help enhance MicroB, called browser-extras which is busy porting and packaging content and extensions to improve your browsing experience as well as reduce the pressure on our in house developers. Thanks to their contributors there for settings it up and working on it. 

You can examine the packages they produce:

At the present .deb is the only official way to install things, and this is a platform requirement (xpinstall was explicitly disabled per platform integration requirements)

> Can I place it in user's home directory under
> .mozilla/plugins/ or something similar ?

There are actually a couple of choices

System plugins are installed into:
/usr/lib/browser/plugins with symlinks pointing to them in ~/.mozilla/plugins

This is probably the best behavior as it enables hypothetical users to choose which plugins to have enabled w/o forcing multiple installations of the same files.

Please please please keep in mind that there can easily be more than one browser on the system. My systems tend to have at least 3:
Opera (I have a 770...)

Your plug-ins should be written according to NPAPI which means runtime interogation and proper error handling. You should not be crashing just because the user has a different browser (newer, older, or just plain different) hosting your plugin. NPAPI requires that plugins be browser agnostic.

More information about the maemo-developers mailing list