pocketbook-demo icon indicating copy to clipboard operation
pocketbook-demo copied to clipboard

Demo: Usage of the configuration functions

Open orontee opened this issue 1 year ago • 1 comments

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.

orontee avatar Aug 05 '23 17:08 orontee

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

orontee avatar Aug 05 '23 17:08 orontee