/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
/*
 * Copyright (c) 2013, Regents of the University of California
 *                     Yingdi Yu
 *
 * BSD license, See the LICENSE file for more information
 *
 * Author: Yingdi Yu <yingdi@cs.ucla.edu>
 */

#ifndef LINKNDN_DNS_STORAGE_H
#define LINKNDN_DNS_STORAGE_H

#include <sqlite3.h>
#include <ndn-cpp/data.hpp>

class DnsStorage
{
public:
  struct Error : public std::runtime_error { Error(const std::string &what) : std::runtime_error(what) {} };

  DnsStorage();

  ~DnsStorage();

  void
  updateDnsSelfProfileData(const ndn::Data& data, const ndn::Name& identity);

  void
  updateDnsEndorseOthers(const ndn::Data& data, const ndn::Name& identity, const ndn::Name& endorsee);
  
  void
  updateDnsOthersEndorse(const ndn::Data& data, const ndn::Name& identity);

  ndn::ptr_lib::shared_ptr<ndn::Data>
  getData(const ndn::Name& name);

private:
  void
  updateDnsData(const ndn::Block& data, const std::string& identity, const std::string& name, const std::string& type, const std::string& dataName);

private:
  sqlite3 *m_db;
};

#endif
