char        *retType = nsnull; char        *ext = nsnull; nsresult    rv;  ext = PL_strrchr(filename, '.'); if (ext) { ext++; NS_WITH_SERVICE(nsIMIMEService, mimeFinder, kMimeServiceCID, &rv); if (NS_SUCCEEDED(rv) && mimeFinder) mimeFinder->GetTypeFromExtension(ext, &retType); }  return retType;
mime_file_type (const char *filename, void *stream_closure){#if 0  NET_cinfo *cinfo = NET_cinfo_find_type ((char *) filename);  if (!cinfo || !cinfo->type)    return 0;  else    return nsCRT::strdup(cinfo->type);#else  return 0;#endif}