Adding benchmark file for encrypted cloud storage.
[iotcloud.git] / version2 / src / C / NewKey.h
index 53a8f8c37d272d23cc8537a16d25f752d0146c36..2abb1be0707bc8e70418c686af80da2ba7eaf004 100644 (file)
@@ -1,5 +1,7 @@
 #ifndef NEWKEY_H
 #define NEWKEY_H
+#include "common.h"
+#include "Entry.h"
 
 /**
  * This Entry records the abort sent by a given machine.
@@ -7,31 +9,22 @@
  * @version 1.0
  */
 
-
 class NewKey : public Entry {
- private:
-       IoTString * key;
+private:
+       IoTString *key;
        int64_t machineid;
 
-
- public:
- NewKey(Slot * slot, IoTString * _key, int64_t _machineid) :
-       Entry(slot),
-               key(_key),
-               machineid(_machineid) {
-               }
-       
+public:
+       NewKey(Slot *slot, IoTString *_key, int64_t _machineid);
+       ~NewKey();
        int64_t getMachineID() { return machineid; }
-       IoTString * getKey() { return key; }
-       void setSlot(Slot * s) { parentslot = s; }
-       
-
-       void encode(ByteBuffer * bb);
+       IoTString *getKey() { return key; }
+       void setSlot(Slot *s) { parentslot = s; }
+       void encode(ByteBuffer *bb);
        int getSize();
        char getType() { return TypeNewKey; }
-        
-       Entry * getCopy(Slot * s) { return new NewKey(s, key, machineid); }
+       Entry *getCopy(Slot *s);
 };
 
-Entry * NewKey_decode(Slot *slot, ByteBuffer *bb);
-
+Entry *NewKey_decode(Slot *slot, ByteBuffer *bb);
+#endif