pentominos:libartefact
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
pentominos:libartefact [2010/01/29 08:50] – created deva | pentominos:libartefact [2010/01/29 09:04] – deva | ||
---|---|---|---|
Line 4: | Line 4: | ||
The library takes care of http communication, | The library takes care of http communication, | ||
It is intended as a complete interface to the communication possibilities with the Artefact server. | It is intended as a complete interface to the communication possibilities with the Artefact server. | ||
+ | |||
+ | =====How to use libartefact===== | ||
+ | To use libartefact, | ||
+ | The project supplies a pkg-config file called libartefact.pc, | ||
+ | In order to use it simply add | ||
+ | <code autoconf> | ||
+ | PKG_CHECK_MODULES(ATF, | ||
+ | </ | ||
+ | to '' | ||
+ | Alternatively use the '' | ||
=====API overview===== | =====API overview===== | ||
- | <code c> | ||
+ | <code c> | ||
+ | atf_handle_t *handle = atf_init(); | ||
+ | void atf_close(handle); | ||
</ | </ | ||
=====Error handling===== | =====Error handling===== | ||
<code c> | <code c> | ||
+ | |||
+ | // ... here should be some code that allocates handle and does something useful ... | ||
+ | |||
atf_error_t err = atf_get_last_error(handle); | atf_error_t err = atf_get_last_error(handle); | ||
- | char buf[512]; | + | if(err != ATF_NO_ERROR) { |
- | printf(" | + | |
+ | printf(" | ||
+ | } | ||
</ | </ |
pentominos/libartefact.txt · Last modified: 2010/01/29 09:14 by deva