Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

_PmDatabaseOps Struct Reference

Database operations structure. More...

#include <module.h>


Data Fields

PmStatus(* open )(PmDatabase *db)
 Opens the database.

PmStatus(* create )(PmDatabase *db)
 Creates a new database.

PmStatus(* close )(PmDatabase *db)
 Closes the database.

PmStatus(* rebuild )(PmDatabase *db)
 Rebuilds the database.

unsigned long(* getPackageCount )(PmDatabase *db)
 Returns the number of packages in the database.

PmStatus(* addPackage )(PmDatabase *db, PmPackage *pkg)
 Adds the information on a package to the database.

PmStatus(* removePackage )(PmDatabase *db, PmPackage *package)
 Removes the information on a package from the database.

PmStatus(* findByName )(PmDatabase *db, const char *name, PmMatches *matches)
 Searches for a package by name.

PmStatus(* findByGroup )(PmDatabase *db, const char *group, PmMatches *matches)
 Searches for a package by group.

PmStatus(* findByFile )(PmDatabase *db, const char *file, PmMatches *matches)
 Searches for a package by file.

PmStatus(* findByRequires )(PmDatabase *db, const char *requires, PmMatches *matches)
 Searches for a package by the specified required dependency.

PmStatus(* findByProvides )(PmDatabase *db, const char *provides, PmMatches *matches)
 Searches for a package by the specified provided dependency.

PmStatus(* findByConflicts )(PmDatabase *db, const char *conflicts, PmMatches *matches)
 Searches for a package by the specified conflicting dependency.

PmStatus(* getAllPackages )(PmDatabase *db, PmMatches *matches)
 Returns all packages in the database.

PmPackage *(* firstPackage )(PmDatabase *db, PmMatches *matches)
 Returns the first matched package.

PmPackage *(* nextPackage )(PmDatabase *db, PmMatches *matches)
 Returns the next matched package.

PmStatus(* destroyMatches )(PmMatches *matches)
 Destroys a PmMatches structure.

void(* destroyPkgData )(void *data)
 Destroys any database-specific data in a package structure.

void(* getFiles )(PmDatabase *db, PmPackage *pkg)
 Gets a list of files from a package in the database and adds them to the package.

void(* getRequiredDeps )(PmDatabase *db, PmPackage *pkg)
 Gets a list of required dependencies from a package in the database and adds them to the package.

void(* getProvidedDeps )(PmDatabase *db, PmPackage *pkg)
 Gets a list of provided dependencies from a package in the database and adds them to the package.

char *(* getScript )(PmDatabase *db, PmPackage *package, PmScriptType type, PmScriptEvent event, const char *trigger)
 Gets the script with the specified type, event, and trigger name, if the script is a trigger.


Detailed Description

Database operations structure.

These functions should only be used by libpackman!


Field Documentation

PmStatus(* _PmDatabaseOps::addPackage)(PmDatabase *db, PmPackage *pkg)
 

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.

Parameters:
db  The database to add the package to.
pkg  The package to add to the database.
Returns:
The status of the operation.
See also:
pmDatabaseAddPackage()

PmStatus(* _PmDatabaseOps::close)(PmDatabase *db)
 

Closes the database.

Parameters:
db  The database to close.
Returns:
The status of the operation.
See also:
pmCloseDatabase()

PmStatus(* _PmDatabaseOps::create)(PmDatabase *db)
 

Creates a new database.

Parameters:
db  The database handle.
Returns:
The status of the operation.
See also:
pmCreateDatabase()

PmStatus(* _PmDatabaseOps::destroyMatches)(PmMatches *matches)
 

Destroys a PmMatches structure.

Parameters:
matches  The structure to destroy.

void(* _PmDatabaseOps::destroyPkgData)(void *data)
 

Destroys any database-specific data in a package structure.

Parameters:
data  The data to destroy.

PmStatus(* _PmDatabaseOps::findByConflicts)(PmDatabase *db, const char *conflicts, PmMatches *matches)
 

Searches for a package by the specified conflicting dependency.

Parameters:
db  The database to search.
conflicts  The conflicting dependency to search with.
matches  The returned PmMatches structure.
Returns:
The status of the search.
See also:
pmFindByConflicts()

PmStatus(* _PmDatabaseOps::findByFile)(PmDatabase *db, const char *file, PmMatches *matches)
 

Searches for a package by file.

Parameters:
db  The database to search.
file  The file to search for.
matches  The returned PmMatches structure.
Returns:
The status of the search.
See also:
pmFindByFile()

PmStatus(* _PmDatabaseOps::findByGroup)(PmDatabase *db, const char *group, PmMatches *matches)
 

Searches for a package by group.

Parameters:
db  The database to search.
group  The group to search for.
matches  The returned PmMatches structure.
Returns:
The status of the search.
See also:
pmFindByGroup()

PmStatus(* _PmDatabaseOps::findByName)(PmDatabase *db, const char *name, PmMatches *matches)
 

Searches for a package by name.

Parameters:
db  The database to search.
name  The name of the package to search for.
matches  The returned PmMatches structure.
Returns:
The status of the search.
See also:
pmFindByName()

PmStatus(* _PmDatabaseOps::findByProvides)(PmDatabase *db, const char *provides, PmMatches *matches)
 

Searches for a package by the specified provided dependency.

Parameters:
db  The database to search.
provides  The provided dependency to search with.
matches  The returned PmMatches structure.
Returns:
The status of the search.
See also:
pmFindByProvides()

PmStatus(* _PmDatabaseOps::findByRequires)(PmDatabase *db, const char *requires, PmMatches *matches)
 

Searches for a package by the specified required dependency.

Parameters:
db  The database to search.
requires  The required dependency to search with.
matches  The returned PmMatches structure.
Returns:
The status of the search.
See also:
pmFindByRequires()

PmPackage*(* _PmDatabaseOps::firstPackage)(PmDatabase *db, PmMatches *matches)
 

Returns the first matched package.

Parameters:
db  The database.
matches  The matches.
Returns:
The first matched package.
See also:
pmFirstPackage()

PmStatus(* _PmDatabaseOps::getAllPackages)(PmDatabase *db, PmMatches *matches)
 

Returns all packages in the database.

Parameters:
db  The database.
matches  The returned PmMatches structure.
Returns:
The status of the search.
See also:
pmGetAllPackages()

void(* _PmDatabaseOps::getFiles)(PmDatabase *db, PmPackage *pkg)
 

Gets a list of files from a package in the database and adds them to the package.

Parameters:
db  The database.
pkg  The package.

unsigned long(* _PmDatabaseOps::getPackageCount)(PmDatabase *db)
 

Returns the number of packages in the database.

Parameters:
db  The database.
Returns:
The number of packages.
See also:
pmDatabaseGetPackageCount()

void(* _PmDatabaseOps::getProvidedDeps)(PmDatabase *db, PmPackage *pkg)
 

Gets a list of provided dependencies from a package in the database and adds them to the package.

Parameters:
db  The database.
pkg  The package.

void(* _PmDatabaseOps::getRequiredDeps)(PmDatabase *db, PmPackage *pkg)
 

Gets a list of required dependencies from a package in the database and adds them to the package.

Parameters:
db  The database.
pkg  The package.

char*(* _PmDatabaseOps::getScript)(PmDatabase *db, PmPackage *package, PmScriptType type, PmScriptEvent event, const char *trigger)
 

Gets the script with the specified type, event, and trigger name, if the script is a trigger.

Parameters:
db  The database.
package  The package.
type  The type of script.
event  The event.
trigger  The name of a package for a trigger, NULL if the specified script is not a trigger script.
Returns:
The script if found, or NULL if not found.

PmPackage*(* _PmDatabaseOps::nextPackage)(PmDatabase *db, PmMatches *matches)
 

Returns the next matched package.

Parameters:
db  The database.
matches  The matches.
Returns:
The next matched package.
See also:
pmNextPackage()

PmStatus(* _PmDatabaseOps::open)(PmDatabase *db)
 

Opens the database.

Parameters:
db  The database to open.
Returns:
The status of the operation.
See also:
pmOpenDatabase()

PmStatus(* _PmDatabaseOps::rebuild)(PmDatabase *db)
 

Rebuilds the database.

Parameters:
db  The database to rebuild.
Returns:
The status of the operation.
See also:
pmRebuildDatabase()

PmStatus(* _PmDatabaseOps::removePackage)(PmDatabase *db, PmPackage *package)
 

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.

Parameters:
db  The database to remove the package from.
package  The package to remove.
Returns:
The status of this operation.
See also:
pmDatabaseRemovePackage()


The documentation for this struct was generated from the following file:
Generated on Tue Jul 2 03:15:24 2002 for libpackman by doxygen1.2.15-20020430