createrepo_c library
0.3.0
C library for metadata manipulation
Main Page
Modules
Data Structures
Files
File List
All
Data Structures
Functions
Variables
Typedefs
Enumerations
Enumerator
Groups
Pages
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
24
extern
"C"
{
25
#endif
26
27
#include "checksum.h"
28
#include "compression_wrapper.h"
29
#include "package.h"
30
73
typedef
struct
{
74
char
*
type
;
75
char
*
location_real
;
76
char
*
location_href
;
77
char
*
location_base
;
78
char
*
checksum
;
79
char
*
checksum_type
;
80
char
*
checksum_open
;
81
char
*
checksum_open_type
;
82
gint64
timestamp
;
83
gint64
size
;
84
gint64
size_open
;
85
int
db_ver
;
87
GStringChunk *
chunk
;
88
}
cr_RepomdRecord
;
89
92
typedef
struct
{
93
gchar *
cpeid
;
94
gchar *
val
;
95
}
cr_DistroTag
;
96
99
typedef
struct
{
100
gchar *
revision
;
101
gchar *
repoid
;
102
gchar *
repoid_type
;
103
gchar *
contenthash
;
104
gchar *
contenthash_type
;
105
GSList *
repo_tags
;
106
GSList *
content_tags
;
107
GSList *
distro_tags
;
108
GSList *
records
;
110
GStringChunk *chunk;
113
}
cr_Repomd
;
114
119
cr_RepomdRecord
*
cr_repomd_record_new
(
const
char
*type,
const
char
*path);
120
126
void
cr_repomd_record_free
(
cr_RepomdRecord
*record);
127
132
cr_RepomdRecord
*
cr_repomd_record_copy
(
const
cr_RepomdRecord
*orig);
133
146
int
cr_repomd_record_fill
(
cr_RepomdRecord
*record,
147
cr_ChecksumType
checksum_type,
148
GError **err);
149
161
int
cr_repomd_record_compress_and_fill
(
cr_RepomdRecord
*record,
162
cr_RepomdRecord
*compressed_record,
163
cr_ChecksumType
checksum_type,
164
cr_CompressionType
compression,
165
GError **err);
166
172
int
cr_repomd_record_rename_file
(
cr_RepomdRecord
*record, GError **err);
173
179
void
cr_repomd_record_load_contentstat
(
cr_RepomdRecord
*record,
180
cr_ContentStat
*stats);
181
184
cr_Repomd
*
cr_repomd_new
();
185
190
void
cr_repomd_set_record
(
cr_Repomd
*repomd,
cr_RepomdRecord
*record);
191
196
void
cr_repomd_set_revision
(
cr_Repomd
*repomd,
const
char
*revision);
197
203
void
cr_repomd_set_repoid
(
cr_Repomd
*repomd,
204
const
char
*repoid,
205
const
char
*type);
206
212
void
cr_repomd_set_contenthash
(
cr_Repomd
*repomd,
213
const
char
*hash,
214
const
char
*type);
215
221
void
cr_repomd_add_distro_tag
(
cr_Repomd
*repomd,
222
const
char
*cpeid,
223
const
char
*tag);
224
229
void
cr_repomd_add_repo_tag
(
cr_Repomd
*repomd,
const
char
*tag);
230
235
void
cr_repomd_add_content_tag
(
cr_Repomd
*repomd,
const
char
*tag);
236
242
cr_RepomdRecord
*
cr_repomd_get_record
(
cr_Repomd
*repomd,
const
char
*type);
243
250
void
cr_repomd_detach_record
(
cr_Repomd
*repomd,
cr_RepomdRecord
*rec);
251
257
void
cr_repomd_sort_records
(
cr_Repomd
*repomd);
258
262
void
cr_repomd_free
(
cr_Repomd
*repomd);
263
266
#ifdef __cplusplus
267
}
268
#endif
269
270
#endif
/* __C_CREATEREPOLIB_REPOMD_H__ */
src
repomd.h
Generated on Tue May 6 2014 14:44:44 for createrepo_c library by
1.8.3.1