Librepo library 1.14.5
C library for downloading linux repository metadata and packages
repomd.h
1/* librepo - A library providing (libcURL like) API to downloading repository
2 * Copyright (C) 2012 Tomas Mlcoch
3 *
4 * Licensed under the GNU Lesser General Public License Version 2.1
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#ifndef __LR_REPOMD_H__
22#define __LR_REPOMD_H__
23
24#include <glib.h>
25
26#include "xmlparser.h"
27#include "types.h"
28
29G_BEGIN_DECLS
30
37typedef struct {
38 char *cpeid;
39 char *tag;
41
43typedef struct {
44 char *type;
47 char *checksum;
53 gint64 timestamp;
54 gint64 size;
55 gint64 size_open;
56 gint64 size_header;
59 GStringChunk *chunk;
61
63typedef struct {
64 char *revision;
65 char *repoid;
67 GSList *repo_tags;
68 GSList *content_tags;
69 GSList *distro_tags;
70 GSList *records;
72 GStringChunk *chunk;
76
82
86void
88
97gboolean
99 int fd,
100 LrXmlParserWarningCb warningcb,
101 void *warningcb_data,
102 GError **err);
103
111 const char *type);
112
119gint64
121
124G_END_DECLS
125
126#endif
gint64 lr_yum_repomd_get_highest_timestamp(LrYumRepoMd *repomd, GError **err)
gboolean lr_yum_repomd_parse_file(LrYumRepoMd *repomd, int fd, LrXmlParserWarningCb warningcb, void *warningcb_data, GError **err)
void lr_yum_repomd_free(LrYumRepoMd *repomd)
LrYumRepoMdRecord * lr_yum_repomd_get_record(LrYumRepoMd *repomd, const char *type)
LrYumRepoMd * lr_yum_repomd_init(void)
int(* LrXmlParserWarningCb)(LrXmlParserWarningType type, char *msg, void *cbdata, GError **err)
Definition: xmlparser.h:57
char * tag
Definition: repomd.h:39
char * cpeid
Definition: repomd.h:38
GSList * records
Definition: repomd.h:70
GStringChunk * chunk
Definition: repomd.h:72
char * repoid_type
Definition: repomd.h:66
GSList * content_tags
Definition: repomd.h:68
GSList * distro_tags
Definition: repomd.h:69
char * revision
Definition: repomd.h:64
char * repoid
Definition: repomd.h:65
GSList * repo_tags
Definition: repomd.h:67
char * checksum_type
Definition: repomd.h:48
char * header_checksum
Definition: repomd.h:51
gint64 size
Definition: repomd.h:54
gint64 size_open
Definition: repomd.h:55
char * type
Definition: repomd.h:44
gint64 size_header
Definition: repomd.h:56
char * checksum
Definition: repomd.h:47
GStringChunk * chunk
Definition: repomd.h:59
char * checksum_open
Definition: repomd.h:49
char * location_href
Definition: repomd.h:45
char * checksum_open_type
Definition: repomd.h:50
gint64 timestamp
Definition: repomd.h:53
char * header_checksum_type
Definition: repomd.h:52
char * location_base
Definition: repomd.h:46