ZenLib
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
ZenLib
Format
Http
Http_Utils.h
Go to the documentation of this file.
1
// ZenLib::Format::Http::Utils - Utils for HTTP handling
2
// Copyright (C) 2008-2011 MediaArea.net SARL, Info@MediaArea.net
3
//
4
// This software is provided 'as-is', without any express or implied
5
// warranty. In no event will the authors be held liable for any damages
6
// arising from the use of this software.
7
//
8
// Permission is granted to anyone to use this software for any purpose,
9
// including commercial applications, and to alter it and redistribute it
10
// freely, subject to the following restrictions:
11
//
12
// 1. The origin of this software must not be misrepresented; you must not
13
// claim that you wrote the original software. If you use this software
14
// in a product, an acknowledgment in the product documentation would be
15
// appreciated but is not required.
16
// 2. Altered source versions must be plainly marked as such, and must not be
17
// misrepresented as being the original software.
18
// 3. This notice may not be removed or altered from any source distribution.
19
//
20
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
21
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
22
//
23
// HTTP utils
24
//
25
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
26
27
//---------------------------------------------------------------------------
28
#ifndef ZenLib_Server_Http_UtilsH
29
#define ZenLib_Server_Http_UtilsH
30
//---------------------------------------------------------------------------
31
32
//---------------------------------------------------------------------------
33
#include <string>
34
#include <ctime>
35
#include <map>
36
#include <vector>
37
//---------------------------------------------------------------------------
38
39
namespace
ZenLib
40
{
41
42
namespace
Format
43
{
44
45
namespace
Http
46
{
47
48
//***************************************************************************
49
//
50
//***************************************************************************
51
52
//---------------------------------------------------------------------------
53
// Character manipulation
54
unsigned
char
Char2Hex
(
unsigned
char
Char
);
55
wchar_t
Char2Hex
(
wchar_t
Char
);
56
std::string
Hex2Char
(
unsigned
char
Char
);
57
std::wstring
Hex2Char
(
wchar_t
Char
);
58
59
//---------------------------------------------------------------------------
60
// URL manipulation
61
std::string
URL_Encoded_Encode
(
const
std::string& URL);
62
std::wstring
URL_Encoded_Encode
(
const
std::wstring& URL);
63
std::string
URL_Encoded_Decode
(
const
std::string& URL);
64
std::wstring
URL_Encoded_Decode
(
const
std::wstring& URL);
65
66
//---------------------------------------------------------------------------
67
// Cleanup
68
void
TrimLeft
(std::string& String,
char
ToTrim);
69
70
}
//Namespace
71
72
}
//Namespace
73
74
}
//Namespace
75
76
#endif //ZENLIB_SERVER_HTTP_UTILS
77
78
79
80
Generated on Sun Oct 21 2012 19:54:34 for ZenLib by
1.8.2