edits
[iotcloud.git] / version2 / src / C / KeyValue.h
1 #ifndef KEYVALUE_H
2 #define KEYVALUE_H
3 #include "common.h"
4
5 /**
6  * KeyValue entry for Slot.
7  * @author Brian Demsky <bdemsky@uci.edu>
8  * @version 1.0
9  */
10
11 class KeyValue {/*extends Entry */
12 private:
13         IoTString *key;
14         IoTString *value;
15
16 public:
17         KeyValue(IoTString *_key, IoTString *_value) :
18                 key(_key),
19                 value(_value) {
20         }
21
22         IoTString *getKey() { return key; }
23         IoTString *getValue() { return value; }
24         void encode(ByteBuffer *bb);
25         int32_t getSize();
26         KeyValue *getCopy();
27 };
28
29 KeyValue *KeyValue_decode(ByteBuffer *bb);
30 #endif