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

« back to all changes in this revision

Viewing changes to camel/providers/imapx/camel-imapx-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) 2000 Ximian Inc.
 
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 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 General Public
 
16
 * License along with this program; if not, write to the
 
17
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
18
 * Boston, MA 02111-1307, USA.
 
19
 */
 
20
 
 
21
#ifndef _CAMEL_IMAPX_STREAM_H
 
22
#define _CAMEL_IMAPX_STREAM_H
 
23
 
 
24
#include <camel/camel-stream.h>
 
25
 
 
26
#define CAMEL_IMAPX_STREAM(obj)         CAMEL_CHECK_CAST (obj, camel_imapx_stream_get_type (), CamelIMAPXStream)
 
27
#define CAMEL_IMAPX_STREAM_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_imapx_stream_get_type (), CamelIMAPXStreamClass)
 
28
#define CAMEL_IS_IMAPX_STREAM(obj)      CAMEL_CHECK_TYPE (obj, camel_imapx_stream_get_type ())
 
29
 
 
30
typedef struct _CamelIMAPXStreamClass CamelIMAPXStreamClass;
 
31
typedef struct _CamelIMAPXStream CamelIMAPXStream;
 
32
 
 
33
typedef enum {
 
34
        IMAPX_TOK_PROTOCOL = -2,
 
35
        IMAPX_TOK_ERROR = -1,
 
36
        IMAPX_TOK_TOKEN = 256,
 
37
        IMAPX_TOK_STRING,
 
38
        IMAPX_TOK_INT,
 
39
        IMAPX_TOK_LITERAL,
 
40
} camel_imapx_token_t;
 
41
 
 
42
struct _CamelIMAPXStream {
 
43
        CamelStream parent;
 
44
 
 
45
        CamelStream *source;
 
46
 
 
47
        /*int state;*/
 
48
        guchar *buf, *ptr, *end;
 
49
        guint literal;
 
50
 
 
51
        guint unget;
 
52
        camel_imapx_token_t unget_tok;
 
53
        guchar *unget_token;
 
54
        guint unget_len;
 
55
 
 
56
        guchar *tokenbuf, *tokenptr, *tokenend;
 
57
};
 
58
 
 
59
struct _CamelIMAPXStreamClass {
 
60
        CamelStreamClass parent_class;
 
61
};
 
62
 
 
63
CamelType        camel_imapx_stream_get_type    (void);
 
64
 
 
65
CamelStream     *camel_imapx_stream_new         (CamelStream *source);
 
66
 
 
67
gint             camel_imapx_stream_buffered    (CamelIMAPXStream *is);
 
68
 
 
69
camel_imapx_token_t camel_imapx_stream_token    (CamelIMAPXStream *is, guchar **start, guint *len, CamelException *ex); /* throws IO,PARSE exception */
 
70
void             camel_imapx_stream_ungettoken  (CamelIMAPXStream *is, camel_imapx_token_t tok, guchar *token, guint len);
 
71
 
 
72
void             camel_imapx_stream_set_literal (CamelIMAPXStream *is, guint literal);
 
73
gint             camel_imapx_stream_gets                (CamelIMAPXStream *is, guchar **start, guint *len);
 
74
gint             camel_imapx_stream_getl                (CamelIMAPXStream *is, guchar **start, guint *len);
 
75
 
 
76
/* all throw IO,PARSE exceptions */
 
77
 
 
78
/* gets an atom, upper-cases */
 
79
gint             camel_imapx_stream_atom                (CamelIMAPXStream *is, guchar **start, guint *len, CamelException *ex);
 
80
/* gets an atom or string */
 
81
gint             camel_imapx_stream_astring     (CamelIMAPXStream *is, guchar **start, CamelException *ex);
 
82
/* gets a NIL or a string, start==NULL if NIL */
 
83
gint             camel_imapx_stream_nstring     (CamelIMAPXStream *is, guchar **start, CamelException *ex);
 
84
/* gets a NIL or string into a stream, stream==NULL if NIL */
 
85
gint             camel_imapx_stream_nstring_stream(CamelIMAPXStream *is, CamelStream **stream, CamelException *ex);
 
86
/* gets 'text' */
 
87
gint             camel_imapx_stream_text                (CamelIMAPXStream *is, guchar **text, CamelException *ex);
 
88
 
 
89
/* gets a 'number' */
 
90
guint32          camel_imapx_stream_number(CamelIMAPXStream *is, CamelException *ex);
 
91
 
 
92
/* skips the rest of a line, including literals, etc */
 
93
gint camel_imapx_stream_skip(CamelIMAPXStream *is, CamelException *ex);
 
94
 
 
95
#endif /* _CAMEL_IMAPX_STREAM_H */