>+NS_IMETHODIMP >+nsGIOMimeApp::SetAsDefaultForMimeType(nsACString const& aMimeType) >+{ >+ char *content_type = >+ g_content_type_from_mime_type(PromiseFlatCString(aMimeType).get()); >+ if (!content_type) >+ return NS_ERROR_FAILURE;
>+NS_IMETHODIMP >+nsGIOService::GetAppForMimeType(const nsACString& aMimeType, >+ nsIGIOMimeApp** aApp) >+{ >+ *aApp = nsnull; >+ >+ char *content_type = >+ g_content_type_from_mime_type(PromiseFlatCString(aMimeType).get()); >+ if (!content_type) >+ return NS_ERROR_FAILURE;
>+NS_IMETHODIMP >+nsGIOService::GetDescriptionForMimeType(const nsACString& aMimeType, >+ nsACString& aDescription) >+{ >+ char *content_type = >+ g_content_type_from_mime_type(PromiseFlatCString(aMimeType).get()); >+ if (!content_type) >+ return NS_ERROR_FAILURE; >+
It looks like g_content_type_from_mime_type() is only available from GLib 2.18: http://library.gnome.org/devel/gio/unstable/ix03.html
Should we require GLib 2.18 for this XPCOM module or is there a reasonable way of doing this that would work with 2.16?
>+NS_IMETHODIMP :SetAsDefaultFo rMimeType( nsACString const& aMimeType) type_from_ mime_type( PromiseFlatCStr ing(aMimeType) .get()) ;
>+nsGIOMimeApp:
>+{
>+ char *content_type =
>+ g_content_
>+ if (!content_type)
>+ return NS_ERROR_FAILURE;
>+NS_IMETHODIMP :GetAppForMimeT ype(const nsACString& aMimeType, type_from_ mime_type( PromiseFlatCStr ing(aMimeType) .get()) ;
>+nsGIOService:
>+ nsIGIOMimeApp** aApp)
>+{
>+ *aApp = nsnull;
>+
>+ char *content_type =
>+ g_content_
>+ if (!content_type)
>+ return NS_ERROR_FAILURE;
>+NS_IMETHODIMP :GetDescription ForMimeType( const nsACString& aMimeType, type_from_ mime_type( PromiseFlatCStr ing(aMimeType) .get()) ;
>+nsGIOService:
>+ nsACString& aDescription)
>+{
>+ char *content_type =
>+ g_content_
>+ if (!content_type)
>+ return NS_ERROR_FAILURE;
>+
It looks like g_content_ type_from_ mime_type( ) is only available from GLib 2.18: library. gnome.org/ devel/gio/ unstable/ ix03.html
http://
Should we require GLib 2.18 for this XPCOM module or is there a reasonable way of doing this that would work with 2.16?