2022-11-04 03:15:28 +03:00
|
|
|
#include <string>
|
|
|
|
#include "iostream"
|
|
|
|
#include "augeas.h"
|
|
|
|
#include "map"
|
|
|
|
#include <sys/stat.h>
|
2022-11-05 21:43:43 +03:00
|
|
|
#include "augSettings.h"
|
2022-11-12 01:09:13 +03:00
|
|
|
#include "utils.h"
|
2022-11-04 03:15:28 +03:00
|
|
|
|
2022-11-03 22:30:21 +03:00
|
|
|
#if defined(_WIN32)
|
2022-11-12 01:09:13 +03:00
|
|
|
#define CLAPI __attribute__((unused)) __declspec(dllexport)
|
2022-11-03 22:30:21 +03:00
|
|
|
#else
|
2022-11-12 01:09:13 +03:00
|
|
|
#define CLAPI __attribute__((unused))
|
2022-11-03 22:30:21 +03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
|
2022-11-12 01:09:13 +03:00
|
|
|
// Object Life-cycle
|
|
|
|
CLAPI void *init_aug (augSettings settings, int flags);
|
2022-11-05 00:10:00 +03:00
|
|
|
|
2022-11-12 01:09:13 +03:00
|
|
|
CLAPI bool load_file (void *aug, const char *filePath);
|
2022-11-05 00:38:12 +03:00
|
|
|
|
2022-11-12 01:09:13 +03:00
|
|
|
CLAPI void print_preview (augeas *aug, const char *path);
|
2022-11-05 00:38:12 +03:00
|
|
|
|
2022-11-12 01:09:13 +03:00
|
|
|
CLAPI void close_aug (void *aug);
|
2022-11-05 00:38:12 +03:00
|
|
|
|
2022-11-12 01:09:13 +03:00
|
|
|
CLAPI void free_str (char *str);
|
2022-11-05 00:38:12 +03:00
|
|
|
|
2022-11-12 01:09:13 +03:00
|
|
|
CLAPI void print_tree (augeas *aug, const char *path);
|
2022-11-05 00:38:12 +03:00
|
|
|
|
2022-11-12 01:09:13 +03:00
|
|
|
CLAPI char *get_tree (augeas *aug, const char *path);
|
2022-11-03 22:30:21 +03:00
|
|
|
|
2022-11-12 01:09:13 +03:00
|
|
|
CLAPI const char *get_node (augeas *aug, const char *path);
|
2022-11-05 00:10:00 +03:00
|
|
|
|
2022-11-12 01:09:13 +03:00
|
|
|
CLAPI bool set_node (augeas *aug, const char *path, const char *value);
|
|
|
|
|
|
|
|
CLAPI bool insert_node (augeas *aug, const char *path, const char *label, int before);
|
|
|
|
|
|
|
|
CLAPI char* get_preview (augeas *aug, const char *path);
|
|
|
|
|
|
|
|
CLAPI int rm_node (augeas *aug, const char *path);
|
|
|
|
|
|
|
|
CLAPI bool save (augeas *aug);
|
|
|
|
|
2022-11-12 01:10:27 +03:00
|
|
|
CLAPI int match(augeas *aug, const char *match_path, char*** matches);
|
2022-11-03 22:30:21 +03:00
|
|
|
}
|