#include <libpackman/types.h>
#include <libpackman/db.h>
Go to the source code of this file.
Database Setup Functions | |
PmDatabase * | pmOpenDatabase (const char *type, PmAccessMode mode) |
Opens a database of the specified type. | |
PmDatabase * | pmCreateDatabase (const char *type) |
Creates a new database of the specified type. | |
void | pmCloseDatabase (PmDatabase *db) |
Closes the specified database. | |
PmStatus | pmRebuildDatabase (const char *type) |
Rebuilds the database of the specified type. | |
PmMatches (De)allocation Functions | |
unsigned long | pmDbGetPackageCount (PmDatabase *db) |
Returns the number of packages in the database. | |
PmMatches (De)allocation Functions | |
PmMatches * | pmNewMatches (PmDatabase *db) |
Creates a new PmMatches structure. | |
void | pmDestroyMatches (PmMatches *matches) |
Destroys a PmMatches structure. | |
Database Manipulation Functions | |
PmStatus | pmInstallPackage (PmDatabase *db, PmPackage *package, char checkDeps, PmTransactionError **error) |
Installs a package and adds it to the database. | |
PmStatus | pmUninstallPackage (PmDatabase *db, PmPackage *package, char checkDeps, PmTransactionError **error) |
Uninstalls a package and removes it from the database. | |
PmStatus | pmInstallBatch (PmDatabase *db, PmBatch *batch, char checkDeps, PmTransactionError **error) |
Installs a batch of packages and adds them to the database. | |
PmStatus | pmUninstallBatch (PmDatabase *db, PmBatch *batch, char checkDeps, PmTransactionError **error) |
Uninstalls a batch of packages and removes them the database. | |
PmStatus | pmDbAddPackage (PmDatabase *db, PmPackage *package, char checkDeps, PmTransactionError **error) |
Adds the information on a package to the database. | |
PmStatus | pmDbRemovePackage (PmDatabase *db, PmPackage *package, char checkDeps, PmTransactionError **error) |
Removes the information on a package from the database. | |
PmStatus | pmDbAddBatch (PmDatabase *db, PmBatch *batch, char checkDeps, PmTransactionError **error) |
Adds a batch of packages to the database. | |
PmStatus | pmDbRemoveBatch (PmDatabase *db, PmBatch *batch, char checkDeps, PmTransactionError **error) |
Removes a batch of packages from the database. | |
Search Functions | |
PmStatus | pmFindByName (PmDatabase *db, const char *name, PmMatches **matches) |
Searches for a package by name. | |
PmStatus | pmFindByGroup (PmDatabase *db, const char *group, PmMatches **matches) |
Searches for a package by group. | |
PmStatus | pmFindByFile (PmDatabase *db, const char *file, PmMatches **matches) |
Searches for a package by file. | |
PmStatus | pmFindByProvides (PmDatabase *db, const char *provides, PmMatches **matches) |
Searches for a package by the specified provided dependency. | |
PmStatus | pmFindByRequires (PmDatabase *db, const char *requires, PmMatches **matches) |
Searches for a package by the specified required dependency. | |
PmStatus | pmFindByConflicts (PmDatabase *db, const char *conflicts, PmMatches **matches) |
Searches for a package by the specified conflicting dependency. | |
PmStatus | pmGetAllPackages (PmDatabase *db, PmMatches **matches) |
Returns all packages in the database. | |
Match Iteration Functions | |
PmPackage * | pmFirstMatch (PmMatches *matches) |
Returns the first matched package. | |
PmPackage * | pmNextMatch (PmMatches *matches) |
Returns the next matched package. |
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
Closes the specified database. This will free up all memory associated with the database, except for any existing PmPackage structures still in memory. All PmPackage structures returned from a call to the database should be destroyed before pmCloseDatabase() is called.
|
|
Creates a new database of the specified type. The type parameter must match one of the installed package modules. These are located in /usr/lib/packman/database, /usr/local/lib/packman/database, and/or $HOME/.gnupdate/packman/database. If successful, the PmDatabase structure returned will be a handle to the newly created and opened database. The database will be opened in read/write mode.
|
|
Adds a batch of packages to the database. Under almost all circumstances, you should specify 1 for checkDeps.
|
|
Adds the information on a package to the database. This is different from pmInstallPackage(), which adds the information and then proceeds to extract and install the package's files. Under almost all circumstances, you should specify 1 for checkDeps.
|
|
Returns the number of packages in the database.
|
|
Removes a batch of packages from the database. Under almost all circumstances, you should specify 1 for checkDeps.
|
|
Removes the information on a package from the database. This is different from pmUninstallPackage(), which removes the information and then proceeds to uninstall the package's files. Under almost all circumstances, you should specify 1 for checkDeps.
|
|
Destroys a PmMatches structure.
|
|
Searches for a package by the specified conflicting dependency.
|
|
Searches for a package by file.
|
|
Searches for a package by group.
|
|
Searches for a package by name.
|
|
Searches for a package by the specified provided dependency.
|
|
Searches for a package by the specified required dependency.
|
|
Returns the first matched package. The returned package must be freed.
|
|
Returns all packages in the database.
|
|
Installs a batch of packages and adds them to the database. Under almost all circumstances, you should specify 1 for checkDeps.
|
|
Installs a package and adds it to the database. Under almost all circumstances, you should specify 1 for checkDeps.
|
|
Creates a new PmMatches structure.
|
|
Returns the next matched package. The returned package must be freed.
|
|
Opens a database of the specified type. The type parameter must match one of the installed package modules. These are located in /usr/lib/packman/database, /usr/local/lib/packman/database, and/or $HOME/.gnupdate/packman/database.
|
|
Rebuilds the database of the specified type. The type parameter must match one of the installed package modules. These are located in /usr/lib/packman/database, /usr/local/lib/packman/database, and/or $HOME/.gnupdate/packman/database.
|
|
Uninstalls a batch of packages and removes them the database. Under almost all circumstances, you should specify 1 for checkDeps.
|
|
Uninstalls a package and removes it from the database. Under almost all circumstances, you should specify 1 for checkDeps.
|