| 1 | /* |
| 2 | * This file is part of OnlineAccountsDaemon |
| 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_DAEMON_MANAGER_ADAPTOR_H |
| 22 | #define ONLINE_ACCOUNTS_DAEMON_MANAGER_ADAPTOR_Hcxx . . $ `online-accounts-daemon/lib/LomiriOnlineAccountsDaemon/manager_adaptor.h:22:9`! |
| 23 | |
| 24 | #include <QDBusAbstractAdaptor> |
| 25 | #include <QDBusConnection> |
| 26 | #include <QDBusContext> |
| 27 | #include <QDBusMessage> |
| 28 | #include <QString> |
| 29 | #include <QVariantMap> |
| 30 | #include <sys/types.h> |
| 31 | #include "account_info.h"cxx . . $ `<file>/online-accounts-daemon/lib/LomiriOnlineAccountsDaemon/account_info.h`/ |
| 32 | #include "manager.h"cxx . . $ `<file>/online-accounts-daemon/lib/LomiriOnlineAccountsDaemon/manager.h`/ |
| 33 | |
| 34 | namespace OnlineAccountsDaemoncxx . . $ OnlineAccountsDaemon/ { |
| 35 | |
| 36 | class CallContextcxx . . $ OnlineAccountsDaemon/CallContext# { |
| 37 | public: |
| 38 | explicit CallContextcxx . . $ OnlineAccountsDaemon/CallContext#CallContext(7eec26b26ff080f5).(QDBusContextcxx . . $ QDBusContext# *dbusContext); |
| 39 | CallContextcxx . . $ OnlineAccountsDaemon/CallContext#CallContext(d517f77eb2794df1).(const CallContextcxx . . $ OnlineAccountsDaemon/CallContext# &other); |
| 40 | virtual ~cxx . . $ OnlineAccountsDaemon/CallContext#`~CallContext`(ced63f7c635d850d).CallContextcxx . . $ OnlineAccountsDaemon/CallContext#(); |
| 41 | |
| 42 | void setDelayedReplycxx . . $ OnlineAccountsDaemon/CallContext#setDelayedReply(b45ddcbc8423892c).(bool delayed); |
| 43 | void sendReplycxx . . $ OnlineAccountsDaemon/CallContext#sendReply(43b2c7823722fc17).(const QListcxx . . $ QList#<QVariantcxx . . $ QVariant#> &args) const; |
| 44 | void sendErrorcxx . . $ OnlineAccountsDaemon/CallContext#sendError(b5b78ffdab614c30).(const QStringcxx . . $ QString# &name, const QStringcxx . . $ QString# &message) const; |
| 45 | |
| 46 | QStringcxx . . $ QString# securityContextcxx . . $ OnlineAccountsDaemon/CallContext#securityContext(6ef7b6c27b00b43d).() const; |
| 47 | pid_tcxx . . $ pid_t# clientPidcxx . . $ OnlineAccountsDaemon/CallContext#clientPid(455f465bc33b4cdf).() const; |
| 48 | QStringcxx . . $ QString# clientNamecxx . . $ OnlineAccountsDaemon/CallContext#clientName(6ef7b6c27b00b43d).() const; |
| 49 | |
| 50 | private: |
| 51 | QDBusConnectioncxx . . $ QDBusConnection# m_connectioncxx . . $ OnlineAccountsDaemon/CallContext#m_connection.; |
| 52 | QDBusMessagecxx . . $ QDBusMessage# m_messagecxx . . $ OnlineAccountsDaemon/CallContext#m_message.; |
| 53 | }; |
| 54 | |
| 55 | class CallContextCountercxx . . $ OnlineAccountsDaemon/CallContextCounter#: public QObjectcxx . . $ QObject# |
| 56 | { |
| 57 | Q_OBJECTcxx . . $ OnlineAccountsDaemon/CallContextCounter#staticMetaObject. |
| 58 | |
| 59 | public: |
| 60 | static CallContextCountercxx . . $ OnlineAccountsDaemon/CallContextCounter# *instancecxx . . $ OnlineAccountsDaemon/CallContextCounter#instance(60846d24b36273d5).(); |
| 61 | |
| 62 | int activeContextscxx . . $ OnlineAccountsDaemon/CallContextCounter#activeContexts(455f465bc33b4cdf).() const { return m_contextscxx . . $ OnlineAccountsDaemon/CallContextCounter#m_contexts.; } |
| 63 | |
| 64 | Q_SIGNALScxx . . $ `<external>/1208926524888476972/qobjectdefs.h:93:10`!: |
| 65 | void activeContextsChangedcxx . . $ OnlineAccountsDaemon/CallContextCounter#activeContextsChanged(49f6e7a06ebc5aa8).(); |
| 66 | |
| 67 | protected: |
| 68 | void addContextcxx . . $ OnlineAccountsDaemon/CallContextCounter#addContext(d517f77eb2794df1).(const CallContextcxx . . $ OnlineAccountsDaemon/CallContext# &context); |
| 69 | void removeContextcxx . . $ OnlineAccountsDaemon/CallContextCounter#removeContext(d517f77eb2794df1).(const CallContextcxx . . $ OnlineAccountsDaemon/CallContext# &context); |
| 70 | |
| 71 | private: |
| 72 | friend class CallContextcxx . . $ OnlineAccountsDaemon/CallContext#; |
| 73 | CallContextCountercxx . . $ OnlineAccountsDaemon/CallContextCounter#CallContextCounter(49f6e7a06ebc5aa8).(); |
| 74 | |
| 75 | int m_contextscxx . . $ OnlineAccountsDaemon/CallContextCounter#m_contexts.; |
| 76 | }; |
| 77 | |
| 78 | class ManagerAdaptorPrivatecxx . . $ OnlineAccountsDaemon/ManagerAdaptorPrivate#; |
| 79 | class ManagerAdaptorcxx . . $ OnlineAccountsDaemon/ManagerAdaptor#: public QDBusAbstractAdaptorcxx . . $ QDBusAbstractAdaptor# |
| 80 | { |
| 81 | Q_OBJECTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:170:9`! |
| 82 | Q_CLASSINFOcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:100:10`!("D-Bus Interface", "com.lomiri.OnlineAccounts.Manager") |
| 83 | Q_CLASSINFOcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:100:10`!("D-Bus Introspection", "" |
| 84 | " <interface name=\"com.lomiri.OnlineAccounts.Manager\">\n" |
| 85 | " <method name=\"GetAccounts\">\n" |
| 86 | " <arg direction=\"in\" type=\"a{sv}\" name=\"filters\"/>\n" |
| 87 | " <arg direction=\"out\" type=\"a(ua{sv})\" name=\"accounts\"/>\n" |
| 88 | " <arg direction=\"out\" type=\"aa{sv}\" name=\"services\"/>\n" |
| 89 | " </method>\n" |
| 90 | " <method name=\"Authenticate\">\n" |
| 91 | " <arg direction=\"in\" type=\"u\" name=\"accountId\"/>\n" |
| 92 | " <arg direction=\"in\" type=\"s\" name=\"serviceId\"/>\n" |
| 93 | " <arg direction=\"in\" type=\"b\" name=\"interactive\"/>\n" |
| 94 | " <arg direction=\"in\" type=\"b\" name=\"invalidate\"/>\n" |
| 95 | " <arg direction=\"in\" type=\"a{sv}\" name=\"parameters\"/>\n" |
| 96 | " <arg direction=\"out\" type=\"a{sv}\" name=\"credentials\"/>\n" |
| 97 | " </method>\n" |
| 98 | " <method name=\"RequestAccess\">\n" |
| 99 | " <arg direction=\"in\" type=\"s\" name=\"serviceId\"/>\n" |
| 100 | " <arg direction=\"in\" type=\"a{sv}\" name=\"parameters\"/>\n" |
| 101 | " <arg direction=\"out\" type=\"(ua{sv})\" name=\"account\"/>\n" |
| 102 | " <arg direction=\"out\" type=\"a{sv}\" name=\"credentials\"/>\n" |
| 103 | " </method>\n" |
| 104 | " <signal name=\"AccountChanged\">\n" |
| 105 | " <arg type=\"s\" name=\"serviceId\"/>\n" |
| 106 | " <arg type=\"(ua{sv})\" name=\"account\"/>\n" |
| 107 | " </signal>\n" |
| 108 | " </interface>\n" |
| 109 | "") |
| 110 | |
| 111 | public: |
| 112 | explicit ManagerAdaptorcxx . . $ OnlineAccountsDaemon/ManagerAdaptor#ManagerAdaptor(654426b51cdc7b1d).(Managercxx . . $ OnlineAccountsDaemon/Manager# *parent); |
| 113 | ~cxx . . $ OnlineAccountsDaemon/ManagerAdaptor#`~ManagerAdaptor`(ced63f7c635d850d).ManagerAdaptorcxx . . $ OnlineAccountsDaemon/ManagerAdaptor#(); |
| 114 | |
| 115 | inline Managercxx . . $ OnlineAccountsDaemon/Manager# *parentcxx . . $ OnlineAccountsDaemon/ManagerAdaptor#parent(6a3567a468892afd).() const |
| 116 | { return static_cast<Managercxx . . $ OnlineAccountsDaemon/Manager# *>(QObjectcxx . . $ QObject#::parentcxx . . $ QObject#parent(2dbb680a34285c44).()); } |
| 117 | |
| 118 | inline QDBusContextcxx . . $ QDBusContext# *dbusContextcxx . . $ OnlineAccountsDaemon/ManagerAdaptor#dbusContext(321c8926ad053611).() const |
| 119 | { return static_cast<QDBusContextcxx . . $ QDBusContext# *>(parentcxx . . $ OnlineAccountsDaemon/ManagerAdaptor#parent(6a3567a468892afd).()); } |
| 120 | |
| 121 | void notifyAccountChangecxx . . $ OnlineAccountsDaemon/ManagerAdaptor#notifyAccountChange(d95a3829712944c5).(const AccountInfocxx . . $ OnlineAccountsDaemon/AccountInfo# &info, uintcxx . . $ uint# changeType); |
| 122 | |
| 123 | public Q_SLOTScxx . . $ `<external>/1208926524888476972/qobjectdefs.h:92:10`!: |
| 124 | QVariantMapcxx . . $ QVariantMap# Authenticatecxx . . $ OnlineAccountsDaemon/ManagerAdaptor#Authenticate(23136f2bb133efbe).(uintcxx . . $ uint# accountId, const QStringcxx . . $ QString# &serviceId, |
| 125 | bool interactive, bool invalidate, |
| 126 | const QVariantMapcxx . . $ QVariantMap# ¶meters); |
| 127 | void GetAccountscxx . . $ OnlineAccountsDaemon/ManagerAdaptor#GetAccounts(cb829950619bbc42).(const QVariantMapcxx . . $ QVariantMap# &filters, |
| 128 | QListcxx . . $ QList#<AccountInfocxx . . $ OnlineAccountsDaemon/AccountInfo#> &accounts, |
| 129 | QListcxx . . $ QList#<QVariantMapcxx . . $ QVariantMap#> &services); |
| 130 | AccountInfocxx . . $ OnlineAccountsDaemon/AccountInfo# RequestAccesscxx . . $ OnlineAccountsDaemon/ManagerAdaptor#RequestAccess(7a1a0a1dabf523f2).(const QStringcxx . . $ QString# &serviceId, |
| 131 | const QVariantMapcxx . . $ QVariantMap# ¶meters, |
| 132 | QVariantMapcxx . . $ QVariantMap# &credentials); |
| 133 | |
| 134 | Q_SIGNALScxx . . $ `<external>/1208926524888476972/qobjectdefs.h:93:10`!: |
| 135 | void AccountChangedcxx . . $ OnlineAccountsDaemon/ManagerAdaptor#AccountChanged(1a218bcf06aca772).(const QStringcxx . . $ QString# &serviceId, AccountInfocxx . . $ OnlineAccountsDaemon/AccountInfo# account); |
| 136 | |
| 137 | private: |
| 138 | Q_DECLARE_PRIVATEcxx . . $ OnlineAccountsDaemon/ManagerAdaptor#d_ptr.(ManagerAdaptor) |
| 139 | ManagerAdaptorPrivatecxx . . $ OnlineAccountsDaemon/ManagerAdaptorPrivate# *d_ptrcxx . . $ OnlineAccountsDaemon/ManagerAdaptor#d_ptr.; |
| 140 | }; |
| 141 | |
| 142 | } // namespace |
| 143 | |
| 144 | #endif // ONLINE_ACCOUNTS_DAEMON_MANAGER_ADAPTOR_H |