blob: 398160b2c58408308b28c04f1f7ce7bafc42cdea (
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
33
34
35
36
37
38
39
40
41
42
43
|
#ifndef REVELA_CONFIG_H
#define REVELA_CONFIG_H
#include <stdbool.h>
#include <stdint.h>
#include <sys/types.h>
#define SITE_CONF "site.ini"
#define ALBUM_CONF "album.ini"
struct image_config {
bool strip;
uint8_t quality;
size_t max_width;
size_t max_height;
bool smart_resize;
};
struct site_config {
char *title;
char *base_url;
uint32_t max_previews;
struct image_config images;
struct image_config thumbnails;
};
struct album_config {
char *title;
char *desc;
};
bool site_config_read_ini(const char *wdir, struct site_config *);
bool album_config_read_ini(const char *adir, struct album_config *);
struct site_config *site_config_init(void);
struct album_config *album_config_init(void);
void site_config_destroy(struct site_config *config);
void album_config_destroy(struct album_config *config);
#endif
|