|
cr_RepomdRecord * | cr_repomd_record_new (const char *type, const char *path) |
|
void | cr_repomd_record_free (cr_RepomdRecord *record) |
|
cr_RepomdRecord * | cr_repomd_record_copy (const cr_RepomdRecord *orig) |
|
int | cr_repomd_record_fill (cr_RepomdRecord *record, cr_ChecksumType checksum_type, GError **err) |
|
int | cr_repomd_record_compress_and_fill (cr_RepomdRecord *record, cr_RepomdRecord *compressed_record, cr_ChecksumType checksum_type, cr_CompressionType compression, GError **err) |
|
int | cr_repomd_record_rename_file (cr_RepomdRecord *record, GError **err) |
|
void | cr_repomd_record_load_contentstat (cr_RepomdRecord *record, cr_ContentStat *stats) |
|
cr_Repomd * | cr_repomd_new () |
|
cr_Repomd * | cr_repomd_copy (cr_Repomd *repomd) |
|
void | cr_repomd_set_record (cr_Repomd *repomd, cr_RepomdRecord *record) |
|
void | cr_repomd_set_revision (cr_Repomd *repomd, const char *revision) |
|
void | cr_repomd_set_repoid (cr_Repomd *repomd, const char *repoid, const char *type) |
|
void | cr_repomd_set_contenthash (cr_Repomd *repomd, const char *hash, const char *type) |
|
void | cr_repomd_add_distro_tag (cr_Repomd *repomd, const char *cpeid, const char *tag) |
|
void | cr_repomd_add_repo_tag (cr_Repomd *repomd, const char *tag) |
|
void | cr_repomd_add_content_tag (cr_Repomd *repomd, const char *tag) |
|
cr_RepomdRecord * | cr_repomd_get_record (cr_Repomd *repomd, const char *type) |
|
void | cr_repomd_detach_record (cr_Repomd *repomd, cr_RepomdRecord *rec) |
|
void | cr_repomd_remove_record (cr_Repomd *repomd, const char *type) |
|
void | cr_repomd_sort_records (cr_Repomd *repomd) |
|
void | cr_repomd_free (cr_Repomd *repomd) |
|
Module for generating repomd.xml.
Example:
void cr_repomd_add_content_tag |
( |
cr_Repomd * |
repomd, |
|
|
const char * |
tag |
|
) |
| |
Add content tag.
- Parameters
-
void cr_repomd_add_distro_tag |
( |
cr_Repomd * |
repomd, |
|
|
const char * |
cpeid, |
|
|
const char * |
tag |
|
) |
| |
Add distro tag.
- Parameters
-
repomd | cr_Repomd object |
cpeid | cpeid string (could be NULL) |
tag | distro tag string |
void cr_repomd_add_repo_tag |
( |
cr_Repomd * |
repomd, |
|
|
const char * |
tag |
|
) |
| |
Detach this record from the repomd records list. Note: Responsibility of freeing record memory no longer belongs to cr_Repomd object.
- Parameters
-
repomd | cr_Repomd object |
rec | Record to be removed |
Get repomd record from the repomd object.
- Parameters
-
repomd | cr_Repomd object |
type | Type of the record ("primary", "primary_db", ..) |
- Returns
- Pointer to a record of desired type or NULL
Create new empty cr_Repomd object wich represents content of repomd.xml.
Almost analogous to cr_repomd_record_fill but suitable for groupfile. Record must be set with the path to existing non compressed groupfile. Compressed file will be created and compressed_record updated.
- Parameters
-
record | cr_RepomdRecord initialized to an existing uncompressed file |
compressed_record | empty cr_RepomdRecord object that will by filled |
checksum_type | type of checksums |
compression | type of compression |
err | GError ** |
- Returns
- cr_Error code
Fill unfilled items in the cr_RepomdRecord (calculate checksums, get file size before/after compression, etc.). Note: If checksum_open, checksum_open_type and size_open are filed then their calculation will be skiped. This items could be filled directly on our own or use function for load them from a cr_ContentStat. If no open stats are supplied, then this function has to decompress the file for the open checksum calculation.
- Parameters
-
record | cr_RepomdRecord object |
checksum_type | type of checksum to use |
err | GError ** |
- Returns
- cr_Error code
Destroy cr_RepomdRecord object. NOTE: Do NOT use this function on objects attached to cr_Repomd (by cr_repomd_set_record).
- Parameters
-
Load the open stats (checksum_open, checksum_open_type and size_open) from the cr_ContentStat object.
- Parameters
-
cr_RepomdRecord* cr_repomd_record_new |
( |
const char * |
type, |
|
|
const char * |
path |
|
) |
| |
Creates (alloc) new cr_RepomdRecord object
- Parameters
-
type | Type of record ("primary", "filelists", ..) |
path | path to the compressed file |
int cr_repomd_record_rename_file |
( |
cr_RepomdRecord * |
record, |
|
|
GError ** |
err |
|
) |
| |
Add a hash as prefix to the filename.
- Parameters
-
- Returns
- cr_Error code
void cr_repomd_remove_record |
( |
cr_Repomd * |
repomd, |
|
|
const char * |
type |
|
) |
| |
Remove first record of the specified type
- Parameters
-
repomd | cr_Repomd object |
type | Type of the record ("primary", "primary_db", ..) |
void cr_repomd_set_contenthash |
( |
cr_Repomd * |
repomd, |
|
|
const char * |
hash, |
|
|
const char * |
type |
|
) |
| |
Set a contenthash
- Parameters
-
repomd | cr_Repomd object |
hash | content hash |
type | Type of hash function |
void cr_repomd_set_repoid |
( |
cr_Repomd * |
repomd, |
|
|
const char * |
repoid, |
|
|
const char * |
type |
|
) |
| |
Set a repoid - OBSOLETE, use cr_repomd_set_contenthash instead
- Parameters
-
repomd | cr_Repomd object |
repoid | RepoId |
type | Type of hash function used to calculate repoid |
void cr_repomd_set_revision |
( |
cr_Repomd * |
repomd, |
|
|
const char * |
revision |
|
) |
| |
Set custom revision string of repomd.
- Parameters
-
repomd | cr_Repomd object |
revision | revision string |
void cr_repomd_sort_records |
( |
cr_Repomd * |
repomd | ) |
|
Records are stored in order they were added to the repomd. Because sometimes deterministic output is desirable this function exists.
- Parameters
-