createrepo_c library  0.9.1
C library for metadata manipulation
error.h
1 /* createrepo_c - Library of routines for manipulation with repodata
2  * Copyright (C) 2013 Tomas Mlcoch
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
17  * USA.
18  */
19 
20 #ifndef __C_CREATEREPOLIB_ERROR_H__
21 #define __C_CREATEREPOLIB_ERROR_H__
22 
23 #include <glib.h>
24 
25 /* Error codes */
26 typedef enum {
27  CRE_OK,
29  CRE_ERROR,
31  CRE_IO,
33  CRE_MEMORY,
35  CRE_STAT,
37  CRE_DB,
39  CRE_BADARG,
41  CRE_NOFILE,
43  CRE_NODIR,
45  CRE_EXISTS,
47  CRE_UNKNOWNCHECKSUMTYPE,
49  CRE_UNKNOWNCOMPRESSION,
51  CRE_XMLPARSER,
53  CRE_XMLDATA,
55  CRE_CBINTERRUPTED,
57  CRE_BADXMLPRIMARY,
59  CRE_BADXMLFILELISTS,
61  CRE_BADXMLOTHER,
63  CRE_BADXMLREPOMD,
65  CRE_MAGIC,
67  CRE_GZ,
69  CRE_BZ2,
71  CRE_XZ,
73  CRE_OPENSSL,
75  CRE_CURL,
77  CRE_ASSERT,
81  CRE_BADCMDARG,
83  CRE_SPAWNERRCODE,
85  CRE_SPAWNKILLED,
87  CRE_SPAWNSTOPED,
89  CRE_SPAWNABNORMAL,
91  CRE_DELTARPM,
93  CRE_BADXMLUPDATEINFO,
95  CRE_SIGPROCMASK,
97  CRE_SENTINEL,
99 } cr_Error;
100 
105 const char *cr_strerror(cr_Error rc);
106 
107 /* Error domains */
108 #define CREATEREPO_C_ERROR createrepo_c_error_quark()
109 
110 GQuark createrepo_c_error_quark(void);
111 
112 #endif