aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbrep/package.cxx8
-rw-r--r--libbrep/package.hxx29
-rw-r--r--libbrep/types.hxx5
-rw-r--r--mod/page.cxx4
-rw-r--r--mod/page.hxx5
5 files changed, 27 insertions, 24 deletions
diff --git a/libbrep/package.cxx b/libbrep/package.cxx
index b985af3..5ec1b69 100644
--- a/libbrep/package.cxx
+++ b/libbrep/package.cxx
@@ -61,10 +61,10 @@ namespace brep
optional<string> ds,
optional<text_type> dt,
string ch,
- optional<url_type> ur,
- optional<url_type> du,
- optional<url_type> su,
- optional<url_type> pu,
+ optional<manifest_url> ur,
+ optional<manifest_url> du,
+ optional<manifest_url> su,
+ optional<manifest_url> pu,
optional<email_type> em,
optional<email_type> pe,
optional<email_type> be,
diff --git a/libbrep/package.hxx b/libbrep/package.hxx
index 59ee589..0ab8413 100644
--- a/libbrep/package.hxx
+++ b/libbrep/package.hxx
@@ -59,14 +59,14 @@ namespace brep
to((?) ? to_string (*(?)) : brep::optional_string ()) \
from((?) ? brep::to_text_type (*(?)) : brep::optional_text_type ())
- // url
+ // manifest_url
//
- using bpkg::url;
+ using bpkg::manifest_url;
- #pragma db value(url) definition
- #pragma db member(url::value) virtual(string) before \
- get(this.string ()) \
- set(this = brep::url ((?), "" /* comment */)) \
+ #pragma db value(manifest_url) definition
+ #pragma db member(manifest_url::value) virtual(string) before \
+ get(this.string ()) \
+ set(this = brep::manifest_url ((?), "" /* comment */)) \
column("")
// email
@@ -356,7 +356,6 @@ namespace brep
using upstream_version_type = brep::upstream_version;
using priority_type = brep::priority;
using license_alternatives_type = brep::license_alternatives;
- using url_type = brep::url;
using email_type = brep::email;
using dependencies_type = brep::dependencies;
using requirements_type = brep::requirements;
@@ -376,10 +375,10 @@ namespace brep
optional<string> description,
optional<text_type> description_type,
string changes,
- optional<url_type>,
- optional<url_type> doc_url,
- optional<url_type> src_url,
- optional<url_type> package_url,
+ optional<manifest_url> url,
+ optional<manifest_url> doc_url,
+ optional<manifest_url> src_url,
+ optional<manifest_url> package_url,
optional<email_type>,
optional<email_type> package_email,
optional<email_type> build_email,
@@ -449,10 +448,10 @@ namespace brep
optional<string> description; // Absent if type is unknown.
optional<text_type> description_type; // Present if description is present.
string changes;
- optional<url_type> url;
- optional<url_type> doc_url;
- optional<url_type> src_url;
- optional<url_type> package_url;
+ optional<manifest_url> url;
+ optional<manifest_url> doc_url;
+ optional<manifest_url> src_url;
+ optional<manifest_url> package_url;
optional<email_type> email;
optional<email_type> package_email;
optional<email_type> build_email;
diff --git a/libbrep/types.hxx b/libbrep/types.hxx
index 9d63b8c..65dfc2d 100644
--- a/libbrep/types.hxx
+++ b/libbrep/types.hxx
@@ -21,6 +21,7 @@
#include <odb/lazy-ptr.hxx>
+#include <libbutl/url.mxx>
#include <libbutl/path.mxx>
#include <libbutl/path-io.mxx>
#include <libbutl/optional.mxx>
@@ -90,6 +91,10 @@ namespace brep
using butl::path_cast;
+ // <libbutl/url.mxx>
+ //
+ using butl::url;
+
// <libbutl/timestamp.mxx>
//
using butl::system_clock;
diff --git a/mod/page.cxx b/mod/page.cxx
index c7dc403..1e317f0 100644
--- a/mod/page.cxx
+++ b/mod/page.cxx
@@ -14,8 +14,6 @@
#include <libstudxml/serializer.hxx>
-#include <libbutl/url.mxx>
-
#include <web/xhtml/fragment.hxx>
#include <web/xhtml/serialization.hxx>
@@ -576,7 +574,7 @@ namespace brep
if (icasecmp (url_.scheme, "https") == 0 ||
icasecmp (url_.scheme, "http") == 0)
{
- butl::url u (url_);
+ url u (url_);
u.scheme.clear ();
s << A(HREF=url_) << u << ~A;
diff --git a/mod/page.hxx b/mod/page.hxx
index 49d8608..cc9840e 100644
--- a/mod/page.hxx
+++ b/mod/page.hxx
@@ -378,13 +378,14 @@ namespace brep
class TR_URL
{
public:
- TR_URL (const url& u, const char* l = "url"): url_ (u), label_ (l) {}
+ TR_URL (const manifest_url& u, const char* l = "url")
+ : url_ (u), label_ (l) {}
void
operator() (xml::serializer&) const;
private:
- const url& url_;
+ const manifest_url& url_;
const char* label_;
};