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);
39 /* repowriter flags */
40 #define REPOWRITER_NO_STORAGE_SOLVABLE (1 << 0)
41 #define REPOWRITER_KEEP_TYPE_DELETED (1 << 1)
42 #define REPOWRITER_LEGACY (1 << 30)
44 Repowriter *repowriter_create(Repo *repo);
45 Repowriter *repowriter_free(Repowriter *writer);
46 void repowriter_set_flags(Repowriter *writer, int flags);
47 void repowriter_set_keyfilter(Repowriter *writer, int (*keyfilter)(Repo *repo, Repokey *key, void *kfdata), void *kfdata);
48 void repowriter_set_keyqueue(Repowriter *writer, Queue *keyq);
49 void repowriter_set_repodatarange(Repowriter *writer, int repodatastart, int repodataend);
50 void repowriter_set_solvablerange(Repowriter *writer, int solvablestart, int solvableend);
51 void repowriter_set_userdata(Repowriter *writer, const void *data, int len);
52 int repowriter_write(Repowriter *writer, FILE *fp);
54 /* convenience functions */
55 extern int repo_write(Repo *repo, FILE *fp);
56 extern int repodata_write(Repodata *data , FILE *fp);
58 extern int repo_write_stdkeyfilter(Repo *repo, Repokey *key, void *kfdata);
60 /* deprecated functions, do not use in new code! */
61 extern int repo_write_filtered(Repo *repo, FILE *fp, int (*keyfilter)(Repo *repo, Repokey *key, void *kfdata), void *kfdata, Queue *keyq);
62 extern int repodata_write_filtered(Repodata *data , FILE *fp, int (*keyfilter)(Repo *repo, Repokey *key, void *kfdata), void *kfdata, Queue *keyq);