Librepo library 1.22.1
C library for downloading linux repository metadata and packages
Loading...
Searching...
No Matches
types.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_TYPES_H__
21#define __LR_TYPES_H__
22
23#include <glib.h>
24
25G_BEGIN_DECLS
26
31
35
37typedef enum {
38 LR_CHECK_GPG = (1<<0),
40} LrChecks;
41
43typedef enum {
44 LR_YUMREPO = (1<<1),
45 LR_RPMMDREPO = LR_YUMREPO,
46 LR_SUSEREPO = (1<<2),
47 LR_DEBREPO = (1<<3),
49
59
66
68typedef enum {
70 LR_AUTH_BASIC = (1<<0),
71 LR_AUTH_DIGEST = (1<<1),
73 LR_AUTH_NTLM = (1<<3),
75 LR_AUTH_NTLM_WB = (1<<5),
76 LR_AUTH_ONLY = ((int)(1u<<31)),
83} LrAuth;
84
85/* Some common used arrays for LRO_YUMDLIST */
86
88#define LR_YUM_FULL NULL
89#define LR_RPMMD_FULL NULL
90
92#define LR_YUM_REPOMDONLY {NULL}
93#define LR_RPMMD_REPOMDONLY {NULL}
94
96#define LR_YUM_BASEXML {"primary", "filelists", "other", NULL}
97#define LR_RPMMD_BASEXML {"primary", "filelists", "other", NULL}
98
100#define LR_YUM_BASEDB {"primary_db", "filelists_db", "other_db", NULL}
101#define LR_RPMMD_BASEDB {"primary_db", "filelists_db", "other_db", NULL}
102
106#define LR_YUM_HAWKEY {"primary", "filelists", "prestodelta", NULL}
107#define LR_RPMMD_HAWKEY {"primary", "filelists", "prestodelta", NULL}
108
109typedef enum LrCbReturnCode_e {
116} LrCbReturnCode;
117
124typedef int (*LrProgressCb)(void *clientp,
125 double total_to_download,
126 double now_downloaded);
127
129typedef enum {
130 LR_TRANSFER_SUCCESSFUL,
131 LR_TRANSFER_ALREADYEXISTS,
132 LR_TRANSFER_ALREDYEXISTS = LR_TRANSFER_ALREADYEXISTS, // Deprecated - Backward comp. - remove in future release
133 LR_TRANSFER_ERROR,
135
143typedef int (*LrEndCb)(void *clientp,
144 LrTransferStatus status,
145 const char *msg);
146
153typedef int (*LrMirrorFailureCb)(void *clientp,
154 const char *msg,
155 const char *url);
156
164typedef int (*LrHandleMirrorFailureCb)(void *clientp,
165 const char *msg,
166 const char *url,
167 const char *metadata);
168
199
205typedef void (*LrFastestMirrorCb)(void *clientp,
207 void *ptr);
208
210
211G_END_DECLS
212
213#endif
LrTransferStatus
Definition types.h:129
int(* LrEndCb)(void *clientp, LrTransferStatus status, const char *msg)
Definition types.h:143
LrIpResolveType
Definition types.h:61
void(* LrFastestMirrorCb)(void *clientp, LrFastestMirrorStages stage, void *ptr)
Definition types.h:205
int(* LrMirrorFailureCb)(void *clientp, const char *msg, const char *url)
Definition types.h:153
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
LrFastestMirrorStages
Definition types.h:169
LrCbReturnCode_e
Definition types.h:109
LrAuth
Definition types.h:68
LrRepotype
Definition types.h:43
LrProxyType
Definition types.h:51
LrChecks
Definition types.h:37
@ LR_IPRESOLVE_V4
Definition types.h:63
@ LR_IPRESOLVE_WHATEVER
Definition types.h:62
@ LR_IPRESOLVE_V6
Definition types.h:64
@ LR_FMSTAGE_CACHELOADING
Definition types.h:174
@ LR_FMSTAGE_STATUS
Definition types.h:193
@ LR_FMSTAGE_FINISHING
Definition types.h:189
@ LR_FMSTAGE_CACHELOADINGSTATUS
Definition types.h:178
@ LR_FMSTAGE_INIT
Definition types.h:170
@ LR_FMSTAGE_DETECTION
Definition types.h:183
@ LR_CB_ABORT
Definition types.h:111
@ LR_CB_ERROR
Definition types.h:113
@ LR_CB_OK
Definition types.h:110
@ LR_AUTH_NTLM
Definition types.h:73
@ LR_AUTH_BASIC
Definition types.h:70
@ LR_AUTH_ANY
Definition types.h:82
@ LR_AUTH_NEGOTIATE
Definition types.h:72
@ LR_AUTH_DIGEST
Definition types.h:71
@ LR_AUTH_NONE
Definition types.h:69
@ LR_AUTH_NTLM_WB
Definition types.h:75
@ LR_AUTH_ONLY
Definition types.h:76
@ LR_AUTH_DIGEST_IE
Definition types.h:74
@ LR_SUSEREPO
Definition types.h:46
@ LR_DEBREPO
Definition types.h:47
@ LR_YUMREPO
Definition types.h:44
@ LR_PROXY_HTTP
Definition types.h:52
@ LR_PROXY_SOCKS5
Definition types.h:55
@ LR_PROXY_SOCKS5_HOSTNAME
Definition types.h:57
@ LR_PROXY_SOCKS4
Definition types.h:54
@ LR_PROXY_HTTP_1_0
Definition types.h:53
@ LR_PROXY_SOCKS4A
Definition types.h:56
@ LR_CHECK_GPG
Definition types.h:38
@ LR_CHECK_CHECKSUM
Definition types.h:39