Annotation of win32/gnome/gmime-x.x.x/gmime-stream-buffer.h, revision 1.1

1.1     ! paf         1: /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
        !             2: /*
        !             3:  *  Authors: Jeffrey Stedfast <fejj@ximian.com>
        !             4:  *
        !             5:  *  Copyright 2001 Ximian, Inc. (www.ximian.com)
        !             6:  *
        !             7:  *  This program is free software; you can redistribute it and/or modify
        !             8:  *  it under the terms of the GNU General Public License as published by
        !             9:  *  the Free Software Foundation; either version 2 of the License, or
        !            10:  *  (at your option) any later version.
        !            11:  *
        !            12:  *  This program is distributed in the hope that it will be useful,
        !            13:  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
        !            14:  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        !            15:  *  GNU General Public License for more details.
        !            16:  *
        !            17:  *  You should have received a copy of the GNU General Public License
        !            18:  *  along with this program; if not, write to the Free Software
        !            19:  *  Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
        !            20:  *
        !            21:  */
        !            22: 
        !            23: 
        !            24: #ifndef __GMIME_STREAM_BUFFER_H__
        !            25: #define __GMIME_STREAM_BUFFER_H__
        !            26: 
        !            27: #ifdef __cplusplus
        !            28: extern "C" {
        !            29: //#pragma }
        !            30: #endif /* __cplusplus */
        !            31: 
        !            32: #include "gmime-stream.h"
        !            33: 
        !            34: typedef enum {
        !            35:        GMIME_STREAM_BUFFER_CACHE_READ,
        !            36:        GMIME_STREAM_BUFFER_BLOCK_READ,
        !            37:        GMIME_STREAM_BUFFER_BLOCK_WRITE,
        !            38: } GMimeStreamBufferMode;
        !            39: 
        !            40: typedef struct _GMimeStreamBuffer {
        !            41:        GMimeStream parent;
        !            42:        
        !            43:        GMimeStream *source;
        !            44:        
        !            45:        unsigned char *buffer;
        !            46:        unsigned char *bufptr;
        !            47:        unsigned char *bufend;
        !            48:        ssize_t buflen;
        !            49:        
        !            50:        GMimeStreamBufferMode mode;
        !            51: } GMimeStreamBuffer;
        !            52: 
        !            53: #define GMIME_STREAM_BUFFER_TYPE g_str_hash ("GMimeStreamBuffer")
        !            54: #define GMIME_IS_STREAM_BUFFER(stream) (((GMimeStream *) stream)->type == GMIME_STREAM_BUFFER_TYPE)
        !            55: #define GMIME_STREAM_BUFFER(stream) ((GMimeStreamBuffer *) stream)
        !            56: 
        !            57: GMimeStream *g_mime_stream_buffer_new (GMimeStream *source, GMimeStreamBufferMode mode);
        !            58: 
        !            59: 
        !            60: ssize_t g_mime_stream_buffer_gets (GMimeStream *stream, char *buf, size_t max);
        !            61: 
        !            62: void    g_mime_stream_buffer_readln (GMimeStream *stream, GByteArray *buffer);
        !            63: 
        !            64: #ifdef __cplusplus
        !            65: }
        !            66: #endif /* __cplusplus */
        !            67: 
        !            68: #endif /* __GMIME_STREAM_BUFFER_H__ */

E-mail: