|
Octane API Client
|
Namespaces | |
| namespace | internal |
Classes | |
| struct | _ |
| Structure representing that it returns nothing. More... | |
| class | ApiClient |
| struct | Content |
Structure used as result for getContent, has data and ContentStatus and inherits Response. More... | |
| struct | ContentStatus |
Structure used in Content, has the status of Content. More... | |
| struct | Device |
Structure used in RoomStatus's devices, has the information of each device connected to the room. More... | |
| class | error_t |
| Utility class that can be used when we only want to specify quasi-normal state types. More... | |
| struct | ErrorResponse |
| General stucture to represent the error. More... | |
| struct | FileInfo |
| struct | HealthResult |
Structure used as result for health, has the server's status and message. More... | |
| class | ok_t |
| Utility class that can be used when we only want to specify normal state types. More... | |
| struct | Response |
Structure used/inherited in various methods of ApiClient, has the server's status. More... | |
| class | Result |
| Wrapper class that bifurcates the values indicated by normal and quasi-normal states. More... | |
| struct | RoomId |
Structure used as result for createRoom, has the room id and inherits Response. More... | |
| struct | RoomStatus |
Structure used as result for getRoomStatus, has the status of the room and inherits Response. More... | |
Enumerations | |
| enum struct | Health { Healthy , Degraded , Faulty } |
Enum used in HealthResult, represents the server's status. More... | |
| enum struct | ContentType { File , Clipboard , MultiFile } |
Enum used in ContentStatus, represents the type of Content. More... | |
Functions | |
| bool | operator== (const HealthResult &a, const HealthResult &b) |
| std::ostream & | operator<< (std::ostream &stream, const HealthResult &healthResult) |
| bool | operator== (const RoomId &a, const RoomId &b) |
| std::ostream & | operator<< (std::ostream &stream, const RoomId &roomId) |
| bool | operator== (const RoomStatus &a, const RoomStatus &b) |
| std::ostream & | operator<< (std::ostream &stream, const RoomStatus &roomStatus) |
| bool | operator== (const ContentStatus &a, const ContentStatus &b) |
| std::ostream & | operator<< (std::ostream &stream, const ContentStatus &contentStatus) |
| error_t< ErrorResponse > | makeError (std::string_view code, std::string_view reason) |
| Utility function to create error response. More... | |
| bool | operator== (const ErrorResponse &a, const ErrorResponse &b) |
| std::ostream & | operator<< (std::ostream &stream, const ErrorResponse &err) |
| template<typename T_OK > | |
| decltype(auto) | ok (const T_OK &ok) |
| Utility function used to construct normal state values. More... | |
| template<typename T_OK > | |
| decltype(auto) | ok (T_OK &&ok) |
| Utility function used to construct normal state values. More... | |
| template<typename T_OK = _> | |
| ok_t< _ > | ok () |
Utitlity function used when the normal state type is _. More... | |
| template<typename T_Error , size_t N> | |
| decltype(auto) | error (const T_Error(&error)[N]) |
| Utility function used to construct quasi-normal state values. More... | |
| template<typename T_Error > | |
| decltype(auto) | error (const T_Error &error) |
| Utility function to construct quasi-normal state values. More... | |
| template<typename T_Error > | |
| decltype(auto) | err (T_Error &&error) |
| Utility function to construct quasi-normal state values. More... | |
Variables | |
| constexpr auto | LIBRARY_NAME = "Octane API Client" |
| constexpr auto | LIBRARY_VERSION = "v0.1.0" |
| Library version. More... | |
| constexpr auto | DEFAULT_API_TOKEN = "mock" |
| Default API token. More... | |
| constexpr auto | DEFAULT_API_ORIGIN = "http://localhost:3000" |
| Default API origin. More... | |
| constexpr auto | DEFAULT_API_BASE_URL = "/api/v1" |
| Default base URL. More... | |
| constexpr auto | ERR_API_CLIENT_INITIALIZATION_FAILED = "ERR_API_CLIENT_INITIALIZATION_FAILED" |
Used when ApiClient initialization failed. More... | |
| constexpr auto | ERR_SERVER_HEALTH_STATUS_FAULTY = "ERR_SERVER_HEALTH_STATUS_FAULTY" |
| Used when the server has incidents and is currently not available. More... | |
| constexpr auto | ERR_CURL_INITIALIZATION_FAILED = "ERR_CURL_INITIALIZATION_FAILED" |
Used when cURL initialization failed, such as inoctane::internal::HttpClient。 More... | |
| constexpr auto | ERR_INCORRECT_HTTP_METHOD = "ERR_INCORRECT_HTTP_METHOD" |
| Used when an unexpected http method was issued. More... | |
| constexpr auto | ERR_CURL_CONNECTION_FAILED = "ERR_CURL_CONNECTION_FAILED" |
| Used when cURL failed to connect. More... | |
| constexpr auto | ERR_JSON_PARSE_FAILED = "ERR_JSON_PARSE_FAILED" |
| Used when JSON parse failed. More... | |
| constexpr auto | ERR_INVALID_RESPONSE = "ERR_INVALID_RESPONSE" |
| Used when there was an unexpected response from the server. More... | |
| constexpr auto | ERR_INVALID_REQUEST = "ERR_INVALID_REQUEST" |
| Used when an unexpected request was issued. More... | |
| constexpr auto | ERR_ROOM_ID_UNDEFINED = "ERR_ROOM_ID_UNDEFINED" |
Used when you are not connected to a room but getRoomStatus() and deleteRoom() was passed nothing. More... | |
| constexpr auto | ERR_ROOM_DISCONNECTED = "ERR_ROOM_DISCONNECTED" |
| constexpr auto | ERR_DUP_DEVICE = "ERR_DUP_DEVICE" |
| constexpr auto | ERR_CONTENT_HASH_MISMATCH = "ERR_CONTENT_HASH_MISMATCH" |
| constexpr auto | ERR_CONTENT_TYPE_DATA_MISMATCH = "ERR_CONTENT_TYPE_DATA_MISMATCH" |
|
strong |
Enum used in ContentStatus, represents the type of Content.
| Enumerator | |
|---|---|
| File | Type of |
| Clipboard | Type of |
| MultiFile | Type of |
|
strong |
Enum used in HealthResult, represents the server's status.
| Enumerator | |
|---|---|
| Healthy | The server is working. |
| Degraded | There are incidents happening in the server. |
| Faulty | The server is dead. |
| decltype(auto) octane::err | ( | T_Error && | error | ) |
Utility function to construct quasi-normal state values.
例えばResultを返す関数で以下のように使用する。 Use it as following in a function that returns Result.
| T_Error | Type of quasi-normal state. |
| [in] | error | Value of quasi-normal state. |


| decltype(auto) octane::error | ( | const T_Error & | error | ) |
Utility function to construct quasi-normal state values.
例えばResultを返す関数で以下のように使用する。 Use it as following in a function that returns Result.
| T_Error | Type of quasi-normal state. |
| [in] | error | Value of quasi-normal state. |

| decltype(auto) octane::error | ( | const T_Error(&) | error[N] | ) |
Utility function used to construct quasi-normal state values.
このオーバーロードは正常系が固定長配列のときに使用される。 例えばResultを返す関数で以下のように使用する。 This overload is used when the normal state is a fixed length array. Use it as following in a function that returns Result.
| T_Error | Type of quasi-normal state. |
| N | Size of array. |
| [in] | error | Value of quasi-normal state. |
okの方で実装していない理由は単に正常系で文字列リテラルを返すことがなかったから。 需要があればそちらも作成する。 This overload was created because we wanted to express errors in string literals. The reason it was not implemented in ok was simply because the normal system never returned a string literal. If there is a demand for it, we will create it too. 

| error_t< ErrorResponse > octane::makeError | ( | std::string_view | code, |
| std::string_view | reason | ||
| ) |
Utility function to create error response.
Result<T, ErrorResponse>という形式の戻り値をもつ関数で より楽にエラーを返すために作られた。 Created to make it easier to return errors in functions which return Result<T, ErrorResponse>.
| [in] | code | Error code. |
| [in] | reason | Reason why the error ocurred. |


Utitlity function used when the normal state type is _.
例えばResultを返す関数で以下のように使用する。 Use it as following in a function that returns Result.
| T_OK | _ |


| decltype(auto) octane::ok | ( | const T_OK & | ok | ) |
Utility function used to construct normal state values.
例えばResultを返す関数で以下のように使用する。 Use it as following in a function that returns Result.
| T_OK | Type of normal state. |
| [in] | ok | Value of normal state. |


| decltype(auto) octane::ok | ( | T_OK && | ok | ) |
Utility function used to construct normal state values.
例えばResultを返す関数で以下のように使用する。 Use it as following in a function that returns Result.
| T_OK | Type of normal state. |
| [in] | ok | Value of normal state. |

| std::ostream & octane::operator<< | ( | std::ostream & | stream, |
| const ContentStatus & | contentStatus | ||
| ) |
| std::ostream & octane::operator<< | ( | std::ostream & | stream, |
| const ErrorResponse & | err | ||
| ) |

| std::ostream & octane::operator<< | ( | std::ostream & | stream, |
| const HealthResult & | healthResult | ||
| ) |
| std::ostream & octane::operator<< | ( | std::ostream & | stream, |
| const RoomId & | roomId | ||
| ) |
| std::ostream & octane::operator<< | ( | std::ostream & | stream, |
| const RoomStatus & | roomStatus | ||
| ) |
| bool octane::operator== | ( | const ContentStatus & | a, |
| const ContentStatus & | b | ||
| ) |
| bool octane::operator== | ( | const ErrorResponse & | a, |
| const ErrorResponse & | b | ||
| ) |
| bool octane::operator== | ( | const HealthResult & | a, |
| const HealthResult & | b | ||
| ) |
| bool octane::operator== | ( | const RoomStatus & | a, |
| const RoomStatus & | b | ||
| ) |
|
constexpr |
Default base URL.
|
constexpr |
Default API origin.
|
constexpr |
Default API token.
|
constexpr |
Used when ApiClient initialization failed.
|
constexpr |
|
constexpr |
|
constexpr |
Used when cURL failed to connect.
|
constexpr |
Used when cURL initialization failed, such as inoctane::internal::HttpClient。
|
constexpr |
|
constexpr |
Used when an unexpected http method was issued.
|
constexpr |
Used when an unexpected request was issued.
|
constexpr |
Used when there was an unexpected response from the server.
|
constexpr |
Used when JSON parse failed.
|
constexpr |
|
constexpr |
Used when you are not connected to a room but getRoomStatus() and deleteRoom() was passed nothing.
|
constexpr |
Used when the server has incidents and is currently not available.
|
constexpr |
Library name. Octane API Client。
|
constexpr |
Library version.
Naming conventions are v{MAJOR}.{MINOR}.{PATCH}