|
a/src/utils/mimeparse.h |
|
b/src/utils/mimeparse.h |
1 |
#ifndef _MIME_H_INCLUDED_
|
1 |
#ifndef _MIME_H_INCLUDED_
|
2 |
#define _MIME_H_INCLUDED_
|
2 |
#define _MIME_H_INCLUDED_
|
3 |
/* @(#$Id: mimeparse.h,v 1.1 2005-01-26 11:45:55 dockes Exp $ (C) 2004 J.F.Dockes */
|
3 |
/* @(#$Id: mimeparse.h,v 1.2 2005-03-25 09:40:28 dockes Exp $ (C) 2004 J.F.Dockes */
|
4 |
|
4 |
|
5 |
#include <string>
|
5 |
#include <string>
|
6 |
#include <map>
|
6 |
#include <map>
|
7 |
|
7 |
|
8 |
// Simple (no quoting) mime value parser. Input: "value; pn1=pv1; pn2=pv2
|
8 |
// Simple (no quoting) mime value parser. Input: "value; pn1=pv1; pn2=pv2
|
9 |
class MimeHeaderValue {
|
9 |
class MimeHeaderValue {
|
10 |
public:
|
10 |
public:
|
11 |
std::string value;
|
11 |
std::string value;
|
12 |
std::map<std::string, std::string> params;
|
12 |
std::map<std::string, std::string> params;
|
13 |
};
|
13 |
};
|
14 |
extern MimeHeaderValue parseMimeHeaderValue(const std::string &in);
|
14 |
extern bool parseMimeHeaderValue(const std::string& in, MimeHeaderValue& psd);
|
15 |
|
15 |
|
|
|
16 |
bool qp_decode(const std::string& in, std::string &out);
|
|
|
17 |
bool base64_decode(const std::string& in, std::string &out);
|
16 |
|
18 |
|
17 |
#endif /* _MIME_H_INCLUDED_ */
|
19 |
#endif /* _MIME_H_INCLUDED_ */
|