createrepo_c library
C library for metadata manipulation
 Vše Třídy Funkce Proměnné Definice typů Výčty Hodnoty výčtu Skupiny Stránky
Repomd API.

Datové struktry

struct  _cr_RepomdRecord
struct  _cr_Repomd

Definice typů

typedef struct _cr_RepomdRecordcr_RepomdRecord
typedef struct _cr_Repomdcr_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)

Detailní popis


Dokumentace definic typů

typedef struct _cr_Repomd* cr_Repomd

cr_Repomd - object representing repomd.xml

Definice je uvedena na řádku 41 v souboru repomd.h.

cr_RepomdRecord - object representing an item from repomd.xml

Definice je uvedena na řádku 36 v souboru repomd.h.


Dokumentace výčtových typů

Enum of repomd record types

Definice je uvedena na řádku 84 v souboru repomd.h.


Dokumentace funkcí

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.

Parametry:
recordcr_RepomdRecord object
checksum_typetype of checksum to use
void cr_free_repomd ( cr_Repomd  repomd)

Frees cr_Repomd object and all its cr_RepomdRecord objects

Parametry:
repomdcr_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).

Parametry:
recordcr_RepomdRecord object
gchar* cr_generate_repomd_xml ( cr_Repomd  repomd)

Generate repomd.xml content.

Parametry:
repomdcr_Repomd object
Návratová hodnota:
string with repomd.xml content
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

Parametry:
pathpath 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.

Parametry:
groupfilecr_RepomdRecord initialized to an existing groupfile
compressed_groupfileempty cr_RepomdRecord object that will by filled
checksum_typetype of checksums
compressiontype of compression
void cr_rename_repomdrecord_file ( cr_RepomdRecord  record)

Add a hash as prefix to the filename.

Parametry:
recordcr_RepomdRecord of file to be renamed
void cr_repomd_add_content_tag ( cr_Repomd  repomd,
const char *  tag 
)

Add content tag.

Parametry:
repomdcr_Repomd object
tagcontent tag
void cr_repomd_add_distro_tag ( cr_Repomd  repomd,
const char *  cpeid,
const char *  tag 
)

Add distro tag.

Parametry:
repomdcr_Repomd object
cpeidcpeid string (could be NULL)
tagdistro tag string
void cr_repomd_add_repo_tag ( cr_Repomd  repomd,
const char *  tag 
)

Add repo tag.

Parametry:
repomdcr_Repomd object
tagrepo tag
void cr_repomd_set_record ( cr_Repomd  repomd,
cr_RepomdRecord  record,
cr_RepomdRecordType  type 
)

Set cr_Repomd record into cr_Repomd object.

Parametry:
repomdcr_Repomd object
recordcr_RepomdRecord object
typetype of cr_RepomdRecord object
void cr_repomd_set_revision ( cr_Repomd  repomd,
const char *  revision 
)

Set custom revision string of repomd.

Parametry:
repomdcr_Repomd object
revisionrevision string