Commit Graph

7 Commits

Author SHA1 Message Date
Ingo Weinhold b94857b322 Refactor MIME DB access
* Add class DatabaseLocation. It contains a list of the MIME DB
  directory paths plus methods to access type files.
* Move all low-level MIME DB access functions from
  database_{support,access} to DatabaseLocation. All code that formerly
  used those now requires a DatabaseLocation object. In BMimeType and in
  the registrar the default object is used, but the low-level classes
  can now be reused with different locations.
* Move get_icon_data() from database_access to database_support and
  delete the former, which is now empty.
2013-05-07 23:15:36 +02:00
Ingo Weinhold 9cda9c9905 Move MIME DB code back from registrar to src/kits/storage/mime
* Together with database_{access,support}.cpp it is built into a static
  library.
* Add new interfaces MimeSniffer and Database::NotificationListener for
  plugging in registrar specific functionality (the sniffer add-on
  support and the notification mechanism).
2013-05-07 17:54:29 +02:00
Michael Lotz f82c11c079 bonefish+mmlr:
* Move most of MIME database support out of libbe and into registrar
* Use the (async) MessageDeliverer instead of a synchronous SendMessage in _SendMonitorUpdate

This fixes a deadlock when the message port of a MIME database watching
application gets full as documented in bug #1311.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23423 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-11 22:45:06 +00:00
Axel Dörfler f6e4cbb952 * Rewrote BeBuild.h which had "a few" consequences (got rid of all those class
definitions).
* Minor cleanup here and there.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22577 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-15 20:13:55 +00:00
Ingo Weinhold e4f35acf7c * Added new (currently private) API class BMimeSnifferAddon,
representing the interface for, well, MIME sniffer add-ons.
* Implemented the respective add-on manager and make use of it in
  the MIME database code. Unfortunately the MIME DB code completely
  lives in libbe.so and hence I had to put my code there too.
  IMHO we should (one day) remove the direct (read-only) MIME DB
  access from libbe and move everything into the registrar.
  Currently the add-on manager supports built-in add-ons only; it
  doesn't really load anything from disk ATM.
* Added a built-in text sniffer add-on to the registrar. It's based
  upon the BSD file tool code.

This closes bug #250 (plain text files are identified as such, now).



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17784 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-06-09 20:48:50 +00:00
shadow303 17e6de7a37 gcc 3 fixes
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4227 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-08-04 00:46:53 +00:00
Tyler Dauwalder 4494844f12 Initial checkin. BPrivate::Storage::Mime::SnifferRules class, which is
responsible for managing sniffer rules and sniffing files and data
streams.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1147 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-09-24 05:22:40 +00:00