11#ifndef OCTANE_API_CLIENT_API_RESULT_TYPES_H_
12#define OCTANE_API_CLIENT_API_RESULT_TYPES_H_
113 std::optional<std::string>
name;
118 std::ostream&
operator<<(std::ostream& stream,
124 std::vector<std::uint8_t>
data;
137 std::variant<std::string, std::vector<uint8_t>, std::vector<FileInfo>>
data;
Definition: api_client.cpp:20
Health
Enum used in HealthResult, represents the server's status.
Definition: api_result_types.h:28
@ Healthy
The server is working.
@ Degraded
There are incidents happening in the server.
@ Faulty
The server is dead.
std::ostream & operator<<(std::ostream &stream, const HealthResult &healthResult)
Definition: api_result_types.cpp:18
ContentType
Enum used in ContentStatus, represents the type of Content.
Definition: api_result_types.h:92
@ File
Type of Content is file.
@ MultiFile
Type of Content is multi-file.
@ Clipboard
Type of Content is clipboard.
bool operator==(const HealthResult &a, const HealthResult &b)
Definition: api_result_types.cpp:15
Define type to represent the result, inspired by Rust's "Result".
Structure used as result for getContent, has data and ContentStatus and inherits Response.
Definition: api_result_types.h:132
ContentStatus contentStatus
The status of Content.
Definition: api_result_types.h:134
std::variant< std::string, std::vector< uint8_t >, std::vector< FileInfo > > data
The data of Content, is a variant of string, single file binary.
Definition: api_result_types.h:137
Structure used in Content, has the status of Content.
Definition: api_result_types.h:105
std::optional< std::string > name
Optional: If the type is file, then this represents it's name.
Definition: api_result_types.h:113
std::uint64_t timestamp
Timestamp of when did this content get uploaded.
Definition: api_result_types.h:109
ContentType type
Type of Content.
Definition: api_result_types.h:111
std::string mime
MIME.
Definition: api_result_types.h:115
std::string device
Device which uploaded this content.
Definition: api_result_types.h:107
Structure used in RoomStatus's devices, has the information of each device connected to the room.
Definition: api_result_types.h:65
std::string name
An unique name for the device which is connected to the room, such as collodi's fedora linux.
Definition: api_result_types.h:68
std::uint64_t timestamp
Timestamp of when did this device connect to the room.
Definition: api_result_types.h:70
Definition: api_result_types.h:120
std::vector< std::uint8_t > data
binary data of the file
Definition: api_result_types.h:124
std::string filename
file name.
Definition: api_result_types.h:122
Structure used as result for health, has the server's status and message.
Definition: api_result_types.h:41
Health health
Status of the server.
Definition: api_result_types.h:43
std::optional< std::string > message
Message which describe details of the server's status.
Definition: api_result_types.h:45
Structure used/inherited in various methods of ApiClient, has the server's status.
Definition: api_result_types.h:55
std::optional< std::string > message
Definition: api_result_types.h:57
Health health
Definition: api_result_types.h:56
Structure used as result for createRoom, has the room id and inherits Response.
Definition: api_result_types.h:144
std::uint64_t id
Definition: api_result_types.h:145
Structure used as result for getRoomStatus, has the status of the room and inherits Response.
Definition: api_result_types.h:77
std::vector< Device > devices
Information for all of the devices connected to the room.
Definition: api_result_types.h:81
std::string name
Name of the room.
Definition: api_result_types.h:79
std::uint64_t id
Id of the room.
Definition: api_result_types.h:83