encrypt-error.hpp
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
22 #ifndef NDN_ENCRYPT_ERROR_HPP
23 #define NDN_ENCRYPT_ERROR_HPP
24 
25 #include "../common.hpp"
26 
27 namespace ndn {
28 
33 class EncryptError {
34 public:
35  enum ErrorCode {
36  Timeout = 1,
37  Validation = 2,
38  UnsupportedEncryptionScheme = 32,
39  InvalidEncryptedFormat = 33,
40  NoDecryptKey = 34,
41  EncryptionFailure = 35,
42  General = 100
43  };
44 
48  typedef func_lib::function<void
49  (ErrorCode errorCode, const std::string& message)> OnError;
50 };
51 
52 }
53 
54 #endif
Copyright (C) 2013-2016 Regents of the University of California.
Definition: common.hpp:36
EncryptError holds the ErrorCode enum and OnError callback definition for errors from the encrypt lib...
Definition: encrypt-error.hpp:33
func_lib::function< void(ErrorCode errorCode, const std::string &message)> OnError
A method calls onError(errorCode, message) for an error.
Definition: encrypt-error.hpp:49