Yet Another Intercepting Proxy
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#ifndef CONFIG_H
|
|
|
|
#define CONFIG_H
|
|
|
|
|
|
|
|
#include <glob.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <sys/stat.h>
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
char *database;
|
|
|
|
char *localConfig; // Project Specific
|
|
|
|
char *userConfig; // User Specific
|
|
|
|
unsigned int port;
|
|
|
|
char *certfile;
|
|
|
|
char *keyfile;
|
|
|
|
} Config;
|
|
|
|
|
|
|
|
bool path_exists(const char *path);
|
|
|
|
char* resolveTilde(const char *path);
|
|
|
|
Config* configDefaults();
|
|
|
|
char* getConfigDir();
|
|
|
|
void maybeMakeDir(const char *path);
|
|
|
|
char* getUserConfigFile();
|
|
|
|
void setConfig(Config *config, char option[], char value[]);
|
|
|
|
void printConfig(Config *config);
|
|
|
|
|
|
|
|
#endif /* ifndef CONFIG_H */
|