alpm_interface(3)

NAME
alpm_interface - Interface Functions

 - Functions to initialize and release libalpm.

SYNOPSIS

  Functions
alpm_handle_t * alpm_initialize (const char *root, const char *dbpath, alpm_errno_t *err)
Initializes the library.
int alpm_release (alpm_handle_t *myhandle)
Release the library.

Detailed Description

Functions to initialize and release libalpm.

Function Documentation

  alpm_handle_t* alpm_initialize (const char * root, const char * dbpath, alpm_errno_t * err)

Initializes the library. Creates handle, connects to database and creates lockfile. This must be called before any other functions are called.

Parameters
    root the root path for all filesystem operations
    dbpath the absolute path to the libalpm database
    err an optional variable to hold any error return codes

Returns
    a context handle on success, NULL on error, err will be set if provided

References alpm_list_add().

  int alpm_release (alpm_handle_t * myhandle)

Release the library. Disconnects from the database, removes handle and lockfile This should be the last alpm call you make. After this returns, handle should be considered invalid and cannot be reused in any way.

Parameters
    myhandle the context handle

Returns
    0 on success, -1 on error

References alpm_unregister_all_syncdbs().

Author

Generated automatically by Doxygen for libalpm from the source code.