doxygen
diff --git a/model/sync-data-buffer.h b/model/sync-data-buffer.h
index dd6dbb8..09e15f4 100644
--- a/model/sync-data-buffer.h
+++ b/model/sync-data-buffer.h
@@ -95,17 +95,33 @@
virtual void setBufferAndLength(const unsigned char *buffer, size_t len)
{m_dataBuffer->setBufferAndLength(buffer, len); }
+ /**
+ * @brief convert from FullState to SyncDataBuffer
+ */
SyncDataBuffer &operator<<(FullState &fs);
+
+ /**
+ * @brief convert from DiffState to SyncDataBuffer
+ */
SyncDataBuffer &operator<<(DiffState &ds);
+ /**
+ * @brief convert from SyncDataBuffer to FullState, throws
+ * SyncDataBufferConvertException if convert fails
+ */
SyncDataBuffer &operator>>(FullState &fs);
+
+ /**
+ * @brief convert from SyncDataBuffer to DiffState, throws
+ * SyncDataBufferConvertException if convert fails
+ */
SyncDataBuffer &operator>>(DiffState &ds);
private:
boost::shared_ptr<DataBuffer> m_dataBuffer;
};
-struct SyncDataBufferConvertError : virtual boost::exception {};
+struct SyncDataBufferConvertException : virtual boost::exception {};
} // Sync
diff --git a/model/sync-interest-table.h b/model/sync-interest-table.h
index 4993cd4..609436d 100644
--- a/model/sync-interest-table.h
+++ b/model/sync-interest-table.h
@@ -23,7 +23,7 @@
#ifndef SYNC_STATE_H
#define SYNC_STATE_H
#include <string>
-#include <boost/unordered_map.hpp>
+#include <boost/unordered_set.hpp>
/**
* \defgroup sync SYNC protocol
@@ -39,10 +39,17 @@
class SyncInterestTable
{
private:
- boost::unordered_map<std::string, std::string> m_table;
+ boost::unordered_set<std::string> m_table;
public:
+ /**
+ * @brief Insert an interest
+ */
bool insert(std::string interest);
- boost::unordered_map<std::string, std::string> fetchAll();
+
+ /**
+ * @brief fetch all Interests and clear the table
+ */
+ boost::unordered_set<std::string> fetchAll();
};