|
a/src/internfile/mh_unknown.h |
|
b/src/internfile/mh_unknown.h |
|
... |
|
... |
14 |
* Free Software Foundation, Inc.,
|
14 |
* Free Software Foundation, Inc.,
|
15 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
15 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
16 |
*/
|
16 |
*/
|
17 |
#ifndef _MH_UNKNOWN_H_INCLUDED_
|
17 |
#ifndef _MH_UNKNOWN_H_INCLUDED_
|
18 |
#define _MH_UNKNOWN_H_INCLUDED_
|
18 |
#define _MH_UNKNOWN_H_INCLUDED_
|
19 |
/* @(#$Id: mh_unknown.h,v 1.1 2006-03-28 09:36:53 dockes Exp $ (C) 2004 J.F.Dockes */
|
19 |
/* @(#$Id: mh_unknown.h,v 1.2 2006-12-15 12:40:02 dockes Exp $ (C) 2004 J.F.Dockes */
|
20 |
|
20 |
|
21 |
#include <string>
|
21 |
#include <string>
|
22 |
|
22 |
|
23 |
#include "rclconfig.h"
|
|
|
24 |
#include "rcldb.h"
|
|
|
25 |
#include "mimehandler.h"
|
23 |
#include "mimehandler.h"
|
26 |
|
24 |
|
27 |
/**
|
25 |
/**
|
28 |
* Handler for files with no content handler: does nothing.
|
26 |
* Handler for files with no content handler: does nothing.
|
29 |
*
|
27 |
*
|
30 |
*/
|
28 |
*/
|
31 |
class MimeHandlerUnknown : public MimeHandler {
|
29 |
class MimeHandlerUnknown : public RecollFilter {
|
32 |
public:
|
30 |
public:
|
33 |
MimeHandler::Status mkDoc(RclConfig *conf, const std::string &fn,
|
31 |
MimeHandlerUnknown(const string& mt) : RecollFilter(mt) {}
|
34 |
const std::string &mtype, Rcl::Doc &docout,
|
32 |
virtual ~MimeHandlerUnknown() {}
|
35 |
std::string&) {
|
33 |
virtual bool set_document_string(const string&) {
|
36 |
return MimeHandler::MHDone;
|
34 |
return m_havedoc = true;
|
|
|
35 |
}
|
|
|
36 |
virtual bool set_document_file(const string&) {
|
|
|
37 |
return m_havedoc = true;
|
|
|
38 |
}
|
|
|
39 |
virtual bool next_document() {
|
|
|
40 |
if (m_havedoc == false)
|
|
|
41 |
return false;
|
|
|
42 |
m_havedoc = false;
|
|
|
43 |
m_metaData["content"] = "";
|
|
|
44 |
m_metaData["mimetype"] = "text/plain";
|
|
|
45 |
return true;
|
37 |
}
|
46 |
}
|
38 |
};
|
47 |
};
|
39 |
|
48 |
|
40 |
#endif /* _MH_UNKNOWN_H_INCLUDED_ */
|
49 |
#endif /* _MH_UNKNOWN_H_INCLUDED_ */
|