identt
Macros | Functions
ProtoForm.hpp File Reference

identt More...

#include <string>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/message.h>
#include <utils/BaseUtils.hpp>
#include <unordered_map>

Go to the source code of this file.

Macros

#define IDENTT_ERR_INVALID_ARG   -1
 
#define IDENTT_ERR_INVALID_PB   -2
 
#define IDENTT_ERR_UNKNOWN_FIELD   -3
 
#define IDENTT_ERR_INVALID_FORM   -5
 

Functions

std::unordered_map< std::string, std::string > identt::query::urldecode (const std::string &text)
 urlencode : plain url-encode More...
 
std::string identt::query::urlencode (const std::string &value)
 urldecode : plain url-decode More...
 
void identt::query::form2pb (const std::string &form, google::protobuf::Message *msg)
 form2pb : Convert url-encoded form to protobuf More...
 

Detailed Description

identt

Author
S Roychowdhury <sroycode at="" gmail="" dot="" com>="">
Version
1.0.0

LICENSE

Copyright (c) 2017 S Roychowdhury.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

DESCRIPTION

ProtoForm.hpp : Headers for Form -> Protobuf implementation

Function Documentation

§ form2pb()

void identt::query::form2pb ( const std::string &  form,
google::protobuf::Message *  msg 
)

form2pb : Convert url-encoded form to protobuf

Parameters
formconst std::string& from encoded string
msggoogle::protobuf::Message* to protobuf
Returns
none

§ urldecode()

std::unordered_map< std::string, std::string > identt::query::urldecode ( const std::string &  text)

urlencode : plain url-encode

urldecode : plain url-decode

Parameters
inputby address const std::string&
Returns
std::unordered_map<std::string,std::string>

§ urlencode()

std::string identt::query::urlencode ( const std::string &  value)

urldecode : plain url-decode

urlencode : plain url-encode

Parameters
valueconst std::string& input by address
Returns
std::string