Bincimap 2.0.16
Easy Imapping
Loading...
Searching...
No Matches
mime-printdoc.cc
Go to the documentation of this file.
1
7#include "mime.h"
8#include "mime-utils.h"
9#include "mime-inputsource.h"
10#include "convert.h"
11#include "iodevice.h"
12#include "iofactory.h"
13
14#include <string>
15#include <vector>
16#include <map>
17#include <exception>
18#include <iostream>
19
20#include <string.h>
21#include <ctype.h>
22#include <stdio.h>
23#include <errno.h>
24
25using namespace ::std;
26
27//------------------------------------------------------------------------
29 unsigned int startoffset,
30 unsigned int length) const
31{
32 if (!mimeSource || mimeSource->getFileDescriptor() != fd) {
33 delete mimeSource;
35 }
36
39
40 char c;
41 for (unsigned int i = 0; i < length; ++i) {
42 if (!mimeSource->getChar(&c))
43 break;
44
45 output << (char)c;
46 }
47}
The IODevice class provides a framework for reading and writing to device.
Definition: iodevice.h:31
virtual void reset(void)
int getFileDescriptor(void) const
void seek(unsigned int offset)
unsigned int headerstartoffsetcrlf
Definition: mime.h:57
void printDoc(int fd, Binc::IODevice &output, unsigned int startoffset, unsigned int length) const
Declaration of miscellaneous convertion functions.
Declaration of the IODevice class.
Declaration of the IOFactory class.
The base class of the MIME input source.
Binc::MimeInputSource * mimeSource
Declaration of main mime parser components.