| CMakeLists.txt |
|
2587 |
- |
| compat |
|
|
- |
| configure.cmake |
|
1148 |
- |
| doc |
|
|
- |
| qabstractgrpcchannel.cpp |
!
\class QAbstractGrpcChannel
\inmodule QtGrpc
\brief The QAbstractGrpcChannel class provides an interface for
implementing the transport layer of \gRPC operations.
Implement this interface to create a custom channel for \gRPC
transportation. The QGrpcHttp2Channel class is provided as a fully featured
implementation of QAbstractGrpcChannel for HTTP/2 communication.
\sa QGrpcChannelOptions, QGrpcHttp2Channel
|
5035 |
- |
| qabstractgrpcchannel.h |
|
2426 |
- |
| qabstractgrpcchannel_p.h |
|
1343 |
- |
| qgrpccalloptions.cpp |
!
\class QGrpcCallOptions
\inmodule QtGrpc
\compares equality
\brief The QGrpcCallOptions class offers various options for fine-tuning
individual RPCs.
\since 6.6
QGrpcCallOptions lets you customize individual remote procedure calls (RPCs).
The generated client interface provides access points to pass the QGrpcCallOptions.
These options supersede the ones set via QGrpcChannelOptions.
To configure the default options shared by RPCs, use QGrpcChannelOptions.
\code
QGrpcCallOptions callOpts;
// Set the metadata for an individial RPC
callOpts.setMetadata({
{ "header" , "value1" },
{ "header" , "value2" },
});
const auto &md = callOpts.metadata(QtGrpc::MultiValue);
qDebug() << "Call Metadata: " << md;
// Set a 2-second deadline for an individial RPC
callOpts.setDeadlineTimeout(2s);
qDebug() << "Call timeout: " << callOpts.deadlineTimeout();
\endcode
|
12179 |
- |
| qgrpccalloptions.h |
|
4132 |
- |
| qgrpccallreply.cpp |
!
\class QGrpcCallReply
\inmodule QtGrpc
\brief The QGrpcCallReply class provides access in handling unary RPCs.
The QGrpcCallReply class provides the interface for handling unary remote
procedure calls (RPCs), which is one of the four \gRPC \l{Service
Methods}{service methods}.
For a high-level overview, refer to the \l{Unary Calls} {Qt GRPC
Client Guide}.
\include qtgrpc-shared.qdocinc rpc-lifetime-note
|
1644 |
- |
| qgrpccallreply.h |
|
1178 |
- |
| qgrpcchanneloptions.cpp |
!
\class QGrpcChannelOptions
\inmodule QtGrpc
\since 6.6
\compares equality
\brief The QGrpcChannelOptions class offers various options for fine-tuning
a gRPC channel.
QGrpcChannelOptions lets you customize a \gRPC channel. Some options apply
to all remote procedure calls (RPCs) that operate on the associated
channel, which is used to communicate with services.
Override options for specific RPCs with QGrpcCallOptions.
\code
QGrpcChannelOptions channelOpts;
// Apply common metadata to every RPC
channelOpts.setMetadata({
{ "header" , "value1" },
{ "header" , "value2" },
});
const auto &md = channelOpts.metadata(QtGrpc::MultiValue);
qDebug() << "Channel Metadata: " << md;
// Apply a 2-second deadline to every RPC
channelOpts.setDeadlineTimeout(2s);
qDebug() << "Channel timeout: " << channelOpts.deadlineTimeout();
// Configure SSL/TLS configuration
channelOpts.setSslConfiguration(QSslConfiguration());
\endcode
\note It is up to the channel's implementation to determine the specifics
of these options.
|
25414 |
- |
| qgrpcchanneloptions.h |
|
5820 |
- |
| qgrpcchanneloptions_p.h |
|
1947 |
- |
| qgrpcclientbase.cpp |
!
\class QGrpcClientBase
\inmodule QtGrpc
\brief The QGrpcClientBase class serves as base for generated client
interfaces.
The QGrpcClientBase class provides a common set of functionalities for the
generated client interface of the \gRPC service definition.
The RPC methods of this class should not be called directly.
\note Thread safety is enforced for the non-const member functions. These
functions must be called from the same \l{QObject::} {thread} in which the
object was created.
|
8450 |
- |
| qgrpcclientbase.h |
|
2388 |
- |
| qgrpccommonoptions.cpp |
!
//! [metadata]
Returns the metadata. If this field is unset, returns empty
metadata.
\include qtgrpc-shared.qdocinc metadata-note
//! [metadata]
|
8579 |
- |
| qgrpccommonoptions_p.h |
tag |
2637 |
- |
| qgrpchttp2channel.cpp |
|
92211 |
- |
| qgrpchttp2channel.h |
|
1756 |
- |
| qgrpcinterceptor.cpp |
!
\since 6.11
\inmodule QtGrpc
\headerfile <QGrpcInterceptor>
\title Interceptor types
\brief The <QGrpcInterceptor> header file provides the basic interceptor
types.
Qt GRPC provides various types that are commonly grouped in the
\c{<QtGrpcInterceptor>} header file.
\include qtgrpc-shared.qdocinc interceptors_overview_ref
Qt GRPC provides the following interceptor interfaces as hook points in the
RPC lifecycle:
\include qtgrpc-interceptors-overview.qdoc interface-table
\section1 Interceptor mechanism
The following classes and pages form the Qt GRPC interceptor mechanism:
\generatelist qtgrpc-interceptors
|
14658 |
- |
| qgrpcinterceptor.h |
|
9774 |
- |
| qgrpcinterceptorchain.cpp |
!
\since 6.11
\inmodule QtGrpc
\ingroup qtgrpc-interceptors
\class QGrpcInterceptorChain
\brief Stores and manages a sequence of interceptors.
QGrpcInterceptorChain stores interceptor instances that observe or modify
different stages of an RPC. The chain is passed to a channel during
construction, and the channel owns the chain for the remainder of its
lifetime.
As an RCP progresses through its lifecycle, the channel invokes the
interceptors stored in the chain at the corresponding interception points.
Interceptors are added to the chain in a defined order. The order is
significant and determines how interceptors are invoked during outbound and
inbound stages of an RPC. For details, see the \l{Direction and flow}
section of the \l{Qt GRPC Interceptors Overview}.
Interceptors can be added using two primary ownership models:
\list
\li \b{Owning}: Add interceptors using \c{std::unique_ptr<T>}. On success, the
chain takes ownership and destroys the interceptors when the chain
(and therefore the channel) is destroyed.
\li \b{Non-owning}: Add interceptors using raw pointers \c{T*}. The chain does
not take ownership. The caller must ensure that interceptor objects
remain valid for as long as the channel may invoke them.
\endlist
Both models can be combined within the same chain. While supported,
\b{mixing} owning and non-owning interceptors requires care to ensure that
non-owning interceptors outlive all channels that may use them.
\note QGrpcInterceptorChain is not copyable and can only be moved.
\sa QtGrpc::InterceptorCapability
|
10858 |
- |
| qgrpcinterceptorchain.h |
|
6153 |
- |
| qgrpcinterceptorchain_p.h |
|
2439 |
- |
| qgrpcinterceptorengine_p.h |
|
6641 |
- |
| qgrpcoperation.cpp |
!
\class QGrpcOperation
\inmodule QtGrpc
\brief The QGrpcOperation class provides common operations to handle the
\gRPC communication from the client side.
QGrpcOperation serves as the base class for the four \gRPC method types:
QGrpcCallReply (unary calls), QGrpcServerStream (server streaming),
QGrpcClientStream (client streaming), and QGrpcBidiStream (bidirectional
streaming). It provides a common interface for interacting with these
remote procedure calls (RPCs).
Each QGrpcOperation corresponds to a specific RPC requested through the
generated client interface.
For a high-level overview, refer to the \l {clientguide} {Qt GRPC
Client Guide}.
|
16035 |
- |
| qgrpcoperation.h |
|
2869 |
- |
| qgrpcoperation_p.h |
|
1501 |
- |
| qgrpcoperationcontext.cpp |
!
\class QGrpcOperationContext
\inmodule QtGrpc
\since 6.7
\brief The QGrpcOperationContext class provides context for communication
between an individual \gRPC operation and a channel.
QGrpcOperationContext is constructed internally when a remote procedure call
(RPC) is requested, mediating interaction between the client's operation
request and the channel's operation outcome.
RPCs requested on the client interface return specializations of
QGrpcOperation, such as QGrpcCallReply, QGrpcServerStream,
QGrpcClientStream, or QGrpcBidiStream. These classes are implicitly
integrated with the underlying QGrpcOperationContext counterpart.
\note Don't use this class directly unless implementing a custom channel.
The signals contained within this class are used to build the communication
between the client-facing QGrpcOperation and the QAbstractGrpcChannel
implementation. These operations are asynchronous in nature, and multiple
RPCs can operate on the same channel concurrently. Channels typically treat
all operations the same, and it is the channel's responsibility to
correctly support and restrict the subset of features its RPC type
supports.
Signals which should only be emitted by the channel's implementation are:
\list
\li finished()
\li messageReceived()
\li messageWritten()
\endlist
Signals which will be emitted by QGrpcOperation and its specializations are:
\list
\li cancelRequested()
\li writeMessageRequested()
\li writesDoneRequested()
\endlist
Custom implementations of QAbstractGrpcChannel must handle the client's
signals, as no default signal handling is provided, and emit their own
signals accordingly.
|
15326 |
- |
| qgrpcoperationcontext.h |
|
3940 |
- |
| qgrpcoperationcontext_p.h |
|
1726 |
- |
| qgrpcserializationformat.cpp |
!
\class QGrpcSerializationFormat
\inmodule QtGrpc
\compares equality
\since 6.8
\brief The QGrpcSerializationFormat class holds the protobuf message
serializer and the associated content-type suffix.
The QGrpcSerializationFormat class contains the \l{serializer} used for
serializing and deserializing protobuf messages, as well as the associated
content-type \l{suffix}, which indicates the message encoding in transport.
For HTTP/2 specific details see the \l{Content-Type} section.
\note The content-type is transport, and therefore implementation specific.
The class can be constructed using one of the
\l{QtGrpc::}{SerializationFormat} presets or a custom suffix and
serializer:
\code
QGrpcSerializationFormat jsonFormat(QtGrpc::SerializationFormat::Json);
\endcode
This creates a QProtobufJsonSerializer with the \c{json} suffix. For HTTP/2
transportation this results in the \c{application/grpc+json} content-type.
//! [custom-serializer-code]
\code
class DummySerializer : public QAbstractProtobufSerializer
{
...
};
QGrpcSerializationFormat dummyFormat("dummy", std::make_shared<DummySerializer>());
\endcode
//! [custom-serializer-code]
//! [custom-serializer-desc]
This uses \c{DummySerializer} for encoding and decoding messages with the
\c{dummy} suffix. For HTTP/2 transportation this results in the
\c{application/grpc+dummy} content-type.
\note Custom serializers require server support for the specified format.
//! [custom-serializer-desc]
\sa QGrpcChannelOptions::serializationFormat
|
7434 |
- |
| qgrpcserializationformat.h |
|
2444 |
- |
| qgrpcstatus.cpp |
!
\class QGrpcStatus
\inmodule QtGrpc
\compares equality
\compareswith equality QtGrpc::StatusCode
\endcompareswith
\brief The QGrpcStatus class combines a \l {QtGrpc::} {StatusCode} and a
string message.
The QGrpcStatus class usually provides information about a finished \gRPC
operation, as returned by the server.
If a RPC operation failed, contains a \l {QtGrpc::} {StatusCode} other than
\l {QtGrpc::StatusCode::} {Ok}.
|
4771 |
- |
| qgrpcstatus.h |
|
2636 |
- |
| qgrpcstream.cpp |
!
\class QGrpcServerStream
\inmodule QtGrpc
\since 6.7
\brief The QGrpcServerStream class provides access in handling server-streaming RPCs.
The QGrpcServerStream class provides the interface for handling
server-streaming remote procedure calls (RPCs), which is one of the four
\gRPC \l{Service Methods}{service methods}.
For a high-level overview, refer to the \l {Server Streaming} {Qt GRPC
Client Guide}.
\include qtgrpc-shared.qdocinc rpc-lifetime-note
|
8948 |
- |
| qgrpcstream.h |
|
3117 |
- |
| qtgrpcglobal.h |
|
449 |
- |
| qtgrpclogging.cpp |
|
245 |
- |
| qtgrpclogging_p.h |
|
760 |
- |
| qtgrpcnamespace.cpp |
!
\fn QDebug QtGrpc::RpcDescriptor::operator<<(QDebug debug, const QtGrpc::RpcDescriptor& description)
Writes \a description to the specified stream \a debug.
|
806 |
- |
| qtgrpcnamespace.h |
|
3296 |
- |
| qtgrpcnamespace.qdoc |
|
6402 |
- |