From ea5ab626990bd02001fe527359efbecd6e5a7dc0 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 16 Apr 2017 10:38:48 +0200 Subject: Add bunch of manifest constructors --- bbot/manifest | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) 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 challenge; + butl::optional result_url; butl::optional task; + task_response_manifest (std::string s, + butl::optional c, + butl::optional u, + butl::optional 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&, -- cgit v1.1