Switch to unified view

a/src/internfile/mimehandler.cpp b/src/internfile/mimehandler.cpp
1
#ifndef lint
1
#ifndef lint
2
static char rcsid[] = "@(#$Id: mimehandler.cpp,v 1.21 2006-12-19 08:40:50 dockes Exp $ (C) 2004 J.F.Dockes";
2
static char rcsid[] = "@(#$Id: mimehandler.cpp,v 1.22 2007-11-16 14:28:52 dockes Exp $ (C) 2004 J.F.Dockes";
3
#endif
3
#endif
4
/*
4
/*
5
 *   This program is free software; you can redistribute it and/or modify
5
 *   This program is free software; you can redistribute it and/or modify
6
 *   it under the terms of the GNU General Public License as published by
6
 *   it under the terms of the GNU General Public License as published by
7
 *   the Free Software Foundation; either version 2 of the License, or
7
 *   the Free Software Foundation; either version 2 of the License, or
...
...
50
    return new MimeHandlerMail(lmime);
50
    return new MimeHandlerMail(lmime);
51
    else 
51
    else 
52
    return new MimeHandlerUnknown(lmime);
52
    return new MimeHandlerUnknown(lmime);
53
}
53
}
54
54
55
/**
55
/*
56
 * Return handler object for given mime type:
56
 * Return handler object for given mime type:
57
 */
57
 */
58
Dijon::Filter *getMimeHandler(const string &mtype, RclConfig *cfg)
58
Dijon::Filter *getMimeHandler(const string &mtype, RclConfig *cfg, 
59
                bool filtertypes)
59
{
60
{
60
    // Get handler definition for mime type
61
    // Get handler definition for mime type
61
    string hs;
62
    string hs;
62
    if (!mtype.empty())
63
    if (!mtype.empty())
63
    hs = cfg->getMimeHandlerDef(mtype);
64
    hs = cfg->getMimeHandlerDef(mtype, filtertypes);
64
65
65
    if (!hs.empty()) {
66
    if (!hs.empty()) {
66
    // Break definition into type and name 
67
    // Break definition into type and name 
67
    list<string> toks;
68
    list<string> toks;
68
    stringToStrings(hs, toks);
69
    stringToStrings(hs, toks);