aboutsummaryrefslogtreecommitdiff
path: root/lib/csapi/gtad.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csapi/gtad.yaml')
-rw-r--r--lib/csapi/gtad.yaml139
1 files changed, 139 insertions, 0 deletions
diff --git a/lib/csapi/gtad.yaml b/lib/csapi/gtad.yaml
new file mode 100644
index 00000000..7f6a97e0
--- /dev/null
+++ b/lib/csapi/gtad.yaml
@@ -0,0 +1,139 @@
+analyzer:
+ subst:
+ "%CLIENT_RELEASE_LABEL%": r0
+ "%CLIENT_MAJOR_VERSION%": r0
+ identifiers:
+ signed: signedData
+ unsigned: unsignedData
+ default: isDefault
+ origin_server_ts: originServerTimestamp # Instead of originServerTs
+ start: begin # Because start() is a method in BaseJob
+
+ types:
+ # Structure:
+ # swaggerType: <targetTypeSpec>
+ # OR
+ # swaggerType:
+ # - swaggerFormat: <targetTypeSpec>
+ # - /swaggerFormatRegEx/: <targetTypeSpec>
+ # - //: <targetTypeSpec> # default, if the format doesn't mach anything above
+ # WHERE
+ # targetTypeSpec = targetType OR
+ # { type: targetType, imports: <filename OR [ filenames... ]>, <other attributes...> }
+ integer:
+ - int64: qint64
+ - int32: qint32
+ - //: int
+ number:
+ - float: float
+ - //: double
+ boolean: { type: bool, initializer: false }
+ string:
+ - byte: &ByteStream
+ type: QIODevice*
+ #initializer: '"{{defaultValue}}"'
+ #string?: true
+ imports: <QtCore/QIODevice>
+ - binary: *ByteStream
+ - date:
+ type: QDate
+ initializer: QDate::fromString("{{defaultValue}}")
+ avoidCopy?: true
+ imports: <QtCore/QDate>
+ - dateTime:
+ type: QDateTime
+ initializer: QDateTime::fromString("{{defaultValue}}")
+ avoidCopy?: true
+ imports: <QtCore/QDateTime>
+ - //:
+ type: QString
+ initializer: QStringLiteral("{{defaultValue}}")
+ string?: true
+ avoidCopy?: true
+ file: *ByteStream
+ object:
+ - /m\.room\.member$/: # A stub for EventsBatch<RoomMemberEvent>
+ - /state_event.yaml$/:
+ type: StateEventPtr
+ noCopy?: true
+ imports: '"events/event.h"'
+ - /room_event.yaml$/:
+ type: RoomEventPtr
+ noCopy?: true
+ imports: '"events/event.h"'
+ - /event.yaml$/:
+ type: EventPtr
+ noCopy?: true
+ imports: '"events/event.h"'
+ - //:
+ type: QJsonObject
+ avoidCopy?: true
+ imports: <QtCore/QJsonObject>
+ array:
+ - string:
+ type: QStringList
+ avoidCopy?: true
+ imports: <QtCore/QStringList>
+ - /^Notification|Result$/:
+ type: "std::vector<{{1}}>"
+ noCopy?: true
+ imports: '"events/event.h"'
+ - /m\.room\.member$/:
+ type: "EventsArray<RoomMemberEvent>"
+ noCopy?: true
+ imports: '"events/roommemberevent.h"'
+ - /state_event.yaml$/:
+ type: StateEvents
+ noCopy?: true
+ - /room_event.yaml$/:
+ type: RoomEvents
+ noCopy?: true
+ - /event.yaml$/:
+ type: Events
+ noCopy?: true
+ - /.+/:
+ type: "QVector<{{1}}>"
+ avoidCopy?: true
+ imports: <QtCore/QVector>
+ - //: { type: QJsonArray, "avoidCopy?": true, imports: <QtCore/QJsonArray> }
+ map:
+ - RoomState:
+ type: "std::unordered_map<QString, {{1}}>"
+ noCopy?: true
+ imports: <unordered_map>
+ - /.+/:
+ type: "QHash<QString, {{1}}>"
+ avoidCopy?: true
+ imports: <QtCore/QHash>
+ - //:
+ type: QVariantHash
+ avoidCopy?: true
+ imports: <QtCore/QVariantHash>
+ variant: { type: QVariant, "avoidCopy?": true, imports: <QtCore/QVariant> }
+ schema: # Properties of inline structure definitions
+ avoidCopy?: true
+
+ #operations:
+
+mustache:
+ definitions:
+ _scopeRenderer: "{{scopeCamelCase}}Job::"
+ _literalQuote: '"'
+ maybeCrefType: "{{#avoidCopy?}}const {{/avoidCopy?}}{{dataType.name}}{{#avoidCopy?}}&{{/avoidCopy?}}{{#noCopy?}}&&{{/noCopy?}}"
+ qualifiedMaybeCrefType:
+ "{{#avoidCopy?}}const {{/avoidCopy?}}{{dataType.qualifiedName}}{{#avoidCopy?}}&{{/avoidCopy?}}{{#noCopy?}}&&{{/noCopy?}}"
+ initializeDefaultValue: "{{#defaultValue}}{{>initializer}}{{/defaultValue}}{{^defaultValue}}{}{{/defaultValue}}"
+ joinedParamDecl: '{{>maybeCrefType}} {{paramName}}{{^required?}} = {{>initializeDefaultValue}}{{/required?}}{{#@join}}, {{/@join}}'
+ joinedParamDef: '{{>maybeCrefType}} {{paramName}}{{#@join}}, {{/@join}}'
+ passQueryParams: '{{#queryParams}}{{paramName}}{{#@join}}, {{/@join}}{{/queryParams}}'
+ paramToString: '{{#string?}}{{nameCamelCase}}{{/string?}}{{^string?}}QString("%1").arg({{nameCamelCase}}){{/string?}}'
+ # preamble: preamble.mustache
+ copyrightName: Kitsune Ral
+ copyrightEmail: <kitsune-ral@users.sf.net>
+
+ templates:
+ - "{{base}}.h.mustache"
+ - "{{base}}.cpp.mustache"
+
+ #outFilesList: apifiles.txt
+