aboutsummaryrefslogtreecommitdiff
path: root/bpkg/pkg-verify.hxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-05-01 13:50:13 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-05-01 15:02:14 +0300
commit2319d01e262b705716e19474865f555f3ca81a7d (patch)
tree15ffb5b3f998a2cc0def729d2f1f76f578d8d139 /bpkg/pkg-verify.hxx
parent5fb0df6f63e02c141e8a0e5ad4543dea525df3fc (diff)
Add hxx extension for headers and lib prefix for library dirs
Diffstat (limited to 'bpkg/pkg-verify.hxx')
-rw-r--r--bpkg/pkg-verify.hxx39
1 files changed, 39 insertions, 0 deletions
diff --git a/bpkg/pkg-verify.hxx b/bpkg/pkg-verify.hxx
new file mode 100644
index 0000000..a96442c
--- /dev/null
+++ b/bpkg/pkg-verify.hxx
@@ -0,0 +1,39 @@
+// file : bpkg/pkg-verify.hxx -*- C++ -*-
+// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
+// license : MIT; see accompanying LICENSE file
+
+#ifndef BPKG_PKG_VERIFY_HXX
+#define BPKG_PKG_VERIFY_HXX
+
+#include <libbpkg/manifest.hxx>
+
+#include <bpkg/types.hxx>
+#include <bpkg/utility.hxx>
+
+#include <bpkg/pkg-verify-options.hxx>
+
+namespace bpkg
+{
+ int
+ pkg_verify (const pkg_verify_options&, cli::scanner& args);
+
+ // Verify archive is a valid package and return its manifest. Throw
+ // failed if invalid or if something goes wrong. If diag is false,
+ // then don't issue diagnostics about the reason why the package is
+ // invalid.
+ //
+ package_manifest
+ pkg_verify (const common_options&,
+ const path& archive,
+ bool ignore_unknown,
+ bool diag = true);
+
+ // Similar to the above but verifies that a source directory is a valid
+ // package. Note that it doesn't enforce the <name>-<version> form for the
+ // directory itself.
+ //
+ package_manifest
+ pkg_verify (const dir_path& source, bool ignore_unknown, bool diag = true);
+}
+
+#endif // BPKG_PKG_VERIFY_HXX