aboutsummaryrefslogtreecommitdiff
path: root/src/mail.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2009-12-21 15:57:21 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2009-12-21 15:57:57 +0200
commit43ba0c3da9ff8913f0286a01a82875fa59601dc0 (patch)
treefac6765cc2fb90ae39f5eb47d2c41abcaf93fb6d /src/mail.c
parent30e1c54062fe7098b9c71601370df1ce27f873d3 (diff)
downloadwydawca-43ba0c3da9ff8913f0286a01a82875fa59601dc0.tar.gz
wydawca-43ba0c3da9ff8913f0286a01a82875fa59601dc0.tar.bz2
Namespace cleanup.
Rename "access method" to "dictionary". All sources affected. * src/method.c: renamed to... * src/dictionary.c: ... this.
Diffstat (limited to 'src/mail.c')
-rw-r--r--src/mail.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/mail.c b/src/mail.c
index 15c2937..98f6c4a 100644
--- a/src/mail.c
+++ b/src/mail.c
@@ -498,7 +498,7 @@ get_uploader_email (struct uploader_info *info, struct file_triplet *trp,
}
mu_address_t
-get_recipient (struct access_method *method, struct file_triplet *trp,
+get_recipient (struct dictionary *dict, struct file_triplet *trp,
const char **errp)
{
unsigned nrows, ncols, i;
@@ -507,32 +507,32 @@ get_recipient (struct access_method *method, struct file_triplet *trp,
int rc;
void *md;
- if (method->type == method_none)
+ if (dict->type == dictionary_none)
{
- *errp = N_("access method is not configured");
+ *errp = N_("dictionary is not configured");
return NULL;
}
- md = method_open (method);
+ md = dictionary_open (dict);
if (!md)
{
- *errp = N_("failed to open access method");
+ *errp = N_("failed to open dictionary");
return NULL;
}
- text = triplet_expand_method_query (method, md, trp);
+ text = triplet_expand_dictionary_query (dict, md, trp);
- rc = method_run (method, md, text);
+ rc = dictionary_lookup (dict, md, text);
free (text);
if (rc)
{
*errp = N_("cannot obtain recipient emails");
- method_close (method, md);
+ dictionary_close (dict, md);
return NULL;
}
- nrows = method_num_rows (method);
- ncols = method_num_cols (method);
+ nrows = dictionary_num_rows (dict);
+ ncols = dictionary_num_cols (dict);
if (nrows == 0)
{
@@ -543,19 +543,19 @@ get_recipient (struct access_method *method, struct file_triplet *trp,
for (i = 0; i < nrows; i++)
{
mu_address_t addr;
- const char *str = method_result (method, md, i, 0);
+ const char *str = dictionary_result (dict, md, i, 0);
if (mu_address_create (&addr, str))
continue;
if (ncols > 0)
{
- str = method_result (method, md, i, 1);
+ str = dictionary_result (dict, md, i, 1);
if (str)
mu_address_set_personal (addr, 1, str);
}
mu_address_union (&rcpt, addr);
mu_address_destroy (&addr);
}
- method_close (method, md);
+ dictionary_close (dict, md);
return rcpt;
}
@@ -583,7 +583,7 @@ do_notify (struct file_triplet *trp, enum notification_event ev,
break;
case notify_owner:
- rcpt = get_recipient (trp->spool->access_method[project_owner_method],
+ rcpt = get_recipient (trp->spool->dictionary[project_owner_dict],
trp, &errp);
}

Return to:

Send suggestions and report system problems to the System administrator.