1 //******************************************************************
3 // Copyright 2016 Samsung Electronics All Rights Reserved.
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
7 // Licensed under the Apache License, Version 2.0 (the "License");
8 // you may not use this file except in compliance with the License.
9 // You may obtain a copy of the License at
11 // http://www.apache.org/licenses/LICENSE-2.0
13 // Unless required by applicable law or agreed to in writing, software
14 // distributed under the License is distributed on an "AS IS" BASIS,
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 // See the License for the specific language governing permissions and
17 // limitations under the License.
19 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
24 * This file provides APIs of Notification Service for common functions.
32 #define NS_UUID_STRING_SIZE 37
34 #define NS_ATTRIBUTE_POLICY "ACCEPTER"
35 #define NS_ATTRIBUTE_MESSAGE "MESSAGE_URI"
36 #define NS_ATTRIBUTE_SYNC "SYNC_URI"
37 #define NS_ATTRIBUTE_TOPIC "TOPIC_URI"
38 #define NS_ATTRIBUTE_MESSAGE_ID "MESSAGE_ID"
39 #define NS_ATTRIBUTE_PROVIDER_ID "PROVIDER_ID"
40 #define NS_ATTRIBUTE_CONSUMER_ID "CONSUMER_ID"
41 #define NS_ATTRIBUTE_TOPIC_LIST "TOPIC_LIST"
42 #define NS_ATTRIBUTE_TOPIC_NAME "TOPIC_NAME"
43 #define NS_ATTRIBUTE_TOPIC_SELECTION "TOPIC_STATE"
44 #define NS_ATTRIBUTE_TITLE "TITLE"
45 #define NS_ATTRIBUTE_TEXT "CONTENTTEXT"
46 #define NS_ATTRIBUTE_SOURCE "SOURCE"
47 #define NS_ATTRIBUTE_STATE "STATE"
48 #define NS_ATTRIBUTE_DEVICE "DEVICE"
49 #define NS_ATTRIBUTE_TYPE "TYPE"
50 #define NS_ATTRIBUTE_DATETIME "DATE_TIME"
51 #define NS_ATTRIBUTE_TTL "TTL"
54 * Result code of notification service
66 * Provider state of notification consumer service
78 * Notification message status to synchronize
88 * Notification Message Type
89 * Alert mean is High / critical
90 * Notice mean is low / critical
91 * Event mean is High / Normal
92 * Information mean is Low / Normal
97 NS_MESSAGE_NOTICE = 2,
108 NS_TOPIC_UNSUBSCRIBED = 0,
109 NS_TOPIC_SUBSCRIBED = 1,
113 typedef struct _nsTopic
117 struct _nsTopic * next;
125 //TODO: decide struct fields
126 char consumerId[NS_UUID_STRING_SIZE];
132 * Consumer information
136 char consumerId[NS_UUID_STRING_SIZE];
141 * Provider information
145 char providerId[NS_UUID_STRING_SIZE];
151 * Media Contents of Notification Message (Optional)
160 * Notification Message
166 char providerId[NS_UUID_STRING_SIZE];
175 NSMediaContents * mediaContents;
181 * Synchronization information of the notification message
186 char providerId[NS_UUID_STRING_SIZE];
191 #endif /* _NS_COMMON_H_ */