Switch to unified view

a/src/internfile/mh_unknown.h b/src/internfile/mh_unknown.h
...
...
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
19
20
#include <string>
20
#include <string>
21
21
22
#include "cstr.h"
22
#include "mimehandler.h"
23
#include "mimehandler.h"
23
24
24
/**
25
/**
25
 * Handler for files with no content handler: does nothing.
26
 * Handler for files with no content handler: does nothing.
26
 *
27
 *
...
...
28
class MimeHandlerUnknown : public RecollFilter {
29
class MimeHandlerUnknown : public RecollFilter {
29
 public:
30
 public:
30
    MimeHandlerUnknown(RclConfig *cnf, const string& mt) 
31
    MimeHandlerUnknown(RclConfig *cnf, const string& mt) 
31
    : RecollFilter(cnf, mt) {}
32
    : RecollFilter(cnf, mt) {}
32
    virtual ~MimeHandlerUnknown() {}
33
    virtual ~MimeHandlerUnknown() {}
33
    virtual bool set_document_string(const string& fn) {
34
    virtual bool set_document_file(const string& fn) {
34
    RecollFilter::set_document_file(fn);
35
    RecollFilter::set_document_file(fn);
35
    return m_havedoc = true;
36
    return m_havedoc = true;
36
    }
37
    }
37
    virtual bool set_document_file(const string&) {
38
    virtual bool set_document_string(const string&) {
38
    return m_havedoc = true;
39
    return m_havedoc = true;
39
    }
40
    }
40
    virtual bool next_document() {
41
    virtual bool next_document() {
41
    if (m_havedoc == false)
42
    if (m_havedoc == false)
42
        return false;
43
        return false;
43
    m_havedoc = false; 
44
    m_havedoc = false; 
44
  m_metaData["content"] = "";
45
  m_metaData[cstr_content] = cstr_null;
45
    m_metaData["mimetype"] = "text/plain";
46
    m_metaData[cstr_mimetype] = cstr_textplain;
46
    return true;
47
    return true;
47
    }
48
    }
48
    virtual bool is_unknown() {return true;}
49
    virtual bool is_unknown() {return true;}
49
};
50
};
50
51