ZenLib
Http_Utils.h
Go to the documentation of this file.
1 /* Copyright (c) MediaArea.net SARL. All Rights Reserved.
2  *
3  * Use of this source code is governed by a zlib-style license that can
4  * be found in the License.txt file in the root of the source tree.
5  */
6 
7 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
8 //
9 // HTTP utils
10 //
11 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
12 
13 //---------------------------------------------------------------------------
14 #ifndef ZenLib_Server_Http_UtilsH
15 #define ZenLib_Server_Http_UtilsH
16 //---------------------------------------------------------------------------
17 
18 //---------------------------------------------------------------------------
19 #include <string>
20 #include <ctime>
21 #include <map>
22 #include <vector>
23 //---------------------------------------------------------------------------
24 
25 namespace ZenLib
26 {
27 
28 namespace Format
29 {
30 
31 namespace Http
32 {
33 
34 //***************************************************************************
35 //
36 //***************************************************************************
37 
38 //---------------------------------------------------------------------------
39 // Character manipulation
40 unsigned char Char2Hex (unsigned char Char);
41 wchar_t Char2Hex (wchar_t Char);
42 std::string Hex2Char (unsigned char Char);
43 #ifndef WSTRING_MISSING
44 std::wstring Hex2Char (wchar_t Char);
45 #endif //WSTRING_MISSING
46 
47 //---------------------------------------------------------------------------
48 // URL manipulation
49 std::string URL_Encoded_Encode (const std::string& URL);
50 #ifndef WSTRING_MISSING
51 std::wstring URL_Encoded_Encode (const std::wstring& URL);
52 #endif //WSTRING_MISSING
53 std::string URL_Encoded_Decode (const std::string& URL);
54 #ifndef WSTRING_MISSING
55 std::wstring URL_Encoded_Decode (const std::wstring& URL);
56 #endif //WSTRING_MISSING
57 
58 //---------------------------------------------------------------------------
59 // Cleanup
60 void TrimLeft (std::string& String, char ToTrim);
61 
62 } //Namespace
63 
64 } //Namespace
65 
66 } //Namespace
67 
68 #endif //ZENLIB_SERVER_HTTP_UTILS
std::string URL_Encoded_Encode(const std::string &URL)
std::string URL_Encoded_Decode(const std::string &URL)
std::string Hex2Char(unsigned char Char)
unsigned char Char2Hex(unsigned char Char)
void TrimLeft(std::string &String, char ToTrim)
Definition: BitStream.h:24
char Char
Definition: Conf.h:225