Re: Why gnome_vfs_mime_get_extensions_list() returns NULL?



Alexander,

Thanks a lot for your reply.

Which API should I use to replace gnome_vfs_mime_get_extensions_list()?

Thanks

Brian

Alexander Larsson wrote:
On Thu, 2007-04-12 at 16:18 +0800, brian.lu wrote:
Hi, experts,

I'm investigating a firefox bug and I found that the root cause is that gnome_vfs_mime_get_extensions_list() returns NULL. In firefox, gnome_vfs_mime_get_extensions_list() is called with "application/pdf" as a parameter. It returns NULL.

I check the source code of gnome_vfs_mime_get_extensions_list() (which is contained in gnome-vfs-mime-info.c), it always returns
NULL.

Is the gnome_vfs_mime_get_extensions_list() deprecated? If so, can anyone tell me its replacement?

Yes, gnome_vfs_mime_get_extensions_list is part of the old mime API that
used the old gnome-mime-data information. It was deprecated when we
moved to the shared-mime-data info. This is since:
a) shared-mime-info uses globs, not extensions
b) Getting that data in the new system isn't very efficient

The whole mime system API is kinda weird since the initial API was
essentially exposing the old mime data file format, and then we changed
file format...

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc alexl redhat com alla lysator liu se He's a jaded umbrella-wielding card sharp on his last day in the job. She's a cold-hearted tomboy queen of the dead with a knack for trouble. They fight crime!




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]