Added Initial version of notification.
[platform/upstream/iotivity.git] / service / notification / src / common / NSConstants.h
1 //******************************************************************
2 //
3 // Copyright 2016 Samsung Electronics All Rights Reserved.
4 //
5 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
6 //
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
10 //
11 //      http://www.apache.org/licenses/LICENSE-2.0
12 //
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.
18 //
19 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
20
21 #ifndef _NS_CONSTANTS_H_
22 #define _NS_CONSTANTS_H_
23
24 #define NS_TAG "IOT_NOTI"
25
26 // SCHEDULE //
27 #define THREAD_COUNT 4
28
29 // NOTIOBJ // 
30 #define NOTIOBJ_TITLE_KEY "title"
31 #define NOTIOBJ_ID_KEY "id"
32 #define NOTOOBJ_CONTENT_KEY "contentText"
33
34 #define DISCOVERY_TAG "NS_PROVIDER_DISCOVERY"
35 #define SUBSCRIPTION_TAG "NS_PROVIDER_SUBSCRIPTION"
36 #define INTERFACE_TAG "NS_PROVIDER_INTERFACE"
37 #define NOTIFICATION_TAG "NS_PROVIDER_NOTIFICATION"
38 #define SCHEDULER_TAG "NS_PROVIDER_SCHEDULER"
39 #define LISTENER_TAG "NS_PROVIDER_LISTENER"
40 #define RESOURCE_TAG "NS_PROVIDER_RESOURCE"
41
42 typedef enum eConnectionState
43 {
44     DISCONNECTED = 0,
45     CONNECTED = 1,
46
47 } NSConnectionState;
48
49 typedef enum eSchedulerType
50 {
51     RESPONSE_SCHEDULER = 0,
52     DISCOVERY_SCHEDULER = 1,
53     SUBSCRIPTION_SCHEDULER = 2,
54     NOTIFICATION_SCHEDULER = 3,
55 } NSSchedulerType;
56
57
58 typedef enum eTaskType
59 {
60     TASK_REGISTER_RESOURCE = 1000,
61
62     TASK_START_PRESENCE = 2000,
63     TASK_STOP_PRESENCE = 2001,
64
65     TASK_RECV_SUBSCRIPTION = 3000,
66     TASK_RECV_UNSUBSCRIPTION = 3001,
67     TASK_SEND_POLICY = 3002,
68     TASK_SEND_ALLOW = 3003,
69     TASK_SEND_DENY = 3004,
70     TASK_SYNC_SUBSCRIPTION = 3005,
71
72     TASK_SEND_NOTIFICATION = 4000,
73     TASK_SEND_PENDING_NOTI = 4001,
74
75     TASK_RECV_READ = 5000,
76     TASK_RECV_DISMISS = 5001,
77     TASK_SEND_READ = 5002,
78     TASK_SEND_DISMISS = 5003,
79
80     TASK_CONSUMER_REQ_DISCOVER = 8001,
81     TASK_CONSUMER_REQ_SUBSCRIBE = 8002,
82     TASK_CONSUMER_REQ_SUBSCRIBE_CANCEL = 8003,
83     TASK_CONSUMER_RECV_NOTIFICATION = 8101,
84
85     TASK_EVENT_CONNECTED = 9000,
86     TASK_EVENT_DISCONNECTED = 9001,
87
88     TASK_CB_SUBSCRIPTION = 10000,
89     TASK_CB_SYNC = 10001,
90
91 } NSTaskType;
92
93 typedef enum eCache
94 {
95     NS_CONSUMER_BLACKLIST = 0,
96     NS_CONSUMER_WHITELIST = 1,
97
98 } NSCache;
99
100 #endif /* _NS_CONSTANTS_H_ */