Loading...
Searching...
No Matches
yum.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_YUMREPO_H__
#define __LR_YUMREPO_H__
#include <glib.h>
#include <librepo/handle.h>
#include <librepo/metalink.h>
#include <librepo/rcodes.h>
#include <librepo/repomd.h>
#include <librepo/result.h>
G_BEGIN_DECLS
typedef struct {
char *type;
char *path;
} LrYumRepoPath;
typedef struct {
GSList *paths;
char *repomd;
char *url;
char *destdir;
char *signature;
char *mirrorlist;
char *metalink;
gboolean use_zchunk;
} LrYumRepo;
typedef struct CbData_s {
void *userdata;
void *cbdata;
LrProgressCb progresscb;
LrHandleMirrorFailureCb hmfcb;
char *metadata;
} CbData;
LrYumRepo *
lr_yum_repo_init(void);
void
lr_yum_repo_free(LrYumRepo *repo);
const char *
lr_yum_repo_path(LrYumRepo *repo, const char *type);
int
hmfcb(void *clientp, const char *msg, const char *url);
gboolean
lr_prepare_repodata_dir(LrHandle *handle, GError **err);
gboolean
lr_store_mirrorlist_files(LrHandle *handle, LrYumRepo *repo, GError **err);
gboolean
lr_copy_metalink_content(LrHandle *handle, LrYumRepo *repo, GError **err);
int
lr_prepare_repomd_xml_file(LrHandle *handle, char **path, GError **err);
gboolean
lr_check_repomd_xml_asc_availability(LrHandle *handle, LrYumRepo *repo, int fd, char *path, GError **err);
void
lr_get_best_checksum(const LrMetalink *metalink, GSList **checksums);
CbData *
lr_get_metadata_failure_callback(const LrHandle *handle);
gboolean
lr_yum_download_repos(GSList *targets,
GError **err);
G_END_DECLS
#endif
LrHandle
struct _LrHandle LrHandle
Definition handle.h:39
LrProgressCb
int(* LrProgressCb)(void *clientp, double total_to_download, double now_downloaded)
Definition types.h:125
LrHandleMirrorFailureCb
int(* LrHandleMirrorFailureCb)(void *clientp, const char *msg, const char *url, const char *metadata)
Definition types.h:165
lr_get_best_checksum
void lr_get_best_checksum(const LrMetalink *metalink, GSList **checksums)
lr_store_mirrorlist_files
gboolean lr_store_mirrorlist_files(LrHandle *handle, LrYumRepo *repo, GError **err)
lr_prepare_repomd_xml_file
int lr_prepare_repomd_xml_file(LrHandle *handle, char **path, GError **err)
lr_get_metadata_failure_callback
CbData * lr_get_metadata_failure_callback(const LrHandle *handle)
lr_yum_repo_path
const char * lr_yum_repo_path(LrYumRepo *repo, const char *type)
lr_yum_repo_init
LrYumRepo * lr_yum_repo_init(void)
hmfcb
int hmfcb(void *clientp, const char *msg, const char *url)
lr_prepare_repodata_dir
gboolean lr_prepare_repodata_dir(LrHandle *handle, GError **err)
lr_yum_repo_free
void lr_yum_repo_free(LrYumRepo *repo)
lr_copy_metalink_content
gboolean lr_copy_metalink_content(LrHandle *handle, LrYumRepo *repo, GError **err)
lr_yum_download_repos
gboolean lr_yum_download_repos(GSList *targets, GError **err)
CbData
struct CbData_s CbData
CbData_s
Definition yum.h:61
CbData_s::hmfcb
LrHandleMirrorFailureCb hmfcb
Definition yum.h:65
CbData_s::metadata
char * metadata
Definition yum.h:66
CbData_s::cbdata
void * cbdata
Definition yum.h:63
CbData_s::progresscb
LrProgressCb progresscb
Definition yum.h:64
CbData_s::userdata
void * userdata
Definition yum.h:62
LrMetalink
Definition metalink.h:57
LrYumRepo
Definition yum.h:46
LrYumRepo::paths
GSList * paths
Definition yum.h:47
LrYumRepo::use_zchunk
gboolean use_zchunk
Definition yum.h:56
LrYumRepo::destdir
char * destdir
Definition yum.h:50
LrYumRepo::signature
char * signature
Definition yum.h:51
LrYumRepo::metalink
char * metalink
Definition yum.h:55
LrYumRepo::repomd
char * repomd
Definition yum.h:48
LrYumRepo::url
char * url
Definition yum.h:49
LrYumRepo::mirrorlist
char * mirrorlist
Definition yum.h:54
LrYumRepoPath
Definition yum.h:40
LrYumRepoPath::type
char * type
Definition yum.h:41
LrYumRepoPath::path
char * path
Definition yum.h:42