~ubuntu-branches/ubuntu/maverick/evolution-data-server/maverick-proposed

« back to all changes in this revision

Viewing changes to camel/providers/imapx/test-imapx.c

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-05-17 17:02:06 UTC
  • mfrom: (1.1.79 upstream) (1.6.12 experimental)
  • Revision ID: james.westby@ubuntu.com-20100517170206-4ufr52vwrhh26yh0
Tags: 2.30.1-1ubuntu1
* Merge from debian experimental. Remaining change:
  (LP: #42199, #229669, #173703, #360344, #508494)
  + debian/control:
    - add Vcs-Bzr tag
    - don't use libgnome
    - Use Breaks instead of Conflicts against evolution 2.25 and earlier.
  + debian/evolution-data-server.install,
    debian/patches/45_libcamel_providers_version.patch:
    - use the upstream versioning, not a Debian-specific one 
  + debian/libedata-book1.2-dev.install, debian/libebackend-1.2-dev.install,
    debian/libcamel1.2-dev.install, debian/libedataserverui1.2-dev.install:
    - install html documentation
  + debian/rules:
    - don't build documentation it's shipped with the tarball

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <glib.h>
 
2
#include "camel-imapx-store.h"
 
3
#include "camel-imapx-folder.h"
 
4
#include <camel/camel.h>
 
5
#include <camel/camel-session.h>
 
6
 
 
7
gint
 
8
main (gint argc, gchar *argv [])
 
9
{
 
10
        CamelSession *session;
 
11
        CamelException *ex;
 
12
        gchar *uri = NULL;
 
13
        CamelService *service;
 
14
        CamelFolder *folder;
 
15
 
 
16
        if (argc != 2) {
 
17
                printf ("Pass the account url argument \n");
 
18
                return -1;
 
19
        }
 
20
 
 
21
        uri = argv [1];
 
22
        g_thread_init (NULL);
 
23
        system ("rm -rf /tmp/test-camel-imapx");
 
24
        camel_init ("/tmp/test-camel-imapx", TRUE);
 
25
        camel_provider_init ();
 
26
        ex = camel_exception_new ();
 
27
 
 
28
        session = CAMEL_SESSION (camel_object_new (CAMEL_SESSION_TYPE));
 
29
        camel_session_construct (session, "/tmp/test-camel-imapx");
 
30
 
 
31
        service = camel_session_get_service (session, uri, CAMEL_PROVIDER_STORE, ex);
 
32
        camel_service_connect (service, ex);
 
33
 
 
34
        camel_store_get_folder_info ((CamelStore *)service, "", 3, NULL);
 
35
        folder = camel_store_get_folder ((CamelStore *)service, "INBOX", 0, NULL);
 
36
        camel_folder_refresh_info (folder, NULL);
 
37
 
 
38
        while (1)
 
39
        {
 
40
        }
 
41
        return 0;
 
42
}