QtGrpc Namespace

The QtGrpc namespace contains miscellaneous identifiers used throughout the QtGrpc library. More...

Header: #include <QtGrpcNamespace>
CMake: find_package(Qt6 REQUIRED COMPONENTS Grpc)
target_link_libraries(mytarget PRIVATE Qt6::Grpc)
Since: Qt 6.5

Types

enum class SerializationFormat { Default, Protobuf, Json }
enum class StatusCode { Ok, Cancelled, InvalidArgument, DeadlineExceeded, NotFound, …, Unauthenticated }

Detailed Description

Type Documentation

enum class QtGrpc::SerializationFormat

Contains preset values for setting the protobuf serializer format.

ConstantValueDescription
QtGrpc::SerializationFormat::Default0The default QGrpcSerializationFormat preset. This preset constructs a QProtobufSerializer with an empty content type suffix.
QtGrpc::SerializationFormat::Protobuf1The embedded protobuf QGrpcSerializationFormat preset. This preset constructs a QProtobufSerializer with the proto content type suffix.
QtGrpc::SerializationFormat::Json2The embedded JSON QGrpcSerializationFormat preset. This preset constructs a QProtobufJsonSerializer with the json content type suffix.

See also QGrpcSerializationFormat.

enum class QtGrpc::StatusCode

Channel's status codes.

ConstantValueDescription
QtGrpc::StatusCode::Ok0No error
QtGrpc::StatusCode::Cancelled1The operation was cancelled, typically by the caller.
QtGrpc::StatusCode::InvalidArgument3The client specified an invalid argument,
QtGrpc::StatusCode::DeadlineExceeded4The deadline expired before the operation could complete,
QtGrpc::StatusCode::NotFound5Some requested entity (e.g., file or directory) was not found.
QtGrpc::StatusCode::AlreadyExists6The entity that a client attempted to create (e.g., file or directory) already exists.
QtGrpc::StatusCode::PermissionDenied7The caller does not have permission to execute the specified operation. PermissionDenied must not be used for rejections caused by exhausting some resource (use ResourceExhausted instead for those errors). PermissionDenied 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.
QtGrpc::StatusCode::ResourceExhausted8Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system is out of space.
QtGrpc::StatusCode::FailedPrecondition9The operation was rejected because the system is not in a state required for the operation's execution.
QtGrpc::StatusCode::Aborted10The operation was aborted, typically due to a concurrency issue such as a sequencer check failure or transaction abort.
QtGrpc::StatusCode::OutOfRange11The operation was attempted past the valid range.
QtGrpc::StatusCode::Unimplemented12The operation is not implemented or is not supported/enabled in this service.
QtGrpc::StatusCode::Internal13This means that some invariants expected by the underlying system have been broken.
QtGrpc::StatusCode::Unavailable14The service is currently unavailable. This is most likely a transient condition, which can be corrected by retrying with a backoff. Note that it is not always safe to retry non-idempotent operations.
QtGrpc::StatusCode::DataLoss15Unrecoverable data loss or corruption.
QtGrpc::StatusCode::Unauthenticated16The request does not have valid authentication credentials for the operation.

See also gRPC status codes.