[RI] Fix for out of memory issue in Arduino Mega
[platform/upstream/iotivity.git] / service / resource-encapsulation / src / resourceCache / include / CacheTypes.h
index f267b71..fa08cc8 100644 (file)
@@ -29,7 +29,7 @@
 #include "logger.h"
 
 #include "PrimitiveResource.h"
-#include "ResourceAttributes.h"
+#include "RCSResourceAttributes.h"
 
 namespace OIC
 {
@@ -38,7 +38,7 @@ namespace OIC
 
         class DataCache;
 
-#define CACHE_TAG  PCF("CACHE")
+#define CACHE_TAG  "CACHE"
 #define CACHE_DEFAULT_REPORT_MILLITIME 10000
 #define CACHE_DEFAULT_EXPIRED_MILLITIME 15000
 
@@ -67,10 +67,16 @@ namespace OIC
             NONE
         };
 
+        enum class CACHE_MODE
+        {
+            OBSERVE = 0,
+            FREQUENCY
+        };
+
         typedef int CacheID;
 
         typedef std::function<OCStackResult(std::shared_ptr<PrimitiveResource>,
-                                            const ResourceAttributes &)> CacheCB;
+                                            const RCSResourceAttributes &)> CacheCB;
         typedef std::map<int, std::pair<Report_Info, CacheCB>> SubscriberInfo;
         typedef std::pair<int, std::pair<Report_Info, CacheCB>> SubscriberInfoPair;