# SPDX-FileCopyrightText: 2019 Kitsune Ral # SPDX-FileCopyrightText: 2019 Marc Deop # SPDX-License-Identifier: LGPL-2.1-or-later # This is the clang-format configuration style to be used by libQuotient. # Inspired by: # https://code.qt.io/cgit/qt/qt5.git/plain/_clang-format # https://wiki.qt.io/Qt_Coding_Style # https://wiki.qt.io/Coding_Conventions # Further information: https://clang.llvm.org/docs/ClangFormatStyleOptions.html # For convenience, the file includes commented out settings that we assume # to borrow from the WebKit style. The values for such settings try to but # are not guaranteed to coincide with the latest version of the WebKit style. --- Language: Cpp BasedOnStyle: WebKit #AccessModifierOffset: -4 AlignAfterOpenBracket: Align #AlignConsecutiveMacros: false #AlignConsecutiveAssignments: false #AlignConsecutiveDeclarations: false AlignEscapedNewlines: Left AlignOperands: true # 'Align' since ClangFormat 11 #AlignTrailingComments: false #AllowAllArgumentsOnNextLine: true #AllowAllConstructorInitializersOnNextLine: true #AllowAllParametersOfDeclarationOnNextLine: true #AllowShortEnumsOnASingleLine: true #AllowShortBlocksOnASingleLine: Empty #AllowShortCaseLabelsOnASingleLine: false #AllowShortFunctionsOnASingleLine: All #AllowShortLambdasOnASingleLine: All #AllowShortIfStatementsOnASingleLine: Never #AllowShortLoopsOnASingleLine: false #AlwaysBreakAfterDefinitionReturnType: None # deprecated #AlwaysBreakAfterReturnType: None #AlwaysBreakBeforeMultilineStrings: false AlwaysBreakTemplateDeclarations: Yes #BinPackArguments: true #BinPackParameters: true BraceWrapping: AfterCaseLabel: false AfterClass: false AfterControlStatement: Never # Switch to MultiLine, once https://bugs.llvm.org/show_bug.cgi?id=47936 is fixed AfterEnum: false AfterFunction: true AfterNamespace: false AfterStruct: false AfterUnion: false AfterExternBlock: false BeforeCatch: false BeforeElse: false IndentBraces: false SplitEmptyFunction: false SplitEmptyRecord: false SplitEmptyNamespace: false BreakBeforeBinaryOperators: NonAssignment BreakBeforeBraces: Custom #BreakBeforeInheritanceComma: false #BreakInheritanceList: BeforeColon #BreakBeforeTernaryOperators: true #BreakConstructorInitializersBeforeComma: false # deprecated? #BreakConstructorInitializers: BeforeComma #BreakStringLiterals: true ColumnLimit: 80 #CompactNamespaces: false #ConstructorInitializerAllOnOneLineOrOnePerLine: false #ConstructorInitializerIndentWidth: 4 #ContinuationIndentWidth: 4 Cpp11BracedListStyle: false #DeriveLineEnding: true #DerivePointerAlignment: false FixNamespaceComments: true IncludeBlocks: Regroup IncludeCategories: - Regex: '^37 38 39 40 41 42 43
/******************************************************************************
 * THIS FILE IS GENERATED - ANY EDITS WILL BE OVERWRITTEN
 */

#pragma once

#include "converters.h"

#include <QtCore/QHash>

namespace QMatrixClient
{
    // Data structures

    /// Device identity keys
    struct DeviceKeys
    {
        /// The ID of the user the device belongs to. Must match the user ID used
        /// when logging in.
        QString userId;
        /// The ID of the device these keys belong to. Must match the device ID used
        /// when logging in.
        QString deviceId;
        /// The encryption algorithms supported by this device.
        QStringList algorithms;
        /// Public identity keys. The names of the properties should be in the
        /// format ``<algorithm>:<device_id>``. The keys themselves should be
        /// encoded as specified by the key algorithm.
        QHash<QString, QString> keys;
        /// Signatures for the device key object. A map from user ID, to a map from
        /// ``<algorithm>:<device_id>`` to the signature.
        /// 
        /// The signature is calculated using the process described at `Signing
        /// JSON`_.
        QHash<QString, QHash<QString, QString>> signatures;
    };
    template <> struct JsonObjectConverter<DeviceKeys>
    {
        static void dumpTo(QJsonObject& jo, const DeviceKeys& pod);
        static void fillFrom(const QJsonObject& jo, DeviceKeys& pod);
    };

} // namespace QMatrixClient