15#include <zypp-core/url/UrlBase.h>
16#include <zypp-core/url/UrlUtils.h>
24 namespace hotfix1050625 {
25 std::string
asString(
const Url & url_r );
30 using filesystem::Pathname;
147 Url(
const std::string &encodedUrl);
168 parseUrl(
const std::string &encodedUrl);
653 setHost(
const std::string &host);
663 setPort(
const std::string &port);
741 setPathParam(
const std::string ¶m,
const std::string &value);
782 setQueryParam(
const std::string ¶m,
const std::string &value);
837 std::ostream &
operator<<( std::ostream &
str,
const Url & url );
842 bool operator<(
const Url &lhs,
const Url &rhs );
847 bool operator==(
const Url &lhs,
const Url &rhs );
850 bool operator!=(
const Url &lhs,
const Url &rhs );
zypp::url::EEncoding EEncoding
Encoding flags.
bool schemeIsPlugin() const
zypp::url::ViewOptions ViewOptions
View options.
std::string getScheme() const
Returns the scheme name of the URL.
std::string asCompleteString() const
Returns a complete string representation of the Url object.
void setViewOptions(const ViewOptions &vopts)
Change the view options of the current object.
void setAuthority(const std::string &authority)
Set the authority component in the URL.
zypp::url::ParamMap getPathParamsMap(EEncoding eflag=zypp::url::E_DECODED) const
Returns a string map with path parameter keys and values.
zypp::url::ParamVec getPathParamsVec() const
Returns a vector with path parameter substrings.
void setQueryString(const std::string &querystr)
Set the query string in the URL.
bool schemeIsRemote() const
std::string getPathParams() const
Returns the path parameters from the URL.
std::string asString() const
Returns a default string representation of the Url object.
std::string getPathData() const
Returns the encoded path component of 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 getAuthority() const
Returns the encoded authority component of the URL.
std::string getUsername(EEncoding eflag=zypp::url::E_DECODED) const
Returns the username from the URL authority.
static bool isRegisteredScheme(const std::string &scheme)
Returns if scheme name is registered.
void setFragment(const std::string &fragment, EEncoding eflag=zypp::url::E_DECODED)
Set the fragment string in the URL.
std::string getPathName(EEncoding eflag=zypp::url::E_DECODED) const
Returns the path name from the URL.
void setQueryStringVec(const zypp::url::ParamVec &qvec)
Set the query parameters.
std::string getQueryParam(const std::string ¶m, EEncoding eflag=zypp::url::E_DECODED) const
Return the value for the specified query parameter.
void setPathName(const std::string &path, EEncoding eflag=zypp::url::E_DECODED)
Set the path name.
void setPathParamsMap(const zypp::url::ParamMap &pmap)
Set the path parameters.
ViewOptions getViewOptions() const
Return the view options of the current object.
bool schemeIsDownloading() const
void setPathData(const std::string &pathdata)
Set the path data component in the URL.
std::string getHost(EEncoding eflag=zypp::url::E_DECODED) const
Returns the hostname or IP from the URL authority.
void setHost(const std::string &host)
Set the hostname or IP in the URL authority.
void setPort(const std::string &port)
Set the port number in the URL authority.
void delQueryParam(const std::string ¶m)
remove the specified query parameter.
void setPathParamsVec(const zypp::url::ParamVec &pvec)
Set the path parameters.
bool isValid() const
Verifies the Url.
std::string getFragment(EEncoding eflag=zypp::url::E_DECODED) const
Returns the encoded fragment component of the URL.
static url::UrlRef parseUrl(const std::string &encodedUrl)
Parse a percent-encoded URL string.
void setPathParam(const std::string ¶m, const std::string &value)
Set or add value for the specified path parameter.
void setPassword(const std::string &pass, EEncoding eflag=zypp::url::E_DECODED)
Set the password in the URL authority.
void setPathParams(const std::string ¶ms)
Set the path parameters.
Url & operator=(const std::string &encodedUrl)
Assigns parsed percent-encoded URL string to the object.
static bool registerScheme(const std::string &scheme, url::UrlRef urlImpl)
Register a scheme-specific implementation.
std::string getQueryString() const
Returns the encoded query string component of the URL.
bool isValidScheme(const std::string &scheme) const
Verifies the specified scheme name.
void setQueryParam(const std::string ¶m, const std::string &value)
Set or add value for the specified query parameter.
static zypp::url::UrlSchemes getRegisteredSchemes()
Returns all registered scheme names.
zypp::url::ParamVec getQueryStringVec() const
Returns a vector with query string parameter substrings.
bool schemeIsLocal() const
void setUsername(const std::string &user, EEncoding eflag=zypp::url::E_DECODED)
Set the username in the URL authority.
zypp::url::UrlSchemes getKnownSchemes() const
Returns scheme names known to this object.
bool hasCredentialsInAuthority() const
Returns true if username and password are encoded in the authority component.
void appendPathName(const Pathname &path_r, EEncoding eflag_r=zypp::url::E_DECODED)
Extend the path name.
void setScheme(const std::string &scheme)
Set the scheme name in the URL.
std::string getPassword(EEncoding eflag=zypp::url::E_DECODED) const
Returns the password from the URL authority.
bool schemeIsVolatile() const
zypp::url::ParamMap getQueryStringMap(EEncoding eflag=zypp::url::E_DECODED) const
Returns a string map with query parameter and their values.
std::string getPort() const
Returns the port from the URL authority.
void setQueryStringMap(const zypp::url::ParamMap &qmap)
Set the query parameters.
String related utilities and Regular expression matching.
std::string asString(TInt val, char zero='0', char one='1')
For printing bits.
std::string asString(const Url &url_r)
RWCOW_pointer< UrlBase > UrlRef
Copy-On-Write Url reference.
std::vector< std::string > UrlSchemes
Vector of URL scheme names.
std::map< std::string, std::string > ParamMap
A parameter map container.
std::vector< std::string > ParamVec
A parameter vector container.
@ E_DECODED
Flag to request decoded string(s).
Easy-to use interface to the ZYPP dependency resolver.
bool operator<(const StrMatcher &lhs, const StrMatcher &rhs)
bool operator==(const SetRelation::Enum &lhs, const SetCompare &rhs)
This is an overloaded member function, provided for convenience. It differs from the above function o...
std::ostream & operator<<(std::ostream &str, const SerialNumber &obj)
bool operator!=(const SetRelation::Enum &lhs, const SetCompare &rhs)
This is an overloaded member function, provided for convenience. It differs from the above function o...
constexpr std::string_view Url("url")
Url::asString() view options.