Loading...
Searching...
No Matches
repomd.h
/* librepo - A library providing (libcURL like) API to downloading repository
* Copyright (C) 2012 Tomas Mlcoch
*
* Licensed under the GNU Lesser General Public License Version 2.1
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef __LR_REPOMD_H__
#define __LR_REPOMD_H__
#include <glib.h>
#include <librepo/xmlparser.h>
#include <librepo/types.h>
G_BEGIN_DECLS
typedef struct {
char *cpeid;
char *tag;
} LrYumDistroTag;
typedef struct {
char *type;
char *location_href;
char *location_base;
char *checksum;
char *checksum_type;
char *checksum_open;
char *checksum_open_type;
char *header_checksum;
char *header_checksum_type;
gint64 timestamp;
gint64 size;
gint64 size_open;
gint64 size_header;
int db_version;
GStringChunk *chunk;
} LrYumRepoMdRecord;
typedef struct {
char *revision;
char *repoid;
char *repoid_type;
GSList *repo_tags;
GSList *content_tags;
GSList *distro_tags;
GSList *records;
GStringChunk *chunk;
} LrYumRepoMd;
LrYumRepoMd *
lr_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);
LrYumRepoMdRecord *
lr_yum_repomd_get_record(LrYumRepoMd *repomd,
const char *type);
gint64
lr_yum_repomd_get_highest_timestamp(LrYumRepoMd *repomd, GError **err);
G_END_DECLS
#endif
lr_yum_repomd_get_highest_timestamp
gint64 lr_yum_repomd_get_highest_timestamp(LrYumRepoMd *repomd, GError **err)
lr_yum_repomd_parse_file
gboolean lr_yum_repomd_parse_file(LrYumRepoMd *repomd, int fd, LrXmlParserWarningCb warningcb, void *warningcb_data, GError **err)
lr_yum_repomd_free
void lr_yum_repomd_free(LrYumRepoMd *repomd)
lr_yum_repomd_get_record
LrYumRepoMdRecord * lr_yum_repomd_get_record(LrYumRepoMd *repomd, const char *type)
lr_yum_repomd_init
LrYumRepoMd * lr_yum_repomd_init(void)
LrXmlParserWarningCb
int(* LrXmlParserWarningCb)(LrXmlParserWarningType type, char *msg, void *cbdata, GError **err)
Definition xmlparser.h:57
LrYumDistroTag
Definition repomd.h:37
LrYumDistroTag::tag
char * tag
Definition repomd.h:39
LrYumDistroTag::cpeid
char * cpeid
Definition repomd.h:38
LrYumRepoMd
Definition repomd.h:63
LrYumRepoMd::records
GSList * records
Definition repomd.h:70
LrYumRepoMd::chunk
GStringChunk * chunk
Definition repomd.h:72
LrYumRepoMd::repoid_type
char * repoid_type
Definition repomd.h:66
LrYumRepoMd::content_tags
GSList * content_tags
Definition repomd.h:68
LrYumRepoMd::distro_tags
GSList * distro_tags
Definition repomd.h:69
LrYumRepoMd::revision
char * revision
Definition repomd.h:64
LrYumRepoMd::repoid
char * repoid
Definition repomd.h:65
LrYumRepoMd::repo_tags
GSList * repo_tags
Definition repomd.h:67
LrYumRepoMdRecord
Definition repomd.h:43
LrYumRepoMdRecord::checksum_type
char * checksum_type
Definition repomd.h:48
LrYumRepoMdRecord::header_checksum
char * header_checksum
Definition repomd.h:51
LrYumRepoMdRecord::size
gint64 size
Definition repomd.h:54
LrYumRepoMdRecord::size_open
gint64 size_open
Definition repomd.h:55
LrYumRepoMdRecord::type
char * type
Definition repomd.h:44
LrYumRepoMdRecord::size_header
gint64 size_header
Definition repomd.h:56
LrYumRepoMdRecord::db_version
int db_version
Definition repomd.h:57
LrYumRepoMdRecord::checksum
char * checksum
Definition repomd.h:47
LrYumRepoMdRecord::chunk
GStringChunk * chunk
Definition repomd.h:59
LrYumRepoMdRecord::checksum_open
char * checksum_open
Definition repomd.h:49
LrYumRepoMdRecord::location_href
char * location_href
Definition repomd.h:45
LrYumRepoMdRecord::checksum_open_type
char * checksum_open_type
Definition repomd.h:50
LrYumRepoMdRecord::timestamp
gint64 timestamp
Definition repomd.h:53
LrYumRepoMdRecord::header_checksum_type
char * header_checksum_type
Definition repomd.h:52
LrYumRepoMdRecord::location_base
char * location_base
Definition repomd.h:46