Permalink
Browse files

highlevel: add release notes

  • Loading branch information...
kodebach committed Jan 7, 2019
1 parent 5c66232 commit 2ac3b211320a7e79ef5b3df288f71b1274dd4179
Showing with 30 additions and 2 deletions.
  1. +30 −2 doc/news/_preparation_next_release.md
@@ -37,8 +37,36 @@ You can also read the news [on our website](https://www.libelektra.org/news/0.8.
- <<HIGHLIGHT3>>


### High-Level-API
TODO
### High-Level API
The new high-level API provides an easier way to get started with Elektra.

To get started (including proper error handling) you now only need a few self-explanatory lines of code:
```c
ElektraError * error;
Elektra * elektra = elektraOpen ("/sw/org/myapp/#0/current", NULL, &error);
if (elektra == NULL)
{
printf ("An error occured: %s", elektraErrorDescription (error));
elektraErrorReset (error);
return -1;
}
// use API
elektraClose (elektra);
```

Once you have an instance of `Elektra` you simply call one of the typed `elektraGet*` functions to read a value:
```c
const char * mystring = elektraGetString (elektra, "mystring");
```
No need to specify the base path `/sw/org/myapp/#0/current` anymore, as the high-level API keeps track of that for you.
The API supports the CORBA types already used by some plugins. The high-level API should also be used in combination
with a specification (`spec-mount`). When used this way, the API is designed to be error and crash free while reading values.
Writing values, can of course still produces errors.

Another advantage of the new API is, that it will be much easier to write bindings for other languages now, because only a few simply
types and functions have to be mapped to provide the full functionality.

Take a look at the [README](/src/libs/highlevel/README.md) for more infos.

0 comments on commit 2ac3b21

Please sign in to comment.