/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* camel-stream-buffer.h :stream which buffers another stream */ /* * * Author : * Michael Zucchi * * Copyright 2000 Helix Code Inc. (http://www.helixcode.com) . * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA */ #ifndef CAMEL_STREAM_BUFFER_H #define CAMEL_STREAM_BUFFER_H 1 #ifdef __cplusplus extern "C" { #pragma } #endif /* __cplusplus }*/ #include #include #define CAMEL_STREAM_BUFFER_TYPE (camel_stream_buffer_get_type ()) #define CAMEL_STREAM_BUFFER(obj) (CAMEL_CHECK_CAST((obj), CAMEL_STREAM_BUFFER_TYPE, CamelStreamBuffer)) #define CAMEL_STREAM_BUFFER_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_STREAM_BUFFER_TYPE, CamelStreamBufferClass)) #define CAMEL_IS_STREAM_BUFFER(o) (CAMEL_CHECK_TYPE((o), CAMEL_STREAM_BUFFER_TYPE)) typedef enum { CAMEL_STREAM_BUFFER_BUFFER = 0, CAMEL_STREAM_BUFFER_NEWLINE, CAMEL_STREAM_BUFFER_NONE, CAMEL_STREAM_BUFFER_READ = 0x00, CAMEL_STREAM_BUFFER_WRITE = 0x80, CAMEL_STREAM_BUFFER_MODE = 0x80 } CamelStreamBufferMode; struct _CamelStreamBuffer { CamelStream parent_object; /* these are all of course, private */ CamelStream *stream; unsigned char *buf, *ptr, *end; int size; unsigned char *linebuf; /* for reading lines at a time */ int linesize; CamelStreamBufferMode mode; unsigned int flags; /* internal flags */ }; typedef struct { CamelStreamClass parent_class; /* Virtual methods */ void (*init) (CamelStreamBuffer *stream_buffer, CamelStream *stream, CamelStreamBufferMode mode); void (*init_vbuf) (CamelStreamBuffer *stream_buffer, CamelStream *stream, CamelStreamBufferMode mode, char *buf, guint32 size); } CamelStreamBufferClass; /* Standard Camel function */ CamelType camel_stream_buffer_get_type (void); /* public methods */ CamelStream *camel_stream_buffer_new (CamelStream *s, CamelStreamBufferMode mode); CamelStream *camel_stream_buffer_new_with_vbuf (CamelStream *s, CamelStreamBufferMode mode, char *buf, guint32 size); /* unimplemented CamelStream *camel_stream_buffer_set_vbuf (CamelStreamBuffer *b, CamelStreamBufferMode mode, char *buf, guint32 size); */ /* read a line of characters */ int camel_stream_buffer_gets (CamelStreamBuffer *b, char *buf, unsigned int max); char *camel_stream_buffer_read_line (CamelStreamBuffer *sbf); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* CAMEL_STREAM_BUFFER_H */ n6/files/elliptic-6.5.3 FreeBSD GNOME current development ports (https://github.com/freebsd/freebsd-ports-gnome)
aboutsummaryrefslogtreecommitdiffstats
Commit message (Expand)AuthorAgeFilesLines
* Mark kde4-l10n ports deprecated.tcberner2018-11-242-0/+6
* Update to 6.0.7.jkim2018-11-092-10/+10
* - Update to 6.0.5lwhsu2018-06-272-10/+10
* - Update to 6.0.4lwhsu2018-05-102-10/+10
* - Update to 6.0.3lwhsu2018-04-082-10/+10
* - Update LibreOffice to 6.0.2 [1]lwhsu2018-03-174-16/+10
* Rename KDE4 meta portstcberner2018-02-102-2/+2
* devel/eric6: update to 18.02dbn2018-02-083-11/+0
* lang/eric6: update to 17.12dbn2018-01-171-3/+3
* devel/eric6: update to 17.11.1, add FLAVORSdbn2018-01-111-3/+3
* Update to 20171225sunpoet2017-12-282-5/+4
* Update license of ports using MPL (without version)dbaio2017-11-041-1/+1
* Update to 5.3.7.jkim2017-11-032-10/+10
* evel/eric6: update to 17.10dbn2017-10-271-3/+3
* Fix kde4-l10n packages after sysutils/filelight's updatetcberner2017-09-174-14/+2
* Update to 5.3.6.jkim2017-09-062-10/+10
* Update pt_BR to 2.1.4sunpoet2017-08-183-6/+7
* Update to 20170814sunpoet2017-08-162-5/+5
* Update to 5.3.5.jkim2017-08-042-10/+10
* Update to 5.3.4.jkim2017-06-222-10/+10
* Update the Calligra ports to 3.0.1.rakuco2017-06-179-230/+0
* Update to 20170615sunpoet2017-06-162-4/+4
* Update to 20170529sunpoet2017-06-012-4/+4
* Update to 20170524sunpoet2017-05-292-4/+4
* Update to 5.3.3.jkim2017-05-202-10/+10
* Update to 5.2.7.jkim2017-05-052-10/+10
* Chase ffmpeg 3.3 update (ABI changes)riggs2017-04-254-2/+4
* Rename the magic DISTVERSION into SPELLVERSION for the aspell ports.mat2017-04-122-2/+2
* Update to 5.2.6.jkim2017-03-282-10/+10
* Update to 20170309sunpoet2017-03-112-4/+4
* Update to 20170227sunpoet2017-03-09