QJsonChannelCore
QJsonChannelGlobal.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <QtGlobal>
4 #include <QMetaType>
6 
7 // error codes defined by spec
8 namespace QJsonChannel {
9  enum ErrorCode {
10  NoError = 0,
11  ParseError = -32700, // Invalid JSON was received by the server.
12  // An error occurred on the server while parsing the JSON text.
13  InvalidRequest = -32600, // The JSON sent is not a valid Request object.
14  MethodNotFound = -32601, // The method does not exist / is not available.
15  InvalidParams = -32602, // Invalid method parameter(s).
16  InternalError = -32603, // Internal JSON-RPC error.
17  ServerErrorBase = -32000, // Reserved for implementation-defined server-errors.
18  UserError = -32099, // Anything after this is user defined
19  TimeoutError = -32100
20  };
21 }
22 Q_DECLARE_METATYPE(QJsonChannel::ErrorCode)
23 
24 #define QJsonChannelDebug if (qgetenv("QJsonChannel_DEBUG").isEmpty()); else qDebug