#include <libgnomevfs/gnome-vfs.h>
#include <libgnomevfs/gnome-vfs-mime-handlers.h>
#include <stdio.h>

static void
check (const char *mime_type)
{
	gchar *desktop_entry;
	GnomeVFSMimeApplication *app;

	printf ("%s:\n", mime_type);

	desktop_entry = gnome_vfs_mime_get_default_desktop_entry (mime_type);
	printf (" %p %s\n", desktop_entry, desktop_entry);

	app = gnome_vfs_mime_get_default_application (mime_type);
	printf (" %p %s\n", app, app->id);
}

int
main (int argc, char **argv)
{
	gnome_vfs_init ();

	check ("application/msexcel");
	check ("application/vnd.ms-excel");

	return 0;
}
