Chromium Code Reviews| Index: chrome/browser/net/quoted_printable.h |
| diff --git a/chrome/browser/net/quoted_printable.h b/chrome/browser/net/quoted_printable.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e2ac5b0d2683051835efb2cc644b200d274f9150 |
| --- /dev/null |
| +++ b/chrome/browser/net/quoted_printable.h |
| @@ -0,0 +1,31 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_NET_QUOTED_PRINTABLE_H_ |
| +#define CHROME_BROWSER_NET_QUOTED_PRINTABLE_H_ |
| +#pragma once |
| + |
| +#include <string> |
| + |
| +// Some functions to encode/decode with the quoted-printable encoding. |
| +// See http://tools.ietf.org/html/rfc2045#section-6.7 |
| + |
| +namespace chrome_browser_net { |
|
brettw
2011/02/28 17:33:14
We're trying to standardize on using nested namesp
Jay Civelli
2011/02/28 19:25:53
Done.
|
| + |
| +// Encodes the input string with the quoted-printable encoding. |
| +void QuotedPrintableEncode(const std::string& input, std::string* output); |
| + |
| +// Decodes the quoted-printable input string. Returns true if the input string |
| +// was wellformed quoted-printable, false otherwise, in which case it still |
| +// decodes as much of the message as possible. |
| +bool QuotedPrintableDecode(const std::string& input, std::string* output); |
| + |
| +// Returns 0 if |iter| does not point to an end-of-line, the number of chars |
| +// that constitutes that EOL otherwise (1 for LF, 2 for CR-LF). |
| +// Exposed as it is also used in unit-tests. |
| +int IsEOL(const std::string::const_iterator& iter, const std::string& input); |
|
tfarina
2011/02/28 18:32:44
Is this going to be used by the consumers (i.e is
Jay Civelli
2011/02/28 19:25:53
As the comment mentions, this is also used by the
|
| + |
| +} // namespace chrome_browser_net |
| + |
| +#endif // CHROME_BROWSER_NET_QUOTED_PRINTABLE_H_ |