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
44 char consumerId[NS_UUID_STRING_SIZE];
\r
45 NSTopicLL ** topics;
\r
49 typedef void * NSCacheData;
\r
51 typedef struct _NSCacheElement
\r
54 struct _NSCacheElement * next;
\r
59 NSCacheType cacheType;
\r
60 NSCacheElement * head;
\r
61 NSCacheElement * tail;
\r
66 char id[NS_UUID_STRING_SIZE];
\r
67 int syncObId; // sync resource observer ID for local consumer
\r
68 int messageObId; // message resource observer ID for local consumer
\r
69 int remote_syncObId; //sync observer ID subscribed through remote server
\r
70 int remote_messageObId; //message observer ID subscribed through remote server
\r
71 bool isWhite; // access state -> True: allowed / False: blocked
\r
77 int messageType; // noti = 1, read = 2, dismiss = 3
\r
78 NSMessage * nsMessage;
\r
90 char id[NS_UUID_STRING_SIZE];
\r
93 } NSCacheTopicSubData;
\r
97 OCResourceHandle handle;
\r
98 char providerId[NS_UUID_STRING_SIZE];
\r
101 char * message_uri;
\r
106 } NSNotificationResource;
\r
110 OCResourceHandle handle;
\r
112 uint64_t messageId;
\r
113 char providerId[NS_UUID_STRING_SIZE];
\r
116 NSMessageType type;
\r
120 char * contentText;
\r
123 NSMediaContents * mediaContents;
\r
124 } NSMessageResource;
\r
128 OCResourceHandle handle;
\r
129 uint64_t messageId;
\r
130 char providerId[NS_UUID_STRING_SIZE];
\r
136 OCResourceHandle handle;
\r
137 char providerId[NS_UUID_STRING_SIZE];
\r
138 char consumerId[NS_UUID_STRING_SIZE];
\r
139 NSTopicList ** TopicList;
\r
144 char providerId[NS_UUID_STRING_SIZE];
\r
145 char * providerName;
\r
149 #endif /* _NS_STRUCTS_H_ */
\r