claugeas/main.h

47 lines
1.4 KiB
C++

#include <string>
#include "iostream"
#include "augeas.h"
#include "map"
#include <sys/stat.h>
#include "augSettings.h"
#include "utils.h"
#if defined(_WIN32)
#define CLAPI __attribute__((unused)) __declspec(dllexport)
#else
#define CLAPI __attribute__((unused))
#endif
extern "C" {
// Object Life-cycle
CLAPI void *init_aug (augSettings settings, int flags);
CLAPI bool load_file (void *aug, const char *filePath);
CLAPI void print_preview (augeas *aug, const char *path);
CLAPI void close_aug (void *aug);
CLAPI void free_str (char *str);
CLAPI void print_tree (augeas *aug, const char *path);
CLAPI char *get_tree (augeas *aug, const char *path);
CLAPI const char *get_node (augeas *aug, const char *path);
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);
CLAPI int match(augeas *aug, const char *match_path, char*** matches);
// internal static extern int match(IntPtr augeas, [MarshalAs(UnmanagedType.LPStr)] string matchPath, uint* size, char*** stringArray);
}