aboutsummaryrefslogtreecommitdiff
path: root/bpkg/pkg-verify
diff options
context:
space:
mode:
Diffstat (limited to 'bpkg/pkg-verify')
-rw-r--r--bpkg/pkg-verify27
1 files changed, 27 insertions, 0 deletions
diff --git a/bpkg/pkg-verify b/bpkg/pkg-verify
new file mode 100644
index 0000000..e002bf3
--- /dev/null
+++ b/bpkg/pkg-verify
@@ -0,0 +1,27 @@
+// file : bpkg/pkg-verify -*- C++ -*-
+// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
+// license : MIT; see accompanying LICENSE file
+
+#ifndef BPKG_PKG_VERIFY
+#define BPKG_PKG_VERIFY
+
+#include <bpkg/manifest>
+
+#include <bpkg/types>
+#include <bpkg/pkg-verify-options>
+
+namespace bpkg
+{
+ void
+ 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 path& archive, bool diag = true);
+}
+
+#endif // BPKG_PKG_VERIFY