Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

dependency.h

Go to the documentation of this file.
00001 
00023 #ifndef _LIBPACKMAN_DEPENDENCY_H_
00024 #define _LIBPACKMAN_DEPENDENCY_H_
00025 
00026 #ifdef __cplusplus
00027 extern "C" {
00028 #endif
00029 
00030 typedef struct _PmDependency     PmDependency;     
00031 typedef enum   _PmDependencyType PmDependencyType; 
00033 #include <libpackman/package.h>
00034 
00035 
00039 enum _PmDependencyType
00040 {
00041     PM_DEP_UNKNOWN = 0,  
00042     PM_DEP_PROVIDES,     
00043     PM_DEP_REQUIRED,     
00044     PM_DEP_PRE_REQUIRED, 
00045     PM_DEP_RECOMMENDED,  
00046     PM_DEP_SUGGESTED,    
00047     PM_DEP_ENHANCES,     
00048     PM_DEP_REPLACES,     
00049     PM_DEP_CONFLICTS,    
00050     PM_DEP_VIRTUAL       
00051 };
00052 
00061 struct _PmDependency
00062 {
00063     char *name;                  
00064     char *owner;                 
00065     char *version;               
00066     PmRelationship versionRel;   
00068     PmDependencyType type;       
00070     PmDependency *altDeps;       
00071     PmDependency *lastAltDep;    
00072     unsigned int altDepCount;    
00074     PmDependency *prev;          
00075     PmDependency *next;          
00076 };
00077 
00078 
00079 /**************************************************************************/
00081 /**************************************************************************/
00092 PmDependency *pmNewDependency(void);
00093 
00104 PmDependency *pmDuplicateDependency(PmDependency *baseDep);
00105 
00114 void pmDestroyDependency(PmDependency *dependency);
00115 
00118 /**************************************************************************/
00120 /**************************************************************************/
00131 void pmSetDependencyName(PmDependency *dep, const char *name);
00132 
00146 void pmSetDependencyVersion(PmDependency *dep, const char *version,
00147                             PmRelationship rel);
00148 
00157 void pmSetDependencyOwner(PmDependency *dep, const char *owner);
00158 
00167 void pmSetDependencyType(PmDependency *dep, PmDependencyType type);
00168 
00172 /**************************************************************************/
00174 /**************************************************************************/
00186 const char *pmGetDependencyName(PmDependency *dep);
00187 
00199 const char *pmGetDependencyVersion(PmDependency *dep, const char **version,
00200                                    PmRelationship *rel);
00201 
00211 const char *pmGetDependencyOwner(PmDependency *dep);
00212 
00222 PmDependencyType pmGetDependencyType(PmDependency *dep);
00223 
00227 /**************************************************************************/
00229 /**************************************************************************/
00242 PmDependency *pmFirstRequirement(PmPackage *package);
00243 
00254 PmDependency *pmNextRequirement(PmDependency *dep);
00255 
00266 PmDependency *pmPreviousRequirement(PmDependency *dep);
00267 
00271 /**************************************************************************/
00273 /**************************************************************************/
00282 void pmAddAltRequirement(PmDependency *base, PmDependency *alt);
00283 
00291 PmDependency *pmFirstAltRequirement(PmDependency *dep);
00292 
00302 unsigned int pmGetAltRequirementCount(PmDependency *dep);
00303 
00306 /**************************************************************************/
00308 /**************************************************************************/
00321 PmDependency *pmFirstProvide(PmPackage *package);
00322 
00333 PmDependency *pmNextProvide(PmDependency *dep);
00334 
00345 PmDependency *pmPreviousProvide(PmDependency *dep);
00346 
00350 #ifdef __cplusplus
00351 }
00352 #endif
00353 
00354 #endif /* _LIBPACKMAN_DEPENDENCY_H_ */

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