aboutsummaryrefslogtreecommitdiff
path: root/src/config.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2009-02-22 13:37:20 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2009-02-22 13:37:20 +0200
commitd1ee123b443c2de4fb6e1622068611ab631a1f27 (patch)
tree86f73699689f12ff9d0882723205c595130869a3 /src/config.c
parent5dd37baedfb74ad33fd7b785fe316e40e3b93551 (diff)
downloadwydawca-d1ee123b443c2de4fb6e1622068611ab631a1f27.tar.gz
wydawca-d1ee123b443c2de4fb6e1622068611ab631a1f27.tar.bz2
Rename directory_pair to spool
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c76
1 files changed, 38 insertions, 38 deletions
diff --git a/src/config.c b/src/config.c
index b8c31f7..c4f50b2 100644
--- a/src/config.c
+++ b/src/config.c
@@ -1121,36 +1121,36 @@ cb_destination_url (enum gconf_callback_command cmd,
}
-static struct gconf_keyword directory_kw[] = {
+static struct gconf_keyword spool_kw[] = {
{ "source", N_("dir"), N_("Source directory"),
- gconf_type_string, NULL, offsetof(struct directory_pair, source_dir) },
+ gconf_type_string, NULL, offsetof(struct spool, source_dir) },
{ "destination", N_("dir"), N_("Destination directory"),
- gconf_type_string, NULL, offsetof(struct directory_pair, dest_url),
+ gconf_type_string, NULL, offsetof(struct spool, dest_url),
cb_destination_url },
{ "file-sweep-time", N_("interval"), N_("Define file sweep time"),
- gconf_type_string, NULL, offsetof(struct directory_pair, file_sweep_time),
+ gconf_type_string, NULL, offsetof(struct spool, file_sweep_time),
cb_interval },
{ "access-method", N_("ident"), N_("Define access method"),
- gconf_type_section, NULL, offsetof(struct directory_pair, access_method),
+ gconf_type_section, NULL, offsetof(struct spool, access_method),
cb_access_method, NULL, access_method_kw },
{ "archive", N_("type: string"), N_("Set up archivation"),
- gconf_type_section, NULL, offsetof(struct directory_pair, archive),
+ gconf_type_section, NULL, offsetof(struct spool, archive),
cb_archive, NULL, archive_kw },
{ "notify-event", NULL, N_("Configure notification"),
- gconf_type_section, NULL, offsetof(struct directory_pair, notification),
+ gconf_type_section, NULL, offsetof(struct spool, notification),
cb_notify_event, NULL, notify_event_kw },
{ NULL }
};
static int
-cb_directory (enum gconf_callback_command cmd,
- gconf_locus_t *locus,
- void *varptr,
- gconf_value_t *value,
- void *cb_data)
+cb_spool (enum gconf_callback_command cmd,
+ gconf_locus_t *locus,
+ void *varptr,
+ gconf_value_t *value,
+ void *cb_data)
{
- struct directory_pair *dpair;
+ struct spool *spool;
void **pdata = cb_data;
int rc, ec, i;
const char *ep = NULL;
@@ -1163,50 +1163,50 @@ cb_directory (enum gconf_callback_command cmd,
gconf_error (locus, 0, _("tag must be a string"));
return 1;
}
- dpair = xzalloc (sizeof (*dpair));
- dpair->url = xstrdup (value->v.string);
- dpair->file_sweep_time = file_sweep_time;
- for (i = 0; i < NITEMS (dpair->access_method); i++)
- dpair->access_method[i] = default_access_method[i];
- dpair->archive = default_archive_descr;
- *pdata = dpair;
+ spool = xzalloc (sizeof (*spool));
+ spool->url = xstrdup (value->v.string);
+ spool->file_sweep_time = file_sweep_time;
+ for (i = 0; i < NITEMS (spool->access_method); i++)
+ spool->access_method[i] = default_access_method[i];
+ spool->archive = default_archive_descr;
+ *pdata = spool;
break;
case gconf_callback_section_end:
rc = 0;
- dpair = *pdata;
- if (!dpair->source_dir)
+ spool = *pdata;
+ if (!spool->source_dir)
{
gconf_error (locus, 0, _("source is not given"));
rc = 1;
}
- else if (test_dir (dpair->source_dir, &ec))
+ else if (test_dir (spool->source_dir, &ec))
{
if (ec)
- gconf_error (locus, ec, _("cannot access %s"), dpair->source_dir);
+ gconf_error (locus, ec, _("cannot access %s"), spool->source_dir);
else
gconf_error (locus, 0, _("%s is not a directory"),
- dpair->source_dir);
+ spool->source_dir);
rc = 1;
}
- if (!dpair->dest_url)
+ if (!spool->dest_url)
{
gconf_error (locus, 0, _("destination is not given"));
rc = 1;
}
- else if (url_to_vtab (dpair->dest_url, &dpair->vtab))
+ else if (url_to_vtab (spool->dest_url, &spool->vtab))
{
gconf_error (locus, 0, _("unsupported url: %s"),
- mu_url_to_string (dpair->dest_url));
+ mu_url_to_string (spool->dest_url));
rc = 1;
}
- else if (dpair->vtab.test_url
- && dpair->vtab.test_url (dpair->dest_url, locus))
+ else if (spool->vtab.test_url
+ && spool->vtab.test_url (spool->dest_url, locus))
rc = 1;
for (i = 0; i < access_method_count; i++)
- if (dpair->access_method[i]->type == method_external)
+ if (spool->access_method[i]->type == method_external)
{
gconf_error (locus, 0,
_("Sorry, method type `external' is not yet supported"));
@@ -1216,11 +1216,11 @@ cb_directory (enum gconf_callback_command cmd,
if (rc)
return rc;
- if (!dpair->notification)
- dpair->notification = default_notification;
- mu_url_sget_path (dpair->dest_url, &dpair->dest_dir);
- register_directory_pair (dpair);
- free (dpair);
+ if (!spool->notification)
+ spool->notification = default_notification;
+ mu_url_sget_path (spool->dest_url, &spool->dest_dir);
+ register_spool (spool);
+ free (spool);
*pdata = NULL;
break;
@@ -1280,9 +1280,9 @@ static struct gconf_keyword wydawca_kw[] = {
gconf_type_section, default_access_method, 0,
cb_access_method, NULL, access_method_kw },
- { "directory", NULL, N_("Define distribution directory"),
+ { "spool", NULL, N_("Define distribution spool"),
gconf_type_section, NULL, 0,
- cb_directory, NULL, directory_kw },
+ cb_spool, NULL, spool_kw },
{ NULL }
};

Return to:

Send suggestions and report system problems to the System administrator.