From 2f536ff8fc3a322a11f3de17c90a432bd3007dcb Mon Sep 17 00:00:00 2001 From: Marius Tomaschewski Date: Thu, 16 Feb 2006 10:36:45 +0000 Subject: [PATCH] - Fixed to provide getViewOptions/setViewOptions() - Fixed documentation of asString() --- zypp/Url.cc | 13 +++++++++++++ zypp/Url.h | 32 ++++++++++++++++++++++++-------- 2 files changed, 37 insertions(+), 8 deletions(-) diff --git a/zypp/Url.cc b/zypp/Url.cc index 34445ec..02ea4e5 100644 --- a/zypp/Url.cc +++ b/zypp/Url.cc @@ -724,6 +724,19 @@ namespace zypp m_impl->setQueryParam(param, value); } + // ----------------------------------------------------------------- + ViewOptions + Url::getViewOptions() const + { + return m_impl->getViewOptions(); + } + + // ----------------------------------------------------------------- + void + Url::setViewOptions(const ViewOptions &vopts) + { + m_impl->setViewOptions(vopts); + } // ----------------------------------------------------------------- std::ostream & operator<<( std::ostream & str, const Url & url ) diff --git a/zypp/Url.h b/zypp/Url.h index c698378..9142a50 100644 --- a/zypp/Url.h +++ b/zypp/Url.h @@ -276,14 +276,7 @@ namespace zypp * * To include a password in the resulting Url string, use: * \code - * url.asString(url::ViewOptions() + - * url::ViewOptions::WITH_PASSWORD); - * \endcode - * - * or its equivalent: - * - * \code - * url.asString(url::ViewOptions::DEFAULTS + + * url.asString(url.getViewOptions() + * url::ViewOptions::WITH_PASSWORD); * \endcode * @@ -738,6 +731,29 @@ namespace zypp EEncoding eflag = zypp::url::E_DECODED); + // ----------------- + /** + * Return the view options of the current object. + * + * This method is used to query the view options + * used by the asString() method. + * + * \return The current view option combination. + */ + ViewOptions + getViewOptions() const; + + /** + * Change the view options of the current object. + * + * This method is used to change the view options + * used by the asString() method. + * + * \param vopts New view options combination. + */ + void + setViewOptions(const ViewOptions &vopts); + private: url::UrlRef m_impl; }; -- 2.7.4