diff options
author | Michal 'vorner' Vaner <michal.vaner@nic.cz> | 2013-09-05 14:04:55 +0200 |
---|---|---|
committer | Michal 'vorner' Vaner <michal.vaner@nic.cz> | 2013-09-05 14:04:55 +0200 |
commit | ccb473862e3046f9cf0dcc923757a4ada7ba093f (patch) | |
tree | fdaa84de97c3ddc5cbffff075d2deae748f036ab /src/lib/config | |
parent | Merge #2857: memory manager initial exchanges (diff) | |
download | kea-ccb473862e3046f9cf0dcc923757a4ada7ba093f.tar.xz kea-ccb473862e3046f9cf0dcc923757a4ada7ba093f.zip |
[2932] Interface to subscribe and unsubscribe notifications
Not documented as of yet, and no implementation.
Diffstat (limited to 'src/lib/config')
-rw-r--r-- | src/lib/config/ccsession.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/config/ccsession.h b/src/lib/config/ccsession.h index c536861ca1..49b49ea7d8 100644 --- a/src/lib/config/ccsession.h +++ b/src/lib/config/ccsession.h @@ -575,6 +575,19 @@ public: /// \param id The id of request as returned by groupRecvMsgAsync. void cancelAsyncRecv(const AsyncRecvRequestID& id); + typedef boost::function<void (const std::string& event_name, + const data::ConstElementPtr& params)> + NotificationCallback; + typedef std::list<NotificationCallback> NotificationCallbacks; + typedef std::map<std::string, NotificationCallbacks> + SubscribedNotifications; + typedef std::pair<SubscribedNotifications::iterator, + NotificationCallbacks::iterator> + NotificationID; + NotificationID subscribeNotification(const std::string& notification_group, + const NotificationCallback& callback); + void unsubscribeNotification(const NotificationID& notification); + /// \brief Subscribe to a group /// /// Wrapper around the CCSession::subscribe. |