aboutsummaryrefslogtreecommitdiffstats
path: root/src/common.h
diff options
context:
space:
mode:
authorJason Woodward2007-06-16 06:41:11 +0000
committerJason Woodward2007-06-16 06:41:11 +0000
commit3faba5e19be6cea47ce315e4ee5aca032eea1090 (patch)
tree6febf3e1591b8067bf6913100d67bde979c2b91b /src/common.h
parent549fdf52b1b021c0f608e0a5285461f4e5f6d782 (diff)
downloadslapt-get-3faba5e19be6cea47ce315e4ee5aca032eea1090.tar.gz
* added GPG signature verification via gpgme (thanks Pat Volkerding for
adding gpgme to -current) * Updated downloading in libslapt for better notification. This also resulted in some simplification in code. Removed unused DEBUG ifdefs. Removed deprecated translation strings. Added error condition strings and slapt_strerror() function. New translation strings. Bumped to 0.9.12.
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/common.h b/src/common.h
index 27afd0e..79b425d 100644
--- a/src/common.h
+++ b/src/common.h
@@ -11,6 +11,21 @@ SLAPT_FALSE = FALSE, SLAPT_TRUE = TRUE
#endif
} SLAPT_BOOL_T;
+typedef enum {
+ SLAPT_OK = 0,
+ SLAPT_MD5_CHECKSUM_MISMATCH,
+ SLAPT_MD5_CHECKSUM_MISSING,
+ #ifdef SLAPT_HAS_GPGME
+ SLAPT_GPG_KEY_IMPORTED,
+ SLAPT_GPG_KEY_NOT_IMPORTED,
+ SLAPT_GPG_KEY_UNCHANGED,
+ SLAPT_CHECKSUMS_VERIFIED,
+ SLAPT_CHECKSUMS_MISSING_KEY,
+ SLAPT_CHECKSUMS_NOT_VERIFIED,
+ #endif
+ SLAPT_DOWNLOAD_INCOMPLETE
+} slapt_code_t;
+
typedef struct {
regmatch_t pmatch[SLAPT_MAX_REGEX_PARTS];
regex_t regex;
@@ -35,3 +50,6 @@ char *slapt_str_replace_chr(const char *string,const char find,
__inline void *slapt_malloc(size_t s);
__inline void *slapt_calloc(size_t n,size_t s);
+/* return human readable error */
+const char *slapt_strerror(slapt_code_t code);
+