X-Git-Url: http://plrg.eecs.uci.edu/git/?p=iotcloud.git;a=blobdiff_plain;f=version2%2Fsrc%2FC%2FKeyValue.h;h=f0b0fe2474b430a88bd8d9efbfa60419ee77249a;hp=06f514b577e096bc59692b9b406a20c3159419d4;hb=b7ed1849727b50e226f3b9d1c432d3071d739368;hpb=d0f7ade2b1b60015ff3cb6ada2071dfafaa656f5 diff --git a/version2/src/C/KeyValue.h b/version2/src/C/KeyValue.h index 06f514b..f0b0fe2 100644 --- a/version2/src/C/KeyValue.h +++ b/version2/src/C/KeyValue.h @@ -1,6 +1,7 @@ #ifndef KEYVALUE_H #define KEYVALUE_H #include "common.h" +#include "IoTString.h" /** * KeyValue entry for Slot. @@ -28,4 +29,12 @@ public: }; KeyValue *KeyValue_decode(ByteBuffer *bb); + +inline unsigned int hashKeyValue(KeyValue *a) { + return a->getKey()->hashValue(); +} + +inline bool KeyValueEquals(KeyValue *a, KeyValue *b) { + return a->getKey()->equals(b->getKey()); +} #endif