Switch to unified view

a/src/bincimapmime/mime.cc b/src/bincimapmime/mime.cc
...
...
25
 */
25
 */
26
#ifdef HAVE_CONFIG_H
26
#ifdef HAVE_CONFIG_H
27
#include <config.h>
27
#include <config.h>
28
#endif
28
#endif
29
29
30
#include "mime.h"
30
#include <string.h>
31
#include "convert.h"
31
#include <ctype.h>
32
#include <stdio.h>
33
#include <errno.h>
34
32
#include <string>
35
#include <string>
33
#include <vector>
36
#include <vector>
34
#include <map>
37
#include <map>
35
#include <exception>
38
#include <exception>
36
#include <iostream>
39
#include <iostream>
37
38
#include <string.h>
39
#include <ctype.h>
40
#include <stdio.h>
41
#include <errno.h>
42
43
#ifndef NO_NAMESPACES
40
#ifndef NO_NAMESPACES
44
using namespace ::std;
41
using namespace ::std;
45
#endif /* NO_NAMESPACES */
42
#endif /* NO_NAMESPACES */
46
43
44
45
#include "mime.h"
46
#include "convert.h"
47
#include "mime-inputsource.h"
48
47
//------------------------------------------------------------------------
49
//------------------------------------------------------------------------
48
Binc::MimeDocument::MimeDocument(void) : MimePart()
50
Binc::MimeDocument::MimeDocument(void)
49
{
51
{
50
  allIsParsed = false;
52
  allIsParsed = false;
51
  headerIsParsed = false;
53
  headerIsParsed = false;
54
  doc_mimeSource = 0;
52
}
55
}
53
56
54
//------------------------------------------------------------------------
57
//------------------------------------------------------------------------
55
Binc::MimeDocument::~MimeDocument(void)
58
Binc::MimeDocument::~MimeDocument(void)
56
{
59
{
60
  delete doc_mimeSource;
61
  doc_mimeSource = 0;
57
}
62
}
58
63
59
//------------------------------------------------------------------------
64
//------------------------------------------------------------------------
60
void Binc::MimeDocument::clear(void) const
65
void Binc::MimeDocument::clear(void)
61
{
66
{
62
  members.clear();
67
  members.clear();
63
  h.clear();
68
  h.clear();
64
  headerIsParsed = false;
69
  headerIsParsed = false;
65
  allIsParsed = false;
70
  allIsParsed = false;
71
  delete doc_mimeSource;
72
  doc_mimeSource = 0;
66
}
73
}
67
74
68
//------------------------------------------------------------------------
75
//------------------------------------------------------------------------
69
void Binc::MimePart::clear(void) const
76
void Binc::MimePart::clear(void)
70
{
77
{
71
  members.clear();
78
  members.clear();
72
  h.clear();
79
  h.clear();
80
  mimeSource = 0;
73
}
81
}
74
82
75
//------------------------------------------------------------------------
83
//------------------------------------------------------------------------
76
Binc::MimePart::MimePart(void)
84
Binc::MimePart::MimePart(void)
77
{
85
{
...
...
79
  messagerfc822 = false;
87
  messagerfc822 = false;
80
  multipart = false;
88
  multipart = false;
81
89
82
  nlines = 0;
90
  nlines = 0;
83
  nbodylines = 0;
91
  nbodylines = 0;
92
  mimeSource = 0;
84
}
93
}
85
94
86
//------------------------------------------------------------------------
95
//------------------------------------------------------------------------
87
Binc::MimePart::~MimePart(void)
96
Binc::MimePart::~MimePart(void)
88
{
97
{
...
...
145
154
146
  return (dest.size() != 0);
155
  return (dest.size() != 0);
147
}
156
}
148
157
149
//------------------------------------------------------------------------
158
//------------------------------------------------------------------------
150
void Binc::Header::clear(void) const
159
void Binc::Header::clear(void)
151
{
160
{
152
  content.clear();
161
  content.clear();
153
}
162
}
154
163
155
//------------------------------------------------------------------------
164
//------------------------------------------------------------------------