Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

dependency.h File Reference

Dependency API. More...

#include <libpackman/package.h>

Go to the source code of this file.

Data Structures

struct  _PmDependency
 A dependency. More...


PmDependency (De)allocation Functions

PmDependencypmNewDependency (void)
 Creates a new PmDependency.

PmDependencypmDuplicateDependency (PmDependency *baseDep)
 Duplicates an existing PmDependency.

void pmDestroyDependency (PmDependency *dependency)
 Destroys the specified PmDependency.


Attribute Modification Functions

void pmSetDependencyName (PmDependency *dep, const char *name)
 Sets the name of the specified dependency.

void pmSetDependencyVersion (PmDependency *dep, const char *version, PmRelationship rel)
 Sets the version and the relationship for the dependency.

void pmSetDependencyOwner (PmDependency *dep, const char *owner)
 Sets the name of the dependency's owner.

void pmSetDependencyType (PmDependency *dep, PmDependencyType type)
 Sets the dependency's type.


Attribute Retrieval Functions

const char * pmGetDependencyName (PmDependency *dep)
 Returns the name of the specified dependency.

const char * pmGetDependencyVersion (PmDependency *dep, const char **version, PmRelationship *rel)
 Returns the version and the relationship of the specified dependency.

const char * pmGetDependencyOwner (PmDependency *dep)
 Returns the name of the dependency's owner.

PmDependencyType pmGetDependencyType (PmDependency *dep)
 Returns the dependency's type.


Requirements Iteration Functions

PmDependencypmFirstRequirement (PmPackage *package)
 Returns the first requirement in the list.

PmDependencypmNextRequirement (PmDependency *dep)
 Returns the next requirement in the list.

PmDependencypmPreviousRequirement (PmDependency *dep)
 Returns the previous requirement in the list.


Alternative Dependency Functions

void pmAddAltRequirement (PmDependency *base, PmDependency *alt)
 Adds an alternative required dependency to an existing dependency.

PmDependencypmFirstAltRequirement (PmDependency *dep)
 Returns the first alternative required dependency.

unsigned int pmGetAltRequirementCount (PmDependency *dep)
 Returns the number of alternative required dependencies for a specified dependency.


Provisions Iteration Functions

PmDependencypmFirstProvide (PmPackage *package)
 Returns the first provide in the list.

PmDependencypmNextProvide (PmDependency *dep)
 Returns the next provide in the list.

PmDependencypmPreviousProvide (PmDependency *dep)
 Returns the previous provide in the list.


Typedefs

typedef _PmDependency PmDependency
 PmDependency.

typedef enum _PmDependencyType PmDependencyType
 PmDependencyType.


Enumerations

enum  _PmDependencyType {
  PM_DEP_UNKNOWN = 0, PM_DEP_PROVIDES, PM_DEP_REQUIRED, PM_DEP_PRE_REQUIRED,
  PM_DEP_RECOMMENDED, PM_DEP_SUGGESTED, PM_DEP_ENHANCES, PM_DEP_REPLACES,
  PM_DEP_CONFLICTS, PM_DEP_VIRTUAL
}
 A dependency type. More...


Detailed Description

Dependency API.

Id:
dependency.h,v 1.12 2002/06/08 04:53:37 chipx86 Exp
Copyright:
(C) 1999-2002 The GNUpdate Project.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

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.


Typedef Documentation

typedef struct _PmDependency PmDependency
 

PmDependency.

typedef enum _PmDependencyType PmDependencyType
 

PmDependencyType.


Enumeration Type Documentation

enum _PmDependencyType
 

A dependency type.

Enumeration values:
PM_DEP_UNKNOWN  Unknown dependency (usually an error.).
PM_DEP_PROVIDES  A provided dependency.
PM_DEP_REQUIRED  A standard, required dependency.
PM_DEP_PRE_REQUIRED  A dependency that must be installed first.
PM_DEP_RECOMMENDED  A strongly recommended dependency.
PM_DEP_SUGGESTED  A suggested, but very optional dependency.
PM_DEP_ENHANCES  A dependency that Enhances this package.
PM_DEP_REPLACES  A dependency that gets replaced by this one.
PM_DEP_CONFLICTS  A conflicting dependency.
PM_DEP_VIRTUAL  A virtual dependency.


Function Documentation

void pmAddAltRequirement PmDependency   base,
PmDependency   alt
 

Adds an alternative required dependency to an existing dependency.

Parameters:
base  The base dependency.
alt  The alternative dependency.

void pmDestroyDependency PmDependency   dependency
 

Destroys the specified PmDependency.

Parameters:
dependency  The PmDependency to destroy.
See also:
pmNewDependency() , pmDuplicateDependency()

PmDependency* pmDuplicateDependency PmDependency   baseDep
 

Duplicates an existing PmDependency.

Parameters:
baseDep  The PmDependency to duplicate.
Returns:
A new copy of baseDep.
See also:
pmNewDependency() , pmDestroyDependency()

PmDependency* pmFirstAltRequirement PmDependency   dep
 

Returns the first alternative required dependency.

Parameters:
dep  The base dependency.
Returns:
The first alternative required dependency.

PmDependency* pmFirstProvide PmPackage   package
 

Returns the first provide in the list.

Parameters:
package  The package containing the provides.
Returns:
The first provide in the list.
See also:
pmNextProvide() , pmPreviousProvide()

PmDependency* pmFirstRequirement PmPackage   package
 

Returns the first requirement in the list.

Parameters:
package  The package containing the requirements.
Returns:
The first requirement in the list.
See also:
pmNextRequirement() , pmPreviousRequirement()

unsigned int pmGetAltRequirementCount PmDependency   dep
 

Returns the number of alternative required dependencies for a specified dependency.

Parameters:
dep  The base dependency.
Returns:
The number of alternative dependencies, excluding the base dependency.

const char* pmGetDependencyName PmDependency   dep
 

Returns the name of the specified dependency.

Parameters:
dep  The dependency.
Returns:
The dependency's name.
See also:
pmSetDependencyName()

const char* pmGetDependencyOwner PmDependency   dep
 

Returns the name of the dependency's owner.

Parameters:
dep  The dependency.
Returns:
The dependency's owner's name.
See also:
pmSetDependencyOwner()

PmDependencyType pmGetDependencyType PmDependency   dep
 

Returns the dependency's type.

Parameters:
dep  The dependency.
Returns:
The dependency's type.
See also:
pmSetDependencyType()

const char* pmGetDependencyVersion PmDependency   dep,
const char **    version,
PmRelationship   rel
 

Returns the version and the relationship of the specified dependency.

Parameters:
dep  The dependency.
version  The returned version.
rel  The returned relationship.
Returns:
The dependency's version.
See also:
pmSetDependencyVersion()

PmDependency* pmNewDependency void   
 

Creates a new PmDependency.

Returns:
A new, empty PmDependency.
See also:
pmDestroyDependency() , pmDuplicateDependency()

PmDependency* pmNextProvide PmDependency   dep
 

Returns the next provide in the list.

Parameters:
dep  The current provide.
Returns:
The next provide in the list.
See also:
pmFirstProvide() , pmPreviousProvide()

PmDependency* pmNextRequirement PmDependency   dep
 

Returns the next requirement in the list.

Parameters:
dep  The current requirement.
Returns:
The next requirement in the list.
See also:
pmFirstRequirement() , pmPreviousRequirement()

PmDependency* pmPreviousProvide PmDependency   dep
 

Returns the previous provide in the list.

Parameters:
dep  The previous provide.
Returns:
The previous provide in the list.
See also:
pmFirstProvide() , pmNextProvide()

PmDependency* pmPreviousRequirement PmDependency   dep
 

Returns the previous requirement in the list.

Parameters:
dep  The previous requirement.
Returns:
The previous requirement in the list.
See also:
pmFirstRequirement() , pmNextRequirement()

void pmSetDependencyName PmDependency   dep,
const char *    name
 

Sets the name of the specified dependency.

Parameters:
dep  The dependency to modify.
name  The new name for the dependency.
See also:
pmGetDependencyName()

void pmSetDependencyOwner PmDependency   dep,
const char *    owner
 

Sets the name of the dependency's owner.

Parameters:
dep  The dependency to modify.
owner  The owner of the dependency.
See also:
pmGetDependencyOwner()

void pmSetDependencyType PmDependency   dep,
PmDependencyType    type
 

Sets the dependency's type.

Parameters:
dep  The dependency.
type  The dependency type.
See also:
pmGetDependencyType()

void pmSetDependencyVersion PmDependency   dep,
const char *    version,
PmRelationship    rel
 

Sets the version and the relationship for the dependency.

The relationship specifies whether the version needed is <, <=, =, >=, or > the value of version.

Parameters:
dep  The dependency to modify.
version  The version for the dependency.
rel  The relationship of the version.
See also:
pmGetDependencyVersion() , PmRelationship


Generated on Tue Jul 2 03:15:23 2002 for libpackman by doxygen1.2.15-20020430