aboutsummaryrefslogtreecommitdiffstats
path: root/src/common.h
diff options
context:
space:
mode:
authorJason Woodward2008-11-25 05:08:34 +0000
committerJason Woodward2008-11-25 05:08:34 +0000
commit9c93560701f95046335c0a69cac26a81969df01e (patch)
treed04c7f3a66373268cc00982d2e6c40ee83ff8073 /src/common.h
parent8d31622d3a7d3d6dc6fd109756baf56b56a7c799 (diff)
downloadslapt-get-9c93560701f95046335c0a69cac26a81969df01e.tar.gz
* (libslapt) added slapt_write_rc_config (incorporating from gslapt)
* (libslapt) added parsing of disabled sources (instead of ignoring what gslapt creates). * test updates * Added source priority support based on patch submitted by Ken Milmore
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/common.h b/src/common.h
index 27d4a3d..2aa29b3 100644
--- a/src/common.h
+++ b/src/common.h
@@ -26,6 +26,22 @@ typedef enum {
SLAPT_DOWNLOAD_INCOMPLETE
} slapt_code_t;
+typedef enum {
+ SLAPT_PRIORITY_DEFAULT = 0,
+ SLAPT_PRIORITY_DEFAULT_PATCH,
+ SLAPT_PRIORITY_PREFERRED,
+ SLAPT_PRIORITY_PREFERRED_PATCH,
+ SLAPT_PRIORITY_OFFICIAL,
+ SLAPT_PRIORITY_OFFICIAL_PATCH,
+ SLAPT_PRIORITY_CUSTOM,
+ SLAPT_PRIORITY_CUSTOM_PATCH
+} SLAPT_PRIORITY_T;
+
+#define SLAPT_PRIORITY_DEFAULT_TOKEN "DEFAULT"
+#define SLAPT_PRIORITY_PREFERRED_TOKEN "PREFERRED"
+#define SLAPT_PRIORITY_OFFICIAL_TOKEN "OFFICIAL"
+#define SLAPT_PRIORITY_CUSTOM_TOKEN "CUSTOM"
+
typedef struct {
regmatch_t pmatch[SLAPT_MAX_REGEX_PARTS];
regex_t regex;
@@ -54,4 +70,5 @@ __inline void *slapt_calloc(size_t n,size_t s);
/* return human readable error */
const char *slapt_strerror(slapt_code_t code);
-
+/* return human readable priority */
+const char *slapt_priority_to_str(SLAPT_PRIORITY_T priority);