createrepo_c library 1.2.1
C library for metadata manipulation
Loading...
Searching...
No Matches
repomd.h
1/* createrepo_c - Library of routines for manipulation with repodata
2 * Copyright (C) 2012 Tomas Mlcoch
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
17 * USA.
18 */
19
20#ifndef __C_CREATEREPOLIB_REPOMD_H__
21#define __C_CREATEREPOLIB_REPOMD_H__
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27#include <glib.h>
28#include "checksum.h"
29#include "compression_wrapper.h"
30#include "package.h"
31
71
74typedef struct {
75 char *type;
79 char *checksum;
85 gint64 timestamp;
86 gint64 size;
87 gint64 size_open;
88 gint64 size_header;
89 int db_ver;
90
91 GStringChunk *chunk;
93
96typedef struct {
97 gchar *cpeid;
98 gchar *val;
100
103typedef struct {
104 gchar *revision;
105 gchar *repoid;
106 gchar *repoid_type;
107 gchar *contenthash;
109 GSList *repo_tags;
110 GSList *content_tags;
111 GSList *distro_tags;
112 GSList *records;
113
114 GStringChunk *chunk;
117} cr_Repomd;
118
123cr_RepomdRecord *cr_repomd_record_new(const char *type, const char *path);
124
131
137
151 cr_ChecksumType checksum_type,
152 GError **err);
153
167 cr_RepomdRecord *compressed_record,
168 cr_ChecksumType checksum_type,
169 cr_CompressionType compression,
170 const char *zck_dict_dir,
171 GError **err);
172
179
184void cr_repomd_record_set_timestamp(cr_RepomdRecord *record, gint64 timestamp);
185
192 cr_ContentStat *stats);
193
200 cr_ContentStat *stats);
201
205
211
217
222void cr_repomd_set_revision(cr_Repomd *repomd, const char *revision);
223
230 const char *repoid,
231 const char *type);
232
239 const char *hash,
240 const char *type);
241
248 const char *cpeid,
249 const char *tag);
250
255void cr_repomd_add_repo_tag(cr_Repomd *repomd, const char *tag);
256
261void cr_repomd_add_content_tag(cr_Repomd *repomd, const char *tag);
262
269
277
282void cr_repomd_remove_record(cr_Repomd *repomd, const char *type);
283
290
295
297
298#ifdef __cplusplus
299}
300#endif
301
302#endif /* __C_CREATEREPOLIB_REPOMD_H__ */
cr_ChecksumType
Definition checksum.h:43
cr_CompressionType
void cr_repomd_free(cr_Repomd *repomd)
void cr_repomd_set_repoid(cr_Repomd *repomd, const char *repoid, const char *type)
void cr_repomd_remove_record(cr_Repomd *repomd, const char *type)
void cr_repomd_record_load_contentstat(cr_RepomdRecord *record, cr_ContentStat *stats)
int cr_repomd_record_fill(cr_RepomdRecord *record, cr_ChecksumType checksum_type, GError **err)
void cr_repomd_detach_record(cr_Repomd *repomd, cr_RepomdRecord *rec)
void cr_repomd_record_set_timestamp(cr_RepomdRecord *record, gint64 timestamp)
void cr_repomd_record_free(cr_RepomdRecord *record)
cr_Repomd * cr_repomd_copy(cr_Repomd *repomd)
void cr_repomd_record_load_zck_contentstat(cr_RepomdRecord *record, cr_ContentStat *stats)
int cr_repomd_record_compress_and_fill(cr_RepomdRecord *record, cr_RepomdRecord *compressed_record, cr_ChecksumType checksum_type, cr_CompressionType compression, const char *zck_dict_dir, GError **err)
void cr_repomd_add_distro_tag(cr_Repomd *repomd, const char *cpeid, const char *tag)
cr_RepomdRecord * cr_repomd_get_record(cr_Repomd *repomd, const char *type)
void cr_repomd_set_revision(cr_Repomd *repomd, const char *revision)
void cr_repomd_set_record(cr_Repomd *repomd, cr_RepomdRecord *record)
cr_Repomd * cr_repomd_new()
cr_RepomdRecord * cr_repomd_record_copy(const cr_RepomdRecord *orig)
void cr_repomd_sort_records(cr_Repomd *repomd)
void cr_repomd_set_contenthash(cr_Repomd *repomd, const char *hash, const char *type)
int cr_repomd_record_rename_file(cr_RepomdRecord *record, GError **err)
void cr_repomd_add_content_tag(cr_Repomd *repomd, const char *tag)
cr_RepomdRecord * cr_repomd_record_new(const char *type, const char *path)
void cr_repomd_add_repo_tag(cr_Repomd *repomd, const char *tag)
gchar * val
Definition repomd.h:98
gchar * cpeid
Definition repomd.h:97
GSList * records
Definition repomd.h:112
gchar * contenthash_type
Definition repomd.h:108
GStringChunk * chunk
Definition repomd.h:114
GSList * content_tags
Definition repomd.h:110
gchar * repoid
Definition repomd.h:105
gchar * revision
Definition repomd.h:104
GSList * distro_tags
Definition repomd.h:111
gchar * repoid_type
Definition repomd.h:106
gchar * contenthash
Definition repomd.h:107
GSList * repo_tags
Definition repomd.h:109
char * checksum_type
Definition repomd.h:80
gint64 size
Definition repomd.h:86
gint64 size_open
Definition repomd.h:87
char * type
Definition repomd.h:75
char * checksum_header
Definition repomd.h:83
gint64 size_header
Definition repomd.h:88
char * checksum
Definition repomd.h:79
GStringChunk * chunk
Definition repomd.h:91
char * checksum_open
Definition repomd.h:81
char * location_href
Definition repomd.h:77
char * checksum_open_type
Definition repomd.h:82
gint64 timestamp
Definition repomd.h:85
char * checksum_header_type
Definition repomd.h:84
char * location_real
Definition repomd.h:76
char * location_base
Definition repomd.h:78