/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8; fill-column: 160 -*- */ /* camel-stream.c : abstract class for a stream */ /* * Author: * Michael Zucchi * * Copyright 1999, 2000 Ximian, Inc. (www.ximian.com) * * This program is free software; you can redistribute it and/or * modify it under the terms of version 2 of the GNU General Public * License as published by the Free Software Foundation. * * 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 */ #ifdef HAVE_CONFIG_H #include #endif #include "camel-stream-null.h" static CamelObjectClass *parent_class = NULL; /* Returns the class for a CamelStream */ #define CS_CLASS(so) CAMEL_STREAM_NULL_CLASS(CAMEL_OBJECT_GET_CLASS(so)) /* dummy implementations, for a NULL stream */ static ssize_t stream_read (CamelStream *stream, char *buffer, size_t n) { return 0; } static ssize_t stream_write (CamelStream *stream, const char *buffer, size_t n) { ((CamelStreamNull *)stream)->written += n; return n; } static int stream_close (CamelStream *stream) { return 0; } static int stream_flush (CamelStream *stream) { return 0; } static gboolean stream_eos (CamelStream *stream) { return TRUE; } static int stream_reset (CamelStream *stream) { ((CamelStreamNull *)stream)->written = 0; return 0; } static void camel_stream_null_class_init (CamelStreamClass *camel_stream_null_class) { CamelStreamClass *camel_stream_class = (CamelStreamClass *)camel_stream_null_class; parent_class = camel_type_get_global_classfuncs( CAMEL_OBJECT_TYPE ); /* virtual method definition */ camel_stream_class->read = stream_read; camel_stream_class->write = stream_write; camel_stream_class->close = stream_close; camel_stream_class->flush = stream_flush; camel_stream_class->eos = stream_eos; camel_stream_class->reset = stream_reset; } CamelType camel_stream_null_get_type (void) { static CamelType camel_stream_null_type = CAMEL_INVALID_TYPE; if (camel_stream_null_type == CAMEL_INVALID_TYPE) { camel_stream_null_type = camel_type_register( camel_stream_get_type(), "CamelStreamNull", sizeof( CamelStreamNull ), sizeof( CamelStreamNullClass ), (CamelObjectClassInitFunc) camel_stream_null_class_init, NULL, NULL, NULL ); } return camel_stream_null_type; } /** * camel_stream_null_new: * * Returns a NULL stream. A null stream is always at eof, and * always returns success for all reads and writes. * * Return value: the stream **/ CamelStream * camel_stream_null_new(void) { return (CamelStream *)camel_object_new(camel_stream_null_get_type ()); } ectron6/files/elliptic-6.5.3'>dependabot/npm_and_yarn/devel/electron6/files/elliptic-6.5.3 FreeBSD GNOME current development ports (https://github.com/freebsd/freebsd-ports-gnome)
aboutsummaryrefslogtreecommitdiffstats
Commit message (Expand)AuthorAgeFilesLines
* Conversion to a single libtool environment.ade2006-02-232-1/+11
* Update to 1.0.4 [1]mnag2005-12-315-51/+40
* Mass-conversion to the USE_AUTOTOOLS New World Order. The code presentade2005-11-151-1/+1
* Add SHA256mnag2005-11-091-0/+1
* Update my emailmnag2005-09-171-1/+1
* Pass maintainership to submitter.novel2005-08-291-1/+1
* At Kris's request, back out the MACHINE_ARCH spelling correction untilobrien2005-04-121-1/+1
* Assist getting more ports working on AMD64 by obeying theobrien2005-04-111-1/+1
* With portmgr hat on, reset maintainership of these ports. Maintainer'slinimon2005-02-141-1/+1
* Apply a big libtool patch to allow porters to use the libtool installed bymarcus2004-07-101-1/+1
* - Update to 1.0.3pav2004-07-094-28/+14
* Add size data.trevor2004-03-181-0/+1
* Whoa there, boy, that's a mighty big commit y'all have there...ade2004-03-141-1/+1
* Bump PORTREVISION on all ports that depend on gettext to aid with upgrading.marcus2004-02-041-1/+1
* - Add memrchr().clement2004-01-192-4/+24
* s/memrchr/memchr/.clement2004-01-181-0/+4
* Update to 1.0.2.marcus2004-01-173-5/+4
* - Update to 1.0.1 (a minor bug fix) [1]sergei2003-11-014-38/+22
* fix build on 5-CURRENT after RFC3542 change (EAI_ADDRFAMILY andume2003-10-301-0/+30
* De-pkg-comment.knu2003-02-212-1/+1
* Fix build with OpenSSL 0.9.7.nectar2003-02-131-0/+21
* * Do not explicitly link against libcmarcus2003-01-204-32/+11
* Add a missing build dependency on Perl.marcus2002-11-181-0/+1
* Maintainer update to version 1.0edwin2002-11-162-10/+5
* Update to 1.0rc1. This includes a minor ABI change as well as improvedmarcus2002-08-253-4/+4
* Update to 0.8.11ade2002-03-133-16/+2
* Update to 0.8.10p1ade2002-02-136-13/+53
* Update to 0.8.9.tobez2002-01-234-34/+14
* Backout previous change - it seems that new revision of the patch doesn'tsobomax2001-12-201-17/+8
* Don't filter libc_r on 5-CURRENT.sobomax2001-12-201-8/+17
* upgrade to 0.8.8ijliao2001-12-132-15/+11
* Update to 0.8.7.tobez2001-11-193-21/+7
* Don't link in libc - FreeBSD doesn't need this.sobomax2001-10-311-4/+14
* Prepare this port to the forthcoming autoconf-2.52.tobez2001-10-311-9/+16
* Fix Null-Pointer Dereference causing SEGVijliao2001-10-202-0/+12
* Update to 0.8.6.tobez2001-10-183-5/+5
* Update mail/libesmtp to 0.8.4.tobez2001-08-164-22/+11
* Remove libtool-based "nit" in build.log to silence complaints abouttobez2001-07-301-1/+3
* - Don't infect user's system with totally useless .la files;sobomax2001-07-207-49/+21
* Remove bogus comment.sobomax2001-07-201-3/+0
* Upgrade mail/libesmtp to 0.8.3.tobez2001-07-158-15/+73
* Updated MAINTAINER to my new committer email address.tobez2001-06-132-2/+2