/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */
/*
 * Copyright (c) 2012 University of California, Los Angeles
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation;
 *
 * This program 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 this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 * Author: Zhenkai Zhu <zhenkai@cs.ucla.edu>
 *         Chaoyi Bian <bcy@pku.edu.cn>
 *         Alexander Afanasyev <alexander.afanasyev@ucla.edu>
 */

#ifndef NLSR_NSYNC_SYNC_STATE_H
#define NLSR_NSYNC_SYNC_STATE_H

#include "sync-state-leaf-container.h"
#include <boost/exception/all.hpp>
#include "sync-state.pb.h"

/**
 * \defgroup sync SYNC protocol
 *
 * Implementation of SYNC protocol
 */
namespace Sync {

/**
 * \ingroup sync
 * @brief this prefix will be used for the dummy node which increases its sequence number whenever
 * a remove operation happens; this is to prevent the reversion of root digest when we prune
 * a branch, i.e. help the root digest to be forward only
 * No corresponding data msg would be published and no attempt would be made to retrieve the
 * data msg
 */
const std::string forwarderPrefix = "/d0n0t18ak/t0ps8cr8t";

class State;
typedef shared_ptr<State> StatePtr;
typedef shared_ptr<State> StateConstPtr;

/**
 * \ingroup sync
 * @brief Container for state leaves and definition of the abstract interface to work with State objects
 */
class State
{
public:
  virtual ~State () { };

  /**
   * @brief Add or update leaf to the state tree
   *
   * @param info name of the leaf
   * @param seq  sequence number of the leaf
   */
  virtual tuple<bool/*inserted*/, bool/*updated*/, SeqNo/*oldSeqNo*/>
  update (NameInfoConstPtr info, const SeqNo &seq) = 0;

  /**
   * @brief Remove leaf from the state tree
   * @param info name of the leaf
   */
  virtual bool
  remove (NameInfoConstPtr info) = 0;

  /**
   * @brief Get state leaves
   */
  const LeafContainer &
  getLeaves () const
  { return m_leaves; }

protected:
  LeafContainer m_leaves;
};


/**
 * @brief Formats a protobuf SyncStateMsg msg
 * @param oss output SyncStateMsg msg
 * @param state state
 * @returns output SyncStateMsg msg
 */
SyncStateMsg &
operator << (SyncStateMsg &ossm, const State &state);


/**
 * @brief Parse a protobuf SyncStateMsg msg
 * @param iss input SyncStateMsg msg
 * @param state state
 * @returns SyncStateMsg msg
 */
SyncStateMsg &
operator >> (SyncStateMsg &issm, State &state);

namespace Error {
/**
 * @brief Will be thrown when data cannot be properly decoded to SyncStateMsg
 */
struct SyncStateMsgDecodingFailure : virtual boost::exception, virtual std::exception { };
}

} // Sync

#endif // NLSR_NSYNC_SYNC_STATE_H
