12#ifndef ZYPP_URL_URLBASE_H
13#define ZYPP_URL_URLBASE_H
219 opt = o.
opt;
return *
this;
300 UrlBase(
const std::string &scheme,
301 const std::string &authority,
302 const std::string &pathdata,
303 const std::string &querystr,
304 const std::string &fragment);
342 init(
const std::string &scheme,
343 const std::string &authority,
344 const std::string &pathdata,
345 const std::string &querystr,
346 const std::string &fragment);
747 setHost(
const std::string &host);
757 setPort(
const std::string &port);
822 setPathParam(
const std::string ¶m,
const std::string &value);
870 setQueryParam(
const std::string ¶m,
const std::string &value);
970 config(
const std::string &opt)
const;
982 config(
const std::string &opt,
const std::string &val);
Internal data used by UrlBase.
virtual UrlBase * clone() const
Returns pointer to a copy of the current object.
virtual void setQueryString(const std::string &querystr)
Set the query string in the URL.
virtual std::string getQueryString() const
Returns the encoded query string component of the URL.
virtual std::string getPort() const
Returns the port number from the URL authority.
virtual void setScheme(const std::string &scheme)
Set the scheme name in the URL.
virtual void setHost(const std::string &host)
Set the hostname or IP in the URL authority.
virtual zypp::url::ParamMap getPathParamsMap(EEncoding eflag) const
Returns a string map with path parameter keys and values.
virtual zypp::url::ParamVec getPathParamsVec() const
Returns a vector with encoded path parameter substrings.
virtual std::string getUsername(EEncoding eflag) const
Returns the username from the URL authority.
virtual UrlSchemes getKnownSchemes() const
Returns scheme names known by this object.
virtual std::string getAuthority() const
Returns the encoded authority component of the URL.
virtual void setQueryParam(const std::string ¶m, const std::string &value)
Set or add value for the specified query parameter.
std::string config(const std::string &opt) const
Get the value of a UrlBase configuration variable.
virtual void setPathParamsVec(const zypp::url::ParamVec &pvec)
Set the path parameters.
virtual std::string getFragment(EEncoding eflag) const
Returns the encoded fragment component of the URL.
virtual std::string getPathParams() const
Returns the encoded path parameters from the URL.
virtual std::string getPassword(EEncoding eflag) const
Returns the password from the URL authority.
virtual std::string getScheme() const
Returns the scheme name of the URL.
virtual zypp::url::ParamMap getQueryStringMap(EEncoding eflag) const
Returns a string map with query parameter and their values.
virtual void setUsername(const std::string &user, EEncoding eflag)
Set the username in the URL authority.
virtual std::string getPathParam(const std::string ¶m, EEncoding eflag) const
Return the value for the specified path parameter.
virtual void setQueryStringMap(const zypp::url::ParamMap &qmap, EEncoding eflag)
Set the query parameters.
virtual void configure()
Configures behaviour of the instance.
virtual void setPathParamsMap(const zypp::url::ParamMap &pmap)
Set the path parameters.
virtual std::string cleanupPathName(const std::string &path, bool authority) const
Utility method to cleanup an encoded path name.
virtual bool isValidHost(const std::string &host) const
Verifies specified host or IP.
virtual std::string asString() const
Returns a default string representation of the Url object.
void delQueryParams(const std::set< std::string > ¶ms)
virtual bool isKnownScheme(const std::string &scheme) const
Returns if scheme name is known to this object.
virtual std::string getHost(EEncoding eflag) const
Returns the hostname or IP from the URL authority.
virtual void setPathData(const std::string &pathdata)
Set the path data component in the URL.
virtual void setPathName(const std::string &path, EEncoding eflag)
Set the path name.
virtual void setPort(const std::string &port)
Set the port number in the URL authority.
virtual std::string getPathData() const
Returns the encoded path component of the URL.
virtual bool isValid() const
Verifies the Url.
virtual std::string getPathName(EEncoding eflag) const
Returns the path name from the URL.
virtual void setFragment(const std::string &fragment, EEncoding eflag)
Set the fragment string in the URL.
virtual void clear()
Clears all data in the object.
virtual bool isValidScheme(const std::string &scheme) const
Verifies specified scheme name.
virtual zypp::url::ParamVec getQueryStringVec() const
Returns a vector with query string parameter substrings.
virtual std::string getQueryParam(const std::string ¶m, EEncoding eflag) const
Return the value for the specified query parameter.
void setViewOptions(const ViewOptions &vopts)
Change the view options of the current object.
virtual void setQueryStringVec(const zypp::url::ParamVec &qvec)
Set the query parameters.
virtual void delQueryParam(const std::string ¶m)
remove the specified query parameter.
virtual void setPassword(const std::string &pass, EEncoding eflag)
Set the password in the URL authority.
virtual void setPathParam(const std::string ¶m, const std::string &value)
Set or add value for the specified path parameter.
virtual void init(const std::string &scheme, const std::string &authority, const std::string &pathdata, const std::string &querystr, const std::string &fragment)
Initializes current object with new URL components.
virtual void setPathParams(const std::string ¶ms)
Set the path parameters.
std::string asString1050625() const
virtual void setAuthority(const std::string &authority)
Set the authority component in the URL.
ViewOptions getViewOptions() const
Return the view options of the current object.
virtual bool isValidPort(const std::string &port) const
Verifies specified port number.
RWCOW_pointer< UrlBase > UrlRef
Copy-On-Write Url reference.
std::vector< std::string > ParamVec
A parameter vector container.
ViewOption ViewOptions
ViewOptions is just an alias for ViewOption.
std::map< std::string, std::string > ParamMap
A parameter map container.
std::vector< std::string > UrlSchemes
Vector of URL scheme names.
Easy-to use interface to the ZYPP dependency resolver.
RW_pointer supporting 'copy on write' functionality.
Url::asString() view options.
static const ViewOption WITH_SCHEME ZYPP_API
Option to include scheme name in the URL string.
bool has(const ViewOption &o) const
Check if specified option o is set in the current object.
static const ViewOption hotfix1050625
ViewOption()
Create instance with default combination of view options.