The Gnome API to get the list of all applications registered for a mimetype call gnome_vfs_mime_get_all_application(const char *mimetype);
The implementation could look like:
NS_IMETHODIMP nsGnomeVFSService::GetAllAppsForMimeType(const nsACString &aMimeType, nsIGnomeVFSMimeApp** aApp) { *aApps = nsnull; GList *apps = gnome_vfs_mime_get_all_application(PromiseFlatCString(aMimeType).get());
while(apps) { GList *next = apps->next; nsGnomeVFSMimeApp *mozApp = new nsGnomeVFSMimeApp(apps->data); NS_ENSURE_TRUE(mozApp, NS_ERROR_OUT_OF_MEMORY);
NS_ADDREF(apps->data = mozApp); } return NS_OK; }
The Gnome API to get the list of all applications registered for a mimetype call gnome_vfs_ mime_get_ all_application (const char *mimetype);
The implementation could look like:
NS_IMETHODIMP ce::GetAllAppsF orMimeType( const nsACString &aMimeType,
nsIGnomeVFSM imeApp* * aApp) vfs_mime_ get_all_ application( PromiseFlatCStr ing(aMimeType) .get()) ;
nsGnomeVFSServi
{
*aApps = nsnull;
GList *apps =
gnome_
while(apps) {
nsGnomeVFSMimeA pp *mozApp = new nsGnomeVFSMimeA pp(apps- >data);
NS_ENSURE_ TRUE(mozApp, NS_ERROR_ OUT_OF_ MEMORY) ;
GList *next = apps->next;
}
return NS_OK;
}