Librepo library  1.7.13
C library for downloading linux repository metadata and packages
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules
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, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #ifndef __LR_TYPES_H__
22 #define __LR_TYPES_H__
23 
24 #include <glib.h>
25 
26 G_BEGIN_DECLS
27 
38 typedef enum {
39  LR_CHECK_GPG = (1<<0),
40  LR_CHECK_CHECKSUM = (1<<1),
41 } LrChecks;
42 
44 typedef enum {
45  LR_YUMREPO = (1<<1),
46  LR_SUSEREPO = (1<<2),
47  LR_DEBREPO = (1<<3),
48 } LrRepotype;
49 
51 typedef enum {
58 } LrProxyType;
59 
61 typedef enum {
66 
67 /* Some common used arrays for LRO_YUMDLIST */
68 
70 #define LR_YUM_FULL NULL
71 
73 #define LR_YUM_REPOMDONLY {NULL}
74 
76 #define LR_YUM_BASEXML {"primary", "filelists", "other", NULL}
77 
79 #define LR_YUM_BASEDB {"primary_db", "filelists_db", "other_db", NULL}
80 
84 #define LR_YUM_HAWKEY {"primary", "filelists", "prestodelta", NULL}
85 
86 typedef enum LrCbReturnCode_e {
87  LR_CB_OK = 0,
93 } LrCbReturnCode;
94 
101 typedef int (*LrProgressCb)(void *clientp,
102  double total_to_download,
103  double now_downloaded);
104 
106 typedef enum {
107  LR_TRANSFER_SUCCESSFUL,
108  LR_TRANSFER_ALREDYEXISTS,
109  LR_TRANSFER_ERROR,
111 
119 typedef int (*LrEndCb)(void *clientp,
120  LrTransferStatus status,
121  const char *msg);
122 
129 typedef int (*LrMirrorFailureCb)(void *clientp,
130  const char *msg,
131  const char *url);
132 
140 typedef int (*LrHandleMirrorFailureCb)(void *clientp,
141  const char *msg,
142  const char *url,
143  const char *metadata);
144 
145 typedef enum {
175 
181 typedef void (*LrFastestMirrorCb)(void *clientp,
182  LrFastestMirrorStages stage,
183  void *ptr);
184 
187 G_END_DECLS
188 
189 #endif
void(* LrFastestMirrorCb)(void *clientp, LrFastestMirrorStages stage, void *ptr)
Definition: types.h:181
LrRepotype
Definition: types.h:44
LrChecks
Definition: types.h:38
LrIpResolveType
Definition: types.h:61
LrProxyType
Definition: types.h:51
LrTransferStatus
Definition: types.h:106
Definition: types.h:87
int(* LrEndCb)(void *clientp, LrTransferStatus status, const char *msg)
Definition: types.h:119
int(* LrProgressCb)(void *clientp, double total_to_download, double now_downloaded)
Definition: types.h:101
LrFastestMirrorStages
Definition: types.h:145
LrCbReturnCode_e
Definition: types.h:86
int(* LrMirrorFailureCb)(void *clientp, const char *msg, const char *url)
Definition: types.h:129
int(* LrHandleMirrorFailureCb)(void *clientp, const char *msg, const char *url, const char *metadata)
Definition: types.h:140