summaryrefslogtreecommitdiff
path: root/src/webchannel/qmetaobjectpublisher_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/webchannel/qmetaobjectpublisher_p.h')
-rw-r--r--src/webchannel/qmetaobjectpublisher_p.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/webchannel/qmetaobjectpublisher_p.h b/src/webchannel/qmetaobjectpublisher_p.h
index 23a9b96..6030de2 100644
--- a/src/webchannel/qmetaobjectpublisher_p.h
+++ b/src/webchannel/qmetaobjectpublisher_p.h
@@ -148,6 +148,14 @@ public:
void sendPendingPropertyUpdates();
/**
+ * Invoke the @p method on @p object with the arguments @p args.
+ *
+ * The return value of the method invocation is then serialized and a response message
+ * is returned.
+ */
+ QVariant invokeMethod(QObject *const object, const QMetaMethod &method, const QJsonArray &args);
+
+ /**
* Invoke the method of index @p methodIndex on @p object with the arguments @p args.
*
* The return value of the method invocation is then serialized and a response message
@@ -156,6 +164,16 @@ public:
QVariant invokeMethod(QObject *const object, const int methodIndex, const QJsonArray &args);
/**
+ * Invoke the method of name @p methodName on @p object with the arguments @p args.
+ *
+ * This method performs overload resolution on @p methodName.
+ *
+ * The return value of the method invocation is then serialized and a response message
+ * is returned.
+ */
+ QVariant invokeMethod(QObject *const object, const QByteArray &methodName, const QJsonArray &args);
+
+ /**
* Set the value of property @p propertyIndex on @p object to @p value.
*/
void setProperty(QObject *object, const int propertyIndex, const QJsonValue &value);
@@ -177,6 +195,26 @@ public:
QVariant toVariant(const QJsonValue &value, int targetType) const;
/**
+ * Assigns a score for the conversion from @p value to @p targetType.
+ *
+ * Scores can be compared to find the best match. The lower the score, the
+ * more preferable is the conversion.
+ *
+ * @sa invokeMethod, methodOverloadBadness
+ */
+ int conversionScore(const QJsonValue &value, int targetType) const;
+
+ /**
+ * Scores @p method against @p args.
+ *
+ * Scores can be compared to find the best match from a set of overloads.
+ * The lower the score, the more preferable is the method.
+ *
+ * @sa invokeMethod, conversionScore
+ */
+ int methodOverloadBadness(const QMetaMethod &method, const QJsonArray &args) const;
+
+ /**
* Remove wrapped objects which last transport relation is with the passed transport object.
*/
void transportRemoved(QWebChannelAbstractTransport *transport);