added cacheadapter interface and memorycache of notification.
[platform/upstream/iotivity.git] / service / notification / examples / linux / notificationprovider.c
index e4422d3..c614294 100644 (file)
@@ -20,7 +20,7 @@ int id;
 \r
 void OCProcessThread(void * ptr)\r
 {\r
-    (void*) ptr;\r
+    (void) ptr;\r
     while (!isExit)\r
     {\r
         if (OCProcess() != OC_STACK_OK)\r
@@ -36,17 +36,16 @@ void subscribeRequestCallback(NSConsumer *consumer)
     OIC_LOG(INFO, TAG, "consumer requested to subscribe");\r
     char *cid = consumer->mId;\r
 \r
-    printf("Consumer ID: %s\n", cid);\r
+    printf("NS_ Consumer ID: %s\n", cid);\r
 \r
     NSAccept(consumer, true);\r
 }\r
 \r
-void syncCallback(NSProvider *provider, NSSync *sync)\r
+void syncCallback(NSSync *sync)\r
 {\r
     OIC_LOG(INFO, TAG, "sync requested");\r
 \r
-    printf("Sync State: %d\n", sync->mState);\r
-\r
+    printf("NS_ Sync State: %d\n", sync->mState);\r
 }\r
 \r
 int main()\r
@@ -80,8 +79,8 @@ int main()
         printf("4. NSRead \n");\r
         //printf("5. NSAccept \n");\r
         printf("6. NSGetConsumerList \n");\r
-        printf("7. startPresence \n");\r
-        printf("8. stopPresence \n");\r
+        //printf("7. startPresence \n");\r
+        //printf("8. stopPresence \n");\r
         printf("0. Exit() \n");\r
 \r
         printf("input : ");\r
@@ -120,6 +119,7 @@ int main()
                 printf("app - mTitle : %s \n", title);\r
                 printf("app - mContentText : %s \n", body);\r
 \r
+\r
                 NSMessage * msg = (NSMessage *)malloc(sizeof(NSMessage));\r
 \r
                 sprintf(charID, "%d", id);\r
@@ -175,12 +175,12 @@ int main()
                     */\r
                 break;\r
             case 7:\r
-                OIC_LOG(INFO, TAG, "NSStartPresence");\r
-                NSTestStartPresence();\r
+                OIC_LOG(INFO, TAG, "NSStartPresence - not working");\r
+                //NSTestStartPresence();\r
                 break;\r
             case 8:\r
-                OIC_LOG(INFO, TAG, "NSStopPresence");\r
-                NSTestStopPresence();\r
+                OIC_LOG(INFO, TAG, "NSStopPresence- not working");\r
+                //NSTestStopPresence();\r
                 break;\r
             default:\r
                 OIC_LOG(INFO, TAG, "Under Construction");\r