"Fossies" - the Fresh Open Source Software Archive

Member "recoll-1.26.3/internfile/mh_unknown.h" (4 Sep 2019, 1551 Bytes) of package /linux/privat/recoll-1.26.3.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "mh_unknown.h" see the Fossies "Dox" file reference documentation.

    1 /* Copyright (C) 2004 J.F.Dockes
    2  *   This program is free software; you can redistribute it and/or modify
    3  *   it under the terms of the GNU General Public License as published by
    4  *   the Free Software Foundation; either version 2 of the License, or
    5  *   (at your option) any later version.
    6  *
    7  *   This program is distributed in the hope that it will be useful,
    8  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
    9  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   10  *   GNU General Public License for more details.
   11  *
   12  *   You should have received a copy of the GNU General Public License
   13  *   along with this program; if not, write to the
   14  *   Free Software Foundation, Inc.,
   15  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
   16  */
   17 #ifndef _MH_UNKNOWN_H_INCLUDED_
   18 #define _MH_UNKNOWN_H_INCLUDED_
   19 
   20 #include <string>
   21 
   22 #include "cstr.h"
   23 #include "mimehandler.h"
   24 
   25 /**
   26  * Handler for files with no content handler: does nothing.
   27  *
   28  */
   29 class MimeHandlerUnknown : public RecollFilter {
   30  public:
   31     MimeHandlerUnknown(RclConfig *cnf, const string& id) 
   32     : RecollFilter(cnf, id) {
   33     }
   34     virtual ~MimeHandlerUnknown() {}
   35     virtual bool is_data_input_ok(DataInput input) const {
   36         return true;
   37     }
   38     
   39     virtual bool next_document() {
   40     if (m_havedoc == false)
   41         return false;
   42     m_havedoc = false; 
   43     m_metaData[cstr_dj_keycontent] = cstr_null;
   44     m_metaData[cstr_dj_keymt] = cstr_textplain;
   45     return true;
   46     }
   47     virtual bool is_unknown() {return true;}
   48 };
   49 
   50 #endif /* _MH_UNKNOWN_H_INCLUDED_ */