/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
 * Copyright (c) 2017, Regents of the University of California.
 *
 * This file is part of ndncert, a certificate management system based on NDN.
 *
 * ndncert 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.
 *
 * ndncert 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 copies of the GNU General Public License along with
 * ndncert, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
 *
 * See AUTHORS.md for complete list of ndncert authors and contributors.
 */

#ifndef NDNCERT_JSON_HELPER_HPP
#define NDNCERT_JSON_HELPER_HPP

#include "certificate-request.hpp"

namespace ndn {
namespace ndncert {

const std::string JSON_IDNENTIFIER = "identifier";
const std::string JSON_CA_INFO = "ca-info";
const std::string JSON_STATUS = "status";
const std::string JSON_REQUEST_ID = "request-id";
const std::string JSON_CHALLENGES = "challenges";
const std::string JSON_CHALLENGE_TYPE = "challenge-type";
const std::string JSON_ERROR_INFO = "error-info";
const std::string JSON_CERTIFICATE = "certificate";

/**
 * @brief Generate JSON file to response PROBE insterest
 *
 * Target JSON format:
 * {
 *   "identifier": "",
 *   "ca-info": ""
 * }
 */
const JsonSection
genResponseProbeJson(const Name& identifier, const Name& CaInformation);

/**
 * @brief Generate JSON file to response NEW interest
 *
 * Target JSON format:
 * {
 *   "request-id": "",
 *   "challenges": [
 *     {
 *       "challenge-type": ""
 *     },
 *     {
 *       "challenge-type": ""
 *     },
 *     ...
 *   ]
 * }
 */
const JsonSection
genResponseNewJson(const std::string& requestId, const std::list<std::string>& challenges);

/**
 * @brief Generate JSON file to response _SELECT, _VALIDATE, and _STATUS interest
 *
 * if certificate name is not present:
 *
 * Target JSON format:
 * {
 *   "request-id": "@p requestId",
 *   "challenge-type": "@p challengeType",
 *   "status": "@p status"
 * }
 *
 * if certificate name is present:
 *
 * Target JSON format:
 * {
 *   "request-id": "@p requestId",
 *   "challenge-type": "@p challengeType",
 *   "status": "@p status",
 *   "certificate":"@p name"
 * }
 */
const JsonSection
genResponseChallengeJson(const std::string& requestId, const std::string& challengeType,
                         const std::string& status, const Name& name = Name());

/**
 * @brief Generate JSON file when there is an Error
 *
 * Target JSON format:
 * {
 *   "status": "",
 *   "error-info": ""
 * }
 */
const JsonSection
genErrorJson(const std::string& errorInfo);

} // namespace ndncert
} // namespace ndn

#endif // NDNCERT_JSON_HELPER_HPP
