blob: de3d59af1a6493d678aaac9f18eb019b9cfbca8f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
/***************************************************************************
copyright : (C) 2007 by Robby Stephenson
email : robby@periapsis.org
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of version 2 of the GNU General Public License as *
* published by the Free Software Foundation; *
* *
***************************************************************************/
#ifndef GRIFFITHIMPORTER_H
#define GRIFFITHIMPORTER_H
#include "importer.h"
#include "../datavectors.h"
class KProcess;
namespace Tellico {
namespace Import {
/**
* An importer for importing collections used by Griffith, a movie colleciton manager.
*
* The database is assumed to be $HOME/.griffith/griffith.db. The file format is sqlite3,
* and a python script, depending on pysqlite, i sused to import the database
*
* @author Robby Stephenson
*/
class GriffithImporter : public Importer {
Q_OBJECT
TQ_OBJECT
public:
/**
*/
GriffithImporter() : Importer(), m_coll(0), m_process(0) {}
/**
*/
virtual ~GriffithImporter();
/**
*/
virtual Data::CollPtr collection();
virtual bool canImport(int type) const;
private slots:
void slotData(KProcess* proc, char* buffer, int len);
void slotError(KProcess* proc, char* buffer, int len);
void slotProcessExited(KProcess* proc);
private:
Data::CollPtr m_coll;
KProcess* m_process;
TQByteArray m_data;
};
} // end namespace
} // end namespace
#endif
|