aboutsummaryrefslogtreecommitdiff
path: root/libbpkg/manifest.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-05-23 00:36:15 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-05-24 17:56:03 +0300
commitb39e27a9f1ab04cb67ffad1d2c7e7ae089d5e8c4 (patch)
treed79f6d16d451f081af3a7014e3b629a3d85ca3fc /libbpkg/manifest.hxx
parente3c8b1c5273e20a6c20b5ba923cdcea919340950 (diff)
Add package_name class
Diffstat (limited to 'libbpkg/manifest.hxx')
-rw-r--r--libbpkg/manifest.hxx13
1 files changed, 4 insertions, 9 deletions
diff --git a/libbpkg/manifest.hxx b/libbpkg/manifest.hxx
index 97239db..82e580d 100644
--- a/libbpkg/manifest.hxx
+++ b/libbpkg/manifest.hxx
@@ -18,6 +18,8 @@
#include <libbutl/optional.mxx>
#include <libbutl/manifest-forward.hxx>
+#include <libbpkg/package-name.hxx>
+
#include <libbpkg/export.hxx>
#include <libbpkg/version.hxx>
@@ -313,7 +315,7 @@ namespace bpkg
struct dependency
{
- std::string name;
+ package_name name;
butl::optional<dependency_constraint> constraint;
};
@@ -376,13 +378,6 @@ namespace bpkg
comment (std::move (c)) {}
};
- // Check if the package name complies with the specification (see the bpkg
- // manual for details) and throw std::invalid_argument if that's not the
- // case.
- //
- LIBBPKG_EXPORT void
- validate_package_name (const std::string&);
-
class LIBBPKG_EXPORT package_manifest
{
public:
@@ -391,7 +386,7 @@ namespace bpkg
using url_type = bpkg::url;
using email_type = bpkg::email;
- std::string name;
+ package_name name;
version_type version;
butl::optional<priority_type> priority;
std::string summary;