IoTivity C++ SDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NSTopicsList.h
Go to the documentation of this file.
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 
27 #ifndef _NS_TOPICS_LIST_H_
28 #define _NS_TOPICS_LIST_H_
29 
30 
31 #include <string>
32 #include <list>
33 #include "NSTopic.h"
34 
35 namespace OIC
36 {
37  namespace Service
38  {
44  {
45  public:
49  NSTopicsList() : m_modifiable(true) { }
50 
57  NSTopicsList(::NSTopicLL *topics, bool modify);
58 
64  NSTopicsList(const NSTopicsList &topicsList);
65 
72  NSTopicsList &operator=(const NSTopicsList &topicsList);
73 
77  ~NSTopicsList();
78 
85  void addTopic(const std::string &topicName, NSTopic::NSTopicState state);
86 
92  void removeTopic(const std::string &topicName);
93 
99  std::list<NSTopic> getTopicsList() const;
100 
108  void unsetModifiability();
109 
110  private:
111  std::list<NSTopic *> m_topicsList;
112  bool m_modifiable;
113 
114  };
115  }
116 }
117 #endif /* _NS_TOPICS_LIST_H_ */
NSTopicState
Notification topic State.
Definition: NSTopic.h:48
This class provides a set of APIs for Notification service Topics Linked list.
Definition: NSTopicsList.h:43
~NSTopicsList()
Destructor of NSTopicsList.
This file contains Notification service topic representation.
std::list< NSTopic > getTopicsList() const
This method is for getting topic LL from the Notification service Topics Linked list.
NSTopicsList()
Constructor of NSTopicsList.
Definition: NSTopicsList.h:49
Topic linked list.
Definition: NSCommon.h:103
void addTopic(const std::string &topicName, NSTopic::NSTopicState state)
This method is for adding topic for the Notification service Topics Linked list.
void removeTopic(const std::string &topicName)
This method is for removing topic from the Notification service Topics Linked list.
NSTopicsList & operator=(const NSTopicsList &topicsList)
Copy assignment operator of NSTopicsList.
void unsetModifiability()
This method is for preventing for add/remove Topic from Topicslist.