Librepo library 1.22.1
C library for downloading linux repository metadata and packages
Loading...
Searching...
No Matches
yum.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, see <https://www.gnu.org/licenses/>.
18 */
19
20#ifndef __LR_YUMREPO_H__
21#define __LR_YUMREPO_H__
22
23#include <glib.h>
24
25#include <librepo/handle.h>
26#include <librepo/metalink.h>
27#include <librepo/rcodes.h>
28#include <librepo/repomd.h>
29#include <librepo/result.h>
30
31G_BEGIN_DECLS
32
37
39typedef struct {
40 char *type;
41 char *path;
43
45typedef struct {
46 GSList *paths;
47 char *repomd;
48 char *url;
49 char *destdir;
50 char *signature;
53 char *mirrorlist;
54 char *metalink;
55 gboolean use_zchunk;
56} LrYumRepo;
57
67
73
77void
79
85const char *
86lr_yum_repo_path(LrYumRepo *repo, const char *type);
87
95int
96hmfcb(void *clientp, const char *msg, const char *url);
97
103gboolean
104lr_prepare_repodata_dir(LrHandle *handle, GError **err);
105
106
113gboolean
114lr_store_mirrorlist_files(LrHandle *handle, LrYumRepo *repo, GError **err);
115
122gboolean
123lr_copy_metalink_content(LrHandle *handle, LrYumRepo *repo, GError **err);
124
131int
132lr_prepare_repomd_xml_file(LrHandle *handle, char **path, GError **err);
133
134gboolean
135lr_check_repomd_xml_asc_availability(LrHandle *handle, LrYumRepo *repo, int fd, char *path, GError **err);
136
141void
142lr_get_best_checksum(const LrMetalink *metalink, GSList **checksums);
143
148CbData *
150
157gboolean
158lr_yum_download_repos(GSList *targets,
159 GError **err);
160
162
163G_END_DECLS
164
165#endif
struct _LrHandle LrHandle
Definition handle.h:38
int(* LrProgressCb)(void *clientp, double total_to_download, double now_downloaded)
Definition types.h:124
int(* LrHandleMirrorFailureCb)(void *clientp, const char *msg, const char *url, const char *metadata)
Definition types.h:164
void lr_get_best_checksum(const LrMetalink *metalink, GSList **checksums)
gboolean lr_store_mirrorlist_files(LrHandle *handle, LrYumRepo *repo, GError **err)
int lr_prepare_repomd_xml_file(LrHandle *handle, char **path, GError **err)
CbData * lr_get_metadata_failure_callback(const LrHandle *handle)
const char * lr_yum_repo_path(LrYumRepo *repo, const char *type)
LrYumRepo * lr_yum_repo_init(void)
int hmfcb(void *clientp, const char *msg, const char *url)
gboolean lr_prepare_repodata_dir(LrHandle *handle, GError **err)
void lr_yum_repo_free(LrYumRepo *repo)
gboolean lr_copy_metalink_content(LrHandle *handle, LrYumRepo *repo, GError **err)
gboolean lr_yum_download_repos(GSList *targets, GError **err)
struct CbData_s CbData
Definition yum.h:60
LrHandleMirrorFailureCb hmfcb
Definition yum.h:64
char * metadata
Definition yum.h:65
void * cbdata
Definition yum.h:62
LrProgressCb progresscb
Definition yum.h:63
void * userdata
Definition yum.h:61
GSList * paths
Definition yum.h:46
gboolean use_zchunk
Definition yum.h:55
char * destdir
Definition yum.h:49
char * signature
Definition yum.h:50
char * metalink
Definition yum.h:54
char * repomd
Definition yum.h:47
char * url
Definition yum.h:48
char * mirrorlist
Definition yum.h:53
char * type
Definition yum.h:40
char * path
Definition yum.h:41