| 1 | /* |
| 2 | * This file is part of OnlineAccountsModule |
| 3 | * |
| 4 | * Copyright (C) 2015 Canonical Ltd. |
| 5 | * |
| 6 | * Contact: Alberto Mardegan <[email protected]> |
| 7 | * |
| 8 | * This program is free software: you can redistribute it and/or modify it |
| 9 | * under the terms of the GNU Lesser General Public License version 3, as |
| 10 | * published by the Free Software Foundation. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, but |
| 13 | * WITHOUT ANY WARRANTY; without even the implied warranties of |
| 14 | * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
| 15 | * PURPOSE. See the GNU Lesser General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU Lesser General Public License |
| 18 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 19 | */ |
| 20 | |
| 21 | #ifndef ONLINE_ACCOUNTS_MODULE_ACCOUNT_MODEL_H |
| 22 | #define ONLINE_ACCOUNTS_MODULE_ACCOUNT_MODEL_Hcxx . . $ `online-accounts/lib/qml/Lomiri/OnlineAccounts/account_model.h:22:9`! |
| 23 | |
| 24 | #include <LomiriOnlineAccounts/Service>cxx . . $ `<file>/online-accounts/lib/qt/LomiriOnlineAccounts/Service`/ |
| 25 | |
| 26 | #include <QAbstractListModel> |
| 27 | #include <QQmlParserStatus> |
| 28 | #include <QQmlListProperty> |
| 29 | #include <QJSValue> |
| 30 | #include <QString> |
| 31 | #include <QVariant> |
| 32 | |
| 33 | namespace OnlineAccountsModulecxx . . $ OnlineAccountsModule/ { |
| 34 | |
| 35 | class Accountcxx . . $ OnlineAccountsModule/Account#; |
| 36 | |
| 37 | class AccountModelPrivatecxx . . $ OnlineAccountsModule/AccountModelPrivate#; |
| 38 | class AccountModelcxx . . $ OnlineAccountsModule/AccountModel#: public QAbstractListModelcxx . . $ QAbstractListModel#, public QQmlParserStatuscxx . . $ QQmlParserStatus# |
| 39 | { |
| 40 | Q_OBJECTcxx . . $ OnlineAccountsModule/AccountModel#staticMetaObject. |
| 41 | Q_INTERFACEScxx . . $ `<external>/1208926524888476972/qobjectdefs.h:103:9`!(QQmlParserStatus) |
| 42 | Q_PROPERTYcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:104:9`!(int count READ rowCount NOTIFY countChanged) |
| 43 | Q_PROPERTYcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:104:9`!(bool ready READ isReady NOTIFY isReadyChanged) |
| 44 | Q_PROPERTYcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:104:9`!(QString applicationId READ applicationId \ |
| 45 | WRITE setApplicationId NOTIFY applicationIdChanged) |
| 46 | Q_PROPERTYcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:104:9`!(QString serviceId READ serviceId \ |
| 47 | WRITE setServiceId NOTIFY serviceIdChanged) |
| 48 | Q_PROPERTYcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:104:9`!(QList<QObject*> accountList READ accountList \ |
| 49 | NOTIFY accountListChanged) |
| 50 | Q_PROPERTYcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:104:9`!(QJSValue serviceList READ serviceList \ |
| 51 | NOTIFY isReadyChanged) |
| 52 | |
| 53 | public: |
| 54 | enum Rolescxx . . $ OnlineAccountsModule/AccountModel#Roles# { |
| 55 | DisplayNameRolecxx . . $ OnlineAccountsModule/AccountModel#DisplayNameRole. = Qtcxx . . $ Qt/::UserRolecxx . . $ Qt/UserRole. + 1, |
| 56 | ValidRolecxx . . $ OnlineAccountsModule/AccountModel#ValidRole., |
| 57 | AccountIdRolecxx . . $ OnlineAccountsModule/AccountModel#AccountIdRole., |
| 58 | ServiceIdRolecxx . . $ OnlineAccountsModule/AccountModel#ServiceIdRole., |
| 59 | AuthenticationMethodRolecxx . . $ OnlineAccountsModule/AccountModel#AuthenticationMethodRole., |
| 60 | SettingsRolecxx . . $ OnlineAccountsModule/AccountModel#SettingsRole., |
| 61 | AccountRolecxx . . $ OnlineAccountsModule/AccountModel#AccountRole., |
| 62 | ServiceRolecxx . . $ OnlineAccountsModule/AccountModel#ServiceRole., |
| 63 | }; |
| 64 | |
| 65 | explicit AccountModelcxx . . $ OnlineAccountsModule/AccountModel#AccountModel(749de1b6ae65bddd).(QObjectcxx . . $ QObject# *parent = 0); |
| 66 | ~cxx . . $ OnlineAccountsModule/AccountModel#`~AccountModel`(ced63f7c635d850d).AccountModelcxx . . $ OnlineAccountsModule/AccountModel#(); |
| 67 | |
| 68 | bool isReadycxx . . $ OnlineAccountsModule/AccountModel#isReady(50ce9a9e25b4a850).() const; |
| 69 | |
| 70 | void setApplicationIdcxx . . $ OnlineAccountsModule/AccountModel#setApplicationId(3520e46b33348bf6).(const QStringcxx . . $ QString# &applicationId); |
| 71 | QStringcxx . . $ QString# applicationIdcxx . . $ OnlineAccountsModule/AccountModel#applicationId(6ef7b6c27b00b43d).() const; |
| 72 | |
| 73 | void setServiceIdcxx . . $ OnlineAccountsModule/AccountModel#setServiceId(3520e46b33348bf6).(const QStringcxx . . $ QString# &serviceId); |
| 74 | QStringcxx . . $ QString# serviceIdcxx . . $ OnlineAccountsModule/AccountModel#serviceId(6ef7b6c27b00b43d).() const; |
| 75 | |
| 76 | QListcxx . . $ QList#<QObjectcxx . . $ QObject#*> accountListcxx . . $ OnlineAccountsModule/AccountModel#accountList(adb747650fc59aad).() const; |
| 77 | |
| 78 | QJSValuecxx . . $ QJSValue# serviceListcxx . . $ OnlineAccountsModule/AccountModel#serviceList(cedfddd5dbefb84d).() const; |
| 79 | |
| 80 | Q_INVOKABLEcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:124:9`! void requestAccesscxx . . $ OnlineAccountsModule/AccountModel#requestAccess(dac83e64e8e6a438).(const QStringcxx . . $ QString# &service, |
| 81 | const QVariantMapcxx . . $ QVariantMap# ¶ms); |
| 82 | |
| 83 | Q_INVOKABLEcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:124:9`! QVariantcxx . . $ QVariant# getcxx . . $ OnlineAccountsModule/AccountModel#get(2d155939dc996343).(int row, const QStringcxx . . $ QString# &roleName) const; |
| 84 | |
| 85 | // reimplemented virtual methods |
| 86 | int rowCountcxx . . $ OnlineAccountsModule/AccountModel#rowCount(e3878d4d6cd9529c).(const QModelIndexcxx . . $ QModelIndex# &parent = QModelIndexcxx . . $ QModelIndex#QModelIndex(ced63f7c635d850d).()) const; |
| 87 | QVariantcxx . . $ QVariant# datacxx . . $ OnlineAccountsModule/AccountModel#data(69b5b18a001c0029).(const QModelIndexcxx . . $ QModelIndex# &index, int role = Qtcxx . . $ Qt/::DisplayRolecxx . . $ Qt/DisplayRole.) const; |
| 88 | QHashcxx . . $ QHash#<int, QByteArraycxx . . $ QByteArray#> roleNamescxx . . $ OnlineAccountsModule/AccountModel#roleNames(404e830a028de8a7).() const; |
| 89 | |
| 90 | void classBegincxx . . $ OnlineAccountsModule/AccountModel#classBegin(49f6e7a06ebc5aa8).() Q_DECL_OVERRIDEcxx . . $ `<external>/4507883856836070869/qcompilerdetection.h:1137:10`!; |
| 91 | void componentCompletecxx . . $ OnlineAccountsModule/AccountModel#componentComplete(49f6e7a06ebc5aa8).() Q_DECL_OVERRIDEcxx . . $ `<external>/4507883856836070869/qcompilerdetection.h:1137:10`!; |
| 92 | |
| 93 | Q_SIGNALScxx . . $ `<external>/1208926524888476972/qobjectdefs.h:93:10`!: |
| 94 | void isReadyChangedcxx . . $ OnlineAccountsModule/AccountModel#isReadyChanged(49f6e7a06ebc5aa8).(); |
| 95 | void countChangedcxx . . $ OnlineAccountsModule/AccountModel#countChanged(49f6e7a06ebc5aa8).(); |
| 96 | void applicationIdChangedcxx . . $ OnlineAccountsModule/AccountModel#applicationIdChanged(49f6e7a06ebc5aa8).(); |
| 97 | void serviceIdChangedcxx . . $ OnlineAccountsModule/AccountModel#serviceIdChanged(49f6e7a06ebc5aa8).(); |
| 98 | void accountListChangedcxx . . $ OnlineAccountsModule/AccountModel#accountListChanged(49f6e7a06ebc5aa8).(); |
| 99 | void accessReplycxx . . $ OnlineAccountsModule/AccountModel#accessReply(381447dc75fa75e7).(const QVariantMapcxx . . $ QVariantMap# &reply, |
| 100 | const QVariantMapcxx . . $ QVariantMap# &authenticationData); |
| 101 | |
| 102 | private: |
| 103 | Q_DECLARE_PRIVATEcxx . . $ OnlineAccountsModule/AccountModel#d_func(c91c663be0e31975).(AccountModel) |
| 104 | AccountModelPrivatecxx . . $ OnlineAccountsModule/AccountModelPrivate# *d_ptrcxx . . $ OnlineAccountsModule/AccountModel#d_ptr.; |
| 105 | }; |
| 106 | |
| 107 | } // namespace |
| 108 | |
| 109 | #endif // ONLINE_ACCOUNTS_MODULE_ACCOUNT_MODEL_H |