blob: eb4ea357eceedf9cb5c23e4d8debab246a232b54 [file] [log] [blame]
Shock Jiang6cce21a2014-09-07 10:14:12 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
Yumin Xia55a7cc42017-05-14 18:43:34 -07002/*
3 * Copyright (c) 2014-2018, 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,
Yumin Xia55a7cc42017-05-14 18:43:34 -070037 NDNS_DOE = 1085,
Yumin Xiaa484ba72016-11-10 20:40:12 -080038 NDNS_AUTH = 1086, ///< only has RR for detailed (longer) label
39 NDNS_RESP = 1087, ///< response type means there are requested RR
40 NDNS_UNKNOWN = 1088, ///< this is not a real type, just mean that contentType is unknown
Shock Jiang6cce21a2014-09-07 10:14:12 -070041};
42
Shock Jiang895bc1b2014-10-01 20:00:58 -070043std::ostream&
Yumin Xiaa484ba72016-11-10 20:40:12 -080044operator<<(std::ostream& os, const NdnsContentType contentType);
Shock Jiang6cce21a2014-09-07 10:14:12 -070045
Shock Jiangcde28712014-10-19 21:17:20 -070046/**
47 * @brief define Return code of Update's Response
48 */
49enum UpdateReturnCode {
50 UPDATE_OK = 0, ///< Update succeeds
51 UPDATE_FAILURE = 1 ///< Update fails
52};
53
Shock Jiang6cce21a2014-09-07 10:14:12 -070054} // namespace ndns
55} // namespace ndn
56
57#endif // NDNS_NDNS_ENUM_HPP