summary file



Hello
*I implemented a sample in C to retreive folders and headers of an account based on the folder-lister.c file packaged in libtinymail and example in trac site here are functions i added.
static void
callback1  (TnyFolder *self, gboolean cancelled, TnyList *headers, GError *err, gpointer user_data)
{
    TnyIterator *iter;

    iter = tny_list_create_iterator (headers);
    while (!tny_iterator_is_done (iter))
    {
        TnyHeader *header = TNY_HEADER (tny_iterator_get_current (iter));
        g_print ("%s\n", tny_header_get_priority  (header));
        g_object_unref (header);
        tny_iterator_next (iter);
    }
    g_object_unref (iter);
}

static void
status_callback (GObject *self, TnyStatus *status, gpointer user_data)
{
    return;
}

static void
callback_folder_async (TnyFolderStore *self, gboolean cancelled, TnyList *list, GError *err, gpointer user_data)
{
    TnyIterator *iter = tny_list_create_iterator (list);

    while (!tny_iterator_is_done (iter))
    {
        TnyFolderStore *folder = (TnyFolderStore*) tny_iterator_get_current (iter);
        //TnyList *folders = tny_simple_list_new ();
        g_print ("%s\n", tny_folder_get_name (TNY_FOLDER (folder)));
        TnyList *headers = tny_simple_list_new ();

        g_print ("count %d\n",tny_folder_get_all_count (folder));
   
        tny_folder_get_headers_async (TNY_FOLDER (folder),headers,TRUE,callback1,status_callback ,NULL);
        //tny_folder_store_get_folders_async (folder,
            //folders, NULL, TRUE, callback, NULL, NULL);
        g_object_unref (G_OBJECT (folder));
        tny_iterator_next (iter);
    }

    g_object_unref (iter);
    g_object_unref (list);
g_print("leave %s\n",__FUNCTION__);
}
I got those errors :

(process:14953): camel-lite-CRITICAL **: Unable to mmap file: Failed to map file '/home/user/.mail-app/mail/pop/account2__pop.mail.yahoo.com/summary
.mmap': mmap() failed: Success


(process:14953): camel-lite-WARNING **: Cannot load summary file: `/home/user/.mail-app/mail/pop/account2__pop.mail.yahoo.com/summary.mmap': Success

(process:14953): camel-lite-CRITICAL **: Unable to mmap file: Failed to map file '/home/user/.mail-app/mail/pop/account2__pop.mail.yahoo.com/summary
.mmap': mmap() failed: Success


(process:14953): camel-lite-WARNING **: Cannot load summary file: `/home/user/.mail-app/mail/pop/account2__pop.mail.yahoo.com/summary.mmap': Success

(process:14953): camel-lite-CRITICAL **: Unable to mmap file: Failed to map file '/home/user/.mail-app/mail/pop/account2__pop.mail.yahoo.com/summary
.mmap': mmap() failed: Success


Can someone tell me what summary.mmap is for?
In case it is a cache of headers, would it consume so much memory and would it be volatile? if it is not temporary is it configurable to not cache messages or headers?

* i wanted to connect to my gmail account i have error about greeting. I think this has relation with port configuration and security settings.
is this instruction correct :
tny_account_set_secure_auth_mech (account, "ssl");

* i have another question, are retreived folders created in file system? I saw that every account has a created folder associated to it.

Best regards
M.B.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]