Generating IV from random numbers, not machine ID and local sequence number.
[iotcloud.git] / version2 / src / C / Entry.h
index 1a8c4b516457bc8555c37e141cc693f69a161e7e..2c018296c23fce1bf92e96f8393bd20d340daa21 100644 (file)
 #define TypeLastMessage 5
 #define TypeRejectedMessage 6
 #define TypeTableStatus 7
+#define TypeSlot 8
 
 class Entry : public Liveness {
        /* Records whether the information is still live or has been
           superceded by a newer update.  */
 private:
        bool islive;
-
 protected:
        Slot *parentslot;
 
 public:
        Entry(Slot *_parentslot) : islive(true), parentslot(_parentslot) {}
-
+       virtual ~Entry() {}
        /**
         * Returns true if the Entry object is still live.
         */
@@ -51,18 +51,14 @@ public:
         * array.
         */
        virtual int getSize() = 0;
-
-
-       /**
-        * Returns a char encoding the type of the entry object.
-        */
-       virtual char getType() = 0;
-
+       virtual void releaseRef() {delete this;}
+       virtual void acquireRef() {}
 
        /**
         * Returns a copy of the Entry that can be added to a different slot.
         */
        virtual Entry *getCopy(Slot *s) = 0;
+       friend Entry *Entry_decode(Slot *slot, ByteBuffer *bb);
 };
 
 /**