summaryrefslogtreecommitdiff
path: root/tag.h
blob: e84450059e861f4e6a23b1eb5c943cb8ab03d1d9 (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
#ifndef TAG_H
#define TAG_H

#include <boost/shared_ptr.hpp>

#include <string>
#include <map>

class Tag {
	public:
		typedef boost::shared_ptr<Tag> p;
		typedef std::map<std::string, std::string> Fields;

		//! Tag fields.
		Fields fields;

		//! Generic tag loader.
		static p load(const std::string filename);

		//! Check for the existence of a specific field.
		bool has_field(const std::string name);
};

class ID3Tag : public Tag {
	private:
		void tag_add_string(struct id3_tag *id3tag, const char *type, const char *id);

	public:
		ID3Tag(const std::string filename);
};

#endif