From a10dd60b04acf9f482ec3aecf7be0c8b8c0c03bd Mon Sep 17 00:00:00 2001
From: whh8b <whh8b@git.zephyr-software.com>
Date: Sat, 30 Jan 2016 05:37:08 +0000
Subject: [PATCH] Add DollopManager_t to the public SDK API.

---
 .gitattributes       |  1 +
 include/dollop_man.h | 63 ++++++++++++++++++++++++++++++++++++++++++++
 include/zipr.h       |  2 ++
 include/zipr_sdk.h   |  1 +
 4 files changed, 67 insertions(+)
 create mode 100644 include/dollop_man.h

diff --git a/.gitattributes b/.gitattributes
index 45b1e8f..cba7581 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -2,6 +2,7 @@
 /README -text
 /SDK_VERSION -text
 include/dollop.h -text
+include/dollop_man.h -text
 include/memory_space.h -text
 include/range.h -text
 include/zipr.h -text
diff --git a/include/dollop_man.h b/include/dollop_man.h
new file mode 100644
index 0000000..bdd55b5
--- /dev/null
+++ b/include/dollop_man.h
@@ -0,0 +1,63 @@
+/***************************************************************************
+ * Copyright (c)  2014  Zephyr Software LLC. All rights reserved.
+ *
+ * This software is furnished under a license and/or other restrictive
+ * terms and may be used and copied only in accordance with such terms
+ * and the inclusion of the above copyright notice. This software or
+ * any other copies thereof may not be provided or otherwise made
+ * available to any other person without the express written consent
+ * of an authorized representative of Zephyr Software LCC. Title to,
+ * ownership of, and all rights in the software is retained by
+ * Zephyr Software LCC.
+ *
+ * Zephyr Software LLC. Proprietary Information
+ *
+ * Unless otherwise specified, the information contained in this
+ * directory, following this legend, and/or referenced herein is
+ * Zephyr Software LLC. (Zephyr) Proprietary Information. 
+ *
+ * CONTACT
+ *
+ * For technical assistance, contact Zephyr Software LCC. at:
+ *      
+ *
+ * Zephyr Software, LLC
+ * 2040 Tremont Rd
+ * Charlottesville, VA 22911
+ *
+ * E-mail: jwd@zephyr-software.com
+ **************************************************************************/
+
+#ifndef dollop_man_h
+#define dollop_man_h 
+
+#include <dollop.h>
+
+namespace Zipr_SDK {
+class DollopManager_t {
+	public:
+		DollopManager_t() {};
+
+		virtual void AddDollops(Zipr_SDK::Dollop_t *dollop_head) = 0;
+		virtual Zipr_SDK::Dollop_t *AddNewDollops(libIRDB::Instruction_t *start) = 0;
+		virtual size_t Size() = 0;
+
+		virtual Zipr_SDK::Dollop_t *GetContainingDollop(libIRDB::Instruction_t *insn) = 0;
+
+		virtual void AddDollopPatch(Zipr_SDK::DollopPatch_t *new_patch) = 0;
+		virtual std::list<Zipr_SDK::DollopPatch_t*> PatchesToDollop(Zipr_SDK::Dollop_t *target) = 0;
+
+		virtual bool UpdateTargets(Zipr_SDK::Dollop_t *) = 0;
+		virtual void UpdateAllTargets() = 0;
+
+		virtual std::list<Zipr_SDK::Dollop_t*>::const_iterator dollops_begin() = 0;
+		virtual std::list<Zipr_SDK::Dollop_t*>::const_iterator dollops_end() = 0;
+
+		virtual void PrintDollopPatches(const std::ostream &) = 0;
+		friend std::ostream &operator<<(std::ostream &out, const DollopManager_t &dollop_man);
+		virtual void PrintStats(std::ostream &out) = 0;
+		virtual void PrintPlacementMap(const Zipr_SDK::MemorySpace_t &memory_space,
+		                       const std::string &map_filename) = 0;
+};
+}
+#endif
diff --git a/include/zipr.h b/include/zipr.h
index ecd5676..587d394 100644
--- a/include/zipr.h
+++ b/include/zipr.h
@@ -32,6 +32,7 @@
 #define zipr_h
 
 #include <memory_space.h>
+#include <dollop_man.h>
 
 
 namespace Zipr_SDK
@@ -86,6 +87,7 @@ class Zipr_t
         	virtual ELFIO::elfio *GetELFIO()=0;
         	virtual libIRDB::FileIR_t *GetFileIR()=0;
         	virtual Zipr_SDK::InstructionLocationMap_t *GetLocationMap()=0; 
+		virtual Zipr_SDK::DollopManager_t *GetDollopManager()=0;
 };
 
 };
diff --git a/include/zipr_sdk.h b/include/zipr_sdk.h
index 831f5ad..4c2a092 100644
--- a/include/zipr_sdk.h
+++ b/include/zipr_sdk.h
@@ -50,6 +50,7 @@
 #include <range.h>
 #include <dollop.h>
 #include <memory_space.h>
+#include <dollop_man.h>
 #include <zipr_options.h>
 #include <zipr_plugin.h>
 #include <zipr.h>
-- 
GitLab