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 std::wstring Hex2Char (wchar_t Char);
44 
45 //---------------------------------------------------------------------------
46 // URL manipulation
47 std::string URL_Encoded_Encode (const std::string& URL);
48 std::wstring URL_Encoded_Encode (const std::wstring& URL);
49 std::string URL_Encoded_Decode (const std::string& URL);
50 std::wstring URL_Encoded_Decode (const std::wstring& URL);
51 
52 //---------------------------------------------------------------------------
53 // Cleanup
54 void TrimLeft (std::string& String, char ToTrim);
55 
56 } //Namespace
57 
58 } //Namespace
59 
60 } //Namespace
61 
62 #endif //ZENLIB_SERVER_HTTP_UTILS