aboutsummaryrefslogtreecommitdiff
path: root/libbpkg/manifest.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-05-21 17:25:00 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-05-21 18:30:18 +0300
commite3c8b1c5273e20a6c20b5ba923cdcea919340950 (patch)
treeb1ac64796daed928aba3eca6e65165960a1e940b /libbpkg/manifest.hxx
parent716a34125008cb5ad16b32b0032822b7e27d0225 (diff)
Add validate_package_name() function, validate manifest package names
Diffstat (limited to 'libbpkg/manifest.hxx')
-rw-r--r--libbpkg/manifest.hxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/libbpkg/manifest.hxx b/libbpkg/manifest.hxx
index f1e031e..97239db 100644
--- a/libbpkg/manifest.hxx
+++ b/libbpkg/manifest.hxx
@@ -376,6 +376,13 @@ 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: