Teknomancer / beezer

Beezer is an archiving tool for the Haiku operating system.
BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link

Improve Rules file handling #10

Open Teknomancer opened 3 years ago

Teknomancer commented 3 years ago

See discussion in 62eb75ac0dd21cef4a3a6cae6dde48104eb58ad2.

Teknomancer commented 3 years ago

We should be able use our existing HashTable implementation for the extension to mime-type mapping.

augiedoggie commented 3 years ago

We could probably use a BMessage to get the data from the archivers now that I think about it. It allows storing multiple entries under a single key.

augiedoggie commented 3 years ago

In the archivers we could do ...

m_rulesMsg->AddString("application/x-zstd", ".zst");
m_rulesMsg->AddString("application/x-zstd", ".zstd");
...

and then iterate through them in the add-on loading code. Or the other way around with file extension as the key.

augiedoggie commented 3 years ago

I'll assign this one to me and work on it in a day or two if you haven't already started on it. I have some ideas on how to change things around.

Teknomancer commented 3 years ago

I haven't started on it, thanks!

Yes, using BMessage sounds good.