/usr/include/gmime-2.6/gmime/gmime-filter-yenc.h is in libgmime-2.6-dev 2.6.20-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/* GMime
* Copyright (C) 2000-2014 Jeffrey Stedfast
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free
* Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/
#ifndef __GMIME_FILTER_YENC_H__
#define __GMIME_FILTER_YENC_H__
#include <gmime/gmime-filter.h>
G_BEGIN_DECLS
#define GMIME_TYPE_FILTER_YENC (g_mime_filter_yenc_get_type ())
#define GMIME_FILTER_YENC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMIME_TYPE_FILTER_YENC, GMimeFilterYenc))
#define GMIME_FILTER_YENC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMIME_TYPE_FILTER_YENC, GMimeFilterYencClass))
#define GMIME_IS_FILTER_YENC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GMIME_TYPE_FILTER_YENC))
#define GMIME_IS_FILTER_YENC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GMIME_TYPE_FILTER_YENC))
#define GMIME_FILTER_YENC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GMIME_TYPE_FILTER_YENC, GMimeFilterYencClass))
typedef struct _GMimeFilterYenc GMimeFilterYenc;
typedef struct _GMimeFilterYencClass GMimeFilterYencClass;
/**
* GMIME_YDECODE_STATE_INIT:
*
* Initial state for the g_mime_ydecode_step() function.
**/
#define GMIME_YDECODE_STATE_INIT (0)
/**
* GMIME_YENCODE_STATE_INIT:
*
* Initial state for the g_mime_ydecode_step() function.
**/
#define GMIME_YENCODE_STATE_INIT (0)
/* first 8 bits are reserved for saving a byte */
/**
* GMIME_YDECODE_STATE_EOLN:
*
* State bit that denotes the yEnc filter has reached an end-of-line.
*
* This state is for internal use only.
**/
#define GMIME_YDECODE_STATE_EOLN (1 << 8)
/**
* GMIME_YDECODE_STATE_ESCAPE:
*
* State bit that denotes the yEnc filter has reached an escape
* sequence.
*
* This state is for internal use only.
**/
#define GMIME_YDECODE_STATE_ESCAPE (1 << 9)
/* bits 10 and 11 reserved for later uses? */
/**
* GMIME_YDECODE_STATE_BEGIN:
*
* State bit that denotes the yEnc filter has found the =ybegin line.
**/
#define GMIME_YDECODE_STATE_BEGIN (1 << 12)
/**
* GMIME_YDECODE_STATE_PART:
*
* State bit that denotes the yEnc filter has found the =ypart
* line. (Note: not all yencoded blocks have one)
**/
#define GMIME_YDECODE_STATE_PART (1 << 13)
/**
* GMIME_YDECODE_STATE_DECODE:
*
* State bit that denotes yEnc filter has begun decoding the actual
* yencoded content and will continue to do so until an =yend line is
* found (or until there is nothing left to decode).
**/
#define GMIME_YDECODE_STATE_DECODE (1 << 14)
/**
* GMIME_YDECODE_STATE_END:
*
* State bit that denoates that g_mime_ydecode_step() has finished
* decoding.
**/
#define GMIME_YDECODE_STATE_END (1 << 15)
/**
* GMIME_YENCODE_CRC_INIT:
*
* Initial state for the crc and pcrc state variables.
**/
#define GMIME_YENCODE_CRC_INIT (~0)
/**
* GMIME_YENCODE_CRC_FINAL:
* @crc: crc or pcrc state variable
*
* Gets the final crc value from @crc.
**/
#define GMIME_YENCODE_CRC_FINAL(crc) (~crc)
/**
* GMimeFilterYenc:
* @parent_object: parent #GMimeFilter
* @encode: encode vs decode
* @part: part id
* @state: encode/decode state
* @pcrc: part crc
* @crc: full crc
*
* A filter for yEncoding or yDecoding a stream.
**/
struct _GMimeFilterYenc {
GMimeFilter parent_object;
gboolean encode;
int part;
int state;
guint32 pcrc;
guint32 crc;
};
struct _GMimeFilterYencClass {
GMimeFilterClass parent_class;
};
GType g_mime_filter_yenc_get_type (void);
GMimeFilter *g_mime_filter_yenc_new (gboolean encode);
void g_mime_filter_yenc_set_state (GMimeFilterYenc *yenc, int state);
void g_mime_filter_yenc_set_crc (GMimeFilterYenc *yenc, guint32 crc);
/*int g_mime_filter_yenc_get_part (GMimeFilterYenc *yenc);*/
guint32 g_mime_filter_yenc_get_pcrc (GMimeFilterYenc *yenc);
guint32 g_mime_filter_yenc_get_crc (GMimeFilterYenc *yenc);
size_t g_mime_ydecode_step (const unsigned char *inbuf, size_t inlen, unsigned char *outbuf,
int *state, guint32 *pcrc, guint32 *crc);
size_t g_mime_yencode_step (const unsigned char *inbuf, size_t inlen, unsigned char *outbuf,
int *state, guint32 *pcrc, guint32 *crc);
size_t g_mime_yencode_close (const unsigned char *inbuf, size_t inlen, unsigned char *outbuf,
int *state, guint32 *pcrc, guint32 *crc);
G_END_DECLS
#endif /* __GMIME_FILTER_YENC_H__ */
|