added cacheadapter interface and memorycache of notification.
[platform/upstream/iotivity.git] / service / notification / src / common / NSStructs.h
index 8305aaf..f8c6ca1 100644 (file)
@@ -23,6 +23,8 @@
 \r
 #include <string.h>\r
 #include <stdlib.h>\r
+#include <stdio.h>\r
+#include <stdbool.h>\r
 #include "NSCommon.h"\r
 #include "NSConstants.h"\r
 \r
@@ -33,4 +35,34 @@ typedef struct _nsTask
     struct _nsTask* nextTask;\r
 } NSTask;\r
 \r
+typedef void * NSCacheData;\r
+\r
+typedef struct _NSCacheElement\r
+{\r
+    NSCacheData * data;\r
+    struct _NSCacheElement * next;\r
+} NSCacheElement;\r
+\r
+typedef struct\r
+{\r
+    NSCacheType cacheType;\r
+    NSCacheElement * head;\r
+    NSCacheElement * tail;\r
+} NSCacheList;\r
+\r
+typedef struct\r
+{\r
+    char * id; // ip\r
+    int syncObId;\r
+    int messageObId;\r
+    bool isWhite;\r
+}NSCacheSubData;\r
+\r
+typedef struct\r
+{\r
+    char * id; // ip ? ? ?\r
+    int messageType; // noti = 1, read = 2, dismiss = 3\r
+    NSMessage * nsMessage;\r
+}NSCacheMsgData;\r
+\r
 #endif /* _NS_STRUCTS_H_ */\r