On this page

<QGrpcInterceptor> - Interceptor types

The <QGrpcInterceptor> header file provides the basic interceptor types. More...

Header: #include <QGrpcInterceptor>
Since: Qt 6.11

Types

(since 6.11) flags InterceptorCapabilities
(since 6.11) enum class InterceptorCapability { Start, InitialMetadata, MessageReceived, WriteMessage, WritesDone, …, Cancel }

Detailed Description

Qt GRPC provides various types that are commonly grouped in the <QtGrpcInterceptor> header file.

For an introduction to the interception mechanism and how interceptor interfaces participate in the lifecycle of an RPC, see the Qt GRPC Interceptors Overview.

Qt GRPC provides the following interceptor interfaces as hook points in the RPC lifecycle:

InterfaceHook PointDirectionCan Modify
QGrpcStartInterceptorBefore the RPC is initiatedOutboundInitial message object, call options
QGrpcWriteMessageInterceptorBefore an outgoing message is writtenOutboundMessage object
QGrpcWritesDoneInterceptorWhen the client indicates writes are doneOutbound
QGrpcCancelInterceptorWhen the RPC is cancelledOutbound
QGrpcInitialMetadataInterceptorWhen initial metadata is receivedInboundMetadata
QGrpcMessageReceivedInterceptorWhen a message payload is receivedInboundSerialized message data
QGrpcTrailingMetadataInterceptorWhen trailing metadata is receivedInboundMetadata
QGrpcFinishedInterceptorWhen the RPC completesInboundFinal status

Interceptor mechanism

The following classes and pages form the Qt GRPC interceptor mechanism:

Type Documentation

[since 6.11] enum class InterceptorCapability
[since 6.11] flags InterceptorCapabilities

Specifies interception hook points supported by an interceptor.

Qt GRPC uses InterceptorCapability values to describe which interception hook points an interceptor provides.

A single interceptor class can implement multiple interceptor interfaces (for example, QGrpcStartInterceptor and QGrpcFinishedInterceptor) and therefore support multiple capabilities.

ConstantValueDescription
InterceptorCapability::Start0x01The interceptor implements QGrpcStartInterceptor.
InterceptorCapability::InitialMetadata0x02The interceptor implements QGrpcInitialMetadataInterceptor.
InterceptorCapability::MessageReceived0x04The interceptor implements QGrpcMessageReceivedInterceptor.
InterceptorCapability::WriteMessage0x08The interceptor implements QGrpcWriteMessageInterceptor.
InterceptorCapability::WritesDone0x10The interceptor implements QGrpcWritesDoneInterceptor.
InterceptorCapability::TrailingMetadata0x20The interceptor implements QGrpcTrailingMetadataInterceptor.
InterceptorCapability::Finished0x40The interceptor implements QGrpcFinishedInterceptor.
InterceptorCapability::Cancel0x80The interceptor implements QGrpcCancelInterceptor.

This enum was introduced in Qt 6.11.

The InterceptorCapabilities type is a typedef for QFlags<InterceptorCapability>. It stores an OR combination of InterceptorCapability values.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.