33 lines
693 B
C
33 lines
693 B
C
#ifndef CONFIG_H
|
|
#define CONFIG_H
|
|
|
|
typedef struct {
|
|
char base_path[1024];
|
|
char template_path[1024];
|
|
char passwd_file[1024];
|
|
int max_entries;
|
|
char hidden_dirs[10][256];
|
|
int hidden_dirs_count;
|
|
char hidden_files[10][256];
|
|
int hidden_files_count;
|
|
char preview_image[512];
|
|
char preview_text[512];
|
|
char preview_audio[512];
|
|
char preview_video[512];
|
|
char preview_pdf[512];
|
|
|
|
int max_attempts;
|
|
int block_time;
|
|
|
|
char log_file[1024];
|
|
int enable_access_log;
|
|
} config_t;
|
|
|
|
extern config_t g_config;
|
|
|
|
int load_config(const char *path);
|
|
void set_default_config(void);
|
|
int is_string_in_list(const char *str, const char *list);
|
|
|
|
#endif
|