libzypp  17.14.0
UrlUtils.h File Reference
#include "zypp/url/UrlException.h"
#include <string>
#include <vector>
#include <map>
Include dependency graph for UrlUtils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 zypp
 Easy-to use interface to the ZYPP dependency resolver.
 
 zypp::url
 Url details namespace.
 

Macros

#define URL_SAFE_CHARS   ":/?#[]@!$&'(){}*+,;="
 Characters that are safe for URL without percent-encoding. More...
 

Typedefs

typedef std::vector< std::string > zypp::url::ParamVec
 A parameter vector container. More...
 
typedef std::map< std::string, std::string > zypp::url::ParamMap
 A parameter map container. More...
 

Enumerations

enum  zypp::url::EEncoding { zypp::url::E_ENCODED, zypp::url::E_DECODED }
 Encoding flags. More...
 

Functions

std::string zypp::url::encode (const std::string &str, const std::string &safe="", EEncoding eflag=E_DECODED)
 Encodes a string using URL percent encoding. More...
 
std::string zypp::url::decode (const std::string &str, bool allowNUL=false)
 Decodes a URL percent encoded string. More...
 
std::string zypp::url::encode_octet (const unsigned char c)
 Encode one character. More...
 
int zypp::url::decode_octet (const char *hex)
 Decode one character. More...
 
void zypp::url::split (ParamVec &pvec, const std::string &pstr, const std::string &psep)
 Split into a parameter vector. More...
 
void zypp::url::split (ParamMap &pmap, const std::string &pstr, const std::string &psep, const std::string &vsep, EEncoding eflag=E_ENCODED)
 Split into a parameter map. More...
 
std::string zypp::url::join (const ParamVec &pvec, const std::string &psep)
 Join parameter vector to a string. More...
 
std::string zypp::url::join (const ParamMap &pmap, const std::string &psep, const std::string &vsep, const std::string &safe)
 Join parameter map to a string. More...
 

Macro Definition Documentation

◆ URL_SAFE_CHARS

#define URL_SAFE_CHARS   ":/?#[]@!$&'(){}*+,;="

Characters that are safe for URL without percent-encoding.

Definition at line 22 of file UrlUtils.h.