| 
    olp-cpp-sdk
    1.23.1
    
   | 
 
Rrepresents the outcome of a network request. More...
#include <NetworkTypes.h>
Public Member Functions | |
| SendOutcome (RequestId request_id) | |
| Sets a successful request outcome.  More... | |
| SendOutcome (ErrorCode error_code) | |
| Sets an unsuccessful request outcome.  More... | |
| bool | IsSuccessful () const | 
| Checks if the network request push was successful.  More... | |
| RequestId | GetRequestId () const | 
| Gets the request ID.  More... | |
| ErrorCode | GetErrorCode () const | 
| Gets the error code.  More... | |
Static Public Attributes | |
| static constexpr RequestId | kInvalidRequestId | 
| The invalid request ID alias.  More... | |
Rrepresents the outcome of a network request.
It contains either a valid request ID or error code if the request trigger failed. The caller must check whether the outcome of the request was a success before attempting to access the result or error.
      
  | 
  inlineexplicit | 
Sets a successful request outcome.
| request_id | The valid unique request ID. | 
      
  | 
  inlineexplicit | 
Sets an unsuccessful request outcome.
| error_code | The error code that specifies why the request failed. | 
      
  | 
  inline | 
Gets the error code.
ErrorCode::SUCCESS if the request was successful; any other ErrorCode otherwise. 
      
  | 
  inline | 
Gets the request ID.
RequestIdConstants::RequestIdInvalid otherwise. 
      
  | 
  inline | 
Checks if the network request push was successful.
      
  | 
  staticconstexpr | 
The invalid request ID alias.