-
Notifications
You must be signed in to change notification settings - Fork 1
/
file-type.h
51 lines (39 loc) · 966 Bytes
/
file-type.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
/*
* Copyright (c) 2013-2019 amded workers, All rights reserved.
* Terms for redistribution and use can be found in LICENCE.
*/
/**
* @file file-type.h
* @brief API for transparent file-type id vs. label handling
*/
#ifndef INC_FILE_TYPE_H
#define INC_FILE_TYPE_H
#include <string>
enum file_type {
FILE_T_INVALID = -1,
FILE_T_M4A,
FILE_T_MP3,
FILE_T_FLAC,
FILE_T_OGG_VORBIS,
FILE_T_OPUS
};
namespace Amded {
class FileType {
private:
enum file_type id;
std::string label;
public:
/* Default {de,con}struction */
FileType();
~FileType();
/* ...via id */
FileType(enum file_type);
FileType& operator=(enum file_type);
/* ...via string */
FileType(const std::string&);
FileType& operator=(const std::string&);
std::string get_label() const;
enum file_type get_id() const;
};
}
#endif /* INC_FILE_TYPE_H */