RICOH Camera USB SDK for C++  1.1.0
RICOH Camera USB SDK for C++
response.hpp
Go to the documentation of this file.
1 // Copyright (c) 2017 Ricoh Company, Ltd. All Rights Reserved.
2 #ifndef RICOH_CAMERA_SDK_RESPONSE_HPP_
3 #define RICOH_CAMERA_SDK_RESPONSE_HPP_
4 
5 #include <memory>
6 #include <vector>
7 
9 
10 namespace Ricoh {
11 namespace CameraController {
12 
16 enum class Result {
17  Ok,
18  Error
19 };
20 
21 class Capture;
22 class Error;
23 
28 public:
34  Response(Result result);
35 
42  Response(Result result, const std::shared_ptr<Error>& error);
43 
44  virtual ~Response() = default;
45 
51  Result getResult() const;
52 
58  const std::vector<std::shared_ptr<Error>>& getErrors() const;
59 
65  void addError(const std::shared_ptr<Error>& error);
66 
67 protected:
68  Result result_;
69  std::vector<std::shared_ptr<Error>> errors_;
70 };
71 
76 public:
77 
84 
91  StartCaptureResponse(Result result, const std::shared_ptr<Error>& error);
92 
98  StartCaptureResponse(const std::shared_ptr<const Capture>& capture);
99 
100  ~StartCaptureResponse() = default;
101 
107  std::shared_ptr<const Capture> getCapture() const;
108 
109 private:
110  std::shared_ptr<const Capture> capture_;
111 };
112 
113 } // namespace CameraController
114 } // namespace Ricoh
115 
116 #endif // RICOH_CAMERA_SDK_RESPONSE_HPP_
Definition: camera_device.hpp:13
The class for a response having a capture from a camera device.
Definition: response.hpp:75
The class for a response from a camera device.
Definition: response.hpp:27
#define RCSDK_API
Definition: export.hpp:17
The interface for a camera capture information.
Definition: capture.hpp:38
This class represents a error of a request to a camera device.
Definition: error.hpp:75
Result
The type of a result responded form a camera device.
Definition: response.hpp:16