util: scheduler::ScopedEventId to automatically cancel scheduled events upon destruction
Change-Id: I3254983ab27480143c778baa28de7eb0409b26ce
Refs: #2442
diff --git a/src/util/scheduler.hpp b/src/util/scheduler.hpp
index 4287556..8948860 100644
--- a/src/util/scheduler.hpp
+++ b/src/util/scheduler.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2013-2014 Regents of the University of California.
+ * Copyright (c) 2013-2015 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -28,6 +28,8 @@
#include <set>
namespace ndn {
+namespace util {
+namespace scheduler {
struct EventIdImpl; ///< \brief Private storage of information about the event
/**
@@ -105,6 +107,16 @@
bool m_isEventExecuting;
};
+} // namespace scheduler
+
+using util::scheduler::Scheduler;
+
+} // namespace util
+
+// for backwards compatibility
+using util::scheduler::Scheduler;
+using util::scheduler::EventId;
+
} // namespace ndn
#endif // NDN_UTIL_SCHEDULER_HPP