1 //******************************************************************
\r
3 // Copyright 2016 Samsung Electronics All Rights Reserved.
\r
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\r
7 // Licensed under the Apache License, Version 2.0 (the "License");
\r
8 // you may not use this file except in compliance with the License.
\r
9 // You may obtain a copy of the License at
\r
11 // http://www.apache.org/licenses/LICENSE-2.0
\r
13 // Unless required by applicable law or agreed to in writing, software
\r
14 // distributed under the License is distributed on an "AS IS" BASIS,
\r
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
16 // See the License for the specific language governing permissions and
\r
17 // limitations under the License.
\r
19 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
\r
21 #ifndef _NS_STRUCTS_H_
\r
22 #define _NS_STRUCTS_H_
\r
27 #include <stdbool.h>
\r
28 #include <octypes.h>
\r
29 #include "NSCommon.h"
\r
30 #include "NSConstants.h"
\r
31 #include "ocstack.h"
\r
33 typedef struct _nsTask
\r
35 NSTaskType taskType;
\r
37 struct _nsTask * nextTask;
\r
45 char consumerId[NS_UUID_STRING_SIZE];
\r
46 NSTopicLL ** topics;
\r
50 typedef void * NSCacheData;
\r
52 typedef struct _NSCacheElement
\r
55 struct _NSCacheElement * next;
\r
61 NSCacheType cacheType;
\r
62 NSCacheElement * head;
\r
63 NSCacheElement * tail;
\r
69 char id[NS_UUID_STRING_SIZE];
\r
70 int syncObId; // sync resource observer ID for local consumer
\r
71 int messageObId; // message resource observer ID for local consumer
\r
72 int remote_syncObId; //sync observer ID subscribed through remote server
\r
73 int remote_messageObId; //message observer ID subscribed through remote server
\r
74 bool isWhite; // access state -> True: allowed / False: blocked
\r
81 int messageType; // noti = 1, read = 2, dismiss = 3
\r
82 NSMessage * nsMessage;
\r
95 char id[NS_UUID_STRING_SIZE];
\r
98 } NSCacheTopicSubData;
\r
102 OCResourceHandle handle;
\r
103 char providerId[NS_UUID_STRING_SIZE];
\r
106 char * message_uri;
\r
112 } NSNotificationResource;
\r
116 OCResourceHandle handle;
\r
118 uint64_t messageId;
\r
119 char providerId[NS_UUID_STRING_SIZE];
\r
122 NSMessageType type;
\r
126 char * contentText;
\r
129 NSMediaContents * mediaContents;
\r
131 } NSMessageResource;
\r
135 OCResourceHandle handle;
\r
136 uint64_t messageId;
\r
137 char providerId[NS_UUID_STRING_SIZE];
\r
144 OCResourceHandle handle;
\r
145 char providerId[NS_UUID_STRING_SIZE];
\r
146 char consumerId[NS_UUID_STRING_SIZE];
\r
147 NSTopicList ** TopicList;
\r
153 char providerId[NS_UUID_STRING_SIZE];
\r
154 char * providerName;
\r
165 } NSMQTopicAddress;
\r
170 OCDevAddr * devAddr;
\r
175 #endif /* _NS_STRUCTS_H_ */
\r