extern "C" {
#endif
-struct s_Repo;
-
typedef struct s_KeyValue {
Id id;
const char *str;
int flags;
Pool *pool;
- struct s_Repo *repo;
- struct s_Repodata *data;
+ Repo *repo;
+ Repodata *data;
/* data pointers */
unsigned char *dp;
* keyname: if non-null, limit search to this keyname
* match: if non-null, limit search to this match
*/
-int dataiterator_init(Dataiterator *di, Pool *pool, struct s_Repo *repo, Id p, Id keyname, const char *match, int flags);
+int dataiterator_init(Dataiterator *di, Pool *pool, Repo *repo, Id p, Id keyname, const char *match, int flags);
void dataiterator_init_clone(Dataiterator *di, Dataiterator *from);
-void dataiterator_set_search(Dataiterator *di, struct s_Repo *repo, Id p);
+void dataiterator_set_search(Dataiterator *di, Repo *repo, Id p);
void dataiterator_set_keyname(Dataiterator *di, Id keyname);
int dataiterator_set_match(Dataiterator *di, const char *match, int flags);
void dataiterator_skip_solvable(Dataiterator *di);
void dataiterator_skip_repo(Dataiterator *di);
void dataiterator_jump_to_solvid(Dataiterator *di, Id solvid);
-void dataiterator_jump_to_repo(Dataiterator *di, struct s_Repo *repo);
+void dataiterator_jump_to_repo(Dataiterator *di, Repo *repo);
void dataiterator_entersub(Dataiterator *di);
void dataiterator_clonepos(Dataiterator *di, Dataiterator *from);
void dataiterator_seek(Dataiterator *di, int whence);
/*----------------------------------------------- */
-struct s_Repo;
-struct s_Repodata;
struct s_Repokey;
struct s_KeyValue;
typedef struct s_Datapos {
- struct s_Repo *repo;
+ Repo *repo;
Id solvid;
Id repodataid;
Id schema;
struct s_Pool {
void *appdata; /* application private pointer */
- struct s_Stringpool ss;
+ Stringpool ss;
Reldep *rels; /* table of rels: Id -> Reldep */
int nrels; /* number of unique rels */
- struct s_Repo **repos;
+ Repo **repos;
int nrepos; /* repos allocated */
int urepos; /* repos in use */
- struct s_Repo *installed; /* packages considered installed */
+ Repo *installed; /* packages considered installed */
Solvable *solvables;
int nsolvables; /* solvables allocated */
Map *considered;
/* callback for REL_NAMESPACE dependencies handled by the application */
- Id (*nscallback)(struct s_Pool *, void *data, Id name, Id evr);
+ Id (*nscallback)(Pool *, void *data, Id name, Id evr);
void *nscallbackdata;
/* debug mask and callback */
int debugmask;
- void (*debugcallback)(struct s_Pool *, void *data, int type, const char *str);
+ void (*debugcallback)(Pool *, void *data, int type, const char *str);
void *debugcallbackdata;
/* load callback */
- int (*loadcallback)(struct s_Pool *, struct s_Repodata *, void *);
+ int (*loadcallback)(Pool *, Repodata *, void *);
void *loadcallbackdata;
/* search position */
char *rootdir;
- int (*custom_vendorcheck)(struct s_Pool *, Solvable *, Solvable *);
+ int (*custom_vendorcheck)(Pool *, Solvable *, Solvable *);
int addfileprovidesfiltered; /* 1: only use filtered file list for addfileprovides */
int addedfileprovides; /* true: application called addfileprovides */
extern int pool_get_flag(Pool *pool, int flag);
extern void pool_debug(Pool *pool, int type, const char *format, ...) __attribute__((format(printf, 3, 4)));
-extern void pool_setdebugcallback(Pool *pool, void (*debugcallback)(struct s_Pool *, void *data, int type, const char *str), void *debugcallbackdata);
+extern void pool_setdebugcallback(Pool *pool, void (*debugcallback)(Pool *pool, void *data, int type, const char *str), void *debugcallbackdata);
extern void pool_setdebugmask(Pool *pool, int mask);
-extern void pool_setloadcallback(Pool *pool, int (*cb)(struct s_Pool *, struct s_Repodata *, void *), void *loadcbdata);
-extern void pool_setnamespacecallback(Pool *pool, Id (*cb)(struct s_Pool *, void *, Id, Id), void *nscbdata);
+extern void pool_setloadcallback(Pool *pool, int (*cb)(Pool *, Repodata *, void *), void *loadcbdata);
+extern void pool_setnamespacecallback(Pool *pool, Id (*cb)(Pool *, void *, Id, Id), void *nscbdata);
extern void pool_flush_namespaceproviders(Pool *pool, Id ns, Id evr);
-extern void pool_set_custom_vendorcheck(Pool *pool, int (*vendorcheck)(struct s_Pool *, Solvable *, Solvable *));
-extern int (*pool_get_custom_vendorcheck(Pool *pool))(struct s_Pool *, Solvable *, Solvable *);
+extern void pool_set_custom_vendorcheck(Pool *pool, int (*vendorcheck)(Pool *, Solvable *, Solvable *));
+extern int (*pool_get_custom_vendorcheck(Pool *pool))(Pool *, Solvable *, Solvable *);
extern char *pool_alloctmpspace(Pool *pool, int len);
extern void pool_freetmpspace(Pool *pool, const char *space);
extern char *pool_tmpappend(Pool *pool, const char *str1, const char *str2, const char *str3);
extern const char *pool_bin2hex(Pool *pool, const unsigned char *buf, int len);
-extern void pool_set_installed(Pool *pool, struct s_Repo *repo);
+extern void pool_set_installed(Pool *pool, Repo *repo);
extern int pool_error(Pool *pool, int ret, const char *format, ...) __attribute__((format(printf, 3, 4)));
extern char *pool_errstr(Pool *pool);
* key - search only this key
* match - key must match this string
*/
-void pool_search(Pool *pool, Id p, Id key, const char *match, int flags, int (*callback)(void *cbdata, Solvable *s, struct s_Repodata *data, struct s_Repokey *key, struct s_KeyValue *kv), void *cbdata);
+void pool_search(Pool *pool, Id p, Id key, const char *match, int flags, int (*callback)(void *cbdata, Solvable *s, Repodata *data, struct s_Repokey *key, struct s_KeyValue *kv), void *cbdata);
void pool_clear_pos(Pool *pool);
#define SIZEOF_SHA384 48
#define SIZEOF_SHA512 64
-struct s_Repo;
struct s_KeyValue;
typedef struct s_Repokey {
#define REPODATA_FILELIST_FILTERED 1
#define REPODATA_FILELIST_EXTENSION 2
-typedef struct s_Repodata {
+struct s_Repodata {
Id repodataid; /* our id */
- struct s_Repo *repo; /* back pointer to repo */
+ Repo *repo; /* back pointer to repo */
int state; /* available, stub or error */
- void (*loadcallback)(struct s_Repodata *);
+ void (*loadcallback)(Repodata *);
int start; /* start of solvables this repodata is valid for */
int end; /* last solvable + 1 of this repodata */
struct dircache *dircache;
#endif
-} Repodata;
+};
#define SOLVID_META -1
#define SOLVID_POS -2
/*-----
* management functions
*/
-void repodata_initdata(Repodata *data, struct s_Repo *repo, int localpool);
+void repodata_initdata(Repodata *data, Repo *repo, int localpool);
void repodata_freedata(Repodata *data);
void repodata_free(Repodata *data);