Librepo library  1.14.5
C library for downloading linux repository metadata and packages
Repomd (repomd.xml) parser

Data Structures

struct  LrYumDistroTag
 
struct  LrYumRepoMdRecord
 
struct  LrYumRepoMd
 

Functions

LrYumRepoMdlr_yum_repomd_init (void)
 
void lr_yum_repomd_free (LrYumRepoMd *repomd)
 
gboolean lr_yum_repomd_parse_file (LrYumRepoMd *repomd, int fd, LrXmlParserWarningCb warningcb, void *warningcb_data, GError **err)
 
LrYumRepoMdRecordlr_yum_repomd_get_record (LrYumRepoMd *repomd, const char *type)
 
gint64 lr_yum_repomd_get_highest_timestamp (LrYumRepoMd *repomd, GError **err)
 

Detailed Description

Function Documentation

◆ lr_yum_repomd_free()

void lr_yum_repomd_free ( LrYumRepoMd repomd)

Free repomd content and repomd object itself.

Parameters
repomdRepomd object.

◆ lr_yum_repomd_get_highest_timestamp()

gint64 lr_yum_repomd_get_highest_timestamp ( LrYumRepoMd repomd,
GError **  err 
)

Get the highest timestamp from repomd records.

Parameters
repomdRepomd record.
errGError **
Returns
The highest timestamp from repomd records or -1 if no records available.

◆ lr_yum_repomd_get_record()

LrYumRepoMdRecord* lr_yum_repomd_get_record ( LrYumRepoMd repomd,
const char *  type 
)

Get repomd record from the repomd object.

Parameters
repomdRepomd record.
typeType of record e.g. "primary", "filelists", ...
Returns
Record of desired type or NULL.

◆ lr_yum_repomd_init()

LrYumRepoMd* lr_yum_repomd_init ( void  )

Create new empty repomd object.

Returns
New repomd object.

◆ lr_yum_repomd_parse_file()

gboolean lr_yum_repomd_parse_file ( LrYumRepoMd repomd,
int  fd,
LrXmlParserWarningCb  warningcb,
void *  warningcb_data,
GError **  err 
)

Parse repomd.xml file.

Parameters
repomdEmpty repomd object.
fdFile descriptor.
warningcbCallback for warnings
warningcb_dataWarning callback user data
errGError **
Returns
TRUE if everything is ok, FALSE if err is set.