1995-12-28 04:08:35 +08:00
|
|
|
#ifndef H_QUERY
|
|
|
|
#define H_QUERY
|
|
|
|
|
1996-02-15 04:56:22 +08:00
|
|
|
#include <rpmlib.h>
|
|
|
|
|
1995-12-28 04:08:35 +08:00
|
|
|
enum querysources { QUERY_PATH, QUERY_PACKAGE, QUERY_ALL, QUERY_SPATH,
|
1996-01-06 03:10:38 +08:00
|
|
|
QUERY_SPACKAGE, QUERY_RPM, QUERY_SRPM, QUERY_GROUP,
|
1996-06-21 06:28:02 +08:00
|
|
|
QUERY_SGROUP, QUERY_WHATPROVIDES, QUERY_WHATREQUIRES,
|
|
|
|
QUERY_DBOFFSET };
|
1995-12-28 04:08:35 +08:00
|
|
|
|
1996-04-16 06:21:30 +08:00
|
|
|
#define QUERY_FOR_INFO (1 << 0)
|
|
|
|
#define QUERY_FOR_LIST (1 << 1)
|
|
|
|
#define QUERY_FOR_STATE (1 << 2)
|
|
|
|
#define QUERY_FOR_DOCS (1 << 3)
|
|
|
|
#define QUERY_FOR_CONFIG (1 << 4)
|
|
|
|
#define QUERY_FOR_SCRIPTS (1 << 5)
|
1996-06-21 06:28:02 +08:00
|
|
|
#define QUERY_FOR_REQUIRES (1 << 6)
|
|
|
|
#define QUERY_FOR_PROVIDES (1 << 7)
|
|
|
|
#define QUERY_FOR_DUMPFILES (1 << 8)
|
1995-12-28 04:08:35 +08:00
|
|
|
|
1996-04-03 11:45:17 +08:00
|
|
|
int doQuery(char * prefix, enum querysources source, int queryFlags,
|
1996-04-02 11:36:00 +08:00
|
|
|
char * arg, char * queryFormat);
|
1996-04-03 11:45:17 +08:00
|
|
|
void queryPrintTags(void);
|
1995-12-28 04:08:35 +08:00
|
|
|
|
1996-02-15 04:56:22 +08:00
|
|
|
/* 0 found matches */
|
|
|
|
/* 1 no matches */
|
|
|
|
/* 2 error */
|
1996-11-19 02:02:36 +08:00
|
|
|
int findPackageByLabel(rpmdb db, char * arg, dbiIndexSet * matches);
|
1996-02-15 04:56:22 +08:00
|
|
|
|
1995-12-28 04:08:35 +08:00
|
|
|
#endif
|