createrepo_c library  1.2.0
C library for metadata manipulation
locate_metadata.h
1 /* createrepo_c - Library of routines for manipulation with repodata
2  * Copyright (C) 2012 Tomas Mlcoch
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
17  * USA.
18  */
19 
20 #ifndef __C_CREATEREPOLIB_LOCATE_METADATA_H__
21 #define __C_CREATEREPOLIB_LOCATE_METADATA_H__
22 
23 #include <glib.h>
24 #include "repomd.h"
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
38  char *pri_xml_href;
39  char *fil_xml_href;
40  char *fex_xml_href;
41  char *oth_xml_href;
49  char *repomd;
50  char *original_url;
52  char *local_path;
53  int tmp;
57 };
58 
63 typedef struct {
64  gchar *name;
65  gchar *type;
66 } cr_Metadatum;
67 
68 struct cr_MetadataLocation *
69 cr_parse_repomd(const char *repomd_path, const char *repopath, int ignore_sqlite);
70 
80 GSList*
82  const gchar *type,
83  GSList *additional_metadata);
84 
93 gint cr_cmp_metadatum_type(gconstpointer metadatum, gconstpointer type);
94 
103 gint cr_cmp_repomd_record_type(gconstpointer repomd_record, gconstpointer type);
104 
114 struct cr_MetadataLocation *cr_locate_metadata(const char *repopath,
115  gboolean ignore_sqlite,
116  GError **err);
117 
123 
128 
140 gchar* cr_copy_metadatum(const gchar *src, const gchar *tmp_out_repo, GError **err);
141 
144 #ifdef __cplusplus
145 }
146 #endif
147 
148 #endif /* __C_CREATEREPOLIB_LOCATE_METADATA_H__ */
GSList * cr_insert_additional_metadatum(const gchar *path, const gchar *type, GSList *additional_metadata)
void cr_metadatum_free(cr_Metadatum *m)
gchar * cr_copy_metadatum(const gchar *src, const gchar *tmp_out_repo, GError **err)
gint cr_cmp_repomd_record_type(gconstpointer repomd_record, gconstpointer type)
struct cr_MetadataLocation * cr_locate_metadata(const char *repopath, gboolean ignore_sqlite, GError **err)
gint cr_cmp_metadatum_type(gconstpointer metadatum, gconstpointer type)
void cr_metadatalocation_free(struct cr_MetadataLocation *ml)
GSList * additional_metadata
cr_Repomd * repomd_data