summaryrefslogtreecommitdiffstats
path: root/amarok/src/metabundlesaver.h
blob: 5ef3d3202a8461833fc4b6b168553927daeed409 (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
// Jeff Mitchell <kde-dev@emailgoeshere.com>, (C) 2006
// License: GNU General Public License V2

#ifndef METABUNDLESAVER_H
#define METABUNDLESAVER_H

#include <tqobject.h>
#include <tqstringlist.h>
#include <kurl.h>    //inline functions
#include <tdelocale.h> //inline functions
#include <taglib/audioproperties.h>
#include "expression.h"
#include "atomicstring.h"
#include "atomicurl.h"

#include "amarok_export.h"

namespace TagLib {
    class FileRef;
}

/**
 * @class MetaBundleSaver
 * @author Jeff Mitchell <kde-dev@emailgoeshere.com>
 */

class LIBAMAROK_EXPORT MetaBundleSaver : public TQObject
{
    Q_OBJECT
  
public:
     MetaBundleSaver( MetaBundle *bundle );
    ~MetaBundleSaver();

    //bool scannerSafeSave( TagLib::File* file );
    TagLib::FileRef* prepareToSave();
    bool doSave();
    bool cleanupSave();
    void abortSave( const TQString message );

private:
    MetaBundle *m_bundle;
    TQString m_tempSavePath;
    TQString m_origRenamedSavePath;
    TQCString m_tempSaveDigest;
    TagLib::FileRef* m_saveFileref;
    char m_databuf[8192];
    TQ_ULONG m_maxlen;
    bool m_cleanupNeeded;
};

#endif