[interfacekit] Re: MimeDatabase News

Hi folks,

I'm in a bit of a rush, but here's a quick update:

BMimeType::GetSupportingApps() should be working now. I did nearly as 
simple an implementation as possible, which means creating the 
supporting apps table from the database on the first 
GetSupportingApps() call, then maintaing said database in memory as 
SetSupportedTypes() calls are made. It passes all the previous tests we 
had written (though I need to make the tests a bit more rigorous with 
some SetSupportedTypes() calls in there), and furthermore, it appears 
to be noticably faster than the R5 implementation. As this surprises me 
a bit, I plan to double-check that I'm not missing something at some 
point, but here's hoping (actually, I just realized 
SetSupportedTypes(NULL) is not implemented, but I will do that shortly, 
and it's not relevant to the current tests anyway :-).

I'm not currently using the __mime_table file for anything, as it 
contains only redundant information (correct?) and I figured we'd see 
if a simpler implementation would be fast enough. So far, it looks okay 
to me, but perhaps we'll think of some reason later as to why we might 
still want to use a __mime_table file.

SetSupportedTypes() now takes a "bool fullSync" parameter analogous to 
BAppFileInfo's "bool sync_all" parameter. I need to write some tests up 
for this function as well.

Ingo, can you get rid of the B_REG_MIME_UNSUPPORT_TYPE constant once 
you update BAppFileInfo to use the updated SetSupportedTypes()?

I believe this leaves the MIME sniffer and C functions as far as 
BMimeType is concerned. Up next for me is some polishing on all the 
recent mime database stuff, plus the tests I mentioned.

Also, I'm moving to a new apartment over the course of the next week or 
so, so I may take a slight break, or at least a cutback, from OBOS work 
until I get resettled.

-Tyler

Other related posts: