23 namespace filesystem {
26 using filesystem::Pathname;
143 Url(
const std::string &encodedUrl);
164 parseUrl(
const std::string &encodedUrl);
644 setHost(
const std::string &host);
654 setPort(
const std::string &port);
727 setPathParam(
const std::string ¶m,
const std::string &value);
768 setQueryParam(
const std::string ¶m,
const std::string &value);
void setPassword(const std::string &pass, EEncoding eflag=zypp::url::E_DECODED)
Set the password in the URL authority.
std::vector< std::string > ParamVec
A parameter vector container.
std::map< std::string, std::string > ParamMap
A parameter map container.
void setPathParam(const std::string ¶m, const std::string &value)
Set or add value for the specified path parameter.
void setQueryParam(const std::string ¶m, const std::string &value)
Set or add value for the specified query parameter.
std::string getPathData() const
Returns the encoded path component of the URL.
bool operator!=(const CountryCode &lhs, const CountryCode &rhs)
bool schemeIsDownloading() const
std::vector< std::string > UrlSchemes
Vector of URL scheme names.
ViewOptions getViewOptions() const
Return the view options of the current object.
void setViewOptions(const ViewOptions &vopts)
Change the view options of the current object.
static zypp::url::UrlSchemes getRegisteredSchemes()
Returns all registered scheme names.
std::string getPathName(EEncoding eflag=zypp::url::E_DECODED) const
Returns the path name from the URL.
std::string getHost(EEncoding eflag=zypp::url::E_DECODED) const
Returns the hostname or IP from the URL authority.
bool schemeIsVolatile() const
bool schemeIsRemote() const
void setPathParams(const std::string ¶ms)
Set the path parameters.
void setPort(const std::string &port)
Set the port number in the URL authority.
std::string getUsername(EEncoding eflag=zypp::url::E_DECODED) const
Returns the username from the URL authority.
void setUsername(const std::string &user, EEncoding eflag=zypp::url::E_DECODED)
Set the username in the URL authority.
void setHost(const std::string &host)
Set the hostname or IP in the URL authority.
static bool registerScheme(const std::string &scheme, url::UrlRef urlImpl)
Register a scheme-specific implementation.
bool isValid() const
Verifies the Url.
void setQueryStringVec(const zypp::url::ParamVec &qvec)
Set the query parameters.
Url::asString() view options.
void setFragment(const std::string &fragment, EEncoding eflag=zypp::url::E_DECODED)
Set the fragment string in the URL.
void setAuthority(const std::string &authority)
Set the authority component in the URL.
std::string getPathParam(const std::string ¶m, EEncoding eflag=zypp::url::E_DECODED) const
Return the value for the specified path parameter.
std::string asString() const
Returns a default string representation of the Url object.
zypp::url::EEncoding EEncoding
Encoding flags.
void setPathName(const std::string &path, EEncoding eflag=zypp::url::E_DECODED)
Set the path name.
zypp::url::UrlSchemes getKnownSchemes() const
Returns scheme names known to this object.
zypp::url::ParamMap getQueryStringMap(EEncoding eflag=zypp::url::E_DECODED) const
Returns a string map with query parameter and their values.
static bool isRegisteredScheme(const std::string &scheme)
Returns if scheme name is registered.
std::string asCompleteString() const
Returns a complete string representation of the Url object.
std::ostream & operator<<(std::ostream &str, const Exception &obj)
void setScheme(const std::string &scheme)
Set the scheme name in the URL.
zypp::url::ParamVec getQueryStringVec() const
Returns a vector with query string parameter substrings.
static url::UrlRef parseUrl(const std::string &encodedUrl)
Parse a percent-encoded URL string.
bool schemeIsLocal() const
std::string getPathParams() const
Returns the path parameters from the URL.
void setPathData(const std::string &pathdata)
Set the path data component in the URL.
Url & operator=(const std::string &encodedUrl)
Assigns parsed percent-encoded URL string to the object.
std::string getQueryString() const
Returns the encoded query string component of the URL.
std::string getQueryParam(const std::string ¶m, EEncoding eflag=zypp::url::E_DECODED) const
Return the value for the specified query parameter.
zypp::url::ParamMap getPathParamsMap(EEncoding eflag=zypp::url::E_DECODED) const
Returns a string map with path parameter keys and values.
std::string getFragment(EEncoding eflag=zypp::url::E_DECODED) const
Returns the encoded fragment component of the URL.
bool operator==(const StrMatcher &lhs, const StrMatcher &rhs)
zypp::url::ViewOptions ViewOptions
View options.
void setQueryString(const std::string &querystr)
Set the query string in the URL.
std::string getPort() const
Returns the port from the URL authority.
zypp::url::ParamVec getPathParamsVec() const
Returns a vector with path parameter substrings.
std::string getAuthority() const
Returns the encoded authority component of the URL.
std::string getScheme() const
Returns the scheme name of the URL.
bool operator<(const StrMatcher &lhs, const StrMatcher &rhs)
bool isValidScheme(const std::string &scheme) const
Verifies specified scheme name.
void setPathParamsVec(const zypp::url::ParamVec &pvec)
Set the path parameters.
void setPathParamsMap(const zypp::url::ParamMap &pmap)
Set the path parameters.
void setQueryStringMap(const zypp::url::ParamMap &qmap)
Set the query parameters.
std::string getPassword(EEncoding eflag=zypp::url::E_DECODED) const
Returns the password from the URL authority.
bool hasCredentialsInAuthority() const
Returns true if username and password are encoded in the authority component.
void delQueryParam(const std::string ¶m)
remove the specified query parameter.
Flag to request decoded string(s).