To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Revision:

root / common / FeatureFileIndex.h

History | View | Annotate | Download (982 Bytes)

1
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */
2

    
3
#ifndef _CLASSICAL_DATA_FEATURE_FILE_INDEX_H_
4
#define _CLASSICAL_DATA_FEATURE_FILE_INDEX_H_
5

    
6
#include "Objects.h"
7

    
8
#include <dataquay/BasicStore.h>
9
#include <dataquay/TransactionalStore.h>
10

    
11
#include <QMutex>
12

    
13
namespace ClassicalData {
14

    
15
class FeatureFileIndex : public QObject
16
{
17
    Q_OBJECT
18

    
19
public:
20
    static FeatureFileIndex *getInstance();
21
    
22
    FeatureFileIndex();
23
    ~FeatureFileIndex();
24

    
25
    void loadFor(AudioFile *, Dataquay::Store *);
26

    
27
public slots:
28
    void featureFileAdded(QString filepath);
29

    
30
private:
31
    QMutex m_mutex;
32
    QString m_indexFileName;
33
    Dataquay::BasicStore *m_bs;
34
    Dataquay::TransactionalStore *m_index;
35
    QString getIndexFileName();
36
    QString getFeatureDirectoryName();
37
    bool loadFor(Dataquay::Uri canonicalUri, Dataquay::Uri actingUri,
38
                 QString hash, Dataquay::Store *);
39
    void updateIndex();
40
    void index(QUrl);
41
};
42

    
43
}
44

    
45
#endif
46

    
47

    
48