QtProtobuf  0.6
Protobuf plugin to generate Qt classes
Public Member Functions | Friends | List of all members
QtProtobuf::QAbstractGrpcChannel Class Referenceabstract

The QAbstractGrpcChannel class is interface that represents common gRPC channel functionality. More...

#include <qabstractgrpcchannel.h>

Inheritance diagram for QtProtobuf::QAbstractGrpcChannel:
Inheritance graph
[legend]

Public Member Functions

virtual QGrpcStatus call (const QString &method, const QString &service, const QByteArray &args, QByteArray &ret)=0
 Calls method synchronously with given serialized message args and write result of call to ret. More...
 
virtual void call (const QString &method, const QString &service, const QByteArray &args, QtProtobuf::QGrpcAsyncReply *ret)=0
 Calls method asynchronously with given serialized messge args. More...
 
virtual void subscribe (QGrpcSubscription *subscription, const QString &service, QAbstractGrpcClient *client)=0
 Subscribes to server-side stream to receive updates for given method. More...
 
virtual std::shared_ptr< QAbstractProtobufSerializerserializer () const =0
 
const QThread * thread () const
 

Friends

class QGrpcAsyncReply
 
class QGrpcSubscription
 

Detailed Description

The QAbstractGrpcChannel class is interface that represents common gRPC channel functionality.

You may implement this interface to create own channels for gRPC transport.

Member Function Documentation

◆ call() [1/2]

virtual QGrpcStatus QtProtobuf::QAbstractGrpcChannel::call ( const QString &  method,
const QString &  service,
const QByteArray &  args,
QByteArray &  ret 
)
pure virtual

Calls method synchronously with given serialized message args and write result of call to ret.

Note
This method is synchronous, that means it doesn't return until call is completed or aborted by timeout if it's implemented in inherited channel.
This method should not be called directly.
Parameters
[in]methodremote method is called
[in]serviceservice identified in URL path format
[in]argsserialized argument message
[out]retoutput bytearray to collect returned message
Returns
returns gRPC QAbstractGrpcChannel::Status code for operation

Implemented in QtProtobuf::QGrpcHttp2Channel, and QtProtobuf::QGrpcChannel.

◆ call() [2/2]

virtual void QtProtobuf::QAbstractGrpcChannel::call ( const QString &  method,
const QString &  service,
const QByteArray &  args,
QtProtobuf::QGrpcAsyncReply ret 
)
pure virtual

Calls method asynchronously with given serialized messge args.

Result of method call is written to QGrpcAsyncReply.

Note
This method is asynchronous, that means it returns control imediately after it is called.
This method should not be called directly.
Parameters
[in]methodremote method is called
[in]serviceservice identified in URL path format
[in]argsserialized argument message
[out]retQGrpcAsyncReply that will be returned to end-point user to read data once call complete. QGrpcAsyncReply lifecycle is managed by QAbstractGrpcClient only.
See also
QGrpcAsyncReply for details

Implemented in QtProtobuf::QGrpcHttp2Channel, and QtProtobuf::QGrpcChannel.

◆ subscribe()

virtual void QtProtobuf::QAbstractGrpcChannel::subscribe ( QGrpcSubscription subscription,
const QString &  service,
QAbstractGrpcClient client 
)
pure virtual

Subscribes to server-side stream to receive updates for given method.

Note
This method should not be called directly.
Parameters
[in]methodremote method is called
[in]serviceservice identified in URL path format
[in]argsserialized argument message
[in]handlercallback that will be called when message recevied from the server-stream

Implemented in QtProtobuf::QGrpcHttp2Channel, and QtProtobuf::QGrpcChannel.


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