Adding two small helpers to scheduler
diff --git a/src/fetch-manager.cc b/src/fetch-manager.cc
index ba24f97..b0154ea 100644
--- a/src/fetch-manager.cc
+++ b/src/fetch-manager.cc
@@ -32,15 +32,29 @@
: m_ccnx (ccnx)
, m_sync (sync)
{
- m_scheduler.start ();
+ m_scheduler = make_shared<Scheduler> ();
+ m_scheduler->start ();
}
FetchManager::~FetchManager ()
{
- m_scheduler.shutdown ();
+ m_scheduler->shutdown ();
+ m_scheduler.reset ();
}
void
FetchManager::Enqueue (const Ccnx::Name &deviceName, uint32_t minSeqNo, uint32_t maxSeqNo, int priority/*=PRIORITY_NORMAL*/)
{
}
+
+Ccnx::CcnxWrapperPtr
+FetchManager::GetCcnx ()
+{
+ return m_ccnx;
+}
+
+SchedulerPtr
+FetchManager::GetScheduler ()
+{
+ return m_scheduler;
+}
diff --git a/src/fetch-manager.h b/src/fetch-manager.h
index 5efd838..eb38551 100644
--- a/src/fetch-manager.h
+++ b/src/fetch-manager.h
@@ -45,12 +45,19 @@
virtual ~FetchManager ();
void
- Enqueue (const Ccnx::Name &deviceName, uint32_t minSeqNo, uint32_t maxSeqNo, int priority=PRIORITY_NORMAL);
+ Enqueue (const Ccnx::Name &deviceName,
+ uint32_t minSeqNo, uint32_t maxSeqNo, int priority=PRIORITY_NORMAL);
+
+ Ccnx::CcnxWrapperPtr
+ GetCcnx ();
+
+ SchedulerPtr
+ GetScheduler ();
private:
Ccnx::CcnxWrapperPtr m_ccnx;
SyncLogPtr m_sync; // to access forwarding hints
- Scheduler m_scheduler;
+ SchedulerPtr m_scheduler;
};