Annotation of win32/gnome/gmime-x.x.x/gmime-stream-mmap.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_MMAP_H__
        !            25: #define __GMIME_STREAM_MMAP_H__
        !            26: 
        !            27: #ifdef __cplusplus
        !            28: extern "C" {
        !            29: //#pragma }
        !            30: #endif /* __cplusplus */
        !            31: 
        !            32: #ifdef HAVE_SYS_MMAN_H
        !            33: #include <sys/mman.h>
        !            34: #endif
        !            35: #ifdef HAVE_UNISTD_H
        !            36: #include <unistd.h>
        !            37: #endif
        !            38: #include "gmime-stream.h"
        !            39: 
        !            40: typedef struct _GMimeStreamMmap {
        !            41:        GMimeStream parent;
        !            42:        
        !            43:        gboolean owner;
        !            44:        gboolean eos;
        !            45:        int fd;
        !            46:        
        !            47:        char *map;
        !            48:        size_t maplen;
        !            49: } GMimeStreamMmap;
        !            50: 
        !            51: #define GMIME_STREAM_MMAP_TYPE g_str_hash ("GMimeStreamMmap")
        !            52: #define GMIME_IS_STREAM_MMAP(stream) (((GMimeStream *) stream)->type == GMIME_STREAM_MMAP_TYPE)
        !            53: #define GMIME_STREAM_MMAP(stream) ((GMimeStreamMmap *) stream)
        !            54: 
        !            55: GMimeStream *g_mime_stream_mmap_new (int fd, int prot, int flags);
        !            56: GMimeStream *g_mime_stream_mmap_new_with_bounds (int fd, int prot, int flags, off_t start, off_t end);
        !            57: 
        !            58: #ifdef __cplusplus
        !            59: }
        !            60: #endif /* __cplusplus */
        !            61: 
        !            62: #endif /* __GMIME_STREAM_MMAP_H__ */

E-mail: