QtProtobuf  0.6
Protobuf plugin to generate Qt classes
Public Types | Public Member Functions | Properties | List of all members
QtProtobuf::QGrpcStatus Class Referencefinal

The QGrpcStatus class contains information about last gRPC operation. More...

#include <qgrpcstatus.h>

Public Types

enum  StatusCode {
  Ok = 0 , Cancelled = 1 , Unknown = 2 , InvalidArgument = 3 ,
  DeadlineExceeded = 4 , NotFound = 5 , AlreadyExists = 6 , PermissionDenied = 7 ,
  Unauthenticated = 16 , ResourceExhausted = 8 , FailedPrecondition = 9 , Aborted = 10 ,
  OutOfRange = 11 , Unimplemented = 12 , Internal = 13 , Unavailable = 14 ,
  DataLoss = 15
}
 Channel's status codes. More...
 

Public Member Functions

 QGrpcStatus (StatusCode code=StatusCode::Ok, const QString &message=QString())
 
StatusCode code () const
 code getter for QGrpcStatus::StatusCode received for prior gRPC call.
 
QString message () const
 message getter for status message received for prior gRPC call.
 
bool operator== (StatusCode code) const
 
bool operator!= (StatusCode code) const
 
bool operator== (const QGrpcStatus &other) const
 
 QGrpcStatus (const QGrpcStatus &other)
 
QGrpcStatusoperator= (const QGrpcStatus &other)
 
 QGrpcStatus (QGrpcStatus &&other)
 
QGrpcStatusoperator= (QGrpcStatus &&other)
 

Properties

Q_GADGETStatusCode code
 
QString message
 

Detailed Description

The QGrpcStatus class contains information about last gRPC operation.

In case of error in call/subscription processing QGrpcStatus will contain code any of non-Ok QGrpcStatus::StatusCode. This class combines QGrpcStatus::StatusCode and message returned from channel or QGrpc framework.

Member Enumeration Documentation

◆ StatusCode

Channel's status codes.

See also
gRPC status codes
Enumerator
Ok 

No error.

Cancelled 

The operation was cancelled, typically by the caller.

Unknown 

Unknown error.

InvalidArgument 

The client specified an invalid argument.

DeadlineExceeded 

The deadline expired before the operation could complete.

NotFound 

Some requested entity (e.g., file or directory) was not found.

AlreadyExists 

The entity that a client attempted to create (e.g., file or directory) already exists.

409 Conflict

PermissionDenied 

The caller does not have permission to execute the specified operation.

PERMISSION_DENIED must not be used for rejections caused by exhausting some resource (use RESOURCE_EXHAUSTED instead for those errors). PERMISSION_DENIED must not be used if the caller can not be identified (use UNAUTHENTICATED instead for those errors). This error code does not imply the request is valid or the requested entity exists or satisfies other pre-conditions. 403 Forbidden

Unauthenticated 

The request does not have valid authentication credentials for the operation.

ResourceExhausted 

Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system is out of space.

FailedPrecondition 

The operation was rejected because the system is not in a state required for the operation's execution.

Aborted 

The operation was aborted, typically due to a concurrency issue such as a sequencer check failure or transaction abort.

OutOfRange 

The operation was attempted past the valid range.

Unimplemented 

The operation is not implemented or is not supported/enabled in this service.

Internal 

Internal errors.

This means that some invariants expected by the underlying system have been broken.

Unavailable 

The service is currently unavailable.

DataLoss 

Unrecoverable data loss or corruption.


The documentation for this class was generated from the following files: