gphoto2pp
A C++ Wrapper for libgphoto2
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
camera_list_wrapper.hpp
Go to the documentation of this file.
1 
25 #ifndef CAMERALISTWRAPPER_HPP
26 #define CAMERALISTWRAPPER_HPP
27 
28 #include <string>
29 
30 namespace gphoto2
31 {
32  struct _CameraList;
33 }
34 
35 namespace gphoto2pp
36 {
42  {
43  public:
46 
47  // Move constructor and move assignment are allowed
50 
51  CameraListWrapper(CameraListWrapper const & other);
53 
54  gphoto2::_CameraList* getPtr() const;
55 
62  int count() const;
63 
71  std::string getName(int index) const;
72 
80  std::string getValue(int index) const;
81 
89  void setName(int index, std::string const & name);
90 
98  void setValue(int index, std::string const & value);
99 
107  void append(std::string const & name, std::string const & value);
108 
114  void reset();
115 
121  void sort();
122 
129  int findByName(std::string const & name) const;
130 
137  std::pair<std::string, std::string> getPair(int index) const;
138 
145  std::pair<std::string, std::string> getPairByName(std::string const & name) const;
146 
147  private:
148  gphoto2::_CameraList* m_cameraList;
149  };
150 }
151 
152 #endif // CAMERALISTWRAPPER_HPP