X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=service%2Fnotification%2Fsrc%2Fcommon%2FNSStructs.h;h=39126bc4f19f92a86514f2500c0af312c4df5441;hb=3c093548382bb2542c87a67e6e5fa32552c29cb3;hp=2cab5f5cfa6d0cce96307ee7d8d8994e1e6ac37f;hpb=2fe1c5ea6741015a119958911e34613f4852c175;p=platform%2Fupstream%2Fiotivity.git diff --git a/service/notification/src/common/NSStructs.h b/service/notification/src/common/NSStructs.h index 2cab5f5..39126bc 100644 --- a/service/notification/src/common/NSStructs.h +++ b/service/notification/src/common/NSStructs.h @@ -25,22 +25,35 @@ #include #include #include +#include #include "NSCommon.h" #include "NSConstants.h" +#include "ocstack.h" typedef struct _nsTask { NSTaskType taskType; - void* taskData; - struct _nsTask* nextTask; + void * taskData; + struct _nsTask * nextTask; + } NSTask; +typedef struct +{ + NSTopicLL * head; + NSTopicLL * tail; + char consumerId[NS_UUID_STRING_SIZE]; + NSTopicLL ** topics; + +} NSTopicList; + typedef void * NSCacheData; typedef struct _NSCacheElement { NSCacheData * data; struct _NSCacheElement * next; + } NSCacheElement; typedef struct @@ -48,29 +61,54 @@ typedef struct NSCacheType cacheType; NSCacheElement * head; NSCacheElement * tail; + } NSCacheList; typedef struct { - char * id; // ip - int syncObId; - int messageObId; - bool isWhite; -}NSCacheSubData; + char id[NS_UUID_STRING_SIZE]; + int syncObId; // sync resource observer ID for local consumer + int messageObId; // message resource observer ID for local consumer + int remote_syncObId; //sync observer ID subscribed through remote server + int remote_messageObId; //message observer ID subscribed through remote server + bool isWhite; // access state -> True: allowed / False: blocked + +} NSCacheSubData; typedef struct { - char * id; // ip ? ? ? + char * id; int messageType; // noti = 1, read = 2, dismiss = 3 NSMessage * nsMessage; -}NSCacheMsgData; + +} NSCacheMsgData; + +typedef struct +{ + char * topicName; + NSTopicState state; + +} NSCacheTopicData; + +typedef struct +{ + char id[NS_UUID_STRING_SIZE]; + char * topicName; + +} NSCacheTopicSubData; typedef struct { OCResourceHandle handle; - int accepter; - char* message_uri; - char* sync_uri; + char providerId[NS_UUID_STRING_SIZE]; + char * version; + bool policy; + char * message_uri; + char * sync_uri; + + //optional + char * topic_uri; + } NSNotificationResource; typedef struct @@ -78,7 +116,7 @@ typedef struct OCResourceHandle handle; uint64_t messageId; - char providerId[37]; + char providerId[NS_UUID_STRING_SIZE]; //optional NSMessageType type; @@ -87,6 +125,7 @@ typedef struct char * title; char * contentText; char * sourceName; + char * topicName; NSMediaContents * mediaContents; } NSMessageResource; @@ -94,14 +133,43 @@ typedef struct typedef struct { OCResourceHandle handle; - char* id; - char* state; + uint64_t messageId; + char providerId[NS_UUID_STRING_SIZE]; + char * state; + } NSSyncResource; typedef struct { - char providerId[37]; - char * providerName; + OCResourceHandle handle; + char providerId[NS_UUID_STRING_SIZE]; + char consumerId[NS_UUID_STRING_SIZE]; + NSTopicList ** TopicList; + +} NSTopicResource; + +typedef struct +{ + char providerId[NS_UUID_STRING_SIZE]; + char * providerName; + char * userInfo; + } NSProviderInfo; +#ifdef WITH_MQ +typedef struct +{ + char * serverAddr; + char * topicName; + +} NSMQTopicAddress; + +typedef struct +{ + char * serverUri; + OCDevAddr * devAddr; + +} NSMQServerInfo; +#endif + #endif /* _NS_STRUCTS_H_ */