GoPxL SDK
GoResponse.h
Go to the documentation of this file.
1 
9 #ifndef GO_PXL_SDK_GORESPONSE_H
10 #define GO_PXL_SDK_GORESPONSE_H
11 
12 #include <kApi/kApiDef.h>
13 
14 #include <GoPxLSdk/Def.h>
15 #include <GoPxLSdk/GoJson.h>
18 
19 class GoStreamResponseTests;
20 
21 namespace GoPxLSdk
22 {
23 
25 {
26 public:
30  GoResponse() = default;
31 
32  virtual ~GoResponse() = default;
33 
42  GoResponse(GoResponseType type, const GoJson& fullmsg);
43 
51  virtual kStatus Status() const;
52 
60  virtual GoResponseType Type() const;
61 
69  virtual const std::string& Path() const;
70 
78  virtual const GoJson& Payload() const;
79 
87  virtual const GoJson& Raw() const;
88 
89 private:
90  kStatus status = kOK;
92  std::string path;
93  GoJson payload;
94  GoJson raw;
95 };
96 
97 
102 {
103 public:
110  GoRequestResponse() = default;
111  ~GoRequestResponse() = default;
112 
120  GoRequestResponse(const GoJson& fullmsg);
121 };
122 
123 
128 {
129 public:
136  GoNotificationResponse() = default;
137  ~GoNotificationResponse() = default;
138 
146  GoNotificationResponse(const GoJson& fullmsg);
147 
156  GoNotificationType NotificationType() const;
157 };
158 
159 
164 {
165  friend class ::GoStreamResponseTests;
166 
167 // Public declaration.
168 public:
169  using StreamId = k32u;
170 
171 public:
178  GoStreamResponse() = default;
179  ~GoStreamResponse() = default;
180 
188  GoStreamResponse(const GoJson& fullmsg);
189 
198  GoStreamResponse::StreamId StreamIdentifier() const;
199 
208  const std::string StreamStatus() const;
209 };
210 
211 }
212 
213 #endif
Simplify working with json data.
Definition: GoJson.h:38
#define GoPxLSdkClass
Definition: Def.h:35
Declares the general SDK definitions.
Definition: GoResponseType.h:15
k32u StreamId
Definition: GoResponse.h:169
Represents streamed data.
Definition: GoResponse.h:163
Definition: GoNotificationType.h:17
Represents a response to requests such as Read/Update.
Definition: GoResponse.h:101
Represents a response to change notifications.
Definition: GoResponse.h:127
A reply to a request (e.g. Read or Update).
Definition: GoResponseType.h:20
Definition: GoResponse.h:24
Definition: Def.h:46