#!/bin/sh
#
# List the supported MIME types of the available
# mozilla/firefox/iceweasel plugins.
#
# See also http://wiki.debian.org/DebianEdu/BrowserMultimedia

cat > x.c <<EOF
#include <stdio.h>
int main(int argc, char *argv[]) {
  printf("%s\n", NPP_GetMIMEDescription());
  return 0;
}
EOF

for f in  /usr/lib/mozilla/plugins/*.so; do
    gcc -o x x.c $f -L/usr/lib -Wl,-rpath,/usr/lib/mozilla/plugins
    echo $f
    ./x | sed "s/;/;\n/g" | sed 's/^/  /' | sort
done

exit 0
