blob: 89ad87d46d8043556f2e1bd7f6c0fd867fa36d3b [file] [log] [blame]
Shock Jiang6cce21a2014-09-07 10:14:12 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/**
Yumin Xiaa484ba72016-11-10 20:40:12 -08003 * Copyright (c) 2014-2016, Regents of the University of California.
Shock Jiang6cce21a2014-09-07 10:14:12 -07004 *
5 * This file is part of NDNS (Named Data Networking Domain Name Service).
6 * See AUTHORS.md for complete list of NDNS authors and contributors.
7 *
8 * NDNS is free software: you can redistribute it and/or modify it under the terms
9 * of the GNU General Public License as published by the Free Software Foundation,
10 * either version 3 of the License, or (at your option) any later version.
11 *
12 * NDNS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
13 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 * PURPOSE. See the GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along with
17 * NDNS, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef NDNS_NDNS_ENUM_HPP
21#define NDNS_NDNS_ENUM_HPP
22
Shock Jiang895bc1b2014-10-01 20:00:58 -070023#include <ostream>
Yumin Xiaa484ba72016-11-10 20:40:12 -080024#include <ndn-cxx/encoding/tlv.hpp>
Shock Jiang6cce21a2014-09-07 10:14:12 -070025
26namespace ndn {
27namespace ndns {
28
29/**
Yumin Xiaa484ba72016-11-10 20:40:12 -080030 * @brief contentType of response
Shock Jiang6cce21a2014-09-07 10:14:12 -070031 */
Yumin Xiaa484ba72016-11-10 20:40:12 -080032enum NdnsContentType {
33 NDNS_BLOB = ndn::tlv::ContentType_Blob,
34 NDNS_LINK = ndn::tlv::ContentType_Link,
35 NDNS_KEY = ndn::tlv::ContentType_Key,
36 NDNS_NACK = ndn::tlv::ContentType_Nack,
37 NDNS_AUTH = 1086, ///< only has RR for detailed (longer) label
38 NDNS_RESP = 1087, ///< response type means there are requested RR
39 NDNS_UNKNOWN = 1088, ///< this is not a real type, just mean that contentType is unknown
Shock Jiang6cce21a2014-09-07 10:14:12 -070040};
41
Shock Jiang895bc1b2014-10-01 20:00:58 -070042std::ostream&
Yumin Xiaa484ba72016-11-10 20:40:12 -080043operator<<(std::ostream& os, const NdnsContentType contentType);
Shock Jiang6cce21a2014-09-07 10:14:12 -070044
Shock Jiangcde28712014-10-19 21:17:20 -070045/**
46 * @brief define Return code of Update's Response
47 */
48enum UpdateReturnCode {
49 UPDATE_OK = 0, ///< Update succeeds
50 UPDATE_FAILURE = 1 ///< Update fails
51};
52
Shock Jiang6cce21a2014-09-07 10:14:12 -070053} // namespace ndns
54} // namespace ndn
55
56#endif // NDNS_NDNS_ENUM_HPP