Librepo library  1.7.13
C library for downloading linux repository metadata and packages
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules
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 
29 G_BEGIN_DECLS
30 
37 typedef struct {
38  char *cpeid;
39  char *tag;
41 
43 typedef struct {
44  char *type;
45  char *location_href;
46  char *location_base;
47  char *checksum;
48  char *checksum_type;
49  char *checksum_open;
51  gint64 timestamp;
52  gint64 size;
53  gint64 size_open;
54  int db_version;
56  GStringChunk *chunk;
58 
60 typedef struct {
61  char *revision;
62  char *repoid;
63  char *repoid_type;
64  GSList *repo_tags;
65  GSList *content_tags;
66  GSList *distro_tags;
67  GSList *records;
69  GStringChunk *chunk;
72 } LrYumRepoMd;
73 
79 
83 void
85 
94 gboolean
96  int fd,
97  LrXmlParserWarningCb warningcb,
98  void *warningcb_data,
99  GError **err);
100 
108  const char *type);
109 
116 gint64
117 lr_yum_repomd_get_highest_timestamp(LrYumRepoMd *repomd, GError **err);
118 
121 G_END_DECLS
122 
123 #endif
char * checksum
Definition: repomd.h:47
char * repoid_type
Definition: repomd.h:63
GSList * distro_tags
Definition: repomd.h:66
GStringChunk * chunk
Definition: repomd.h:56
char * checksum_type
Definition: repomd.h:48
char * type
Definition: repomd.h:44
gint64 timestamp
Definition: repomd.h:51
GSList * repo_tags
Definition: repomd.h:64
gboolean lr_yum_repomd_parse_file(LrYumRepoMd *repomd, int fd, LrXmlParserWarningCb warningcb, void *warningcb_data, GError **err)
gint64 lr_yum_repomd_get_highest_timestamp(LrYumRepoMd *repomd, GError **err)
char * location_base
Definition: repomd.h:46
char * revision
Definition: repomd.h:61
char * repoid
Definition: repomd.h:62
char * cpeid
Definition: repomd.h:38
GStringChunk * chunk
Definition: repomd.h:69
gint64 size_open
Definition: repomd.h:53
LrYumRepoMdRecord * lr_yum_repomd_get_record(LrYumRepoMd *repomd, const char *type)
int(* LrXmlParserWarningCb)(LrXmlParserWarningType type, char *msg, void *cbdata, GError **err)
Definition: xmlparser.h:57
GSList * content_tags
Definition: repomd.h:65
void lr_yum_repomd_free(LrYumRepoMd *repomd)
GSList * records
Definition: repomd.h:67
char * tag
Definition: repomd.h:39
LrYumRepoMd * lr_yum_repomd_init()
char * location_href
Definition: repomd.h:45
char * checksum_open_type
Definition: repomd.h:50
gint64 size
Definition: repomd.h:52
char * checksum_open
Definition: repomd.h:49