From 5bfe08e96e36a9e0ff3f8a9c497549046f7b8fb4 Mon Sep 17 00:00:00 2001
From: Daniele Kruse <dkruse@cern.ch>
Date: Wed, 20 Jan 2016 18:45:41 +0100
Subject: [PATCH] Added the DRInfo structure and modified the Archive Request

---
 common/ArchiveRequest.hpp | 17 +++++++++++
 common/DRInfo.hpp         | 59 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 76 insertions(+)
 create mode 100644 common/DRInfo.hpp

diff --git a/common/ArchiveRequest.hpp b/common/ArchiveRequest.hpp
index 7504c053bb..d0f28dc3aa 100644
--- a/common/ArchiveRequest.hpp
+++ b/common/ArchiveRequest.hpp
@@ -21,12 +21,19 @@
 #include <stdint.h>
 #include <string>
 
+#include "common/DRInfo.hpp"
+
 namespace cta {
 
 /**
  * Structure to store an archive request.
  */
 struct ArchiveRequest {
+  
+  /**
+   * The EOS src URL.
+   */
+  std::string src_URL;
 
   /**
    * The size of the file to be archived in bytes.
@@ -42,6 +49,16 @@ struct ArchiveRequest {
    * The checksum value.
    */
   std::string checksumValue;
+  
+  /**
+   * The storage class name.
+   */
+  std::string storageClass;
+  
+  /**
+   * The disaster recovery info
+   */
+  cta::DRInfo drInfo;
 
 }; // struct ArchiveRequest
 
diff --git a/common/DRInfo.hpp b/common/DRInfo.hpp
new file mode 100644
index 0000000000..4c74695f38
--- /dev/null
+++ b/common/DRInfo.hpp
@@ -0,0 +1,59 @@
+/*
+ * The CERN Tape Archive (CTA) project
+ * Copyright (C) 2015  CERN
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+#include <stdint.h>
+#include <string>
+
+namespace cta {
+
+/**
+ * Structure to store an archive request.
+ */
+struct DRInfo {
+  
+  /**
+   * The EOS instance.
+   */
+  std::string instance;
+
+  /**
+   * The EOS path.
+   */
+  std::string path;
+
+  /**
+   * The EOS owner.
+   */
+  std::string owner;
+
+  /**
+   * The EOS group.
+   */
+  std::string group;
+  
+  /**
+   * The EOS key-value string containing everything above and more (no parsing by CTA).
+   */
+  std::string blob;
+
+}; // struct DRInfo
+
+} // namespace cta
+
-- 
GitLab