Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to register MIME type for NPAPI plugin in Linux

46 views
Skip to first unread message

Ashish Mittal

unread,
Dec 5, 2011, 3:43:22 AM12/5/11
to
Hi,

I have written a NPAPI plugin using croos plattform tool(Qt), in
the .res file of my plugin project(on Window OS), I have associated
MIME type with this plugin dll, so that it is getting detected by
firefox, now I wanted to use the same plugin on Linux machine, I have
recompiled the project on Linux machine and getting .so as an output.
But it is not getting detected by firefox , so how do I associate MIME
type with this plugin under Linux env.

or what is equlient of .res file in Linux.??
my dll MIME type is "application/x-shockwave-flash|application/
futuresplash"

Please help

Regards
Ashish

Enrique Ocaña González

unread,
Dec 6, 2011, 6:43:32 AM12/6/11
to dev-tech...@lists.mozilla.org
MIME type registration in Linux happens in a different way. You need to
declare a function in your plugin that will tell the browser about the MIME
type on runtime, when the plugin is loaded:

char *
NP_GetMIMEDescription(void) {
return "application/pdf:.pdf:Portable Document Format";
}

You can get more information about this in the following links:

http://gplflash.sourceforge.net/gplflash2_blog/npapi.html#SEC9
https://developer.mozilla.org/en/NP_GetMIMEDescription

And a full MPL/GPL/LGPL multiplatform plugin sample at:

http://people.igalia.com/eocanha/dev/libertexto/npsimple.tar.gz

(used to be at http://git.webvm.net/?p=npsimple but that's not online anymore)

Hope this to be useful. Cheers.

--
Enrique Ocaña
0 new messages