/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
/*
 * Copyright (c) 2012-2014 University of California, Los Angeles
 *
 * This file is part of ChronoSync, synchronization library for distributed realtime
 * applications for NDN.
 *
 * ChronoSync is free software: you can redistribute it and/or modify it under the terms
 * of the GNU General Public License as published by the Free Software Foundation, either
 * version 3 of the License, or (at your option) any later version.
 *
 * ChronoSync is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 * PURPOSE.  See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * ChronoSync, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
 *
 * @author Zhenkai Zhu <http://irl.cs.ucla.edu/~zhenkai/>
 * @author Chaoyi Bian <bcy@pku.edu.cn>
 * @author Alexander Afanasyev <http://lasr.cs.ucla.edu/afanasyev/index.html>
 */

#ifndef SYNC_INTEREST_CONTAINER_H
#define SYNC_INTEREST_CONTAINER_H

#include <ndn-cxx/util/time.hpp>

#include "sync-digest.h"

#include <boost/multi_index_container.hpp>
#include <boost/multi_index/tag.hpp>
// #include <boost/multi_index/ordered_index.hpp>
// #include <boost/multi_index/composite_key.hpp>
#include <boost/multi_index/hashed_index.hpp>
#include <boost/multi_index/sequenced_index.hpp>
#include <boost/multi_index/ordered_index.hpp>
// #include <boost/multi_index/random_access_index.hpp>
#include <boost/multi_index/member.hpp>
#include <boost/multi_index/mem_fun.hpp>

namespace mi = boost::multi_index;

namespace Sync {

struct Interest
{
  Interest (DigestConstPtr digest, const std::string &name, bool unknown=false)
  : m_digest (digest)
  , m_name (name)
  , m_time (ndn::time::system_clock::now())
  , m_unknown (unknown)
  {
  }

  DigestConstPtr   m_digest;
  std::string      m_name;
  ndn::time::system_clock::TimePoint m_time;
  bool             m_unknown;
};

/// @cond include_hidden
struct named { };
struct hashed;
struct timed;
/// @endcond

/**
 * \ingroup sync
 * @brief Container for interests (application PIT)
 */
struct InterestContainer : public mi::multi_index_container<
  Interest,
  mi::indexed_by<
    mi::hashed_unique<
      mi::tag<named>,
      BOOST_MULTI_INDEX_MEMBER(Interest, std::string, m_name)
    >
    ,

    mi::hashed_non_unique<
      mi::tag<hashed>,
      BOOST_MULTI_INDEX_MEMBER(Interest, DigestConstPtr, m_digest),
      DigestPtrHash,
      DigestPtrEqual
      >
    ,

    mi::ordered_non_unique<
      mi::tag<timed>,
      BOOST_MULTI_INDEX_MEMBER(Interest, ndn::time::system_clock::TimePoint, m_time)
      >
    >
  >
{
};

} // Sync

#endif // SYNC_INTEREST_CONTAINER_H
