1#ifndef CPR_CERT_INFO_H
2#define CPR_CERT_INFO_H
3
4#include <initializer_list>
5#include <string>
6#include <vector>
7
8namespace cpr {
9
10class CertInfo {
11 private:
12 std::vector<std::string> cert_info_;
13
14 public:
15 CertInfo() = default;
16 CertInfo(const std::initializer_list<std::string>& entry) : cert_info_{entry} {};
17 ~CertInfo() noexcept = default;
18
19 using iterator = std::vector<std::string>::iterator;
20 using const_iterator = std::vector<std::string>::const_iterator;
21
22 std::string& operator[](const size_t& pos);
23 iterator begin();
24 iterator end();
25 const_iterator begin() const;
26 const_iterator end() const;
27 const_iterator cbegin() const;
28 const_iterator cend() const;
29 void emplace_back(const std::string& str);
30 void push_back(const std::string& str);
31 void pop_back();
32};
33} // namespace cpr
34
35#endif
36