Astarte device API for C++ 0.7.1
Astarte device SDK for C++
Loading...
Searching...
No Matches
ownership.hpp
Go to the documentation of this file.
1// (C) Copyright 2025, SECO Mind Srl
2//
3// SPDX-License-Identifier: Apache-2.0
4
5#ifndef ASTARTE_DEVICE_SDK_OWNERSHIP_H
6#define ASTARTE_DEVICE_SDK_OWNERSHIP_H
7
12
13#include <cstdint>
14#include <string_view>
15
16namespace AstarteDeviceSdk {
17
25
26static constexpr auto ownership_as_str(AstarteOwnership ownership) -> std::string_view {
27 switch (ownership) {
29 return "device";
31 return "server";
32 }
33 return "unknown";
34}
35
36} // namespace AstarteDeviceSdk
37
38#endif // ASTARTE_DEVICE_SDK_OWNERSHIP_H
Umbrella namespace for the Astarte device SDK.
Definition data.hpp:22
AstarteOwnership
Possible Astarte ownership.
Definition ownership.hpp:19
@ kServer
Ownership is retained by the Astarte cloud server.
Definition ownership.hpp:23
@ kDevice
Ownership is retained by the device.
Definition ownership.hpp:21