Cryptolens Client API for C++
ActivationData.hpp
1 #pragma once
2 
3 #include <string>
4 
5 namespace cryptolens_io {
6 
7 namespace v20190401 {
8 
9 // An immutable class representing an activated machine
10 // for a given serial key
12 private:
13  std::string mid_;
14  std::string ip_;
15  std::uint64_t time_;
16 public:
18  ( std::string mid
19  , std::string ip
20  , std::uint64_t time
21  )
22  : mid_(std::move(mid))
23  , ip_(std::move(ip))
24  , time_(time)
25  { }
26 
27  // Returns the machine id
28  std::string const& get_mid() const { return mid_; }
29 
30  // Returns the IP when the machine was activated the first time
31  std::string const& get_ip() const { return ip_; }
32 
33  // Returns the time the machine was activated the first time
34  std::uint64_t get_time() const { return time_; }
35 };
36 
37 } // namespace v20190401
38 
39 namespace v20180502 {
40 
41 using ::cryptolens_io::v20190401::ActivationData;
42 
43 } // namespace v20180502
44 
45 namespace latest {
46 
47 using ::cryptolens_io::v20190401::ActivationData;
48 
49 } // namespace latest
50 
51 } // namespace cryptolens_io
Definition: ActivationData.hpp:11
Definition: ActivateError.hpp:5