blob: 6fb9caef7e60f051f0254f5fddcfd243535df158 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
{{#@filePartial}}preamble{{/@filePartial}}
#pragma once
{{#operations}}
#include "../basejob.h"
{{/operations}}
{{#imports}}
#include {{.}}
{{/imports}}
{{#models}}
#include <QtCore/QJsonValue> {{! FIXME: This should probably go inside imports }}
{{/models}}
namespace QMatrixClient
{
{{#models}}
// Data structures
{{#model}}
struct {{classname}}
{
{{#vars}}
{{datatype}} {{name}};
{{/vars}}
operator QJsonValue() const { return {}; }
};
{{/model}}
{{/models}}
{{#operations}}
// Operations
{{#operation}}
class {{#@cap}}{{operationId}}{{/@cap}}Job : public BaseJob
{
public:
{{#@cap}}{{operationId}}{{/@cap}}Job(const ConnectionData* connection
{{#allParams}}
, {{!}}
{{#avoidCopy?}}const {{dataType}}&{{/avoidCopy?}}
{{^avoidCopy?}}{{dataType}}{{/avoidCopy?}} {{paramName}}
{{/allParams}});
{{#returns?}}
virtual {{className}}Job();
{{#returns}}
{{type}} {{name}}() const;
{{/returns}}
protected:
{{#returnFile?}}
Status parseReply(QByteArray data) override;
{{/returnFile?}}
{{^returnFile}}
Status parseJson(const JsonDocument& data) override;
{{/returnFile}}
private:
class Private;
Private* d;
{{/returns?}}
};
{{/operation}}
{{/operations}}
} // namespace QMatrixClient
|