GoPxL SDK
GoResponse.h
Go to the documentation of this file.
1 
10 #ifndef GO_PXL_SDK_GORESPONSE_H
11 #define GO_PXL_SDK_GORESPONSE_H
12 
13 #include <kApi/kApiDef.h>
14 
15 #include <GoPxLSdk/Def.h>
16 #include <GoPxLSdk/GoJson.h>
19 
20 class GoStreamResponseTests;
21 
22 namespace GoPxLSdk
23 {
24 
26 {
27 public:
31  GoResponse() = default;
32 
33  virtual ~GoResponse() = default;
34 
43  GoResponse(GoResponseType type, const GoJson& fullmsg);
44 
52  virtual kStatus Status() const;
53 
61  virtual GoResponseType Type() const;
62 
70  virtual const std::string& Path() const;
71 
79  virtual const GoJson& Payload() const;
80 
88  virtual const GoJson& Raw() const;
89 
90 private:
91  kStatus status = kOK;
93  std::string path;
94  GoJson payload;
95  GoJson raw;
96 };
97 
98 
103 {
104 public:
111  GoRequestResponse() = default;
112  ~GoRequestResponse() = default;
113 
121  GoRequestResponse(const GoJson& fullmsg);
122 };
123 
124 
129 {
130 public:
137  GoNotificationResponse() = default;
138  ~GoNotificationResponse() = default;
139 
147  GoNotificationResponse(const GoJson& fullmsg);
148 
157  GoNotificationType NotificationType() const;
158 };
159 
160 
165 {
166  friend class ::GoStreamResponseTests;
167 
168 // Public declaration.
169 public:
170  using StreamId = k32u;
171 
172 public:
179  GoStreamResponse() = default;
180  ~GoStreamResponse() = default;
181 
189  GoStreamResponse(const GoJson& fullmsg);
190 
199  GoStreamResponse::StreamId StreamIdentifier() const;
200 
209  const std::string StreamStatus() const;
210 };
211 
212 }
213 
214 #endif
Simplify working with json data.
Definition: GoJson.h:39
Declares the GoPxLSdk.GoResponseType class.
#define GoPxLSdkClass
Definition: Def.h:35
Declares the general SDK definitions.
Definition: GoResponseType.h:16
k32u StreamId
Definition: GoResponse.h:170
Represents streamed data.
Definition: GoResponse.h:164
Definition: GoNotificationType.h:18
Declares the GoPxLSdk.GoJson class.
Represents a response to requests such as Read/Update.
Definition: GoResponse.h:102
Declares the GoPxLSdk.GoNotificationType class.
Represents a response to change notifications.
Definition: GoResponse.h:128
A reply to a request (e.g. Read or Update).
Definition: GoResponseType.h:21
Definition: GoResponse.h:25
Definition: Def.h:46