Loading...
Searching...
No Matches
types.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_TYPES_H__
#define __LR_TYPES_H__
#include <glib.h>
G_BEGIN_DECLS
typedef enum {
LR_CHECK_GPG = (1<<0),
LR_CHECK_CHECKSUM = (1<<1),
} LrChecks;
typedef enum {
LR_YUMREPO = (1<<1),
LR_RPMMDREPO = LR_YUMREPO,
LR_SUSEREPO = (1<<2),
LR_DEBREPO = (1<<3),
} LrRepotype;
typedef enum {
LR_PROXY_HTTP,
LR_PROXY_HTTP_1_0,
LR_PROXY_SOCKS4,
LR_PROXY_SOCKS5,
LR_PROXY_SOCKS4A,
LR_PROXY_SOCKS5_HOSTNAME,
} LrProxyType;
typedef enum {
LR_IPRESOLVE_WHATEVER,
LR_IPRESOLVE_V4,
LR_IPRESOLVE_V6,
} LrIpResolveType;
typedef enum {
LR_AUTH_NONE = 0,
LR_AUTH_BASIC = (1<<0),
LR_AUTH_DIGEST = (1<<1),
LR_AUTH_NEGOTIATE = (1<<2),
LR_AUTH_NTLM = (1<<3),
LR_AUTH_DIGEST_IE = (1<<4),
LR_AUTH_NTLM_WB = (1<<5),
LR_AUTH_ONLY = ((int)(1u<<31)),
LR_AUTH_ANY = (~LR_AUTH_DIGEST_IE),
} LrAuth;
/* Some common used arrays for LRO_YUMDLIST */
#define LR_YUM_FULL NULL
#define LR_RPMMD_FULL NULL
#define LR_YUM_REPOMDONLY {NULL}
#define LR_RPMMD_REPOMDONLY {NULL}
#define LR_YUM_BASEXML {"primary", "filelists", "other", NULL}
#define LR_RPMMD_BASEXML {"primary", "filelists", "other", NULL}
#define LR_YUM_BASEDB {"primary_db", "filelists_db", "other_db", NULL}
#define LR_RPMMD_BASEDB {"primary_db", "filelists_db", "other_db", NULL}
#define LR_YUM_HAWKEY {"primary", "filelists", "prestodelta", NULL}
#define LR_RPMMD_HAWKEY {"primary", "filelists", "prestodelta", NULL}
typedef enum LrCbReturnCode_e {
LR_CB_OK = 0,
LR_CB_ABORT,
LR_CB_ERROR,
} LrCbReturnCode;
typedef int (*LrProgressCb)(void *clientp,
double total_to_download,
double now_downloaded);
typedef enum {
LR_TRANSFER_SUCCESSFUL,
LR_TRANSFER_ALREADYEXISTS,
LR_TRANSFER_ALREDYEXISTS = LR_TRANSFER_ALREADYEXISTS, // Deprecated - Backward comp. - remove in future release
LR_TRANSFER_ERROR,
} LrTransferStatus;
typedef int (*LrEndCb)(void *clientp,
LrTransferStatus status,
const char *msg);
typedef int (*LrMirrorFailureCb)(void *clientp,
const char *msg,
const char *url);
typedef int (*LrHandleMirrorFailureCb)(void *clientp,
const char *msg,
const char *url,
const char *metadata);
typedef enum {
LR_FMSTAGE_INIT,
LR_FMSTAGE_CACHELOADING,
LR_FMSTAGE_CACHELOADINGSTATUS,
LR_FMSTAGE_DETECTION,
LR_FMSTAGE_FINISHING,
LR_FMSTAGE_STATUS,
} LrFastestMirrorStages;
typedef void (*LrFastestMirrorCb)(void *clientp,
LrFastestMirrorStages stage,
void *ptr);
G_END_DECLS
#endif
LrTransferStatus
LrTransferStatus
Definition types.h:130
LrEndCb
int(* LrEndCb)(void *clientp, LrTransferStatus status, const char *msg)
Definition types.h:144
LrIpResolveType
LrIpResolveType
Definition types.h:62
LrFastestMirrorCb
void(* LrFastestMirrorCb)(void *clientp, LrFastestMirrorStages stage, void *ptr)
Definition types.h:206
LrMirrorFailureCb
int(* LrMirrorFailureCb)(void *clientp, const char *msg, const char *url)
Definition types.h:154
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
LrFastestMirrorStages
LrFastestMirrorStages
Definition types.h:170
LrCbReturnCode_e
LrCbReturnCode_e
Definition types.h:110
LrAuth
LrAuth
Definition types.h:69
LrRepotype
LrRepotype
Definition types.h:44
LrProxyType
LrProxyType
Definition types.h:52
LrChecks
LrChecks
Definition types.h:38
LR_IPRESOLVE_V4
@ LR_IPRESOLVE_V4
Definition types.h:64
LR_IPRESOLVE_WHATEVER
@ LR_IPRESOLVE_WHATEVER
Definition types.h:63
LR_IPRESOLVE_V6
@ LR_IPRESOLVE_V6
Definition types.h:65
LR_FMSTAGE_CACHELOADING
@ LR_FMSTAGE_CACHELOADING
Definition types.h:175
LR_FMSTAGE_STATUS
@ LR_FMSTAGE_STATUS
Definition types.h:194
LR_FMSTAGE_FINISHING
@ LR_FMSTAGE_FINISHING
Definition types.h:190
LR_FMSTAGE_CACHELOADINGSTATUS
@ LR_FMSTAGE_CACHELOADINGSTATUS
Definition types.h:179
LR_FMSTAGE_INIT
@ LR_FMSTAGE_INIT
Definition types.h:171
LR_FMSTAGE_DETECTION
@ LR_FMSTAGE_DETECTION
Definition types.h:184
LR_CB_ABORT
@ LR_CB_ABORT
Definition types.h:112
LR_CB_ERROR
@ LR_CB_ERROR
Definition types.h:114
LR_CB_OK
@ LR_CB_OK
Definition types.h:111
LR_AUTH_NTLM
@ LR_AUTH_NTLM
Definition types.h:74
LR_AUTH_BASIC
@ LR_AUTH_BASIC
Definition types.h:71
LR_AUTH_ANY
@ LR_AUTH_ANY
Definition types.h:83
LR_AUTH_NEGOTIATE
@ LR_AUTH_NEGOTIATE
Definition types.h:73
LR_AUTH_DIGEST
@ LR_AUTH_DIGEST
Definition types.h:72
LR_AUTH_NONE
@ LR_AUTH_NONE
Definition types.h:70
LR_AUTH_NTLM_WB
@ LR_AUTH_NTLM_WB
Definition types.h:76
LR_AUTH_ONLY
@ LR_AUTH_ONLY
Definition types.h:77
LR_AUTH_DIGEST_IE
@ LR_AUTH_DIGEST_IE
Definition types.h:75
LR_SUSEREPO
@ LR_SUSEREPO
Definition types.h:47
LR_DEBREPO
@ LR_DEBREPO
Definition types.h:48
LR_YUMREPO
@ LR_YUMREPO
Definition types.h:45
LR_PROXY_HTTP
@ LR_PROXY_HTTP
Definition types.h:53
LR_PROXY_SOCKS5
@ LR_PROXY_SOCKS5
Definition types.h:56
LR_PROXY_SOCKS5_HOSTNAME
@ LR_PROXY_SOCKS5_HOSTNAME
Definition types.h:58
LR_PROXY_SOCKS4
@ LR_PROXY_SOCKS4
Definition types.h:55
LR_PROXY_HTTP_1_0
@ LR_PROXY_HTTP_1_0
Definition types.h:54
LR_PROXY_SOCKS4A
@ LR_PROXY_SOCKS4A
Definition types.h:57
LR_CHECK_GPG
@ LR_CHECK_GPG
Definition types.h:39
LR_CHECK_CHECKSUM
@ LR_CHECK_CHECKSUM
Definition types.h:40