Modules | Functions
Initialize

Modules

 Session info
 Release

Functions

QUVIcode quvi_init (quvi_t *quvi)
 Start a new libquvi session.

Function Documentation

QUVIcode quvi_init ( quvi_t quvi)

Start a new libquvi session.

Initializes a new session handle and locates the website scripts used to parse the page URLs. The library searches the following paths in the following order:

  • $QUVI_BASEDIR defined path (exclusive, overrides default search paths)
  • Current working directory (./lua/website/)
  • $HOME./quvi/
  • $HOME/.config/quvi/
  • $HOME/.local/share/quvi/
  • --datadir=DIR (and pkgdatadir) specified with configure (script)
    • These directories are typically $prefix/share/ and $prefix/share/quvi/

Note that you can have libquvi dump (to stderr) the scanned directory paths by setting the QUVI_SHOW_SCANDIR environment variable.

Parameters:
quviPointer to a new handle
Note:
Returns:
Non-zero if an error occurred
See also:
quvi_close

Example:

 #include <quvi/quvi.h>
 ...
 quvi_t quvi;
 int rc;
 rc = quvi_init(&quvi);
 if (rc != QUVI_OK)
   {
     fprintf(stderr, "error: libquvi: %s\n", quvi_strerror(quvi,rc));
     exit(1);
   }
Examples:
callback_libsoup.c, quvi.c, and simple.c.
 All Files Functions Typedefs Enumerations Enumerator Defines