blob: e9c3be378fd194113fb13b43a6f2a887d20eba55 (
plain) (
blame)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
#ifndef CONFIGURATION_H_A7164D18
#define CONFIGURATION_H_A7164D18
#include <map>
#include <string>
#include <set>
namespace twitter {
class configuration {
public:
enum class resizetype {
fit,
crop
};
struct photosize {
size_t height;
size_t width;
resizetype resize;
};
explicit configuration(std::string data);
size_t getCharactersReservedPerMedia() const
{
return _characters_reserved_per_media;
}
size_t getDirectMessageCharacterLimit() const
{
return _dm_text_character_limit;
}
size_t getMaxMediaPerUpload() const
{
return _max_media_per_upload;
}
size_t getPhotoSizeLimit() const
{
return _photo_size_limit;
}
const std::map<std::string, photosize>& getPhotoSizes() const
{
return _photo_sizes;
}
size_t getShortUrlLength() const
{
return _short_url_length;
}
size_t getShortHttpsUrlLength() const
{
return _short_https_url_length;
}
const std::set<std::string>& getNonUsernamePaths() const
{
return _non_username_paths;
}
private:
size_t _characters_reserved_per_media;
size_t _dm_text_character_limit;
size_t _max_media_per_upload;
size_t _photo_size_limit;
std::map<std::string, photosize> _photo_sizes;
size_t _short_url_length;
size_t _short_https_url_length;
std::set<std::string> _non_username_paths;
};
};
#endif /* end of include guard: CONFIGURATION_H_A7164D18 */
|