client-cpp  0.7.0
INotificationManager.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2014-2015 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 <list>
21 #include <string>
22 
23 #include "kaa/notification/gen/NotificationDefinitions.hpp"
24 
25 namespace kaa {
26 
27 /*
28  * Forward declaration.
29  */
30 class INotificationListener;
31 class INotificationTopicListListener;
32 
41 public:
49  virtual void addTopicListListener(INotificationTopicListListener& listener) = 0;
50 
58  virtual void removeTopicListListener(INotificationTopicListListener& listener) = 0;
59 
66  virtual Topics getTopics() = 0;
67 
75  virtual void addNotificationListener(INotificationListener& listener) = 0;
76 
89  virtual void addNotificationListener(const std::string& topidId, INotificationListener& listener) = 0;
90 
98  virtual void removeNotificationListener(INotificationListener& listener) = 0;
99 
112  virtual void removeNotificationListener(const std::string& topidId, INotificationListener& listener) = 0;
113 
129  virtual void subscribeToTopic(const std::string& id, bool forceSync = true) = 0;
130 
146  virtual void subscribeToTopics(const std::list<std::string>& idList, bool forceSync = true) = 0;
147 
164  virtual void unsubscribeFromTopic(const std::string& id, bool forceSync = true) = 0;
165 
182  virtual void unsubscribeFromTopics(const std::list<std::string>& idList, bool forceSync = true) = 0;
183 
199  virtual void sync() = 0;
200 
202 };
203 
204 } /* namespace kaa */
205 
206 #endif /* INOTIFICATIONMANAGER_HPP_ */
The listener which receives updates on available topics.
virtual void addNotificationListener(INotificationListener &listener)=0
Adds the listener which receives notifications on all available topics.
virtual void unsubscribeFromTopic(const std::string &id, bool forceSync=true)=0
Unsubscribes from the specified optional topic to stop receiving notifications on that topic...
The public interface to topic subscription and notification delivery subsystems.
virtual void addTopicListListener(INotificationTopicListListener &listener)=0
Adds the listener which receives updates on the list of available topics.
virtual Topics getTopics()=0
Retrieves the list of available topics.
virtual void unsubscribeFromTopics(const std::list< std::string > &idList, bool forceSync=true)=0
Unsubscribes from the specified list of optional topics to stop receiving notifications on those topi...
The listener which receives notifications on the specified topic.
virtual void removeNotificationListener(INotificationListener &listener)=0
Removes the listener which receives notifications on all available topics.
virtual void sync()=0
Sends subscription request(s) to the Operations server.
virtual void removeTopicListListener(INotificationTopicListListener &listener)=0
Removes listener which receives updates on the list of available topics.
virtual void subscribeToTopics(const std::list< std::string > &idList, bool forceSync=true)=0
Subscribes to the specified list of optional topics to receive notifications on those topics...
virtual void subscribeToTopic(const std::string &id, bool forceSync=true)=0
Subscribes to the specified optional topic to receive notifications on that topic.