wibble
1.1
Main Page
Namespaces
Classes
Files
File List
File Members
wibble
net
mime.h
Go to the documentation of this file.
1
#ifndef WIBBLE_NET_MIME_H
2
#define WIBBLE_NET_MIME_H
3
4
/*
5
* net/mime - MIME utilities
6
*
7
* Copyright (C) 2010 Enrico Zini <enrico@enricozini.org>
8
*
9
* This library is free software; you can redistribute it and/or
10
* modify it under the terms of the GNU Lesser General Public
11
* License as published by the Free Software Foundation; either
12
* version 2.1 of the License, or (at your option) any later version.
13
*
14
* This library is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
* Lesser General Public License for more details.
18
*
19
* You should have received a copy of the GNU Lesser General Public
20
* License along with this library; if not, write to the Free Software
21
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22
*/
23
24
#include <string>
25
#include <map>
26
#include <
wibble/regexp.h
>
27
#include <iosfwd>
28
29
namespace
wibble {
30
namespace
net {
31
namespace
mime {
32
33
struct
Reader
34
{
35
wibble::ERegexp
header_splitter
;
36
37
Reader
();
38
51
bool
read_line
(
int
sock, std::string& res);
52
59
bool
read_headers
(
int
sock, std::map<std::string, std::string>& headers);
60
69
bool
read_until_boundary
(
int
sock,
const
std::string& boundary, std::ostream& out,
size_t
max=0);
70
77
bool
discard_until_boundary
(
int
sock,
const
std::string& boundary);
78
84
bool
readboundarytail
(
int
sock);
85
};
86
87
}
88
}
89
}
90
91
// vim:set ts=4 sw=4:
92
#endif
Generated on Wed Oct 23 2013 17:14:25 for wibble by
1.8.4