|
a/src/internfile/mimehandler.cpp |
|
b/src/internfile/mimehandler.cpp |
|
... |
|
... |
40 |
|
40 |
|
41 |
// Performance help: we use a pool of already known and created
|
41 |
// Performance help: we use a pool of already known and created
|
42 |
// handlers. There can be several instances for a given mime type
|
42 |
// handlers. There can be several instances for a given mime type
|
43 |
// (think email attachment in email message: 2 rfc822 handlers are
|
43 |
// (think email attachment in email message: 2 rfc822 handlers are
|
44 |
// needed simulteanously)
|
44 |
// needed simulteanously)
|
|
|
45 |
//
|
|
|
46 |
// FIXME: this is not compatible with multiple threads and a potential
|
|
|
47 |
// problem in the recoll gui (indexing thread + preview request). A
|
|
|
48 |
// simple lock would be enough as handlers are removed from the cache
|
|
|
49 |
// while in use and multiple copies are allowed
|
45 |
static multimap<string, Dijon::Filter*> o_handlers;
|
50 |
static multimap<string, Dijon::Filter*> o_handlers;
|
46 |
|
51 |
|
47 |
/** For mime types set as "internal" in mimeconf:
|
52 |
/** For mime types set as "internal" in mimeconf:
|
48 |
* create appropriate handler object. */
|
53 |
* create appropriate handler object. */
|
49 |
static Dijon::Filter *mhFactory(const string &mime)
|
54 |
static Dijon::Filter *mhFactory(const string &mime)
|