Zhiyi Zhang | 5f13362 | 2015-10-17 08:49:54 +0800 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
| 2 | /** |
| 3 | * Copyright (c) 2014-2015, Regents of the University of California |
| 4 | * |
| 5 | * This file is part of ndn-group-encrypt (Group-based Encryption Protocol for NDN). |
| 6 | * See AUTHORS.md for complete list of ndn-group-encrypt authors and contributors. |
| 7 | * |
| 8 | * ndn-group-encrypt 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 | * ndn-group-encrypt 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 | * ndn-group-encrypt, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>. |
| 18 | * |
| 19 | * @author Yingdi Yu <yingdi@cs.ucla.edu> |
| 20 | */ |
| 21 | |
| 22 | #ifndef NDN_GEP_ERROR_CODE_HPP |
| 23 | #define NDN_GEP_ERROR_CODE_HPP |
| 24 | |
| 25 | #include "common.hpp" |
| 26 | |
| 27 | namespace ndn { |
| 28 | namespace gep { |
| 29 | |
| 30 | enum class ErrorCode { |
| 31 | Timeout = 1, |
| 32 | Validation = 2, |
| 33 | UnsupportedEncryptionScheme = 32, |
| 34 | InvalidEncryptedFormat = 33, |
Yingdi Yu | 79ce239 | 2016-03-10 10:21:55 -0800 | [diff] [blame] | 35 | NoDecryptKey = 34, |
Yingdi Yu | 48967a6 | 2016-03-11 22:04:14 -0800 | [diff] [blame] | 36 | EncryptionFailure = 35, |
| 37 | DataRetrievalFailure = 36 |
Zhiyi Zhang | 5f13362 | 2015-10-17 08:49:54 +0800 | [diff] [blame] | 38 | }; |
| 39 | |
| 40 | typedef function<void (const ErrorCode&, const std::string&)> ErrorCallBack; |
| 41 | |
| 42 | } // namespace gep |
| 43 | } // namespace ndn |
| 44 | |
| 45 | #endif // NDN_GEP_ERROR_CODE_HPP |