Skip to content

Commit c050e38

Browse files
committed
common: cloudprotocol: add cloud protocol envvars messages
This patch adds support for cloud protocol environment variables messages. Signed-off-by: Mykhailo Lohvynenko <[email protected]>
1 parent 036923c commit c050e38

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

include/aos/common/cloudprotocol/envvars.hpp

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,52 @@ struct EnvVarsInstanceStatus {
163163

164164
using EnvVarsInstanceStatusArray = StaticArray<EnvVarsInstanceStatus, cMaxNumInstances>;
165165

166+
/**
167+
* Environment variable override request.
168+
*/
169+
struct OverrideEnvVarsRequest {
170+
EnvVarsInstanceInfoArray mItems;
171+
172+
/**
173+
* Compares environment variable override request.
174+
*
175+
* @param request environment variable override request to compare with.
176+
* @return bool.
177+
*/
178+
bool operator==(const OverrideEnvVarsRequest& request) const { return mItems == request.mItems; }
179+
180+
/**
181+
* Compares environment variable override request.
182+
*
183+
* @param request environment variable override request to compare with.
184+
* @return bool.
185+
*/
186+
bool operator!=(const OverrideEnvVarsRequest& request) const { return !operator==(request); }
187+
};
188+
189+
/**
190+
* Environment variable override statuses.
191+
*/
192+
struct OverrideEnvVarsStatuses {
193+
EnvVarsInstanceStatusArray mStatuses;
194+
195+
/**
196+
* Compares environment variable override statuses.
197+
*
198+
* @param statuses environment variable override statuses to compare with.
199+
* @return bool.
200+
*/
201+
bool operator==(const OverrideEnvVarsStatuses& statuses) const { return mStatuses == statuses.mStatuses; }
202+
203+
/**
204+
* Compares environment variable override statuses.
205+
*
206+
* @param statuses environment variable override statuses to compare with.
207+
* @return bool.
208+
*/
209+
bool operator!=(const OverrideEnvVarsStatuses& statuses) const { return !operator==(statuses); }
210+
};
211+
166212
} // namespace aos::cloudprotocol
167213

168214
#endif

0 commit comments

Comments
 (0)