2 * Copyright (c) 2007, Novell Inc.
4 * This program is licensed under the BSD license, read LICENSE.BSD
5 * for further information
25 typedef struct s_Repowriter {
32 int (*keyfilter)(Repo *repo, Repokey *key, void *kfdata);
37 /* repowriter flags */
38 #define REPOWRITER_NO_STORAGE_SOLVABLE (1 << 0)
39 #define REPOWRITER_KEEP_TYPE_DELETED (1 << 1)
40 #define REPOWRITER_LEGACY (1 << 30)
42 Repowriter *repowriter_create(Repo *repo);
43 Repowriter *repowriter_free(Repowriter *writer);
44 void repowriter_set_flags(Repowriter *writer, int flags);
45 void repowriter_set_keyfilter(Repowriter *writer, int (*keyfilter)(Repo *repo, Repokey *key, void *kfdata), void *kfdata);
46 void repowriter_set_keyqueue(Repowriter *writer, Queue *keyq);
47 void repowriter_set_repodatarange(Repowriter *writer, int repodatastart, int repodataend);
48 void repowriter_set_solvablerange(Repowriter *writer, int solvablestart, int solvableend);
49 int repowriter_write(Repowriter *writer, FILE *fp);
51 /* convenience functions */
52 extern int repo_write(Repo *repo, FILE *fp);
53 extern int repodata_write(Repodata *data , FILE *fp);
55 extern int repo_write_stdkeyfilter(Repo *repo, Repokey *key, void *kfdata);
57 /* deprecated functions, do not use in new code! */
58 extern int repo_write_filtered(Repo *repo, FILE *fp, int (*keyfilter)(Repo *repo, Repokey *key, void *kfdata), void *kfdata, Queue *keyq);
59 extern int repodata_write_filtered(Repodata *data , FILE *fp, int (*keyfilter)(Repo *repo, Repokey *key, void *kfdata), void *kfdata, Queue *keyq);