diff options
author | NotZed <NotZed@HelixCode.com> | 2000-03-28 06:48:24 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2000-03-28 06:48:24 +0800 |
commit | 767c63615d6229c42ea90503f3888aebf38519ae (patch) | |
tree | e911f4ecce4fd1b9e96451f6f640d90ea192bea0 | |
parent | 3ec585e1b510620a718d672ac682f2b467fe43c2 (diff) | |
download | gsoc2013-evolution-767c63615d6229c42ea90503f3888aebf38519ae.tar gsoc2013-evolution-767c63615d6229c42ea90503f3888aebf38519ae.tar.gz gsoc2013-evolution-767c63615d6229c42ea90503f3888aebf38519ae.tar.bz2 gsoc2013-evolution-767c63615d6229c42ea90503f3888aebf38519ae.tar.lz gsoc2013-evolution-767c63615d6229c42ea90503f3888aebf38519ae.tar.xz gsoc2013-evolution-767c63615d6229c42ea90503f3888aebf38519ae.tar.zst gsoc2013-evolution-767c63615d6229c42ea90503f3888aebf38519ae.zip |
This test is basically now invalid.
2000-03-27 NotZed <NotZed@HelixCode.com>
* tests/test9.c (main): This test is basically now invalid.
* tests/test11.c (main): Fix for async search api. Probably works.
Removed camel-mbox-*.h headers, should be private.
svn path=/trunk/; revision=2200
-rw-r--r-- | ChangeLog | 16 | ||||
-rw-r--r-- | tests/test11.c | 94 | ||||
-rw-r--r-- | tests/test9.c | 4 |
3 files changed, 71 insertions, 43 deletions
@@ -1,5 +1,10 @@ -2000-03-27 Tuomas Kuosmanen <tigert@gimp.org> +2000-03-27 NotZed <NotZed@HelixCode.com> + + * tests/test9.c (main): This test is basically now invalid. + * tests/test11.c (main): Fix for async search api. Probably works. + Removed camel-mbox-*.h headers, should be private. +2000-03-27 Tuomas Kuosmanen <tigert@gimp.org> * art/attachment.xpm art/mail-new.xpm art/mail-read.xpm art/mail-replied.xpm art/mark.xpm art/meeting.xpm art/priority-high.xpm art/priority-low.xpm @@ -64,6 +69,14 @@ * addressbook/backend/ebook/e-book.c: Set the card id properly when retrieving a card. +2000-03-22 NotZed <NotZed@HelixCode.com> + + * e-util/e-sexp.h: Formatting cleanup. + +2000-03-07 NotZed <NotZed@HelixCode.com> + + * e-util/Makefile.am (libeutil_la_SOURCES): s-sexp.h -> e-sexp.h. + * addressbook/backend/ebook/e-card.c, addressbook/backend/ebook/e-card.h: Added the ability to set the card's id (and made getting it work correctly also.) @@ -109,7 +122,6 @@ for name, full name, birthday, telephone, email, and street address properties. - 2000-03-22 Christopher James Lahey <clahey@helixcode.com> * addressbook/backend/ebook/.cvsignore, diff --git a/tests/test11.c b/tests/test11.c index 443f49e788..387c9a6904 100644 --- a/tests/test11.c +++ b/tests/test11.c @@ -6,10 +6,6 @@ #include "camel.h" -#include "camel-mbox-folder.h" -#include "camel-mbox-parser.h" -#include "camel-mbox-utils.h" -#include "camel-mbox-summary.h" #include "camel-log.h" #include "camel-exception.h" #include "camel-folder-summary.h" @@ -31,6 +27,45 @@ auth_callback(char *prompt, gboolean secret, return NULL; } +struct search_data { + CamelFolder *folder; + CamelFolder *outbox; + CamelException *ex; +}; + +static void +search_cb(CamelFolder *folder, int id, gboolean complete, GList *matches, struct search_data *sd) +{ + GList *n; + printf("search found matches:\n"); + n = matches; + while (n) { + CamelMimeMessage *m; + + printf("uid: %s\n", (char *) n->data); + m = camel_folder_get_message_by_uid(sd->folder, n->data, sd->ex); + + if (camel_exception_get_id (sd->ex)) { + printf ("Cannot get message\n" + "Full description : %s\n", camel_exception_get_description (sd->ex)); + } + + camel_folder_append_message(sd->outbox, m, sd->ex); + + if (camel_exception_get_id (sd->ex)) { + printf ("Cannot save message\n" + "Full description : %s\n", camel_exception_get_description (sd->ex)); + } + + n = g_list_next(n); + } + + if (complete) { + camel_folder_close (sd->folder, FALSE, sd->ex); + gtk_exit(0); + } +} + int main (int argc, char**argv) { @@ -43,12 +78,16 @@ main (int argc, char**argv) GList *uid_list; int camel_debug_level = 10; GList *matches; + struct search_data *sd; gtk_init (&argc, &argv); camel_init (); ex = camel_exception_new (); camel_provider_register_as_module ("../camel/providers/mbox/.libs/libcamelmbox.so.0"); - + + sd = g_malloc0(sizeof(*sd)); + sd->ex = ex; + session = camel_session_new (auth_callback); store = camel_session_get_store (session, store_url, ex); if (camel_exception_get_id (ex)) { @@ -83,45 +122,18 @@ main (int argc, char**argv) camel_folder_open (outbox, FOLDER_OPEN_WRITE, ex); - printf("Search for messages\n"); - -#warning "track api change here" - matches = camel_folder_search_by_expression (folder, - "(match-all (header-contains \"subject\" \"gnome\"))", - /* func */ NULL, - /* data */ NULL, - ex); - - if (matches) { - GList *n; - printf("search found matches:\n"); - n = matches; - while (n) { - CamelMimeMessage *m; + sd->folder = folder; + sd->outbox = outbox; - printf("uid: %s\n", (char *) n->data); - m = camel_folder_get_message_by_uid(folder, n->data, ex); - - if (camel_exception_get_id (ex)) { - printf ("Cannot get message\n" - "Full description : %s\n", camel_exception_get_description (ex)); - } - - camel_folder_append_message(outbox, m, ex); - - if (camel_exception_get_id (ex)) { - printf ("Cannot save message\n" - "Full description : %s\n", camel_exception_get_description (ex)); - } + printf("Search for messages\n"); - n = g_list_next(n); - } - - } else { - printf("no matches?\n"); - } + camel_folder_search_by_expression (folder, + "(match-all (header-contains \"subject\" \"gnome\"))", + search_cb, + sd, + ex); - camel_folder_close (folder, FALSE, ex); + gtk_main(); return 0; } diff --git a/tests/test9.c b/tests/test9.c index cb4cd9de61..febf0fed78 100644 --- a/tests/test9.c +++ b/tests/test9.c @@ -47,7 +47,11 @@ main (int argc, char**argv) ex); close (test_file_fd); +#warning This test is no longer valid. +#if 0 + /* needs a folder to work with (indexing) */ camel_mbox_write_xev (argv[1], message_info_array, &mbox_file_size, 1, ex); +#endif if (camel_exception_get_id (ex)) { printf ("Exception caught in camel_mbox_write_xev : %s\n", camel_exception_get_description (ex)); } |