QtProtobuf  0.6
Protobuf plugin to generate Qt classes
Signals | Public Member Functions | Protected Member Functions | Friends | List of all members
QtProtobuf::QAbstractGrpcClient Class Reference

The QAbstractGrpcClient class is bridge between gRPC clients and channels. More...

#include <qabstractgrpcclient.h>

Inheritance diagram for QtProtobuf::QAbstractGrpcClient:
Inheritance graph
[legend]
Collaboration diagram for QtProtobuf::QAbstractGrpcClient:
Collaboration graph
[legend]

Signals

void error (const QGrpcStatus &status)
 error signal is emited by client when error occured in channel or while serialization/deserialization More...
 

Public Member Functions

void attachChannel (const std::shared_ptr< QAbstractGrpcChannel > &channel)
 Attaches channel to client as transport layer for gRPC. More...
 

Protected Member Functions

 QAbstractGrpcClient (const QString &service, QObject *parent=nullptr)
 
void cancel (const QString &method)
 Canceles all subscriptions for specified method. More...
 
QAbstractProtobufSerializerserializer () const
 serializer provides assigned to client serializer More...
 

Friends

class QGrpcAsyncOperationBase
 

Detailed Description

The QAbstractGrpcClient class is bridge between gRPC clients and channels.

QAbstractGrpcClient provides set of bridge functions for client classes generated out of protobuf services.

QAbstractGrpcClient provides threads safety for subscribe and call methods of generated clients.

Member Function Documentation

◆ attachChannel()

void QAbstractGrpcClient::attachChannel ( const std::shared_ptr< QAbstractGrpcChannel > &  channel)

Attaches channel to client as transport layer for gRPC.

Parameters and return values will be serialized to supported by channel format.

Note
Warning: QtGrpc doesn't guarantie thread safety on channel level. You have to be confident that channel routines are working in the same thread as QAbstractGrpcClient.
See also
QAbstractGrcpChannel
Parameters
channelShared pointer to channel will be used as transport layer for gRPC

◆ cancel()

void QtProtobuf::QAbstractGrpcClient::cancel ( const QString &  method)
protected

Canceles all subscriptions for specified method.

Parameters
[in]methodName of method subscription for to be canceled

◆ error

void QtProtobuf::QAbstractGrpcClient::error ( const QGrpcStatus status)
signal

error signal is emited by client when error occured in channel or while serialization/deserialization

Parameters
[out]codegRPC channel StatusCode
[out]errorTextError description from channel or from QGrpc

◆ serializer()

QAbstractProtobufSerializer * QAbstractGrpcClient::serializer ( ) const
protected

serializer provides assigned to client serializer

Returns
pointer to serializer. Serializer is owned by QtProtobuf::QProtobufSerializerRegistry.

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