17 #ifndef DEFAULTNOTIFICATONMANAGER_HPP_ 
   18 #define DEFAULTNOTIFICATONMANAGER_HPP_ 
   26 #include <unordered_map> 
   27 #include <unordered_set> 
   29 #include "kaa/gen/EndpointGen.hpp" 
   55     virtual void subscribeToTopics(
const std::list<std::string>& idList, 
bool forceSync = 
true);
 
   63     void setTransport(std::shared_ptr<NotificationTransport> transport);
 
   66     void updateSubscriptionInfo(
const std::string& 
id, SubscriptionCommandType type);
 
   69     const Topic& findTopic(
const std::string& 
id);
 
   71     void notifyTopicUpdateSubscribers(
const Topics& topics);
 
   72     void notifyMandatoryNotificationSubscribers(
const std::string& 
id, 
const KaaNotification& notification);
 
   73     bool notifyOptionalNotificationSubscribers(
const std::string& 
id, 
const KaaNotification& notification);
 
   76     std::shared_ptr<NotificationTransport>    transport_;
 
   79     std::unordered_map<std::string, Topic>    topics_;
 
   80     KAA_MUTEX_DECLARE(topicsGuard_);
 
   82     typedef KaaObservable<void(
const std::string& topicId, 
const KaaNotification& notification)
 
   84     typedef std::shared_ptr<NotificationObservable>    NotificationObservablePtr;
 
   89     KAA_MUTEX_DECLARE(optionalListenersGuard_);
 
   92     KAA_MUTEX_DECLARE(subscriptionsGuard_);
 
The listener which receives updates on available topics. 
 
virtual void sync()
Sends subscription request(s) to the Operations server. 
 
virtual void addNotificationListener(INotificationListener &listener)
Adds the listener which receives notifications on all available topics. 
 
The public interface to topic subscription and notification delivery subsystems. 
 
virtual void notificationReceived(const Notifications ¬ifications)
 
virtual Topics getTopics()
Retrieves the list of available topics. 
 
NotificationManager(IKaaClientStateStoragePtr status)
 
void setTransport(std::shared_ptr< NotificationTransport > transport)
 
virtual void subscribeToTopics(const std::list< std::string > &idList, bool forceSync=true)
Subscribes to the specified list of optional topics to receive notifications on those topics...
 
virtual void topicsListUpdated(const Topics &topics)
 
virtual void addTopicListListener(INotificationTopicListListener &listener)
Adds the listener which receives updates on the list of available topics. 
 
The listener which receives notifications on the specified topic. 
 
std::shared_ptr< IKaaClientStateStorage > IKaaClientStateStoragePtr
 
virtual void removeNotificationListener(INotificationListener &listener)
Removes the listener which receives notifications on all available topics. 
 
virtual void unsubscribeFromTopics(const std::list< std::string > &idList, bool forceSync=true)
Unsubscribes from the specified list of optional topics to stop receiving notifications on those topi...
 
std::list< SubscriptionCommand > SubscriptionCommands
 
virtual void removeTopicListListener(INotificationTopicListListener &listener)
Removes listener which receives updates on the list of available topics. 
 
virtual void subscribeToTopic(const std::string &id, bool forceSync=true)
Subscribes to the specified optional topic to receive notifications on that topic. 
 
virtual void unsubscribeFromTopic(const std::string &id, bool forceSync=true)
Unsubscribes from the specified optional topic to stop receiving notifications on that topic...