-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathmass_tag.h
54 lines (36 loc) · 1.31 KB
/
mass_tag.h
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
/*
mass_tag engine class (wrapping it all up)
copyright (c) 2004-2006 squell <[email protected]>
use, modification, copying and distribution of this software is permitted
under the conditions described in the file 'COPYING'.
Usage:
Initialize with a tag object (containing changes to make) and a tag::read
factory (selecting the data source); the result is a finder object which
will apply changes to the files it is specified to operate on.
Example:
mass_tag( ID3().set(artist, "TAFKAT") ).glob("*.mp3");
*/
#ifndef __ZF_MASS_TAG_HPP
#define __ZF_MASS_TAG_HPP
#include <string>
#include "fileexp.h"
#include "set_base.h"
namespace fileexp {
class mass_tag : public find {
public:
mass_tag(const tag::writer& write, const tag::reader& read)
: tag_writer(write), tag_reader(read), counter(0) { }
template<class T> mass_tag(const T& tag)
: tag_writer(tag), tag_reader(tag), counter(0) { }
const tag::writer& tag_writer;
const tag::reader& tag_reader;
static tag::ID3field field(wchar_t c);
static std::string var (int i);
static unsigned long total();
protected:
unsigned long counter;
virtual bool file(const char* name, const record&);
virtual bool dir (const record&);
};
}
#endif