client-cpp  0.6.3
INotificationManager.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2014 CyberVision, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef INOTIFICATIONMANAGER_HPP_
18 #define INOTIFICATIONMANAGER_HPP_
19 
20 #include "kaa/KaaDefaults.hpp"
21 
22 #ifdef KAA_USE_NOTIFICATIONS
23 
24 #include <list>
25 #include <string>
26 
29 
30 namespace kaa {
31 
45 class INotificationManager {
46 public:
54  virtual void addTopicListListener(INotificationTopicListListenerPtr listener) = 0;
55 
63  virtual void removeTopicListListener(INotificationTopicListListenerPtr listener) = 0;
64 
71  virtual Topics getTopics() = 0;
72 
81  virtual void addNotificationListener(INotificationListenerPtr listener) = 0;
82 
96  virtual void addNotificationListener(const std::string& topidId, INotificationListenerPtr listener) = 0;
97 
106  virtual void removeNotificationListener(INotificationListenerPtr listener) = 0;
107 
121  virtual void removeNotificationListener(const std::string& topidId, INotificationListenerPtr listener) = 0;
122 
135  virtual void subscribeToTopic(const std::string& id, bool forceSync) = 0;
136 
150  virtual void subscribeToTopics(const std::list<std::string>& idList, bool forceSync) = 0;
151 
166  virtual void unsubscribeFromTopic(const std::string& id, bool forceSync) = 0;
167 
183  virtual void unsubscribeFromTopics(const std::list<std::string>& idList, bool forceSync) = 0;
184 
210  virtual void sync() = 0;
211 
212  virtual ~INotificationManager() {}
213 };
214 
215 } /* namespace kaa */
216 
217 #endif
218 
219 #endif /* INOTIFICATIONMANAGER_HPP_ */