summaryrefslogtreecommitdiffstats
path: root/doc/man3/alpm_databases.3
diff options
context:
space:
mode:
Diffstat (limited to 'doc/man3/alpm_databases.3')
-rw-r--r--doc/man3/alpm_databases.3211
1 files changed, 211 insertions, 0 deletions
diff --git a/doc/man3/alpm_databases.3 b/doc/man3/alpm_databases.3
new file mode 100644
index 00000000..84eda8c5
--- /dev/null
+++ b/doc/man3/alpm_databases.3
@@ -0,0 +1,211 @@
+.TH "Database Functions" 3 "16 Oct 2006" "libalpm" \" -*- nroff -*-
+.ad l
+.nh
+.SH NAME
+Database Functions \- Frunctions to query and manipulate the database of libalpm.
+
+.PP
+.SS "Functions"
+
+.in +1c
+.ti -1c
+.RI "pmdb_t * \fBalpm_db_register\fP (char *treename, alpm_cb_db_register callback)"
+.br
+.ti -1c
+.RI "int \fBalpm_db_unregister\fP (pmdb_t *db)"
+.br
+.ti -1c
+.RI "void * \fBalpm_db_getinfo\fP (PM_DB *db, unsigned char parm)"
+.br
+.ti -1c
+.RI "int \fBalpm_db_setserver\fP (pmdb_t *db, char *url)"
+.br
+.ti -1c
+.RI "int \fBalpm_db_update\fP (int level, PM_DB *db)"
+.br
+.ti -1c
+.RI "pmpkg_t * \fBalpm_db_readpkg\fP (pmdb_t *db, char *name)"
+.br
+.ti -1c
+.RI "PMList * \fBalpm_db_getpkgcache\fP (pmdb_t *db)"
+.br
+.ti -1c
+.RI "PMList * \fBalpm_db_whatprovides\fP (pmdb_t *db, char *name)"
+.br
+.ti -1c
+.RI "pmgrp_t * \fBalpm_db_readgrp\fP (pmdb_t *db, char *name)"
+.br
+.ti -1c
+.RI "PMList * \fBalpm_db_getgrpcache\fP (pmdb_t *db)"
+.br
+.in -1c
+.SH "Detailed Description"
+.PP
+Frunctions to query and manipulate the database of libalpm.
+.PP
+.SH "Function Documentation"
+.PP
+.SS "PMList* alpm_db_getgrpcache (pmdb_t * db)"
+.PP
+Get the group cache of a package database
+.PP
+\fBParameters:\fP
+.RS 4
+\fIdb\fP pointer to the package database to get the group from
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+the list of groups on success, NULL on error
+.RE
+.PP
+
+.SS "void* alpm_db_getinfo (PM_DB * db, unsigned char parm)"
+.PP
+Get informations about a database.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIdb\fP database pointer
+.br
+\fIparm\fP name of the info to get
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+a void* on success (the value), NULL on error
+.RE
+.PP
+
+.SS "PMList* alpm_db_getpkgcache (pmdb_t * db)"
+.PP
+Get the package cache of a package database
+.PP
+\fBParameters:\fP
+.RS 4
+\fIdb\fP pointer to the package database to get the package from
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+the list of packages on success, NULL on error
+.RE
+.PP
+
+.SS "pmgrp_t* alpm_db_readgrp (pmdb_t * db, char * name)"
+.PP
+Get a group entry from a package database
+.PP
+\fBParameters:\fP
+.RS 4
+\fIdb\fP pointer to the package database to get the group from
+.br
+\fIname\fP of the group
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+the groups entry on success, NULL on error
+.RE
+.PP
+
+.SS "pmpkg_t* alpm_db_readpkg (pmdb_t * db, char * name)"
+.PP
+Get a package entry from a package database
+.PP
+\fBParameters:\fP
+.RS 4
+\fIdb\fP pointer to the package database to get the package from
+.br
+\fIname\fP of the package
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+the package entry on success, NULL on error
+.RE
+.PP
+
+.SS "pmdb_t* alpm_db_register (char * treename, alpm_cb_db_register callback)"
+.PP
+Register a package database
+.PP
+\fBParameters:\fP
+.RS 4
+\fItreename\fP the name of the repository
+.br
+\fIcallback\fP a function to be called upon new database creation
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+0 on success, -1 on error (pm_errno is set accordingly)
+.RE
+.PP
+
+.SS "int alpm_db_setserver (pmdb_t * db, char * url)"
+.PP
+Set the serverlist of a database.
+.PP
+\fBParameters:\fP
+.RS 4
+\fIdb\fP database pointer
+.br
+\fIurl\fP url of the server
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+0 on success, -1 on error (pm_errno is set accordingly)
+.RE
+.PP
+
+.SS "int alpm_db_unregister (pmdb_t * db)"
+.PP
+Unregister a package database
+.PP
+\fBParameters:\fP
+.RS 4
+\fIdb\fP pointer to the package database to unregister
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+0 on success, -1 on error (pm_errno is set accordingly)
+.RE
+.PP
+
+.SS "int alpm_db_update (int level, PM_DB * db)"
+.PP
+Update a package database
+.PP
+\fBParameters:\fP
+.RS 4
+\fIlevel\fP control for checking lastupdate time
+.br
+\fIdb\fP pointer to the package database to update
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+0 on success, > 0 on error (pm_errno is set accordingly), < 0 if up to date
+.RE
+.PP
+
+.SS "PMList* alpm_db_whatprovides (pmdb_t * db, char * name)"
+.PP
+Get the list of packages that a package provides
+.PP
+\fBParameters:\fP
+.RS 4
+\fIdb\fP pointer to the package database to get the package from
+.br
+\fIname\fP name of the package
+.RE
+.PP
+\fBReturns:\fP
+.RS 4
+the list of packages on success, NULL on error
+.RE
+.PP
+