[libsoupmm] Overload URI ctor to add support for URI base
- From: Siavash Safi <siavashs src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [libsoupmm] Overload URI ctor to add support for URI base
- Date: Fri, 30 Oct 2009 13:35:10 +0000 (UTC)
commit a1993505e85d55744a11232de7bba458259a4459
Author: Siavash Safi <siavash siavashs org>
Date: Fri Oct 30 17:00:24 2009 +0330
Overload URI ctor to add support for URI base
* libsoup/src/uri.{hg,ccg}: Overload ctor to add support for creating
a new object using another object as base.
libsoup/src/uri.ccg | 5 +++++
libsoup/src/uri.hg | 3 +++
2 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/libsoup/src/uri.ccg b/libsoup/src/uri.ccg
index e0b6c18..3243d78 100644
--- a/libsoup/src/uri.ccg
+++ b/libsoup/src/uri.ccg
@@ -26,4 +26,9 @@ URI::URI(const std::string& uri_string)
gobject_ = soup_uri_new(uri_string.c_str());
}
+URI::URI(URI& base, const std::string& uri_string)
+{
+ gobject_ = soup_uri_new_with_base(base.gobj(), uri_string.c_str());
+}
+
} // namespace Soup
diff --git a/libsoup/src/uri.hg b/libsoup/src/uri.hg
index 77fb980..ab85d90 100644
--- a/libsoup/src/uri.hg
+++ b/libsoup/src/uri.hg
@@ -29,6 +29,7 @@ class URI
public:
explicit URI(const std::string& uri_string);
+ explicit URI(URI& base, const std::string& uri_string);
_WRAP_METHOD(std::string to_string(bool just_path_and_query=true) const, soup_uri_to_string)
@@ -42,6 +43,8 @@ public:
_WRAP_METHOD(void set_path(const std::string& path), soup_uri_set_path)
_WRAP_METHOD(void set_query(const std::string& query), soup_uri_set_query)
_WRAP_METHOD(void set_fragment(const std::string& fragment), soup_uri_set_fragment)
+
+ _IGNORE(soup_uri_new_with_base)
};
} // namespace Soup
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]