createrepo_c library
C library for metadata manipulation
|
Datové struktry | |
struct | _cr_RepomdRecord |
struct | _cr_Repomd |
Definice typů | |
typedef struct _cr_RepomdRecord * | cr_RepomdRecord |
typedef struct _cr_Repomd * | cr_Repomd |
Výčty | |
enum | cr_RepomdRecordType { CR_MD_PRIMARY_XML, CR_MD_FILELISTS_XML, CR_MD_OTHER_XML, CR_MD_PRIMARY_SQLITE, CR_MD_FILELISTS_SQLITE, CR_MD_OTHER_SQLITE, CR_MD_GROUPFILE, CR_MD_COMPRESSED_GROUPFILE, CR_MD_UPDATEINFO, CR_MD_PKGORIGINS } |
Funkce | |
cr_RepomdRecord | cr_new_repomdrecord (const char *path) |
void | cr_free_repomdrecord (cr_RepomdRecord record) |
int | cr_fill_repomdrecord (cr_RepomdRecord record, cr_ChecksumType checksum_type) |
void | cr_process_groupfile_repomdrecord (cr_RepomdRecord groupfile, cr_RepomdRecord compressed_groupfile, cr_ChecksumType checksum_type, cr_CompressionType compression) |
void | cr_rename_repomdrecord_file (cr_RepomdRecord record) |
cr_Repomd | cr_new_repomd () |
void | cr_repomd_set_record (cr_Repomd repomd, cr_RepomdRecord record, cr_RepomdRecordType type) |
void | cr_repomd_set_revision (cr_Repomd repomd, const char *revision) |
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) |
void | cr_free_repomd (cr_Repomd repomd) |
gchar * | cr_generate_repomd_xml (cr_Repomd repomd) |
typedef struct _cr_Repomd* cr_Repomd |
typedef struct _cr_RepomdRecord* cr_RepomdRecord |
enum cr_RepomdRecordType |
int cr_fill_repomdrecord | ( | cr_RepomdRecord | record, |
cr_ChecksumType | checksum_type | ||
) |
Fill unfilled items in the cr_RepomdRecord (calculate checksums, get file size before/after compression, etc.). Note: For groupfile you shoud use cr_process_groupfile_repomdrecord function.
record | cr_RepomdRecord object |
checksum_type | type of checksum to use |
void cr_free_repomd | ( | cr_Repomd | repomd | ) |
Frees cr_Repomd object and all its cr_RepomdRecord objects
repomd | cr_Repomd object |
void cr_free_repomdrecord | ( | cr_RepomdRecord | record | ) |
Destroy cr_RepomdRecord object. NOTE: Do NOT use this function on objects attached to cr_Repomd (by cr_repomd_set_record).
record | cr_RepomdRecord object |
gchar* cr_generate_repomd_xml | ( | cr_Repomd | repomd | ) |
Generate repomd.xml content.
repomd | cr_Repomd object |
cr_Repomd cr_new_repomd | ( | ) |
Create new empty cr_Repomd object wich represents content of repomd.xml.
cr_RepomdRecord cr_new_repomdrecord | ( | const char * | path | ) |
Creates (alloc) new cr_RepomdRecord object
path | path to the compressed file |
void cr_process_groupfile_repomdrecord | ( | cr_RepomdRecord | groupfile, |
cr_RepomdRecord | compressed_groupfile, | ||
cr_ChecksumType | checksum_type, | ||
cr_CompressionType | compression | ||
) |
Analogue of cr_fill_repomdrecord but for groupfile. Groupfile must be set with the path to existing non compressed groupfile. Compressed group file will be created and compressed_groupfile record updated.
groupfile | cr_RepomdRecord initialized to an existing groupfile |
compressed_groupfile | empty cr_RepomdRecord object that will by filled |
checksum_type | type of checksums |
compression | type of compression |
void cr_rename_repomdrecord_file | ( | cr_RepomdRecord | record | ) |
Add a hash as prefix to the filename.
record | cr_RepomdRecord of file to be renamed |
void cr_repomd_add_content_tag | ( | cr_Repomd | repomd, |
const char * | tag | ||
) |
Add content tag.
repomd | cr_Repomd object |
tag | content tag |
void cr_repomd_add_distro_tag | ( | cr_Repomd | repomd, |
const char * | cpeid, | ||
const char * | tag | ||
) |
Add distro tag.
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 | ||
) |
Add repo tag.
repomd | cr_Repomd object |
tag | repo tag |
void cr_repomd_set_record | ( | cr_Repomd | repomd, |
cr_RepomdRecord | record, | ||
cr_RepomdRecordType | type | ||
) |
Set cr_Repomd record into cr_Repomd object.
repomd | cr_Repomd object |
record | cr_RepomdRecord object |
type | type of cr_RepomdRecord object |
void cr_repomd_set_revision | ( | cr_Repomd | repomd, |
const char * | revision | ||
) |
Set custom revision string of repomd.
repomd | cr_Repomd object |
revision | revision string |