Modernize resetprop with fancy C++

This commit is contained in:
topjohnwu
2020-05-07 06:08:30 -07:00
parent c113f854a2
commit aa8b23105f
4 changed files with 129 additions and 134 deletions

View File

@ -3,9 +3,10 @@
#include <string>
#include <functional>
int prop_exist(const char *name);
bool prop_exist(const char *name);
int setprop(const char *name, const char *value, bool trigger = true);
std::string getprop(const char *name, bool persist = false);
void getprop(void (*callback)(const char *, const char *, void *), void *cookie, bool persist = false);
void getprops(void (*callback)(const char *, const char *, void *),
void *cookie = nullptr, bool persist = false);
int delprop(const char *name, bool persist = false);
void load_prop_file(const char *filename, bool trigger = true);