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

« back to all changes in this revision

Viewing changes to camel/providers/imapp/camel-imapp-stream.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
 
 *  Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
3
 
 *
4
 
 *  Authors: Michael Zucchi <notzed@ximian.com>
5
 
 *
6
 
 * This program is free software; you can redistribute it and/or
7
 
 * modify it under the terms of version 2 of the GNU Lesser General Public
8
 
 * License as published by the Free Software Foundation.
9
 
 *
10
 
 * This program is distributed in the hope that it will be useful,
11
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
 
 * General Public License for more details.
14
 
 *
15
 
 * You should have received a copy of the GNU Lesser General Public
16
 
 * License along with this program; if not, write to the
17
 
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
 
 * Boston, MA 02110-1301, USA.
19
 
 */
20
 
 
21
 
#ifndef _CAMEL_IMAPP_STREAM_H
22
 
#define _CAMEL_IMAPP_STREAM_H
23
 
 
24
 
#include <camel/camel-stream.h>
25
 
 
26
 
#define CAMEL_IMAPP_STREAM(obj)         CAMEL_CHECK_CAST (obj, camel_imapp_stream_get_type (), CamelIMAPPStream)
27
 
#define CAMEL_IMAPP_STREAM_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_imapp_stream_get_type (), CamelIMAPPStreamClass)
28
 
#define CAMEL_IS_IMAP_STREAM(obj)      CAMEL_CHECK_TYPE (obj, camel_imapp_stream_get_type ())
29
 
 
30
 
G_BEGIN_DECLS
31
 
 
32
 
typedef struct _CamelIMAPPStreamClass CamelIMAPPStreamClass;
33
 
typedef struct _CamelIMAPPStream CamelIMAPPStream;
34
 
 
35
 
typedef enum {
36
 
        IMAP_TOK_PROTOCOL = -2,
37
 
        IMAP_TOK_ERROR = -1,
38
 
        IMAP_TOK_TOKEN = 256,
39
 
        IMAP_TOK_STRING,
40
 
        IMAP_TOK_INT,
41
 
        IMAP_TOK_LITERAL,
42
 
} camel_imapp_token_t;
43
 
 
44
 
struct _CamelIMAPPStream {
45
 
        CamelStream parent;
46
 
 
47
 
        CamelStream *source;
48
 
 
49
 
        /*int state;*/
50
 
        guchar *buf, *ptr, *end;
51
 
        guint literal;
52
 
 
53
 
        guint unget;
54
 
        camel_imapp_token_t unget_tok;
55
 
        guchar *unget_token;
56
 
        guint unget_len;
57
 
 
58
 
        guchar *tokenbuf, *tokenptr, *tokenend;
59
 
};
60
 
 
61
 
struct _CamelIMAPPStreamClass {
62
 
        CamelStreamClass parent_class;
63
 
};
64
 
 
65
 
CamelType        camel_imapp_stream_get_type    (void);
66
 
 
67
 
CamelStream     *camel_imapp_stream_new         (CamelStream *source);
68
 
 
69
 
camel_imapp_token_t camel_imapp_stream_token    (CamelIMAPPStream *is, guchar **start, guint *len); /* throws IO,PARSE exception */
70
 
void             camel_imapp_stream_ungettoken  (CamelIMAPPStream *is, camel_imapp_token_t tok, guchar *token, guint len);
71
 
 
72
 
void             camel_imapp_stream_set_literal (CamelIMAPPStream *is, guint literal);
73
 
gint             camel_imapp_stream_gets                (CamelIMAPPStream *is, guchar **start, guint *len);
74
 
gint             camel_imapp_stream_getl                (CamelIMAPPStream *is, guchar **start, guint *len);
75
 
 
76
 
/* all throw IO,PARSE exceptions */
77
 
 
78
 
/* gets an atom, upper-cases */
79
 
gint             camel_imapp_stream_atom                (CamelIMAPPStream *is, guchar **start, guint *len);
80
 
/* gets an atom or string */
81
 
gint             camel_imapp_stream_astring     (CamelIMAPPStream *is, guchar **start);
82
 
/* gets a NIL or a string, start==NULL if NIL */
83
 
gint             camel_imapp_stream_nstring     (CamelIMAPPStream *is, guchar **start);
84
 
/* gets a NIL or string into a stream, stream==NULL if NIL */
85
 
gint             camel_imapp_stream_nstring_stream(CamelIMAPPStream *is, CamelStream **stream);
86
 
/* gets 'text' */
87
 
gint             camel_imapp_stream_text                (CamelIMAPPStream *is, guchar **text);
88
 
 
89
 
/* gets a 'number' */
90
 
guint32          camel_imapp_stream_number(CamelIMAPPStream *is);
91
 
 
92
 
G_END_DECLS
93
 
 
94
 
#endif /* ! _CAMEL_IMAPP_STREAM_H */