History log of /haiku/src/kits/storage/mime/SnifferRules.cpp
Revision Date Author Comments
# a1ad8af6 24-May-2019 Augustin Cavalier <waddlesplash@gmail.com>

Change a number of sprintf to snprintf.

Fixes a number of -Werrors about format overflow from GCC 8.


# cd6365c7 17-May-2018 Jérôme Duval <jerome.duval@gmail.com>

style fixes


# 7895cfc6 26-Jul-2015 Adrien Destugues <pulkomandy@gmail.com>

PVS 114: useless check.

We return a few line above if err is != 0.


# 77ac2d8d 17-Dec-2013 Jonathan Schleifer <js@webkeks.org>

SnifferRules.cpp: Make the arguments for operator< const.

It is used on const versions of sniffer_rule and thus it needs to be
declared with const.


# b94857b3 07-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

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.


# 9cda9c99 07-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

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).


# f82c11c0 11-Jan-2008 Michael Lotz <mmlr@mlotz.ch>

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


# ed0d15ba 11-Aug-2006 Axel Dörfler <axeld@pinc-software.de>

* Use max_c() instead of max() in C++ files.
* Updated license header.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18491 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e4f35acf 09-Jun-2006 Ingo Weinhold <ingo_weinhold@gmx.de>

* 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


# 17e6de7a 03-Aug-2003 shadow303 <shadow303@nowhere.fake>

gcc 3 fixes


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4227 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a5519587 01-Oct-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Removed directory and symlink special cases from
GuessMimeType(entry_ref*) and placed them in
Database::GuessMimeType(entry_ref*)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1329 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4494844f 23-Sep-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

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


# 7895cfc69b8d2ffd209400ab6ed4514cd2dab842 26-Jul-2015 Adrien Destugues <pulkomandy@gmail.com>

PVS 114: useless check.

We return a few line above if err is != 0.


# 77ac2d8d8d7a7071392c0c70cba0e7a008ee0b29 17-Dec-2013 Jonathan Schleifer <js@webkeks.org>

SnifferRules.cpp: Make the arguments for operator< const.

It is used on const versions of sniffer_rule and thus it needs to be
declared with const.


# b94857b322093c296230a18d47f6a98a2896b062 07-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

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.


# 9cda9c9905397675aec87ebc6bc9287df3ca2264 07-May-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

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).


# f82c11c0793269f483e03fc6f1a3a93aa1d092f0 11-Jan-2008 Michael Lotz <mmlr@mlotz.ch>

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


# ed0d15ba4634f11cc76fa3cb18c9950d4803163c 11-Aug-2006 Axel Dörfler <axeld@pinc-software.de>

* Use max_c() instead of max() in C++ files.
* Updated license header.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18491 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e4f35acf7c780f50e5f4ca4fc664b6c6806e8fbf 09-Jun-2006 Ingo Weinhold <ingo_weinhold@gmx.de>

* 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


# 17e6de7a37c5c61f45eb724de108daa70905cb8f 03-Aug-2003 shadow303 <shadow303@nowhere.fake>

gcc 3 fixes


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4227 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a5519587952cc7a6aca9275f3b8258d87ce8b000 01-Oct-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

Removed directory and symlink special cases from
GuessMimeType(entry_ref*) and placed them in
Database::GuessMimeType(entry_ref*)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1329 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4494844f127d9e4087f771f1b52367eb26478d17 23-Sep-2002 Tyler Dauwalder <tylerdauwalder@nowhere.fake>

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