1 /*
2 
3   tag::write::Lyrics3 applicative class
4 
5   copyright (c) 2006 squell <squell@alumina.nl>
6 
7   use, modification, copying and distribution of this software is permitted
8   under the conditions described in the file 'COPYING'.
9 
10   Usage:
11 
12   The write::Lyrics3 class implements the interface for Lyrics3 tags
13 
14 */
15 
16 #ifndef __ZF_SETLYRICS3
17 #define __ZF_SETLYRICS3
18 
19 #include <map>
20 #include <string>
21 #include "set_base.h"
22 
23 namespace tag {
24     namespace write {
25 
26         class Lyrics3 : public handler, public reader {
27         public:
28             bool      vmodify(const char*, const function&) const;
29             metadata* read(const char*) const;
30 
31           // standard set
Lyrics3()32             Lyrics3() : mod(), null_tag(), fresh(), gen() { }
33 
34             Lyrics3& set(ID3field i, std::string m);
35             Lyrics3& rewrite(bool t = true)
36             { fresh = t; return *this; }
37             Lyrics3& create(bool t = true)
38             { gen   = t; return *this; }
39 
40           // extended
41             bool set(std::string field, std::string s);
42             bool rm(std::string field);
43             bool from(const char* fn);
44 
45         private:
46             std::map<std::string,std::string> mod;
47             std::string null_tag;
48             bool fresh, gen;
49         };
50 
51     }
52 }
53 
54 #endif
55 
56