pocketbook-demo
pocketbook-demo copied to clipboard
Demo: Usage of the configuration functions
inkview.h advertise for many functions related to "configuration":
iconfig * OpenConfig(const char *path, iconfigedit *ce);
int RefreshConfig(iconfig **cfg); //update memory copy config from his file
int SaveConfig(iconfig *cfg);
void CloseConfig(iconfig *cfg);
void CloseConfigNoSave(iconfig *cfg);
int ReadInt(iconfig *cfg, const char *name, int deflt);
long long ReadLongLong(iconfig *cfg, const char *name, long long deflt);
const char *ReadString(iconfig *cfg, const char *name, const char *deflt);
const char *ReadSecret(iconfig *cfg, const char *name, const char *deflt);
...
It would be interesting to have a demo dedicated to those functions. I could not find any public repository using this part of the SDK.
I finally found one application using those functions: https://github.com/JuanJakobo/Pocketbook-Read-offline/tree/main ... and successfully used most of the config related stuff there: https://github.com/orontee/taranis/blob/v1.4.0-rc0/src/config.cc