mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
JsonUtils & improvements (#476)
* add JsonUtils * update * repair * update * ident * Schema correct msg other adjusts * fix effDel, ExceptionLog, cleanup * fix travis qt5.2 * not so funny * use Qthread interrupt instead abort bool * update services
This commit is contained in:
@@ -45,9 +45,10 @@ public:
|
||||
/// Constructor
|
||||
///
|
||||
/// @param peerAddress provide the Address of the peer
|
||||
/// @param noListener if true, this instance won't listen for hyperion push events
|
||||
/// @param log The Logger class of the creator
|
||||
/// @param noListener if true, this instance won't listen for hyperion push events
|
||||
///
|
||||
JsonProcessor(QString peerAddress, bool noListener = false);
|
||||
JsonProcessor(QString peerAddress, Logger* log, bool noListener = false);
|
||||
~JsonProcessor();
|
||||
|
||||
///
|
||||
@@ -272,16 +273,4 @@ private:
|
||||
/// @param error String describing the error
|
||||
///
|
||||
void sendErrorReply(const QString & error, const QString &command="", const int tan=0);
|
||||
|
||||
///
|
||||
/// Check if a JSON messag is valid according to a given JSON schema
|
||||
///
|
||||
/// @param message JSON message which need to be checked
|
||||
/// @param schemaResource Qt Resource identifier with the JSON schema
|
||||
/// @param errors Output error message
|
||||
/// @param ignoreRequired ignore the required value in JSON schema
|
||||
///
|
||||
/// @return true if message conforms the given JSON schema
|
||||
///
|
||||
bool checkJson(const QJsonObject & message, const QString &schemaResource, QString & errors, bool ignoreRequired = false);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user