QJsonChannelCore
|
QJsonChannelCore utilises ideas and some implementation details of QJsonRpc implementation. QJsonRpc library has tight integration with communication transport and supports server-to-client messages. So QJsonChannelCore library development was started for resolving these QJsonRpc specialties. In addition, QJsonChannelCore supports JSON Schema Service Descriptor for services and methods discovery.
The main component of QJsonChannelCore is QJsonChannelServiceRepository.
You can bind QObjects to the QJsonChannelServiceRepository.
The main funcuonality of the QJsonChannelServiceRepository is processing QJsonChannelMessage and dispatching them to QJsonChannelService.
You also can wrap your QObject by QJsonChannelService and work directly with the service:
Service object should inherit from QObject
Properties are axposed using Q_PROPERTY
Both getter and setter functions will be automatically added to a service for properties wich are binded to member:
Pubblic invokable methods will be exposed with QJsonChannel
Public slots will be exposed as well: ~~~~~~~ public Q_SLOTS: void slot(); void slotWithParams(const QString& first, bool second, double third); QString slotWithParamsAndReturnValue(const QString& name);
void slotWithVariantParams(const QString& first, bool second, double third, const QVariant& fourth); void slotWithDefaultParameter(const QString& first, const QString& second = QString()); ~~~~~~~~