aboutsummaryrefslogtreecommitdiff
path: root/src/wydawca.h
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2013-03-06 22:33:05 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2013-03-06 22:45:10 +0200
commit826bb71c57d903f760c89406f93d19fe0c131de0 (patch)
treef2fc240d52d9be2d668a6ea8a813ab5de5732647 /src/wydawca.h
parent5b29f3ecc4e2edb172d50b23732a588b7a71ce62 (diff)
downloadwydawca-826bb71c57d903f760c89406f93d19fe0c131de0.tar.gz
wydawca-826bb71c57d903f760c89406f93d19fe0c131de0.tar.bz2
Replace mu_url_t with a custom URL.
Diffstat (limited to 'src/wydawca.h')
-rw-r--r--src/wydawca.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/wydawca.h b/src/wydawca.h
index 8e2f155..b79b7e9 100644
--- a/src/wydawca.h
+++ b/src/wydawca.h
@@ -45,7 +45,6 @@
#include <regex.h>
#include <mailutils/types.h>
-#include <mailutils/url.h>
#include <mailutils/errno.h>
#include "grecs.h"
@@ -205,8 +204,16 @@ struct file_triplet {
/* GID is filled in after the triplet is finalized and verified */
#define TRIPLET_GID(t) ((t)->file[file_directive].sb.st_gid)
+typedef struct wy_url *wy_url_t;
+
+wy_url_t wy_url_create(const char *str);
+void wy_url_free(wy_url_t url);
+const char *wy_url_path(wy_url_t url);
+const char *wy_url_scheme(wy_url_t url);
+const char *wy_url_printable(wy_url_t url);
+
struct virt_tab {
- int (*test_url) (mu_url_t url, grecs_locus_t * loc);
+ int (*test_url) (wy_url_t url, grecs_locus_t * loc);
int (*move_file) (struct file_triplet * trp, enum file_type file_id);
int (*archive_file) (struct file_triplet * trp, const char *file_name);
int (*symlink_file) (struct file_triplet * trp,
@@ -222,7 +229,7 @@ struct spool {
struct grecs_list *aliases;
char *url; /* Download URL */
char *source_dir; /* Source directory */
- mu_url_t dest_url; /* Destination URL */
+ wy_url_t dest_url; /* Destination URL */
const char *dest_dir; /* Directory part of the above */
struct virt_tab vtab; /* Virtual method table */
int inotify_enable;
@@ -509,9 +516,14 @@ int assert_string_arg(grecs_locus_t *, enum grecs_callback_command,
const grecs_value_t *);
grecs_value_t *get_arg(grecs_value_t *value, unsigned n, int type);
+int wy_strtofac(const char *str);
+int wy_strtopri(const char *str);
+const char *wy_pritostr(int pri);
+const char *wy_factostr(int fac);
+
/* vtab.c */
-int url_to_vtab(mu_url_t url, struct virt_tab *vtab);
+int url_to_vtab(wy_url_t url, struct virt_tab *vtab);
int move_file(struct file_triplet *trp, enum file_type file_id);
int archive_file(struct file_triplet *trp, const char *file_name);
@@ -523,7 +535,7 @@ int rmsymlink_file(struct file_triplet *trp, const char *file_name);
char *concat_dir(const char *base, const char *name, size_t * pbaselen);
int copy_file(const char *file, const char *dst_file);
-int dir_test_url(mu_url_t url, grecs_locus_t * locus);
+int dir_test_url(wy_url_t url, grecs_locus_t * locus);
int dir_move_file(struct file_triplet *trp, enum file_type file_id);
int dir_archive_file(struct file_triplet *trp, const char *reldir);
int dir_symlink_file(struct file_triplet *trp,

Return to:

Send suggestions and report system problems to the System administrator.