/*
* rpmdata.h : describes the data gathered for each RPM analyzed.
*
* $Id: rpmdata.h,v 1.8 1997/11/13 05:04:34 veillard Exp $
*
* $Log: rpmdata.h,v $
* Revision 1.8 1997/11/13 05:04:34 veillard
* Lot of improvements, copyright, URLs, E-mail, and config files, Daniel.
*
* Revision 1.7 1997/11/12 07:06:53 veillard
* Directory support and file scanning are now based on the config files, Daniel.
*
* Revision 1.6 1997/11/12 05:56:56 veillard
* Beginning of the coding for the configuration, Daniel.
*
* Revision 1.5 1997/11/12 03:50:39 veillard
* Version submitted to guilde@imag.fr, Daniel.
*
* Revision 1.4 1997/11/11 22:28:11 veillard
* Added the support for dependancies on resources, Daniel.
*
* Revision 1.3 1997/11/11 21:18:53 veillard
* Improved a lot, removed bugs related to sorting, Daniel.
*
* Revision 1.2 1997/11/11 11:10:10 veillard
* State after one night of work, Daniel
*
* Revision 1.1.1.1 1997/11/11 07:12:32 veillard
* First revision of RPM-Check
*
*/
#ifndef __RPMDATA_H__
#define __RPMDATA_H__
#include <rpm/header.h>
/*
* Structure associated to a local directory containing RPM files.
*/
#define MAX_URLS 100
typedef struct rpm_dir {
struct rpm_dir *next; /* next in list */
char *dir; /* The local repository */
char *name; /* Name for this repository */
char *ftp; /* The host URL it's mirrored from */
char *ftpsrc; /* The host URL where src.rpm can be found */
char *color; /* The bgcolor for the pages :-) */
char *trust; /* Confidences in the files */
int nb_urls; /* numbers of mirrors */
char *urls[MAX_URLS]; /* Urls for download */
} rpmDir, *rpmDirPtr;
/*
* structure associated with an rpm
*/
#define MAX_RESS 35
#define MAX_REQU 35
typedef struct rpm_data {
struct rpm_data *next; /* next in the list */
rpmDirPtr dir; /* directory infos */
char *filename; /* name of the file */
char *name; /* name of the software */
char *version; /* version of the software */
char *release; /* software release */
char *url; /* URL for the software */
char *arch; /* the target platform */
char *os; /* the target system */
char *distribution; /* general OS distribution */
char *vendor; /* general OS vendor */
char *packager; /* the packager */
char *group; /* type of software */
char *summary; /* 1 line summary */
char *description; /* short description */
char *copyright; /* software copyright */
char *srcrpm; /* source RPM */
time_t date; /* date of packaging */
int_32 size; /* size of the software */
char *host; /* build host */
int nb_ressources; /* #of ressources provided */
struct rpm_ressource *
ressources[MAX_RESS]; /* list of them */
int nb_requires; /* #of ressources required */
struct rpm_ressource *
requires[MAX_REQU]; /* list of them */
char *filelist; /* the filelist */
} rpmData, *rpmDataPtr;
/*
* structure associated with a resource
*/
#define MAX_PROVIDE 30
typedef struct rpm_ressource {
struct rpm_ressource *next; /* next in the list */
char *name; /* name of the ressource */
int nb_provider; /* #of ressources provided */
struct rpm_data *
provider[MAX_PROVIDE];/* list of them */
} rpmRess, *rpmRessPtr;
extern rpmDataPtr rpmList;
extern rpmRessPtr ressList;
extern rpmDirPtr dirList;
extern void rpmDataPrint(rpmDataPtr rpm);
/* extern void rpmDataPrintAll(void); */
extern rpmRessPtr rpmRessAdd(char *ress, rpmDataPtr rpm);
extern rpmRessPtr rpmRequAdd(char *requ, rpmDataPtr rpm);
extern int rpmOpen(char *nameRpm, rpmDirPtr dir);
extern int rpmDirScanAll(void);
extern char *extractEMail(char *string);
extern void rpmGroupSort(void);
extern void rpmDistribSort(void);
extern void rpmVendorSort(void);
extern void rpmDateSort(void);
#endif /* __RPMDATA_H__ */
Webmaster