- Qt 6.10
- Qt GRPC
- QtGrpc Namespace
- Qt 6.10.0 Reference Documentation

# 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

## Classes

`(since 6.10)` struct | MultiValue_t

## Types

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

## Variables

`(since 6.10)` const struct QtGrpc::MultiValue_t | MultiValue

## Detailed Description

## Classes

### class MultiValue_t

Tag type used to access QMultiHash metadata. More...

## Type Documentation

### enum class QtGrpc::SerializationFormat

Contains preset values for setting the protobuf serializer format.

Constant | Value | Description
--- | --- | ---
`QtGrpc::SerializationFormat::Default` | `0` | The default QGrpcSerializationFormat preset. This preset constructs a QProtobufSerializer with an empty content type suffix.
`QtGrpc::SerializationFormat::Protobuf` | `1` | The embedded protobuf QGrpcSerializationFormat preset. This preset constructs a QProtobufSerializer with the `proto` content type suffix.
`QtGrpc::SerializationFormat::Json` | `2` | The 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.

Constant | Value | Description
--- | --- | ---
`QtGrpc::StatusCode::Ok` | `0` | No error
`QtGrpc::StatusCode::Cancelled` | `1` | The operation was cancelled, typically by the caller.
`QtGrpc::StatusCode::InvalidArgument` | `3` | The client specified an invalid argument,
`QtGrpc::StatusCode::DeadlineExceeded` | `4` | The deadline expired before the operation could complete,
`QtGrpc::StatusCode::NotFound` | `5` | Some requested entity (e.g., file or directory) was not found.
`QtGrpc::StatusCode::AlreadyExists` | `6` | The entity that a client attempted to create (e.g., file or directory) already exists.
`QtGrpc::StatusCode::PermissionDenied` | `7` | The 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::ResourceExhausted` | `8` | Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system is out of space.
`QtGrpc::StatusCode::FailedPrecondition` | `9` | The operation was rejected because the system is not in a state required for the operation's execution.
`QtGrpc::StatusCode::Aborted` | `10` | The operation was aborted, typically due to a concurrency issue such as a sequencer check failure or transaction abort.
`QtGrpc::StatusCode::OutOfRange` | `11` | The operation was attempted past the valid range.
`QtGrpc::StatusCode::Unimplemented` | `12` | The operation is not implemented or is not supported/enabled in this service.
`QtGrpc::StatusCode::Internal` | `13` | This means that some invariants expected by the underlying system have been broken.
`QtGrpc::StatusCode::Unavailable` | `14` | The 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::DataLoss` | `15` | Unrecoverable data loss or corruption.
`QtGrpc::StatusCode::Unauthenticated` | `16` | The request does not have valid authentication credentials for the operation.

See also gRPC status codes.

## Variable Documentation

### `[since 6.10]` const struct QtGrpc::MultiValue_t QtGrpc::MultiValue

Tag used to access QMultiHash metadata.

This documentation was introduced in Qt 6.10.

See also QGrpcChannelOptions::metadata(QtGrpc::MultiValue_t) and QGrpcCallOptions::metadata(QtGrpc::MultiValue_t).