New e-sexp callback function to get a user_tag label value.

2002-05-16  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-filter-search.c (get_label): New e-sexp callback function
	to get a user_tag label value.

svn path=/trunk/; revision=16937
This commit is contained in:
Jeffrey Stedfast
2002-05-16 20:03:57 +00:00
committed by Jeffrey Stedfast
parent 7cd27bf6a4
commit 03c399c656
2 changed files with 18 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2002-05-16 Jeffrey Stedfast <fejj@ximian.com>
* camel-filter-search.c (get_label): New e-sexp callback function
to get a user_tag label value.
2002-05-15 Jeffrey Stedfast <fejj@ximian.com>
* providers/imap/camel-imap-utils.c

View File

@ -94,6 +94,7 @@ static ESExpResult *get_score (struct _ESExp *f, int argc, struct _ESExpResult *
static ESExpResult *get_source (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
static ESExpResult *get_size (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
static ESExpResult *shell_exec (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
static ESExpResult *get_label (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms);
/* builtin functions */
static struct {
@ -123,6 +124,7 @@ static struct {
{ "get-source", (ESExpFunc *) get_source, 0 },
{ "get-size", (ESExpFunc *) get_size, 0 },
{ "shell-exec", (ESExpFunc *) shell_exec, 0 },
{ "get-label", (ESExpFunc *) get_label, 0 },
};
@ -511,6 +513,17 @@ get_size (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageS
return r;
}
static ESExpResult *
get_label (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
{
ESExpResult *r;
r = e_sexp_result_new (f, ESEXP_RES_INT);
r->value.number = atoi (camel_tag_get (&fms->info->user_tags, "label"));
return r;
}
static int
run_command (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessageSearch *fms)
{