blob: 7ae80834b19fe92a9457b68b0517d29e811d0762 [file] [log] [blame]
Alexander Afanasyev920af2f2014-01-25 22:56:11 -08001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/**
3 * Copyright (C) 2014 Named Data Networking Project
4 * See COPYING for copyright and distribution information.
5 */
6
7#ifndef NFD_CORE_SCHEDULER_HPP
8#define NFD_CORE_SCHEDULER_HPP
9
Junxiao Shi98e29f42014-03-31 10:27:26 -070010#include "common.hpp"
Junxiao Shic041ca32014-02-25 20:01:15 -070011#include <ndn-cpp-dev/util/scheduler.hpp>
Alexander Afanasyev920af2f2014-01-25 22:56:11 -080012
Alexander Afanasyev18bbf812014-01-29 01:40:23 -080013namespace nfd {
Junxiao Shic041ca32014-02-25 20:01:15 -070014namespace scheduler {
Alexander Afanasyev920af2f2014-01-25 22:56:11 -080015
Junxiao Shic041ca32014-02-25 20:01:15 -070016using ndn::Scheduler;
Alexander Afanasyev920af2f2014-01-25 22:56:11 -080017
Junxiao Shic041ca32014-02-25 20:01:15 -070018/** \class EventId
19 * \brief Opaque type (shared_ptr) representing ID of a scheduled event
Alexander Afanasyev920af2f2014-01-25 22:56:11 -080020 */
Junxiao Shic041ca32014-02-25 20:01:15 -070021using ndn::EventId;
22
Junxiao Shi98e29f42014-03-31 10:27:26 -070023/** \brief schedule an event
24 */
25EventId
26schedule(const time::nanoseconds& after, const Scheduler::Event& event);
Junxiao Shic041ca32014-02-25 20:01:15 -070027
Junxiao Shi98e29f42014-03-31 10:27:26 -070028/** \brief cancel a scheduled event
29 */
30void
31cancel(const EventId& eventId);
32
33} // namespace scheduler
Junxiao Shic041ca32014-02-25 20:01:15 -070034
35using scheduler::EventId;
36
Alexander Afanasyev18bbf812014-01-29 01:40:23 -080037} // namespace nfd
Alexander Afanasyev920af2f2014-01-25 22:56:11 -080038
39#endif // NFD_CORE_SCHEDULER_HPP