aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-04-16 10:38:48 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-04-16 10:38:48 +0200
commitea5ab626990bd02001fe527359efbecd6e5a7dc0 (patch)
tree1dc3937714be84e5e7f497442ae79f4568289a11
parent75b851ff3012f2e6700daf5f9716c536b6ecc887 (diff)
Add bunch of manifest constructors
-rw-r--r--bbot/manifest34
1 files changed, 34 insertions, 0 deletions
diff --git a/bbot/manifest b/bbot/manifest
index 51b0b8b..218282f 100644
--- a/bbot/manifest
+++ b/bbot/manifest
@@ -62,6 +62,13 @@ namespace bbot
machine_header_manifests machines;
+ task_request_manifest (std::string a,
+ std::string f,
+ machine_header_manifests m)
+ : agent (std::move (a)),
+ fingerprint (std::move (f)),
+ machines (std::move (m)) {}
+
public:
task_request_manifest () = default; // VC export.
task_request_manifest (butl::manifest_parser&,
@@ -127,8 +134,18 @@ namespace bbot
// Challenge and task are absent if session is empty.
//
butl::optional<std::string> challenge;
+ butl::optional<std::string> result_url;
butl::optional<task_manifest> task;
+ task_response_manifest (std::string s,
+ butl::optional<std::string> c,
+ butl::optional<std::string> u,
+ butl::optional<task_manifest> t)
+ : session (std::move (s)),
+ challenge (std::move (c)),
+ result_url (std::move (u)),
+ task (std::move (t)) {}
+
public:
task_response_manifest () = default; // VC export.
task_response_manifest (butl::manifest_parser&,
@@ -195,6 +212,16 @@ namespace bbot
//
operation_results results;
+ result_manifest (std::string n,
+ bpkg::version v,
+ result_status s,
+ operation_results r)
+ : name (std::move (n)),
+ version (std::move (v)),
+ status (s),
+ results (std::move (r)) {}
+
+ public:
result_manifest () = default; // VC export.
result_manifest (butl::manifest_parser&, bool ignore_unknown = false);
result_manifest (butl::manifest_parser&,
@@ -213,6 +240,13 @@ namespace bbot
result_manifest result;
+ result_request_manifest (std::string s,
+ std::string c,
+ result_manifest r)
+ : session (std::move (s)),
+ challenge (std::move (c)),
+ result (std::move (r)) {}
+
public:
result_request_manifest () = default; // VC export.
result_request_manifest (butl::manifest_parser&,