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

« back to all changes in this revision

Viewing changes to camel/providers/imapp/camel-imapp-driver.h

  • 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
 
 
2
 
#ifndef _CAMEL_IMAPP_DRIVER_H
3
 
#define _CAMEL_IMAPP_DRIVER_H
4
 
 
5
 
#include <camel/camel-list-utils.h>
6
 
#include <camel/camel-object.h>
7
 
 
8
 
#include "camel-imapp-stream.h"
9
 
 
10
 
#define CAMEL_IMAPP_DRIVER_TYPE     (camel_imapp_driver_get_type ())
11
 
#define CAMEL_IMAPP_DRIVER(obj)     (CAMEL_CHECK_CAST((obj), CAMEL_IMAPP_DRIVER_TYPE, CamelIMAPPDriver))
12
 
#define CAMEL_IMAPP_DRIVER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_IMAPP_DRIVER_TYPE, CamelIMAPPDriverClass))
13
 
#define CAMEL_IS_IMAP_DRIVER(o)    (CAMEL_CHECK_TYPE((o), CAMEL_IMAPP_DRIVER_TYPE))
14
 
 
15
 
G_BEGIN_DECLS
16
 
 
17
 
typedef struct _CamelIMAPPDriver CamelIMAPPDriver;
18
 
typedef struct _CamelIMAPPDriverClass CamelIMAPPDriverClass;
19
 
 
20
 
typedef struct _CamelIMAPPFetch CamelIMAPPFetch;
21
 
 
22
 
typedef gint (*CamelIMAPPDriverFunc)(struct _CamelIMAPPDriver *driver, gpointer data);
23
 
typedef struct _CamelSasl * (*CamelIMAPPSASLFunc)(struct _CamelIMAPPDriver *driver, gpointer data);
24
 
typedef void (*CamelIMAPPLoginFunc)(struct _CamelIMAPPDriver *driver, gchar **login, gchar **pass, gpointer data);
25
 
 
26
 
typedef void (*CamelIMAPPFetchFunc)(struct _CamelIMAPPDriver *driver, CamelIMAPPFetch *);
27
 
 
28
 
struct _CamelIMAPPFetch {
29
 
        struct _CamelIMAPPFetch *next;
30
 
        struct _CamelIMAPPFetch *prev;
31
 
 
32
 
        CamelStream *body;      /* the content fetched */
33
 
 
34
 
        struct _CamelIMAPPFolder *folder;
35
 
        gchar *uid;
36
 
        gchar *section;
37
 
 
38
 
        CamelIMAPPFetchFunc done;
39
 
        gpointer data;
40
 
};
41
 
 
42
 
struct _CamelMimeMessage;
43
 
 
44
 
struct _CamelIMAPPDriver {
45
 
        CamelObject parent_object;
46
 
 
47
 
        struct _CamelIMAPPEngine *engine;
48
 
 
49
 
        struct _CamelIMAPPFolder *folder;
50
 
 
51
 
        /* current folder stuff */
52
 
        GPtrArray *summary;
53
 
        guint32 uidvalidity;
54
 
        guint32 exists;
55
 
        guint32 recent;
56
 
        guint32 unseen;
57
 
        guint32 permanentflags;
58
 
 
59
 
        /* list stuff */
60
 
        GPtrArray *list_result;
61
 
        GSList *list_commands;
62
 
        guint32 list_flags;
63
 
 
64
 
        /* sem_t list_sem; for controlled access to list variables */
65
 
 
66
 
        /* this is so the node is always in a list - easier exception management */
67
 
        CamelDList body_fetch;
68
 
        CamelDList body_fetch_done;
69
 
 
70
 
        /* factory to get an appropriate sasl mech */
71
 
        CamelIMAPPSASLFunc get_sasl;
72
 
        gpointer get_sasl_data;
73
 
 
74
 
        /* callbacks, get login username/pass */
75
 
        CamelIMAPPLoginFunc get_login;
76
 
        gpointer get_login_data;
77
 
};
78
 
 
79
 
struct _CamelIMAPPDriverClass {
80
 
        CamelObjectClass parent_class;
81
 
};
82
 
 
83
 
CamelType       camel_imapp_driver_get_type (void);
84
 
 
85
 
CamelIMAPPDriver *      camel_imapp_driver_new(CamelIMAPPStream *stream);
86
 
 
87
 
void                    camel_imapp_driver_set_sasl_factory(CamelIMAPPDriver *id, CamelIMAPPSASLFunc get_sasl, gpointer sasl_data);
88
 
void                    camel_imapp_driver_set_login_query(CamelIMAPPDriver *id, CamelIMAPPLoginFunc get_login, gpointer login_data);
89
 
 
90
 
void                    camel_imapp_driver_login(CamelIMAPPDriver *id);
91
 
 
92
 
void                    camel_imapp_driver_select(CamelIMAPPDriver *id, struct _CamelIMAPPFolder *folder);
93
 
void                    camel_imapp_driver_update(CamelIMAPPDriver *id, struct _CamelIMAPPFolder *folder);
94
 
void                    camel_imapp_driver_sync(CamelIMAPPDriver *id, gboolean expunge, struct _CamelIMAPPFolder *folder);
95
 
 
96
 
struct _CamelStream *   camel_imapp_driver_fetch(CamelIMAPPDriver *id, struct _CamelIMAPPFolder *folder, const gchar *uid, const gchar *body);
97
 
 
98
 
GPtrArray *             camel_imapp_driver_list(CamelIMAPPDriver *id, const gchar *name, guint32 flags);
99
 
 
100
 
struct _CamelStream *camel_imapp_driver_get(CamelIMAPPDriver *id, struct _CamelIMAPPFolder *folder, const gchar *uid);
101
 
void camel_imapp_driver_append(CamelIMAPPDriver *id, struct _CamelIMAPPFolder *folder, struct _CamelDataWrapper *);
102
 
 
103
 
G_END_DECLS
104
 
 
105
 
#endif