aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test4.c
blob: bc9eef71d170da9e8752a65d2e3541ee745bcbfd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */

/* testing mh providers 
   do not use CamelMhFolder and CamelMhStore directly.
   We do it here for test purpose only */



#include "camel-folder.h"
#include "camel-mh-folder.h"
#include "camel-mh-store.h"
#include "camel.h"

int
main (int argc, char**argv)
{
    CamelStore *store;
    CamelFolder *inbox_folder;
    CamelFolder *root_mh_folder;
    GList *mh_subfolders_name;
    CamelMimeMessage *message_1;
    gboolean inbox_exists;

    gtk_init (&argc, &argv);
    camel_init ();

    
    store = gtk_type_new (CAMEL_MH_STORE_TYPE);
    camel_store_init (store, (CamelSession *)NULL, g_strdup ("mh:///root/Mail"));
    
    root_mh_folder = camel_store_get_folder (store, "");
    mh_subfolders_name = camel_folder_list_subfolders (root_mh_folder, NULL);
    
    printf ("\n------------- Listing root Mh folder subfolders --------\n");
    while (mh_subfolders_name) {
        printf ("\t\"%s\"\n", (gchar *)mh_subfolders_name->data);
        mh_subfolders_name = mh_subfolders_name->next;
    }
    printf ("--------------------------------------------------------\n\n");

    inbox_folder = camel_store_get_folder (store, "inbox");
    if (!inbox_folder) {
        printf ("** Error: could not get inbox folder from store\n");
        return 1;
    }
    
    /* test existence */
    inbox_exists = camel_folder_exists (inbox_folder, NULL);
    if (inbox_exists)
        printf ("MH folder inbox exists, continuing tests\n");
    else {
        printf ("MH folder inbox does not exist. Stopping \n");
        return 1;
    }
    
    printf ("\n  Inbox folder contains %d messages\n", camel_folder_get_message_count (inbox_folder, NULL));
    printf ("\n------------- Gettting message numer 3 in inbox --------\n");
    message_1 = camel_folder_get_message (inbox_folder, 3, NULL);
    printf ("--------------------------------------------------------\n\n");


    return 1;

    
}
4/cgit/gsoc2013-evolution/commit/?h=EVOLUTION_2_5_1&id=a5c5a18c0fe19ebbcb888608e148dc4740355678'>Remove old, dead file.JP Rosevear2004-12-151-88/+0 * Add mail/default/zh_CN/MakefileRodney Dawes2004-12-152-0/+5 * Remove this from CVSRodney Dawes2004-12-153-2473/+11 * Updated Simplified Chinese translationFunda Wang2004-12-141-62/+39 * Added Simplified Chinese translationFunda Wang2004-12-142-0/+346 * Added Simplified Chinese dirFunda Wang2004-12-141-1/+1 * Fixes #68759JP Rosevear2004-12-142-1/+8 * Updated Catalan translation.Jordi Mallach2004-12-142-2/+6 * Correct some white space ugliness in the previous commit.Harish Krishnaswamy2004-12-142-0/+6 * +2004-12-10 Vivek Jain <jvivek@novell.com>Jain Vivek2004-12-132-3/+10 * Updated Simplified Chinese translationFunda Wang2004-12-122-273/+149 * Updated Simplified Chinese translationFunda Wang2004-12-121-2473/+2974 * Back out additional change to use shell-errors.xml.inRodney Dawes2004-12-112-1/+5 * Remove e-destination.cRodney Dawes2004-12-112-2/+5 * Use stock_new-window for the New Window menu item in the File menuRodney Dawes2004-12-102-0/+6 * Add pixtype of pixbuf to the OpenNewWindow menu itemRodney Dawes2004-12-102-1/+5 * keep a local copy of the ECal.Rodrigo Moya2004-12-092-3/+23 * Updated Bulgarian translation by Rostislav Raykov <zbrox@i-space.org>Alexander Shopov2004-12-092-8584/+437 * Include <libebook/e-destination.h> from evolution-data-server.Hans Petter Jansson2004-12-091-1/+1 * addressbook/gui/component/addressbook-migrate.cHans Petter Jansson2004-12-0924-1401/+55 * Fix a warning.Harry Lu2004-12-092-2/+8 * some strcasecmp() calls changed with g_ascii_strcasecmp() for TurkishS.Çaglar Onur2004-12-092-2/+10 * Updated Finnish translationIlkka Tuohela2004-12-092-2371/+2680 * Use stock_new-dir instead of stock_folder for "New Folder" creationRodney Dawes2004-12-093-2/+8 * update the query so currently held events can be cleared off.Harish Krishnaswamy2004-12-082-0/+8 * Support for CSV filesPhilip Van Hoof2004-12-082-29/+587 * *** empty log message ***Jain Vivek2004-12-086-0/+1900 * add mnemonic for buttons, labels, etc. add mnemonic for buttons, labels,Mengjie Yu2004-12-084-139/+335 * kill warning if we can't open the path.Not Zed2004-12-082-1/+6 * and put them here instead so they're available even when the mailer isn'tNot Zed2004-12-083-15/+29 * include es-event.h to fix 64 bit platform problems.David Mosberger2004-12-082-0/+5 * include plugin headers to fix 64 bit problems.David Mosberger2004-12-082-0/+6 * include camel-cipher-context.h so we build if nss isn't available.Not Zed2004-12-072-0/+6 * Added label "Show filters for mail:".Diego Sevilla Ruiz2004-12-073-1/+29 * Updated Danish translation.Martin Willemoes Hansen2004-12-072-14/+18 * Fixes #67403Rodrigo Moya2004-12-063-4/+23 * dont track containee widgets anymore, they are automagically destroyed byNot Zed2004-12-062-16/+7 * set the active item based on the current group.Not Zed2004-12-062-2/+12 * set the table spacings to 6 for generated tables.Not Zed2004-12-062-7/+32 * Fixed typoBaris Cicek2004-12-062-1/+5 * Updated Lithuanian translation.Žygimantas Beručka2004-12-042-920/+927 * da.po: quick fixMartin Willemoes Hansen2004-12-041-2/+2 * Updated Danish translation.Martin Willemoes Hansen2004-12-042-585/+681 * Removed mail/mail-account-editor.c Removed mail/mail-config-druid.c TheyMartin Willemoes Hansen2004-12-042-2/+7 * Add groupwise-account-setup to plguin and base plugin list. AddSivaiah Nallagatla2004-12-042-3/+9 * fixed some includes to get it build as pluginSivaiah Nallagatla2004-12-043-3/+6 * initial check in of groupwise config pluginSivaiah Nallagatla2004-12-043-0/+111 * revert the patch from chenthill, this wont work yet.Not Zed2004-12-032-4/+6 * Make evolution mail link to camel-provider not camel only. Removed someNot Zed2004-12-034-51/+23 * remove the old camel_multipart_encrypted api.Not Zed2004-12-033-9/+15 * Moved stuff from e-util to libedataserver.Not Zed2004-12-038-7/+13 * removed, code moved into camel-net-utils.[ch].Not Zed2004-12-0320-5433/+18 * add libeabutil, since we use e-destination.Not Zed2004-12-032-0/+8 * remove camel, add ADDRESSBOOK_LIBS.Not Zed2004-12-037-6/+20 * Moved various things from e-util to libedataserver.Not Zed2004-12-0336-1283/+135 * have our own so we don't need to link with glib.Not Zed2004-12-03