Switch to unified view

a/src/internfile/internfile.h b/src/internfile/internfile.h
1
#ifndef _INTERNFILE_H_INCLUDED_
1
#ifndef _INTERNFILE_H_INCLUDED_
2
#define _INTERNFILE_H_INCLUDED_
2
#define _INTERNFILE_H_INCLUDED_
3
/* @(#$Id: internfile.h,v 1.2 2005-02-09 12:07:29 dockes Exp $  (C) 2004 J.F.Dockes */
3
/* @(#$Id: internfile.h,v 1.3 2005-03-25 09:40:27 dockes Exp $  (C) 2004 J.F.Dockes */
4
4
5
#include <string>
5
#include <string>
6
6
7
#include "rclconfig.h"
7
#include "rclconfig.h"
8
#include "rcldb.h"
8
#include "rcldb.h"
9
9
10
class MimeHandler;
11
10
/// Turn external file into internal representation, according to mime type etc
12
/// Turn external file into internal representation, according to mime type etc
11
extern bool internfile(const std::string &fn, RclConfig *config, 
13
class FileInterner {
12
             Rcl::Doc& doc, const string& tdir);
14
    string fn;
15
    RclConfig *config;
16
    const string &tdir;
17
    MimeHandler *handler;
18
    string tfile;
19
    string mime;
20
21
    void tmpcleanup();
22
23
 public:
24
    FileInterner(const std::string &f, RclConfig *cnf, const string& td);
25
    ~FileInterner();
26
27
    enum Status {FIError, FIDone, FIAgain};
28
    Status internfile(Rcl::Doc& doc, string &ipath);
29
};
13
30
14
#endif /* _INTERNFILE_H_INCLUDED_ */
31
#endif /* _INTERNFILE_H_INCLUDED_ */