identt
ProtoForm.hpp
Go to the documentation of this file.
1 
33 #ifndef _IDENTT_QUERY_PROTOFORM_HPP_
34 #define _IDENTT_QUERY_PROTOFORM_HPP_
35 
36 #include <string>
37 #include <google/protobuf/descriptor.h>
38 #include <google/protobuf/message.h>
39 
40 #include <utils/BaseUtils.hpp>
41 #include <unordered_map>
42 
43 #ifndef IDENTT_ERR_INVALID_ARG
44 #define IDENTT_ERR_INVALID_ARG -1
45 #endif
46 
47 #ifndef IDENTT_ERR_INVALID_PB
48 #define IDENTT_ERR_INVALID_PB -2
49 #endif
50 
51 #ifndef IDENTT_ERR_UNKNOWN_FIELD
52 #define IDENTT_ERR_UNKNOWN_FIELD -3
53 #endif
54 
55 #ifndef IDENTT_ERR_INVALID_FORM
56 #define IDENTT_ERR_INVALID_FORM -5
57 #endif
58 
59 namespace identt {
60 namespace query {
61 
71 std::unordered_map<std::string,std::string> urldecode(const std::string& text);
72 
82 std::string urlencode(const std::string& value);
83 
96 void form2pb(const std::string& form, google::protobuf::Message* msg);
97 
98 }
99 }
100 
101 #endif // _IDENTT_QUERY_PROTOFORM_HPP_
std::string urlencode(const std::string &value)
urldecode : plain url-decode
Definition: ProtoForm.cc:101
Definition: CryptoBase.hpp:49
void form2pb(const std::string &form, google::protobuf::Message *msg)
form2pb : Convert url-encoded form to protobuf
Definition: ProtoForm.cc:129
std::unordered_map< std::string, std::string > urldecode(const std::string &text)
urlencode : plain url-encode
Definition: ProtoForm.cc:50