ubuntu-system-settings-online-accounts-0.7+16.04.20160322/0000755000015600001650000000000012674252771023536 5ustar pbuserpbgroup00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/0000755000015600001650000000000012674252771025217 5ustar pbuserpbgroup00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/example/0000755000015600001650000000000012674252771026652 5ustar pbuserpbgroup00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/example/Main.qml0000644000015600001650000000226212674252514030246 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013-2015 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ import QtQuick 2.0 import Ubuntu.Components 1.3 import Ubuntu.OnlineAccounts 0.1 Column { id: root property string domain: "ubuntu-system-settings-online-accounts" anchors.left: parent.left anchors.right: parent.right TextField { id: userName placeholderText: i18n.dtr(domain, "User name") readOnly: account.accountId != 0 } TextField { id: password placeholderText: i18n.dtr(domain, "Password") } } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/example/example.provider0000644000015600001650000000030412674252514032051 0ustar pbuserpbgroup00000000000000 Example.com facebook ubuntu-system-settings-online-accounts ubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/example/example.pro0000644000015600001650000000075012674252514031024 0ustar pbuserpbgroup00000000000000include(../../common-project-config.pri) include($${TOP_SRC_DIR}/common-vars.pri) TEMPLATE = lib TARGET = example QML_SOURCES = \ Main.qml OTHER_FILES += \ $${QML_SOURCES} \ example.provider provider.files = example.provider provider.path = $$system("pkg-config --define-variable=prefix=$${INSTALL_PREFIX} --variable providerfilesdir libaccounts-glib") INSTALLS += provider qml.files = $${QML_SOURCES} qml.path = $${ONLINE_ACCOUNTS_PLUGIN_DIR}/$${TARGET} INSTALLS += qml ubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/OnlineAccountsPlugin/0000755000015600001650000000000012674252771031322 5ustar pbuserpbgroup00000000000000././@LongLink0000000000000000000000000000015700000000000011220 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/OnlineAccountsPlugin/application-manager.cppubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/OnlineAccountsPlugin/application-m0000644000015600001650000002423612674252514034004 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "account-manager.h" #include "application-manager.h" #include #include #include #include #include #include using namespace OnlineAccountsUi; ApplicationManager *ApplicationManager::m_instance = 0; namespace OnlineAccountsUi { class ApplicationManagerPrivate { public: ApplicationManagerPrivate(); QString applicationProfile(const QString &applicationId) const; bool applicationMatchesProfile(const Accounts::Application &application, const QString &profile) const; static QString stripVersion(const QString &appId); static QString displayId(const QString &appId); }; } // namespace ApplicationManagerPrivate::ApplicationManagerPrivate() { } QString ApplicationManagerPrivate::applicationProfile(const QString &applicationId) const { /* We need to load the XML file and look for the "profile" element. The * file lookup would become unnecessary if a domDocument() method were * added to the Accounts::Application class. */ QString localShare = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation); QFile file(QString("%1/accounts/applications/%2.application"). arg(localShare).arg(applicationId)); if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) { qDebug() << "file not found:" << file.fileName(); /* libaccounts would fall back to looking into /usr/share/accounts/, * but we know that .click packages don't install files in there, and * currently the profile information is only attached to click * applications. Therefore, if we don't find the file in * ~/.local/share/accounts/, we can assume we won't find the profile * info anywhere. */ return QString(); } QDomDocument doc; doc.setContent(&file); const QDomElement root = doc.documentElement(); return root.firstChildElement(QStringLiteral("profile")).text(); } bool ApplicationManagerPrivate::applicationMatchesProfile(const Accounts::Application &application, const QString &profile) const { /* We don't restrict unconfined apps. */ if (profile == QStringLiteral("unconfined")) return true; /* It's a confined app. We must make sure that the applicationId it * specified matches the apparmor profile. */ QString declaredProfile = applicationProfile(application.name()); return declaredProfile == profile; } QString ApplicationManagerPrivate::stripVersion(const QString &appId) { QStringList components = appId.split('_'); if (components.count() != 3) return QString(); /* Click packages have a profile of the form * $name_$application_$version * (see https://wiki.ubuntu.com/SecurityTeam/Specifications/ApplicationConfinement/Manifest#Click) * * We assume that this is a click package, and strip out the last part. */ components.removeLast(); return components.join('_'); } QString ApplicationManagerPrivate::displayId(const QString &appId) { QStringList components = appId.split('_').mid(0, 2); if (components.count() != 2) return appId; return components.join('/'); } ApplicationManager *ApplicationManager::instance() { if (!m_instance) { m_instance = new ApplicationManager; } return m_instance; } ApplicationManager::ApplicationManager(QObject *parent): QObject(parent), d_ptr(new ApplicationManagerPrivate) { } ApplicationManager::~ApplicationManager() { delete d_ptr; } QVariantMap ApplicationManager::applicationInfo(const QString &claimedAppId, const QString &profile) { Q_D(const ApplicationManager); if (Q_UNLIKELY(profile.isEmpty())) return QVariantMap(); /* Special case: when the applicationId is "system-settings", we don't * require the existance of the .application file, because this request * will always be about creating a new account. */ if (claimedAppId == "system-settings") { QVariantMap app; app.insert(QStringLiteral("id"), claimedAppId); app.insert(QStringLiteral("profile"), profile); return app; } QString applicationId = claimedAppId; Accounts::Application application = AccountManager::instance()->application(applicationId); if (!application.isValid()) { application = applicationFromProfile(profile); applicationId = application.name(); } /* Make sure that the app is who it claims to be */ if (!d->applicationMatchesProfile(application, profile)) { qDebug() << "Given applicationId doesn't match profile"; return QVariantMap(); } QVariantMap app; app.insert(QStringLiteral("id"), applicationId); app.insert(QStringLiteral("displayId"), d->displayId(applicationId)); app.insert(QStringLiteral("displayName"), application.displayName()); app.insert(QStringLiteral("icon"), application.iconName()); /* The applicationMatchesProfile() test above ensures that either the peer * is unconfined, or the profile in the .application file matches the one * we see from our peer. * In the first case, what we really want is the profile from the * .application file (if that's set), to cover the case where an unconfined * process is asking authorization on behalf of a confined app. */ QString targetProfile = d->applicationProfile(application.name()); if (targetProfile.isEmpty()) { targetProfile = profile; } app.insert(QStringLiteral("profile"), targetProfile); /* List all the services supported by this application */ QVariantList serviceIds; Accounts::ServiceList allServices = AccountManager::instance()->serviceList(); Q_FOREACH(const Accounts::Service &service, allServices) { if (!application.serviceUsage(service).isEmpty()) { serviceIds.append(service.name()); } } app.insert(QStringLiteral("services"), serviceIds); return app; } QVariantMap ApplicationManager::providerInfo(const QString &providerId) const { Accounts::Provider provider = AccountManager::instance()->provider(providerId); if (Q_UNLIKELY(!provider.isValid())) { qWarning() << "Invalid provider" << providerId; return QVariantMap(); } QVariantMap info; info.insert(QStringLiteral("id"), providerId); info.insert(QStringLiteral("displayName"), provider.displayName()); info.insert(QStringLiteral("icon"), provider.iconName()); info.insert(QStringLiteral("isSingleAccount"), provider.isSingleAccount()); /* Get Ubuntu-specific information directly from the XML file */ const QDomDocument doc = provider.domDocument(); QDomElement root = doc.documentElement(); info.insert(QStringLiteral("profile"), root.firstChildElement("profile").text()); info.insert(QStringLiteral("package-dir"), root.firstChildElement("package-dir").text()); return info; } QStringList ApplicationManager::usefulProviders() const { AccountManager *manager = AccountManager::instance(); Accounts::ServiceList allServices = manager->serviceList(); QStringList providers; Q_FOREACH(const Accounts::Service &service, allServices) { if (providers.contains(service.provider())) continue; if (!manager->applicationList(service).isEmpty()) { providers.append(service.provider()); } } return providers; } QStringList ApplicationManager::addApplicationToAcl(const QStringList &acl, const QString &applicationId) const { Q_D(const ApplicationManager); QStringList newAcl = acl; QString profile = d->applicationProfile(applicationId); qDebug() << "profile of" << applicationId << ":" << profile; if (!profile.isEmpty()) { newAcl.append(profile); } return newAcl; } QStringList ApplicationManager::removeApplicationFromAcl(const QStringList &acl, const QString &applicationId) const { Q_D(const ApplicationManager); QString profile = d->applicationProfile(applicationId); if (profile.isEmpty()) { return acl; } QStringList newAcl; QString unversionedProfile = ApplicationManagerPrivate::stripVersion(profile); Q_FOREACH(const QString &app, acl) { if (app != profile && (unversionedProfile.isEmpty() || !app.startsWith(unversionedProfile))) { newAcl.append(app); } } return newAcl; } Accounts::Application ApplicationManager::applicationFromProfile(const QString &profile) { /* If the profile is not a click package profile, we have no way of knowing * what application it is. */ QStringList components = profile.split('_'); if (components.count() != 3) return Accounts::Application(); /* First try to see if we can use the full profile as app ID; if not, strip * out the version, and if that fails as well then use only the package * name. */ AccountManager *manager = AccountManager::instance(); Accounts::Application application = manager->application(profile); if (application.isValid()) return application; QString applicationId = components[0] + "_" + components[1]; application = manager->application(applicationId); if (application.isValid()) return application; return manager->application(components[0]); } ././@LongLink0000000000000000000000000000015300000000000011214 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/OnlineAccountsPlugin/request-handler.cppubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/OnlineAccountsPlugin/request-handl0000644000015600001650000001107112674252514034014 0ustar pbuserpbgroup00000000000000/* * This file is part of online-accounts-ui * * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "request-handler.h" #include #include #include #include #include using namespace SignOnUi; namespace SignOnUi { static QList allRequestHandlers; static int counter = 1; class RequestHandlerPrivate { Q_DECLARE_PUBLIC(RequestHandler) public: RequestHandlerPrivate(RequestHandler *request); ~RequestHandlerPrivate(); private: QString m_matchId; QPointer m_request; mutable RequestHandler *q_ptr; }; class RequestHandlerWatcherPrivate { Q_DECLARE_PUBLIC(RequestHandlerWatcher) public: RequestHandlerWatcherPrivate(RequestHandlerWatcher *watcher); ~RequestHandlerWatcherPrivate(); static RequestHandlerWatcherPrivate *instance(); void registerHandler(RequestHandler *handler); private: mutable RequestHandlerWatcher *q_ptr; static RequestHandlerWatcherPrivate *m_instance; }; RequestHandlerWatcherPrivate *RequestHandlerWatcherPrivate::m_instance = 0; } // namespace RequestHandlerPrivate::RequestHandlerPrivate(RequestHandler *request): q_ptr(request) { m_matchId = QString("%1-%2").arg(getpid()).arg(counter++); } RequestHandlerPrivate::~RequestHandlerPrivate() { } RequestHandler::RequestHandler(QObject *parent): QObject(parent), d_ptr(new RequestHandlerPrivate(this)) { allRequestHandlers.append(this); RequestHandlerWatcherPrivate *watcher = RequestHandlerWatcherPrivate::instance(); if (Q_LIKELY(watcher)) { watcher->registerHandler(this); } } RequestHandler::~RequestHandler() { allRequestHandlers.removeOne(this); delete d_ptr; } void RequestHandler::setRequest(QObject *request) { Q_D(RequestHandler); if (request == d->m_request) return; if (d->m_request != 0 && request != 0) { qCritical() << "RequestHandler is already assigned a request"; return; } d->m_request = request; Q_EMIT requestChanged(); } QObject *RequestHandler::request() const { Q_D(const RequestHandler); return d->m_request; } QString RequestHandler::matchId() const { Q_D(const RequestHandler); return d->m_matchId; } RequestHandlerWatcherPrivate::RequestHandlerWatcherPrivate(RequestHandlerWatcher *watcher): q_ptr(watcher) { if (Q_UNLIKELY(m_instance)) { qWarning() << "RequestHandlerWatcher should be instantiated once!"; } m_instance = this; } RequestHandlerWatcherPrivate::~RequestHandlerWatcherPrivate() { m_instance = 0; } RequestHandlerWatcherPrivate *RequestHandlerWatcherPrivate::instance() { return m_instance; } void RequestHandlerWatcherPrivate::registerHandler(RequestHandler *handler) { Q_Q(RequestHandlerWatcher); Q_EMIT q->newHandler(handler); } RequestHandlerWatcher::RequestHandlerWatcher(QObject *parent): QObject(parent), d_ptr(new RequestHandlerWatcherPrivate(this)) { } RequestHandlerWatcher::~RequestHandlerWatcher() { delete d_ptr; } RequestHandler *RequestHandlerWatcher::findMatching(const QVariantMap ¶meters) { /* Find if there's any RequestHandler expecting to handle the SignOnUi * request having "parameters" as parameters. * This is simply done by matching on the X-RequestHandler key (aka * matchKey()), if present. We expect that account plugins add that field * to their AuthSession requests which they want to handle themselves. */ qDebug() << parameters; if (!parameters.contains(SSOUI_KEY_CLIENT_DATA)) return 0; QVariantMap clientData = parameters[SSOUI_KEY_CLIENT_DATA].toMap(); qDebug() << "client data:" << clientData; QString matchId = clientData.value(RequestHandler::matchKey()).toString(); if (matchId.isEmpty()) return 0; Q_FOREACH(RequestHandler *handler, allRequestHandlers) { if (handler->matchId() == matchId) return handler; } return 0; } ././@LongLink0000000000000000000000000000015100000000000011212 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/OnlineAccountsPlugin/account-manager.hubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/OnlineAccountsPlugin/account-manag0000644000015600001650000000227512674252514033763 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef OAU_ACCOUNT_MANAGER_H #define OAU_ACCOUNT_MANAGER_H #include "global.h" #include namespace OnlineAccountsUi { class OAP_EXPORT AccountManager: public Accounts::Manager { Q_OBJECT public: static AccountManager *instance(); protected: explicit AccountManager(QObject *parent = 0); ~AccountManager(); private: static AccountManager *m_instance; }; } // namespace #endif // OAU_ACCOUNT_MANAGER_H ubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/OnlineAccountsPlugin/global.h0000644000015600001650000000216012674252514032725 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of OnlineAccountsPlugin. * * OnlineAccountsPlugin is free software: you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * OnlineAccountsPlugin is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with OnlineAccountsPlugin. If not, see * . */ #ifndef ONLINE_ACCOUNTS_PLUGIN_GLOBAL_H #define ONLINE_ACCOUNTS_PLUGIN_GLOBAL_H #include #if defined(BUILDING_ONLINE_ACCOUNTS_PLUGIN) # define OAP_EXPORT Q_DECL_EXPORT #else # define OAP_EXPORT Q_DECL_IMPORT #endif #endif // ONLINE_ACCOUNTS_PLUGIN_GLOBAL_H ././@LongLink0000000000000000000000000000016200000000000011214 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/OnlineAccountsPlugin/OnlineAccountsPlugin.pc.inubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/OnlineAccountsPlugin/OnlineAccount0000644000015600001650000000055312674252514034004 0ustar pbuserpbgroup00000000000000prefix=$$INSTALL_PREFIX exec_prefix=${prefix} libdir=$$INSTALL_LIBDIR includedir=${prefix}/include plugin_qml_dir=${prefix}/$${ONLINE_ACCOUNTS_PLUGIN_DIR_BASE} Name: $$TARGET Description: Online Accounts plugin module for Ubuntu Touch Version: $$PROJECT_VERSION Requires: Qt5Core Requires.private: Qt5Gui Cflags: -I${includedir} Libs: -L${libdir} -l$${TARGET} ././@LongLink0000000000000000000000000000016000000000000011212 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/OnlineAccountsPlugin/OnlineAccountsPlugin.proubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/OnlineAccountsPlugin/OnlineAccount0000644000015600001650000000161512674252514034004 0ustar pbuserpbgroup00000000000000include (../../common-project-config.pri) include($${TOP_SRC_DIR}/common-vars.pri) TEMPLATE = lib TARGET = online-accounts-plugin CONFIG += \ link_pkgconfig \ qt QT += \ gui \ network PKGCONFIG += \ accounts-qt5 \ signon-plugins-common QMAKE_CXXFLAGS += \ -fvisibility=hidden DEFINES += BUILDING_ONLINE_ACCOUNTS_PLUGIN # Error on undefined symbols QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF private_headers += \ account-manager.h \ application-manager.h \ request-handler.h public_headers += INCLUDEPATH += \ $${TOP_SRC_DIR} SOURCES += \ account-manager.cpp \ application-manager.cpp \ request-handler.cpp HEADERS += \ $${private_headers} \ $${public_headers} headers.files = $${public_headers} include($${TOP_SRC_DIR}/common-installs-config.pri) pkgconfig.files = OnlineAccountsPlugin.pc include($${TOP_SRC_DIR}/common-pkgconfig.pri) ././@LongLink0000000000000000000000000000015300000000000011214 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/OnlineAccountsPlugin/account-manager.cppubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/OnlineAccountsPlugin/account-manag0000644000015600001650000000257412674252514033765 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "account-manager.h" using namespace OnlineAccountsUi; using namespace Accounts; AccountManager *AccountManager::m_instance = 0; AccountManager *AccountManager::instance() { if (!m_instance) { m_instance = new AccountManager; /* to ensure that all the installed services are parsed into * libaccounts' DB, we enumerate them here. * TODO: a click package hook would be a more proper fix. */ m_instance->serviceList(); } return m_instance; } AccountManager::AccountManager(QObject *parent): Accounts::Manager(parent) { } AccountManager::~AccountManager() { } ././@LongLink0000000000000000000000000000015100000000000011212 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/OnlineAccountsPlugin/request-handler.hubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/OnlineAccountsPlugin/request-handl0000644000015600001650000000403012674252514034011 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef SIGNON_UI_REQUEST_HANDLER_H #define SIGNON_UI_REQUEST_HANDLER_H #include "global.h" #include #include namespace SignOnUi { class RequestHandlerPrivate; class OAP_EXPORT RequestHandler: public QObject { Q_OBJECT Q_PROPERTY(QObject *request READ request NOTIFY requestChanged) Q_PROPERTY(QString matchKey READ matchKey CONSTANT) Q_PROPERTY(QString matchId READ matchId CONSTANT) public: explicit RequestHandler(QObject *parent = 0); ~RequestHandler(); void setRequest(QObject *request); QObject *request() const; static QString matchKey() { return QStringLiteral("X-RequestHandler"); } QString matchId() const; Q_SIGNALS: void requestChanged(); private: RequestHandlerPrivate *d_ptr; Q_DECLARE_PRIVATE(RequestHandler) }; class RequestHandlerWatcherPrivate; class OAP_EXPORT RequestHandlerWatcher: public QObject { Q_OBJECT public: explicit RequestHandlerWatcher(QObject *parent = 0); ~RequestHandlerWatcher(); RequestHandler *findMatching(const QVariantMap ¶meters); Q_SIGNALS: void newHandler(SignOnUi::RequestHandler *handler); private: RequestHandlerWatcherPrivate *d_ptr; Q_DECLARE_PRIVATE(RequestHandlerWatcher) }; } // namespace #endif // SIGNON_UI_REQUEST_HANDLER_H ././@LongLink0000000000000000000000000000015500000000000011216 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/OnlineAccountsPlugin/application-manager.hubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/OnlineAccountsPlugin/application-m0000644000015600001650000000413012674252514033773 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef OAU_APPLICATION_MANAGER_H #define OAU_APPLICATION_MANAGER_H #include "global.h" #include #include #include #include class ApplicationManagerTest; namespace OnlineAccountsUi { class ApplicationManagerPrivate; class OAP_EXPORT ApplicationManager: public QObject { Q_OBJECT public: static ApplicationManager *instance(); Q_INVOKABLE QVariantMap applicationInfo(const QString &applicationId, const QString &profile); QVariantMap providerInfo(const QString &providerId) const; Q_INVOKABLE QStringList usefulProviders() const; Q_INVOKABLE QStringList addApplicationToAcl(const QStringList &acl, const QString &appId) const; Q_INVOKABLE QStringList removeApplicationFromAcl(const QStringList &acl, const QString &appId) const; Accounts::Application applicationFromProfile(const QString &profile); protected: explicit ApplicationManager(QObject *parent = 0); ~ApplicationManager(); private: static ApplicationManager *m_instance; ApplicationManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(ApplicationManager) friend class ::ApplicationManagerTest; }; } // namespace #endif // OAU_APPLICATION_MANAGER_H ubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/plugins.pro0000644000015600001650000000017212674252514027415 0ustar pbuserpbgroup00000000000000TEMPLATE = subdirs SUBDIRS = \ OnlineAccountsPlugin \ module \ example module.depends = OnlineAccountsPlugin ubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/module/0000755000015600001650000000000012674252771026504 5ustar pbuserpbgroup00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/module/OAuthMain.qml0000644000015600001650000000272512674252514031045 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013-2015 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ import QtQuick 2.0 import Ubuntu.Components 1.3 import Ubuntu.OnlineAccounts 0.1 Item { id: root property url creationComponentUrl: "OAuth.qml" property url editingComponentUrl: "Options.qml" property Component creationComponent: null property Component editingComponent: null property alias source: loader.source signal finished anchors.fill: parent Loader { id: loader anchors.fill: parent source: sourceComponent === null ? (account.accountId != 0 ? editingComponentUrl : creationComponentUrl) : "" sourceComponent: account.accountId != 0 ? editingComponent : creationComponent Connections { target: loader.item onFinished: root.finished() } } } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/module/OAuth.qml0000644000015600001650000002041712674252520030233 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013-2016 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ import QtQuick 2.0 import Ubuntu.Components 1.3 import Ubuntu.Components.ListItems 1.3 as ListItem import Ubuntu.Components.Popups 1.3 import Ubuntu.OnlineAccounts 0.1 import Ubuntu.OnlineAccounts.Plugin 1.0 Item { id: root /* To override the parameters coming from the .provider file: */ property variant authenticationParameters: {} /* To override the default access control list: */ property variant accessControlList: ["unconfined"] property variant authReply property bool isNewAccount: false property variant __account: account property bool __isAuthenticating: false property alias globalAccountService: globalAccountSettings property bool loading: loader.status == Loader.Null || loader.status == Loader.Loading signal authenticated(variant reply) signal authenticationError(variant error) signal finished anchors.fill: parent Component.onCompleted: { isNewAccount = (account.accountId === 0) enableAccount() authenticate() } RequestHandler { id: requestHandler onRequestChanged: { if (request) { console.log("RequestHandler captured request!") loader.setSource("WebView.qml", { "signonRequest": request }) } else { console.log("Request destroyed!") loader.source = "" } } } Credentials { id: creds caption: account.provider.id acl: accessControlList onCredentialsIdChanged: root.credentialsStored() } AccountService { id: globalAccountSettings objectHandle: account.accountServiceHandle credentials: creds autoSync: false onAuthenticated: { __isAuthenticating = false authReply = reply root.authenticated(reply) } onAuthenticationError: { __isAuthenticating = false root.authenticationError(error) } } AccountServiceModel { id: accountServices includeDisabled: true account: __account.objectHandle } ListItem.Base { visible: loading && !errorItem.visible height: units.gu(7) showDivider: false anchors.top: parent.top Item { height: units.gu(5) width: units.gu(30) anchors.horizontalCenter: parent.horizontalCenter anchors.top: parent.top anchors.margins: units.gu(1) ActivityIndicator { id: loadingIndicator anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left anchors.leftMargin: units.gu(5) running: loading z: 1 } Label { text: i18n.dtr("ubuntu-system-settings-online-accounts", "Loading…") anchors.verticalCenter: parent.verticalCenter anchors.left: loadingIndicator.right anchors.leftMargin: units.gu(3) } } } Loader { id: loader anchors { top: parent.top left: parent.left right: parent.right bottom: Qt.inputMethod.visible ? osk.top : cancelButton.top } focus: true visible: !loading } ErrorItem { id: errorItem anchors { fill: parent; margins: units.gu(4) } visible: false onRetryRequested: { root.credentialsStored() visible = false } } KeyboardRectangle { id: osk } ListItem.SingleControl { id: cancelButton anchors.bottom: parent.bottom showDivider: false control: Button { text: i18n.dtr("ubuntu-system-settings-online-accounts", "Cancel") width: parent.width - units.gu(4) onClicked: root.cancel() } } AccountServiceModel { id: possiblyDuplicateAccounts service: "global" provider: __account.provider.id } function authenticate() { console.log("Authenticating...") creds.sync() } function credentialsStored() { console.log("Credentials stored, id: " + creds.credentialsId) if (creds.credentialsId == 0) return var parameters = {} parameters[requestHandler.matchKey] = requestHandler.matchId parameters["providerId"] = account.provider.id for (var p in authenticationParameters) { parameters[p] = authenticationParameters[p] } __isAuthenticating = true globalAccountSettings.authenticate(parameters) } function cancel() { if (__isAuthenticating) { /* This will cause the authentication to fail, and this method will * be invoked again to delete the credentials. */ globalAccountSettings.cancelAuthentication() return } if (isNewAccount && creds.credentialsId != 0) { console.log("Removing credentials...") creds.remove() creds.removed.connect(finished) } else { finished() } } function enableAccount() { globalAccountSettings.updateServiceEnabled(true) } function getUserName(reply, callback) { /* This should work for OAuth 1.0a; for OAuth 2.0 this function needs * to be reimplemented */ if ('ScreenName' in reply) return reply.ScreenName else if ('UserId' in reply) return reply.UserId return '' } function accountIsDuplicate(userName) { var model = possiblyDuplicateAccounts for (var i = 0; i < model.count; i++) { if (model.get(i, "displayName") == userName) return true } return false } function __gotUserName(userName, reply) { console.log("UserName: " + userName) if (userName != '') { if (accountIsDuplicate(userName)) { var dialog = PopupUtils.open(Qt.resolvedUrl("DuplicateAccount.qml")) dialog.closed.connect(cancel) return } account.updateDisplayName(userName) } beforeSaving(reply) } function saveAccount() { account.synced.connect(finished) account.sync() } /* reimplement this function in plugins in order to perform some actions * before quitting the plugin */ function beforeSaving(reply) { saveAccount() } function __getUserNameAndSave(reply) { /* If the completeCreation function is defined, run it */ if (typeof(completeCreation) == "function") { console.warn("The completeCreation method is deprecated; use getUserName() or beforeSaving() instead") completeCreation(reply) return } var userName = getUserName(reply, function(name) { __gotUserName(name, reply) }) if (typeof(userName) == "string") { __gotUserName(userName, reply) } else if (userName === false) { cancel() return } // otherwise (userName === true), wait for the callback to be invoked } onAuthenticated: __getUserNameAndSave(reply) onAuthenticationError: { console.log("Authentication error, code " + error.code) if (error.code == AccountService.NetworkError) { console.log("Network error") errorItem.visible = true return } root.cancel() } onFinished: loading = false } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/module/plugin.h0000644000015600001650000000243212674252514030147 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of OnlineAccountsPlugin. * * OnlineAccountsClient is free software: you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * OnlineAccountsClient is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with OnlineAccountsClient. If not, see * . */ #ifndef ONLINE_ACCOUNTS_PLUGIN_PLUGIN_H #define ONLINE_ACCOUNTS_PLUGIN_PLUGIN_H #include namespace OnlineAccountsPlugin { class Plugin: public QQmlExtensionPlugin { Q_OBJECT Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") public: void initializeEngine(QQmlEngine *engine, const char *uri); void registerTypes(const char *uri); }; }; // namespace #endif // ONLINE_ACCOUNTS_PLUGIN_PLUGIN_H ubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/module/DuplicateAccount.qml0000644000015600001650000000242712674252514032446 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2016 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ import QtQuick 2.0 import Ubuntu.Components 1.3 import Ubuntu.Components.Popups 1.3 Dialog { id: root property string accountName property bool confirmed: false signal closed title: i18n.dtr("ubuntu-system-settings-online-accounts", "Duplicate account") text: i18n.dtr("ubuntu-system-settings-online-accounts", "There is already an account created for this email address.") onVisibleChanged: if (!visible) closed() Button { text: i18n.dtr("ubuntu-system-settings-online-accounts", "OK") onClicked: PopupUtils.close(root) } } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/module/WebView.qml0000644000015600001650000000266312674252514030571 0ustar pbuserpbgroup00000000000000import QtQuick 2.0 import Ubuntu.Components 1.3 import Ubuntu.Web 0.2 WebView { id: root property QtObject signonRequest onSignonRequestChanged: if (signonRequest) { signonRequest.authenticated.connect(onAuthenticated) url = signonRequest.startUrl } onLoadingStateChanged: { console.log("Loading changed") if (loading && !lastLoadFailed) { signonRequest.onLoadStarted() } else if (lastLoadSucceeded) { signonRequest.onLoadFinished(true) } else if (lastLoadFailed) { signonRequest.onLoadFinished(false) } } onUrlChanged: signonRequest.currentUrl = url context: WebContext { dataPath: signonRequest ? signonRequest.rootDir : "" } function onAuthenticated() { /* Get the cookies and set them on the request */ console.log("Authenticated; getting cookies") context.cookieManager.getCookiesResponse.connect(onGotCookies) context.cookieManager.getAllCookies() visible = false } function onGotCookies(requestId, cookies) { signonRequest.setCookies(cookies) } /* Taken from webbrowser-app */ ProgressBar { anchors.top: parent.top anchors.left: parent.left anchors.right: parent.right height: units.dp(3) showProgressPercentage: false visible: root.loading value: root.loadProgress / 100 } } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/module/ServiceItem.qml0000644000015600001650000000403112674252514031427 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013-2015 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ import QtQuick 2.0 import Ubuntu.Components 1.3 import Ubuntu.OnlineAccounts 0.1 Column { property variant accountServiceHandle signal applicationAdded(string applicationId) signal applicationRemoved(string applicationId) anchors.left: parent.left anchors.right: parent.right Repeater { resources: AccountService { id: accountService objectHandle: accountServiceHandle } model: ApplicationModel { service: accountService.service.id } delegate: ServiceItemBase { text: model.displayName ? model.displayName : model.applicationId subText: ApplicationManager.applicationInfo(model.applicationId, "unconfined").displayId iconSource: model.iconName.indexOf("/") === 0 ? model.iconName : "image://theme/" + model.iconName checked: accountService.serviceEnabled onCheckedChanged: { if (checked != accountService.serviceEnabled) { if (checked) { applicationAdded(model.applicationId) } else { applicationRemoved(model.applicationId) } accountService.updateServiceEnabled(checked) } } } } } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/module/ServiceItemBase.qml0000644000015600001650000000337012674252514032227 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2016 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ import QtQuick 2.0 import Ubuntu.Components 1.3 import Ubuntu.Components.ListItems 1.3 as ListItem ListItem.Base { property alias checked: control.checked property alias text: label.text property alias subText: subLabel.text Item { anchors { left: parent.left; right: parent.right; verticalCenter: parent.verticalCenter } height: childrenRect.height + label.anchors.topMargin + subLabel.anchors.bottomMargin Label { id: label anchors { left: parent.left; right: control.left; top: parent.top } elide: Text.ElideRight color: theme.palette.selected.backgroundText } Label { id: subLabel anchors { left: parent.left; right: control.left; top: label.bottom } color: theme.palette.normal.backgroundText elide: Text.ElideRight textSize: Label.Small } Switch { anchors { right: parent.right; verticalCenter: parent.verticalCenter } id: control } } } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/module/Options.qml0000644000015600001650000000376612674252514030661 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013-2015 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ import QtQuick 2.0 import Ubuntu.Components 1.3 import Ubuntu.Components.ListItems 1.3 as ListItem import Ubuntu.Components.Popups 1.3 import Ubuntu.OnlineAccounts 0.1 Column { id: root property variant __account: account signal finished anchors.left: parent.left anchors.right: parent.right ListItem.SingleValue { text: i18n.dtr("ubuntu-system-settings-online-accounts", "ID") value: account.displayName } ServiceSwitches { account: __account enabled: __account.enabled opacity: enabled ? 1 : 0.5 } ListItem.SingleControl { control: Button { text: i18n.dtr("ubuntu-system-settings-online-accounts", "Remove account…") width: parent.width - units.gu(4) onClicked: PopupUtils.open(removalConfirmationComponent) } showDivider: false } Component { id: removalConfirmationComponent RemovalConfirmation { accountName: __account.provider.displayName onClosed: { if (confirmed) { console.log("Removing account...") account.removed.connect(root.finished) account.remove(Account.RemoveCredentials) } } } } } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/module/StandardAnimation.qml0000644000015600001650000000153212674252514032613 0ustar pbuserpbgroup00000000000000/* * This file is part of online-accounts-ui * * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ import QtQuick 2.0 NumberAnimation { duration: 300 easing.type: Easing.InOutQuad } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/module/ServiceSwitches.qml0000644000015600001650000000451312674252514032327 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013-2015 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ import QtQuick 2.0 import Ubuntu.Components 1.3 import Ubuntu.Components.ListItems 1.3 as ListItem import Ubuntu.OnlineAccounts 0.1 Column { id: root property variant account anchors.left: parent.left anchors.right: parent.right ListItem.Standard { text: i18n.dtr("ubuntu-system-settings-online-accounts", "Access to this account:") } AccountServiceModel { id: accountServices includeDisabled: true account: root.account.objectHandle } AccountService { id: globalAccountService objectHandle: root.account.accountServiceHandle } Credentials { id: credentials credentialsId: globalAccountService.authData.credentialsId } Repeater { model: accountServices delegate: ServiceItem { accountServiceHandle: model.accountServiceHandle onApplicationAdded: { var newAcl = ApplicationManager.addApplicationToAcl(credentials.acl, applicationId) if (newAcl != credentials.acl) { credentials.acl = newAcl credentials.sync() } } onApplicationRemoved: { var newAcl = ApplicationManager.removeApplicationFromAcl(credentials.acl, applicationId) if (newAcl != credentials.acl) { credentials.acl = newAcl credentials.sync() } } } } } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/module/plugin.cpp0000644000015600001650000000301412674252514030477 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of OnlineAccountsPlugin. * * OnlineAccountsClient is free software: you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * OnlineAccountsClient is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with OnlineAccountsClient. If not, see * . */ #include "plugin.h" #include #include #include #include #include #include using namespace OnlineAccountsPlugin; void Plugin::initializeEngine(QQmlEngine *engine, const char *uri) { Q_UNUSED(uri); QQmlContext* context = engine->rootContext(); context->setContextProperty("ApplicationManager", OnlineAccountsUi::ApplicationManager::instance()); } void Plugin::registerTypes(const char *uri) { qDebug() << Q_FUNC_INFO << uri; qmlRegisterType(uri, 1, 0, "RequestHandler"); } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/module/module.pro0000644000015600001650000000234112674252514030506 0ustar pbuserpbgroup00000000000000include(../../common-project-config.pri) include($${TOP_SRC_DIR}/common-vars.pri) TEMPLATE = lib TARGET = OnlineAccountsPlugin API_URI = "Ubuntu.OnlineAccounts.Plugin" API_VER = 1.0 PLUGIN_INSTALL_BASE = $${PLUGIN_PRIVATE_MODULE_DIR}/$$replace(API_URI, \\., /) CONFIG += \ link_pkgconfig \ plugin \ qt QT += qml PKGCONFIG += \ accounts-qt5 # Error on undefined symbols QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF SOURCES = \ plugin.cpp HEADERS += \ plugin.h INCLUDEPATH += \ $$TOP_SRC_DIR/plugins QMAKE_LIBDIR = $${TOP_BUILD_DIR}/plugins/OnlineAccountsPlugin LIBS += -lonline-accounts-plugin QML_SOURCES = \ DuplicateAccount.qml \ ErrorItem.qml \ KeyboardRectangle.qml \ OAuthMain.qml \ OAuth.qml \ Options.qml \ RemovalConfirmation.qml \ ServiceItem.qml \ ServiceItemBase.qml \ ServiceSwitches.qml \ StandardAnimation.qml \ WebView.qml OTHER_FILES += $${QML_SOURCES} qml.files = $${QML_SOURCES} qml.path = $${PLUGIN_INSTALL_BASE} INSTALLS += qml QMLDIR_FILES += qmldir QMAKE_SUBSTITUTES += qmldir.in OTHER_FILES += qmldir.in target.path = $${PLUGIN_INSTALL_BASE} INSTALLS += target qmldir.files = qmldir qmldir.path = $${PLUGIN_INSTALL_BASE} INSTALLS += qmldir ubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/module/RemovalConfirmation.qml0000644000015600001650000000314712674252514033175 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013-2015 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ import QtQuick 2.0 import Ubuntu.Components 1.3 import Ubuntu.Components.ListItems 1.3 as ListItem import Ubuntu.Components.Popups 1.3 Dialog { id: root property string accountName property bool confirmed: false signal closed title: i18n.dtr("ubuntu-system-settings-online-accounts", "Remove account") text: i18n.dtr("ubuntu-system-settings-online-accounts", "The %1 account will be removed only from your phone. You can add it again later.").arg(accountName) onVisibleChanged: if (!visible) closed() Button { text: i18n.dtr("ubuntu-system-settings-online-accounts", "Remove") onClicked: setConfirmed(true) } Button { text: i18n.dtr("ubuntu-system-settings-online-accounts", "Cancel") onClicked: setConfirmed(false) } function setConfirmed(isConfirmed) { confirmed = isConfirmed PopupUtils.close(root) } } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/module/qmldir.in0000644000015600001650000000045112674252514030317 0ustar pbuserpbgroup00000000000000module $${API_URI} plugin $${TARGET} KeyboardRectangle 1.0 KeyboardRectangle.qml OAuthMain 1.0 OAuthMain.qml OAuth 1.0 OAuth.qml Options 1.0 Options.qml RemovalConfirmation 1.0 RemovalConfirmation.qml ServiceItem 1.0 ServiceItem.qml ServiceSwitches 1.0 ServiceSwitches.qml WebView 1.0 WebView.qml ubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/module/ErrorItem.qml0000644000015600001650000000304512674252514031124 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2015 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ import QtQuick 2.0 import Ubuntu.Components 0.1 import Ubuntu.Components.ListItems 0.1 as ListItem Item { id: root signal retryRequested() Column { anchors { verticalCenter: parent.verticalCenter left: parent.left; right: parent.right } spacing: units.gu(2) Label { anchors { left: parent.left; right: parent.right } text: i18n.dtr("ubuntu-system-settings-online-accounts", "This service is not available right now. Try again later.") wrapMode: Text.WordWrap horizontalAlignment: Text.AlignHCenter } Button { anchors.horizontalCenter: parent.horizontalCenter text: i18n.dtr("ubuntu-system-settings-online-accounts", "Try Again") onClicked: root.retryRequested() } } } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/plugins/module/KeyboardRectangle.qml0000644000015600001650000000347612674252514032611 0ustar pbuserpbgroup00000000000000/* * This file is part of online-accounts-ui * * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ import QtQuick 2.0 Item { id: keyboardRect anchors.left: parent.left anchors.right: parent.right anchors.bottom: parent.bottom height: Qt.inputMethod.visible ? Qt.inputMethod.keyboardRectangle.height : 0 Behavior on height { StandardAnimation { } } function recursiveFindFocusedItem(parent) { if (parent.activeFocus) { return parent; } for (var i in parent.children) { var child = parent.children[i]; if (child.activeFocus) { return child; } var item = recursiveFindFocusedItem(child); if (item != null) { return item; } } return null; } Connections { target: Qt.inputMethod onVisibleChanged: { if (!Qt.inputMethod.visible) { var focusedItem = recursiveFindFocusedItem(keyboardRect.parent); if (focusedItem != null) { focusedItem.focus = false; } } } } } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/0000755000015600001650000000000012674252771024700 5ustar pbuserpbgroup00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/tests.pro0000644000015600001650000000025512674252514026561 0ustar pbuserpbgroup00000000000000TEMPLATE = subdirs SUBDIRS = \ autopilot \ click-hooks \ client \ online-accounts-service \ online-accounts-ui \ plugin \ system-settings-plugin ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-service/0000755000015600001650000000000012674252771031437 5ustar pbuserpbgroup00000000000000././@LongLink0000000000000000000000000000015000000000000011211 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-service/tst_service.cppubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-service/tst_service.0000644000015600001650000002045312674252514033771 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "globals.h" #include "request.h" #include "request-manager.h" #include "service.h" #include "ui-proxy.h" #include #include #include #include #include #include #include #include #include #include #include using namespace OnlineAccountsUi; #define P2P_SOCKET "unix:path=/tmp/tst_service_%1" #define TEST_SERVICE_NAME \ QStringLiteral("com.ubuntu.OnlineAccountsUi.Test") #define TEST_OBJECT_PATH QStringLiteral("/") QList m_uiProxies; class RequestReply: public QDBusPendingCallWatcher { Q_OBJECT public: RequestReply(const QDBusPendingCall &call, QObject *parent = 0): QDBusPendingCallWatcher(call, parent), m_isError(false) { QObject::connect(this, SIGNAL(finished(QDBusPendingCallWatcher*)), this, SLOT(onFinished())); } bool isError() const { return m_isError; } QVariantMap reply() const { return m_reply; } QString errorName() const { return m_errorName; } QString errorMessage() const { return m_errorMessage; } private Q_SLOTS: void onFinished() { QDBusPendingReply reply = *this; if (reply.isError()) { m_isError = true; m_errorName = reply.error().name(); m_errorMessage = reply.error().message(); } else { m_reply = qdbus_cast(reply.argumentAt(0). value()); } Q_EMIT finished(); } Q_SIGNALS: void finished(); private: bool m_isError; QVariantMap m_reply; QString m_errorName; QString m_errorMessage; }; class ServiceTest: public QObject { Q_OBJECT public: ServiceTest(); private: RequestReply *sendRequest(const QVariantMap ¶meters) { QDBusMessage msg = QDBusMessage::createMethodCall(TEST_SERVICE_NAME, TEST_OBJECT_PATH, "com.ubuntu.OnlineAccountsUi", "requestAccess"); msg.setArguments(QVariantList() << parameters); QDBusPendingCall call = m_connection.asyncCall(msg); return new RequestReply(call, this); } private Q_SLOTS: void initTestCase(); void testResults(); void testFailure(); void testIdle(); protected Q_SLOTS: void onNewConnection(const QDBusConnection &connection); private: RequestManager m_requestManager; Service m_service; QDBusConnection m_connection; }; /* Mocking UiProxy { */ namespace OnlineAccountsUi { class UiProxyPrivate: public QObject { Q_OBJECT Q_DECLARE_PUBLIC(UiProxy) public: UiProxyPrivate(UiProxy *uiProxy): QObject(uiProxy), m_initCount(0), m_initReply(true), q_ptr(uiProxy) { } ~UiProxyPrivate() {}; void emitFinished() { Q_EMIT q_ptr->finished(); } Q_SIGNALS: void handleRequestCalled(); public: int m_initCount; bool m_initReply; QList m_requests; QVariantMap m_expectedHasHandlerFor; mutable UiProxy *q_ptr; }; } // namespace UiProxy::UiProxy(pid_t, QObject *parent): QObject(parent), d_ptr(new UiProxyPrivate(this)) { m_uiProxies.append(d_ptr); } UiProxy::~UiProxy() { m_uiProxies.removeOne(d_ptr); } bool UiProxy::init() { Q_D(UiProxy); d->m_initCount++; return d->m_initReply; } void UiProxy::handleRequest(Request *request) { Q_D(UiProxy); d->m_requests.append(request); Q_EMIT d->handleRequestCalled(); } bool UiProxy::hasHandlerFor(const QVariantMap ¶meters) { Q_D(UiProxy); return parameters == d->m_expectedHasHandlerFor; } /* } mocking UiProxy */ ServiceTest::ServiceTest(): QObject(0), m_connection(QStringLiteral("uninitialized")) { } void ServiceTest::onNewConnection(const QDBusConnection &connection) { QDBusConnection conn(connection); conn.registerService(TEST_SERVICE_NAME); conn.registerObject(TEST_OBJECT_PATH, &m_service); } void ServiceTest::initTestCase() { QDBusServer *server; for (int i = 0; i < 10; i++) { server = new QDBusServer(QString::fromLatin1(P2P_SOCKET).arg(i), this); if (!server->isConnected()) { delete server; } else { break; } } QVERIFY(server->isConnected()); QObject::connect(server, SIGNAL(newConnection(const QDBusConnection &)), this, SLOT(onNewConnection(const QDBusConnection &))); m_connection = QDBusConnection::connectToPeer(server->address(), QStringLiteral("tst")); QTest::qWait(10); QVERIFY(m_connection.isConnected()); } void ServiceTest::testResults() { QVariantMap parameters; parameters.insert("hello", QString("world")); RequestReply *call = sendRequest(parameters); QSignalSpy callFinished(call, SIGNAL(finished())); QTRY_COMPARE(m_uiProxies.count(), 1); UiProxyPrivate *proxy = m_uiProxies[0]; QCOMPARE(proxy->m_initCount, 1); QCOMPARE(proxy->m_requests.count(), 1); Request *request = proxy->m_requests.last(); QCOMPARE(request->parameters(), parameters); request->setInProgress(true); request->setResult(parameters); QVERIFY(callFinished.wait()); QCOMPARE(call->isError(), false); QCOMPARE(call->reply(), parameters); delete call; proxy->emitFinished(); QTRY_COMPARE(m_uiProxies.count(), 0); } void ServiceTest::testFailure() { QVariantMap parameters; parameters.insert("hi", "there"); RequestReply *call = sendRequest(parameters); QSignalSpy callFinished(call, SIGNAL(finished())); QTRY_COMPARE(m_uiProxies.count(), 1); UiProxyPrivate *proxy = m_uiProxies[0]; QCOMPARE(proxy->m_initCount, 1); QCOMPARE(proxy->m_requests.count(), 1); Request *request = proxy->m_requests.last(); QCOMPARE(request->parameters(), parameters); request->setInProgress(true); QString errorName("com.ubuntu.OnlineAccountsUi.BadLuck"); QString errorMessage("really unlucky"); request->fail(errorName, errorMessage); QVERIFY(callFinished.wait()); QCOMPARE(call->isError(), true); QCOMPARE(call->errorName(), errorName); QCOMPARE(call->errorMessage(), errorMessage); delete call; proxy->emitFinished(); QTRY_COMPARE(m_uiProxies.count(), 0); } void ServiceTest::testIdle() { QCOMPARE(m_requestManager.isIdle(), true); QSignalSpy isIdleChanged(&m_requestManager, SIGNAL(isIdleChanged())); QVariantMap parameters; parameters.insert("time", "out"); RequestReply *call = sendRequest(parameters); QSignalSpy callFinished(call, SIGNAL(finished())); QVERIFY(isIdleChanged.wait()); QCOMPARE(m_requestManager.isIdle(), false); isIdleChanged.clear(); QTRY_COMPARE(m_uiProxies.count(), 1); UiProxyPrivate *proxy = m_uiProxies[0]; QCOMPARE(proxy->m_initCount, 1); QCOMPARE(proxy->m_requests.count(), 1); Request *request = proxy->m_requests.last(); QCOMPARE(request->parameters(), parameters); request->setInProgress(true); request->setResult(parameters); /* the request will terminate, so expect the service * to be idle again */ QTRY_COMPARE(isIdleChanged.count(), 1); QCOMPARE(m_requestManager.isIdle(), true); QVERIFY(callFinished.wait()); QCOMPARE(call->isError(), false); delete call; proxy->emitFinished(); QTRY_COMPARE(m_uiProxies.count(), 0); } QTEST_MAIN(ServiceTest); #include "tst_service.moc" ././@LongLink0000000000000000000000000000015000000000000011211 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-service/tst_service.proubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-service/tst_service.0000644000015600001650000000242212674252514033765 0ustar pbuserpbgroup00000000000000include(../../common-project-config.pri) TARGET = tst_service CONFIG += \ debug \ link_pkgconfig QT += \ core \ dbus \ testlib PKGCONFIG += \ accounts-qt5 \ signon-plugins-common DEFINES += \ NO_REQUEST_FACTORY ONLINE_ACCOUNTS_SERVICE_DIR = $${TOP_SRC_DIR}/online-accounts-service COMMON_SRC_DIR = $${TOP_SRC_DIR}/online-accounts-ui SOURCES += \ $${TOP_BUILD_DIR}/online-accounts-service/onlineaccountsui_adaptor.cpp \ $${ONLINE_ACCOUNTS_SERVICE_DIR}/request.cpp \ $${ONLINE_ACCOUNTS_SERVICE_DIR}/request-manager.cpp \ $${ONLINE_ACCOUNTS_SERVICE_DIR}/service.cpp \ $${ONLINE_ACCOUNTS_SERVICE_DIR}/utils.cpp \ tst_service.cpp HEADERS += \ $${TOP_BUILD_DIR}/online-accounts-service/onlineaccountsui_adaptor.h \ $${ONLINE_ACCOUNTS_SERVICE_DIR}/request.h \ $${ONLINE_ACCOUNTS_SERVICE_DIR}/request-manager.h \ $${ONLINE_ACCOUNTS_SERVICE_DIR}/service.h \ $${ONLINE_ACCOUNTS_SERVICE_DIR}/ui-proxy.h \ $${ONLINE_ACCOUNTS_SERVICE_DIR}/utils.h \ INCLUDEPATH += \ $${TOP_BUILD_DIR}/online-accounts-service \ $${ONLINE_ACCOUNTS_SERVICE_DIR} \ $${COMMON_SRC_DIR} check.commands = "xvfb-run -s '-screen 0 640x480x24' -a dbus-test-runner -t ./$${TARGET}" check.depends = $${TARGET} QMAKE_EXTRA_TARGETS += check ././@LongLink0000000000000000000000000000016100000000000011213 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-service/tst_signonui_service.cppubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-service/tst_signonui0000644000015600001650000001022212674252514034077 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "globals.h" #include "mock/request-manager-mock.h" #include "signonui-service.h" #include #include #include #include #include #include using namespace SignOnUi; class ServiceTest: public QObject { Q_OBJECT public: ServiceTest(); private: void writeFile(const QString &name, const QByteArray &contents); void setFileDate(const QString &name, qint64 timestamp); private Q_SLOTS: void testCookies_data(); void testCookies(); private: OnlineAccountsUi::RequestManager m_requestManager; Service m_service; }; ServiceTest::ServiceTest(): QObject(0) { } void ServiceTest::writeFile(const QString &name, const QByteArray &contents) { QFile file(name); if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) { qWarning() << "Could not write file" << name; return; } file.write(contents); } void ServiceTest::setFileDate(const QString &name, qint64 timestamp) { struct timeval times[2]; times[0].tv_sec = times[1].tv_sec = timestamp; times[0].tv_usec = times[1].tv_usec = 0; utimes(name.toUtf8().constData(), times); } void ServiceTest::testCookies_data() { QTest::addColumn("contents"); QTest::addColumn("expectedTimestamp"); QTest::addColumn("expectedCookies"); RawCookies cookies; QTest::newRow("empty") << "" << qint64(1406204196) << cookies; QTest::newRow("invalid-cookies") << "[\n" " {\"path\": \"/\"},\n" " {\"name\": \"C1\", \"path\": \"/\"},\n" " {\"value\": \"else\", \"domain\": \"foo.com\"}\n" "]" << qint64(1406104196) << cookies; cookies.clear(); cookies.append("C1=something"); cookies.append("C2=else; domain=foo.com"); cookies.append("C3=yes; HttpOnly"); cookies.append("C4=OK; path=/"); cookies.append("C5=no; expires=Sat, 20-Aug-2016 16:33:43 GMT"); QTest::newRow("few-cookies") << "[\n" " {\"name\": \"C1\", \"value\": \"something\"},\n" " {\"name\": \"C2\", \"value\": \"else\", \"domain\": \"foo.com\"},\n" " {\"name\": \"C3\", \"value\": \"yes\", \"httponly\": \"true\"},\n" " {\"name\": \"C4\", \"value\": \"OK\", \"path\": \"/\"},\n" " {\"name\": \"C5\", \"value\": \"no\", \"expirationdate\": \"2016-08-20T16:33:43Z\"}\n" "]" << qint64(1406104196) << cookies; } void ServiceTest::testCookies() { QFETCH(QString, contents); QFETCH(qint64, expectedTimestamp); QFETCH(RawCookies, expectedCookies); QTemporaryDir tempDir; QVERIFY(tempDir.isValid()); qputenv("XDG_CACHE_HOME", tempDir.path().toUtf8()); quint32 id = 47; QString subDir = QString("online-accounts-ui/id-%2").arg(id); QDir identityDir(tempDir.path()); identityDir.mkpath(subDir); identityDir.cd(subDir); QString cookieFile(identityDir.filePath("cookies.json")); writeFile(cookieFile, contents.toUtf8()); setFileDate(cookieFile, expectedTimestamp); RawCookies cookies; qint64 timestamp = 0; m_service.cookiesForIdentity(id, cookies, timestamp); QCOMPARE(cookies, expectedCookies); /* Be more tolerant about the timestamp: divide by 10, to allow a 10 * seconds gap */ QCOMPARE(timestamp / 10, expectedTimestamp / 10); } QTEST_MAIN(ServiceTest); #include "tst_signonui_service.moc" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-service/mock/0000755000015600001650000000000012674252771032370 5ustar pbuserpbgroup00000000000000././@LongLink0000000000000000000000000000016600000000000011220 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-service/mock/request-manager-mock.cppubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-service/mock/request0000644000015600001650000000272212674252514034001 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "request-manager-mock.h" #include using namespace OnlineAccountsUi; static RequestManager *m_instance = 0; RequestManagerPrivate::RequestManagerPrivate(RequestManager *q): QObject(q), q_ptr(q) { } RequestManagerPrivate::~RequestManagerPrivate() { } RequestManager::RequestManager(QObject *parent): QObject(parent), d_ptr(new RequestManagerPrivate(this)) { m_instance = this; } RequestManager::~RequestManager() { m_instance = 0; } RequestManager *RequestManager::instance() { return m_instance; } bool RequestManager::isIdle() const { return true; } void RequestManager::enqueue(Request *request) { Q_D(RequestManager); Q_EMIT d->enqueueCalled(request); } ././@LongLink0000000000000000000000000000015400000000000011215 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-service/mock/request-mock.hubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-service/mock/request0000644000015600001650000000343412674252514034002 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef MOCK_REQUEST_H #define MOCK_REQUEST_H #include "request.h" #include #include #include namespace OnlineAccountsUi { class RequestPrivate: public QObject { Q_OBJECT Q_DECLARE_PUBLIC(Request) public: RequestPrivate(const QDBusConnection &connection, const QDBusMessage &message, const QVariantMap ¶meters, Request *request); ~RequestPrivate(); static RequestPrivate *mocked(Request *r) { return r->d_ptr; } void setClientApparmorProfile(const QString &profile); void setProviderId(const QString &provider); Q_SIGNALS: void cancelCalled(); void failCalled(QString name, QString message); void setResultCalled(QVariantMap result); private: QDBusConnection m_connection; QDBusMessage m_message; QVariantMap m_parameters; QString m_clientApparmorProfile; QString m_providerId; bool m_inProgress; int m_delay; mutable Request *q_ptr; }; } // namespace #endif // MOCK_REQUEST_H ././@LongLink0000000000000000000000000000016400000000000011216 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-service/mock/request-manager-mock.hubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-service/mock/request0000644000015600001650000000245212674252514034001 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef MOCK_REQUEST_MANAGER_H #define MOCK_REQUEST_MANAGER_H #include "request-manager.h" #include namespace OnlineAccountsUi { class RequestManagerPrivate: public QObject { Q_OBJECT Q_DECLARE_PUBLIC(RequestManager) public: RequestManagerPrivate(RequestManager *q); ~RequestManagerPrivate(); static RequestManagerPrivate *mocked(RequestManager *q) { return q->d_ptr; } Q_SIGNALS: void enqueueCalled(Request *request); public: mutable RequestManager *q_ptr; }; } // namespace #endif // MOCK_REQUEST_MANAGER_H ././@LongLink0000000000000000000000000000015600000000000011217 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-service/mock/request-mock.cppubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-service/mock/request0000644000015600001650000000635212674252514034004 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "globals.h" #include "request-mock.h" #include using namespace OnlineAccountsUi; RequestPrivate::RequestPrivate(const QDBusConnection &connection, const QDBusMessage &message, const QVariantMap ¶meters, Request *request): QObject(request), m_connection(connection), m_message(message), m_parameters(parameters), m_inProgress(false), m_delay(0), q_ptr(request) { } RequestPrivate::~RequestPrivate() { } void RequestPrivate::setClientApparmorProfile(const QString &profile) { m_clientApparmorProfile = profile; } void RequestPrivate::setProviderId(const QString &provider) { m_providerId = provider; } Request::Request(const QDBusConnection &connection, const QDBusMessage &message, const QVariantMap ¶meters, QObject *parent): QObject(parent), d_ptr(new RequestPrivate(connection, message, parameters, this)) { } Request::~Request() { } quint64 Request::windowId() const { Q_D(const Request); return d->m_parameters[OAU_KEY_WINDOW_ID].toUInt(); } void Request::setInProgress(bool inProgress) { Q_D(Request); d->m_inProgress = inProgress; } bool Request::isInProgress() const { Q_D(const Request); return d->m_inProgress; } const QVariantMap &Request::parameters() const { Q_D(const Request); return d->m_parameters; } QString Request::clientApparmorProfile() const { Q_D(const Request); return d->m_clientApparmorProfile; } QString Request::interface() const { Q_D(const Request); return d->m_message.interface(); } QString Request::providerId() const { Q_D(const Request); return d->m_providerId; } void Request::setDelay(int delay) { Q_D(Request); d->m_delay = delay; } int Request::delay() const { Q_D(const Request); return d->m_delay; } void Request::cancel() { setCanceled(); } void Request::fail(const QString &name, const QString &message) { Q_D(Request); Q_EMIT d->failCalled(name, message); Q_EMIT completed(); } void Request::setCanceled() { Q_D(Request); if (d->m_inProgress) { fail(OAU_ERROR_USER_CANCELED, QStringLiteral("Canceled")); d->m_inProgress = false; } } void Request::setResult(const QVariantMap &result) { Q_D(Request); if (d->m_inProgress) { Q_EMIT d->setResultCalled(result); Q_EMIT completed(); d->m_inProgress = false; } } ././@LongLink0000000000000000000000000000016400000000000011216 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-service/online-accounts-service.proubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-service/online-accou0000644000015600001650000000025212674252514033730 0ustar pbuserpbgroup00000000000000TEMPLATE = subdirs SUBDIRS = \ tst_inactivity_timer.pro \ tst_libaccounts_service.pro \ tst_service.pro \ tst_signonui_service.pro \ tst_ui_proxy.pro ././@LongLink0000000000000000000000000000016100000000000011213 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-service/tst_signonui_service.proubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-service/tst_signonui0000644000015600001650000000212512674252514034102 0ustar pbuserpbgroup00000000000000include(../../common-project-config.pri) TARGET = tst_signonui_service CONFIG += \ debug \ link_pkgconfig QT += \ core \ dbus \ network \ testlib PKGCONFIG += \ accounts-qt5 \ signon-plugins-common DEFINES += \ NO_REQUEST_FACTORY ONLINE_ACCOUNTS_SERVICE_DIR = $${TOP_SRC_DIR}/online-accounts-service COMMON_SRC_DIR = $${TOP_SRC_DIR}/online-accounts-ui SOURCES += \ $${ONLINE_ACCOUNTS_SERVICE_DIR}/request.cpp \ $${ONLINE_ACCOUNTS_SERVICE_DIR}/signonui-service.cpp \ $${ONLINE_ACCOUNTS_SERVICE_DIR}/utils.cpp \ mock/request-manager-mock.cpp \ tst_signonui_service.cpp HEADERS += \ $${ONLINE_ACCOUNTS_SERVICE_DIR}/request.h \ $${ONLINE_ACCOUNTS_SERVICE_DIR}/request-manager.h \ $${ONLINE_ACCOUNTS_SERVICE_DIR}/signonui-service.h \ $${ONLINE_ACCOUNTS_SERVICE_DIR}/utils.h \ mock/request-manager-mock.h INCLUDEPATH += \ $${ONLINE_ACCOUNTS_SERVICE_DIR} \ $${COMMON_SRC_DIR} check.commands = "xvfb-run -s '-screen 0 640x480x24' -a dbus-test-runner -t ./$${TARGET}" check.depends = $${TARGET} QMAKE_EXTRA_TARGETS += check ././@LongLink0000000000000000000000000000015100000000000011212 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-service/tst_ui_proxy.proubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-service/tst_ui_proxy0000644000015600001650000000214412674252514034126 0ustar pbuserpbgroup00000000000000include(../../common-project-config.pri) TARGET = tst_ui_proxy CONFIG += \ debug \ link_pkgconfig QT += \ core \ dbus \ network \ testlib DEFINES += \ BUILDING_TESTS \ INSTALL_BIN_DIR=\\\"$${INSTALL_PREFIX}/bin\\\" \ TEST_DATA_DIR=\\\"$${PWD}/data\\\" PKGCONFIG += \ accounts-qt5 \ signon-plugins-common ONLINE_ACCOUNTS_SERVICE_DIR = $${TOP_SRC_DIR}/online-accounts-service COMMON_SRC_DIR = $${TOP_SRC_DIR}/online-accounts-ui SOURCES += \ $${COMMON_SRC_DIR}/ipc.cpp \ $${ONLINE_ACCOUNTS_SERVICE_DIR}/mir-helper-stub.cpp \ $${ONLINE_ACCOUNTS_SERVICE_DIR}/ui-proxy.cpp \ mock/request-mock.cpp \ tst_ui_proxy.cpp HEADERS += \ $${COMMON_SRC_DIR}/ipc.h \ $${ONLINE_ACCOUNTS_SERVICE_DIR}/mir-helper.h \ $${ONLINE_ACCOUNTS_SERVICE_DIR}/request.h \ $${ONLINE_ACCOUNTS_SERVICE_DIR}/ui-proxy.h \ mock/request-mock.h INCLUDEPATH += \ $${ONLINE_ACCOUNTS_SERVICE_DIR} \ $${COMMON_SRC_DIR} check.commands = "xvfb-run -s '-screen 0 640x480x24' -a dbus-test-runner -t ./$${TARGET}" check.depends = $${TARGET} QMAKE_EXTRA_TARGETS += check ././@LongLink0000000000000000000000000000015100000000000011212 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-service/tst_ui_proxy.cppubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-service/tst_ui_proxy0000644000015600001650000004227712674252514034141 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "globals.h" #include "ipc.h" #include "mock/request-mock.h" #include "ui-proxy.h" #include #include #include #include #include #include #include #include #include #include #include #include using namespace OnlineAccountsUi; /* mocking the remote process { */ class RemoteProcess: public QObject { Q_OBJECT public: RemoteProcess(const QString &program, const QStringList &arguments, QProcess *process); ~RemoteProcess(); bool run(); void setDelay(int delay) { m_delay = delay; } void setResult(const QVariantMap &result); void fail(const QString &errorName, const QString &errorMessage); void registerHandler(const QString &matchId); const QVariantMap &lastReceived() const { return m_lastData; } QString programName() const { return m_program; } QStringList arguments() const { return m_arguments; } void sendOperation(const QVariantMap &data); QProcessEnvironment environment() const { return m_process->processEnvironment(); } private Q_SLOTS: void onDataReady(QByteArray &data); Q_SIGNALS: void dataReceived(QVariantMap data); private: QString m_program; QStringList m_arguments; QProcess *m_process; QVariantMap m_lastData; int m_requestId; int m_delay; QString m_requestInterface; QLocalSocket m_socket; Ipc m_ipc; }; static QMap remoteProcesses; RemoteProcess::RemoteProcess(const QString &program, const QStringList &arguments, QProcess *process): QObject(process), m_program(program), m_arguments(arguments), m_process(process), m_delay(0) { QObject::connect(&m_ipc, SIGNAL(dataReady(QByteArray &)), this, SLOT(onDataReady(QByteArray &))); QObject::connect(&m_socket, SIGNAL(disconnected()), this, SLOT(deleteLater())); } RemoteProcess::~RemoteProcess() { remoteProcesses.remove(m_process); } bool RemoteProcess::run() { int i = m_arguments.indexOf("--socket"); if (i < 0) return false; m_socket.connectToServer(m_arguments[i + 1]); if (Q_UNLIKELY(!m_socket.waitForConnected())) return false; m_ipc.setChannels(&m_socket, &m_socket); return true; } void RemoteProcess::setResult(const QVariantMap &result) { QVariantMap operation; operation.insert(OAU_OPERATION_CODE, OAU_OPERATION_CODE_REQUEST_FINISHED); operation.insert(OAU_OPERATION_ID, m_requestId); operation.insert(OAU_OPERATION_INTERFACE, m_requestInterface); operation.insert(OAU_OPERATION_DATA, result); operation.insert(OAU_OPERATION_DELAY, m_delay); sendOperation(operation); deleteLater(); } void RemoteProcess::fail(const QString &errorName, const QString &errorMessage) { QVariantMap operation; operation.insert(OAU_OPERATION_CODE, OAU_OPERATION_CODE_REQUEST_FAILED); operation.insert(OAU_OPERATION_ID, m_requestId); operation.insert(OAU_OPERATION_INTERFACE, m_requestInterface); operation.insert(OAU_OPERATION_ERROR_NAME, errorName); operation.insert(OAU_OPERATION_ERROR_MESSAGE, errorMessage); sendOperation(operation); deleteLater(); } void RemoteProcess::registerHandler(const QString &matchId) { QVariantMap operation; operation.insert(OAU_OPERATION_CODE, OAU_OPERATION_CODE_REGISTER_HANDLER); operation.insert(OAU_OPERATION_HANDLER_ID, matchId); sendOperation(operation); } void RemoteProcess::sendOperation(const QVariantMap &data) { QByteArray ba; QDataStream stream(&ba, QIODevice::WriteOnly); stream << data; m_ipc.write(ba); } void RemoteProcess::onDataReady(QByteArray &data) { QVariantMap map; QDataStream stream(&data, QIODevice::ReadOnly); stream >> map; m_lastData = map; if (map[OAU_OPERATION_CODE].toString() == OAU_OPERATION_CODE_PROCESS) { m_requestInterface = map[OAU_OPERATION_INTERFACE].toString(); m_requestId = map[OAU_OPERATION_ID].toInt(); } Q_EMIT dataReceived(map); } /* } mocking the remote process */ /* mocking QProcess { */ void QProcess::start(const QString &program, const QStringList &arguments, OpenMode mode) { Q_UNUSED(mode); RemoteProcess *process = new RemoteProcess(program, arguments, this); remoteProcesses.insert(this, process); } bool QProcess::waitForStarted(int msecs) { Q_UNUSED(msecs); RemoteProcess *process = remoteProcesses.value(this); if (!process) return false; return process->run(); } /* } mocking QProcess */ class UiProxyTest: public QObject { Q_OBJECT public: UiProxyTest(); private: Request *createRequest(const QString &interface, const QString &method, const QString &clientApparmorProfile, const QVariantMap ¶meters); private Q_SLOTS: void initTestCase(); void testInit(); void testRequest_data(); void testRequest(); void testRequestDelay_data(); void testRequestDelay(); void testHandler(); void testWrapper(); void testTrustSessionError_data(); void testTrustSessionError(); void testConfinedPlugin_data(); void testConfinedPlugin(); private: QDBusConnection m_connection; }; UiProxyTest::UiProxyTest(): QObject(0), m_connection(QStringLiteral("uninitialized")) { } Request *UiProxyTest::createRequest(const QString &interface, const QString &method, const QString &clientApparmorProfile, const QVariantMap ¶meters) { QDBusMessage message = QDBusMessage::createMethodCall(OAU_SERVICE_NAME, OAU_OBJECT_PATH, interface, method); Request *request = new Request(m_connection, message, parameters); RequestPrivate *r = RequestPrivate::mocked(request); r->setClientApparmorProfile(clientApparmorProfile); return request; } void UiProxyTest::initTestCase() { qputenv("ACCOUNTS", "/tmp/"); qputenv("AG_APPLICATIONS", TEST_DATA_DIR); qputenv("AG_SERVICES", TEST_DATA_DIR); qputenv("AG_SERVICE_TYPES", TEST_DATA_DIR); qputenv("AG_PROVIDERS", TEST_DATA_DIR); qputenv("XDG_DATA_HOME", TEST_DATA_DIR); } void UiProxyTest::testInit() { /* By passing pid = 0, we disable the prompt session code */ UiProxy *proxy = new UiProxy(0, this); QVERIFY(proxy->init()); delete proxy; proxy = new UiProxy(10, this); QVERIFY(proxy->init()); delete proxy; } void UiProxyTest::testRequest_data() { QTest::addColumn("interface"); QTest::addColumn("method"); QTest::addColumn("clientApparmorProfile"); QTest::addColumn("parameters"); QTest::addColumn("expectedResult"); QTest::addColumn("expectedError"); QVariantMap parameters; QVariantMap result; parameters.insert("greeting", "Hello!"); result.insert("response", "How do you do?"); QTest::newRow("success") << OAU_INTERFACE << "doSomething" << "com.ubuntu.package_app_0.1" << parameters << result << ""; parameters.clear(); result.clear(); parameters.insert("greeting", "Hi!"); QTest::newRow("failure") << OAU_INTERFACE << "doSomethingElse" << "com.ubuntu.package_app_0.2" << parameters << result << "Error code"; parameters.clear(); } void UiProxyTest::testRequest() { QFETCH(QString, interface); QFETCH(QString, method); QFETCH(QString, clientApparmorProfile); QFETCH(QVariantMap, parameters); QFETCH(QVariantMap, expectedResult); QFETCH(QString, expectedError); Request *request = createRequest(interface, method, clientApparmorProfile, parameters); RequestPrivate *r = RequestPrivate::mocked(request); QSignalSpy requestFailCalled(r, SIGNAL(failCalled(QString,QString))); QSignalSpy requestSetResultCalled(r, SIGNAL(setResultCalled(QVariantMap))); UiProxy *proxy = new UiProxy(0, this); QVERIFY(proxy->init()); QSignalSpy finished(proxy, SIGNAL(finished())); proxy->handleRequest(request); QTRY_VERIFY(!remoteProcesses.isEmpty()); QCOMPARE(remoteProcesses.count(), 1); RemoteProcess *process = remoteProcesses.values().first(); QVERIFY(process); QSignalSpy dataReceived(process, SIGNAL(dataReceived(QVariantMap))); QCOMPARE(process->programName(), QString(INSTALL_BIN_DIR "/online-accounts-ui")); /* Check the received data */ if (process->lastReceived().isEmpty()) { QVERIFY(dataReceived.wait()); } QVariantMap data = process->lastReceived(); QCOMPARE(data.value(OAU_OPERATION_CODE).toString(), QStringLiteral(OAU_OPERATION_CODE_PROCESS)); QVERIFY(data.contains(OAU_OPERATION_ID)); QCOMPARE(data.value(OAU_OPERATION_DATA).toMap(), parameters); QCOMPARE(data.value(OAU_OPERATION_INTERFACE).toString(), interface); QCOMPARE(data.value(OAU_OPERATION_CLIENT_PROFILE).toString(), clientApparmorProfile); if (expectedError.isEmpty()) { process->setResult(expectedResult); QVERIFY(requestSetResultCalled.wait()); QCOMPARE(requestSetResultCalled.count(), 1); QCOMPARE(requestSetResultCalled.at(0).at(0).toMap(), expectedResult); } else { process->fail(expectedError, "some error"); QVERIFY(requestFailCalled.wait()); QCOMPARE(requestFailCalled.count(), 1); QCOMPARE(requestFailCalled.at(0).at(0).toString(), expectedError); } if (finished.count() == 0) { QVERIFY(finished.wait()); } QCOMPARE(finished.count(), 1); delete proxy; } void UiProxyTest::testRequestDelay_data() { QTest::addColumn("delay"); QTest::newRow("no delay") << 0; QTest::newRow("300 ms") << 300; QTest::newRow("half second") << 500; } void UiProxyTest::testRequestDelay() { QFETCH(int, delay); QVariantMap parameters; parameters.insert("greeting", "Hello!"); Request *request = createRequest(OAU_INTERFACE, "hello", "unconfined", parameters); RequestPrivate *r = RequestPrivate::mocked(request); QSignalSpy requestFailCalled(r, SIGNAL(failCalled(QString,QString))); QSignalSpy requestSetResultCalled(r, SIGNAL(setResultCalled(QVariantMap))); UiProxy *proxy = new UiProxy(0, this); QVERIFY(proxy->init()); QSignalSpy finished(proxy, SIGNAL(finished())); proxy->handleRequest(request); QTRY_VERIFY(!remoteProcesses.isEmpty()); QCOMPARE(remoteProcesses.count(), 1); RemoteProcess *process = remoteProcesses.values().first(); QVERIFY(process); QSignalSpy dataReceived(process, SIGNAL(dataReceived(QVariantMap))); /* Check the received data */ if (process->lastReceived().isEmpty()) { QVERIFY(dataReceived.wait()); } QVariantMap result; result.insert("response", "OK"); process->setDelay(delay); process->setResult(result); QVERIFY(requestSetResultCalled.wait()); QCOMPARE(requestSetResultCalled.count(), 1); QCOMPARE(requestSetResultCalled.at(0).at(0).toMap(), result); QCOMPARE(request->delay(), delay); int wontFinishBefore = qMax(delay - 200, 0); if (wontFinishBefore > 0) { QTest::qWait(wontFinishBefore); QCOMPARE(finished.count(), 0); QTest::qWait(250); } else { QTest::qWait(10); } QCOMPARE(finished.count(), 1); delete proxy; } void UiProxyTest::testHandler() { UiProxy *proxy = new UiProxy(0, this); QVERIFY(proxy->init()); /* First, try with empty match parameters */ QVariantMap matchParams; QVERIFY(!proxy->hasHandlerFor(matchParams)); /* Valid parameters, but without having registered a handler */ QString match("something unique"); QVariantMap clientData; clientData.insert(OAU_REQUEST_MATCH_KEY, match); matchParams.insert(SSOUI_KEY_CLIENT_DATA, clientData); QVERIFY(!proxy->hasHandlerFor(matchParams)); /* Then, really register a handler */ QVariantMap parameters; parameters.insert("greeting", "hi!"); Request *request = createRequest("iface", "doSomething", "com.ubuntu.package_app_0.1", parameters); proxy->handleRequest(request); QTRY_VERIFY(!remoteProcesses.isEmpty()); QCOMPARE(remoteProcesses.count(), 1); RemoteProcess *process = remoteProcesses.values().first(); QVERIFY(process); QSignalSpy dataReceived(process, SIGNAL(dataReceived(QVariantMap))); /* Wait for the request to arrive */ if (process->lastReceived().isEmpty()) { QVERIFY(dataReceived.wait()); } /* Register a handler */ process->registerHandler(match); QTRY_VERIFY(proxy->hasHandlerFor(matchParams)); /* make sure that a different key doesn't match */ clientData.insert(OAU_REQUEST_MATCH_KEY, QString("Won't match")); matchParams.insert(SSOUI_KEY_CLIENT_DATA, clientData); QVERIFY(!proxy->hasHandlerFor(matchParams)); delete proxy; } void UiProxyTest::testWrapper() { QString wrapper("valgrind-deluxe"); qputenv("OAU_WRAPPER", wrapper.toUtf8()); UiProxy *proxy = new UiProxy(0, this); QVERIFY(proxy->init()); QVariantMap parameters; Request *request = createRequest("iface", "doSomething", "com.ubuntu.package_app_0.1", parameters); proxy->handleRequest(request); QTRY_VERIFY(!remoteProcesses.isEmpty()); QCOMPARE(remoteProcesses.count(), 1); RemoteProcess *process = remoteProcesses.values().first(); QVERIFY(process); QCOMPARE(process->programName(), wrapper); QCOMPARE(process->arguments().at(0), QString(INSTALL_BIN_DIR "/online-accounts-ui")); delete proxy; } void UiProxyTest::testTrustSessionError_data() { QTest::addColumn("clientPid"); QTest::addColumn("envVar"); QTest::addColumn("expectSuccess"); QTest::newRow("PID 0") << 0 << "" << false; QTest::newRow("fail creation") << 4 << "TEST_MIR_HELPER_FAIL_CREATE=1" << false; QTest::newRow("return empty socket") << 4 << "" << false; QTest::newRow("success") << 4 << "TEST_MIR_HELPER_SOCKET=something" << true; } void UiProxyTest::testTrustSessionError() { QFETCH(int, clientPid); QFETCH(QString, envVar); QFETCH(bool, expectSuccess); qputenv("QT_QPA_PLATFORM", "ubuntu-something"); QStringList envVarSplit = envVar.split('='); QByteArray envVarKey = envVarSplit.value(0, "").toUtf8(); QByteArray envVarValue = envVarSplit.value(1, "").toUtf8(); qputenv(envVarKey.constData(), envVarValue); UiProxy *proxy = new UiProxy(clientPid, this); QCOMPARE(proxy->init(), expectSuccess); delete proxy; qunsetenv(envVarKey.constData()); qunsetenv("QT_QPA_PLATFORM"); } void UiProxyTest::testConfinedPlugin_data() { QTest::addColumn("providerId"); QTest::addColumn("expectedProfile"); QTest::addColumn("expectedAppId"); QTest::newRow("unconfined") << QString() << "unconfined" << QString(); QTest::newRow("confined") << "com.ubuntu.test_confined" << "com.ubuntu.test_confined_0.2" << "com.ubuntu.test_confined_0.2"; } void UiProxyTest::testConfinedPlugin() { QFETCH(QString, providerId); QFETCH(QString, expectedProfile); QFETCH(QString, expectedAppId); Request *request = createRequest(OAU_INTERFACE, "doSomething", "unconfined", QVariantMap()); RequestPrivate *r = RequestPrivate::mocked(request); r->setProviderId(providerId); UiProxy *proxy = new UiProxy(0, this); QVERIFY(proxy->init()); QSignalSpy finished(proxy, SIGNAL(finished())); proxy->handleRequest(request); QTRY_VERIFY(!remoteProcesses.isEmpty()); QCOMPARE(remoteProcesses.count(), 1); RemoteProcess *process = remoteProcesses.values().first(); QVERIFY(process); QStringList args = process->arguments(); int option = args.indexOf("--profile"); QVERIFY(option > 0); QCOMPARE(args.at(option + 1), expectedProfile); QProcessEnvironment env = process->environment(); QCOMPARE(env.value("APP_ID"), expectedAppId); delete proxy; } QTEST_MAIN(UiProxyTest); #include "tst_ui_proxy.moc" ././@LongLink0000000000000000000000000000016100000000000011213 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-service/tst_inactivity_timer.cppubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-service/tst_inactivi0000644000015600001650000000552212674252514034061 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "inactivity-timer.h" #include #include #include using namespace OnlineAccountsUi; class Service: public QObject { Q_OBJECT Q_PROPERTY(bool isIdle READ isIdle NOTIFY isIdleChanged) public: Service(): QObject(), m_isIdle(true) {} bool isIdle() const { return m_isIdle; } void setIdle(bool idle) { if (idle == m_isIdle) return; m_isIdle = idle; Q_EMIT isIdleChanged(); } Q_SIGNALS: void isIdleChanged(); private: bool m_isIdle; }; class InactivityTimerTest: public QObject { Q_OBJECT public: InactivityTimerTest(); private Q_SLOTS: void testAlwaysIdle(); void testBecomeIdle(); void testManyServices(); }; InactivityTimerTest::InactivityTimerTest(): QObject(0) { } void InactivityTimerTest::testAlwaysIdle() { InactivityTimer timer(10); QSignalSpy timeout(&timer, SIGNAL(timeout())); Service service; timer.watchObject(&service); QVERIFY(timeout.wait(100)); } void InactivityTimerTest::testBecomeIdle() { InactivityTimer timer(10); QSignalSpy timeout(&timer, SIGNAL(timeout())); Service service; service.setIdle(false); timer.watchObject(&service); /* No signal should be emitted, as the service is not idle */ QVERIFY(!timeout.wait(100)); service.setIdle(true); QVERIFY(timeout.wait(100)); } void InactivityTimerTest::testManyServices() { InactivityTimer timer(50); QSignalSpy timeout(&timer, SIGNAL(timeout())); Service service1; timer.watchObject(&service1); Service service2; timer.watchObject(&service2); Service service3; service3.setIdle(false); timer.watchObject(&service3); /* No signal should be emitted, as service3 is not idle */ QVERIFY(!timeout.wait(100)); /* Now set it is as idle, but soon afterwards set service1 as busy */ service3.setIdle(true); QTest::qWait(10); service1.setIdle(false); QVERIFY(!timeout.wait(100)); service1.setIdle(true); QVERIFY(timeout.wait(100)); } QTEST_MAIN(InactivityTimerTest); #include "tst_inactivity_timer.moc" ././@LongLink0000000000000000000000000000016100000000000011213 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-service/tst_inactivity_timer.proubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-service/tst_inactivi0000644000015600001650000000116312674252514034056 0ustar pbuserpbgroup00000000000000include(../../common-project-config.pri) TARGET = tst_inactivity_timer CONFIG += \ debug QT += \ core \ testlib ONLINE_ACCOUNTS_SERVICE_DIR = $${TOP_SRC_DIR}/online-accounts-service COMMON_SRC_DIR = $${TOP_SRC_DIR}/online-accounts-ui SOURCES += \ $${ONLINE_ACCOUNTS_SERVICE_DIR}/inactivity-timer.cpp \ tst_inactivity_timer.cpp HEADERS += \ $${ONLINE_ACCOUNTS_SERVICE_DIR}/inactivity-timer.h INCLUDEPATH += \ $${COMMON_SRC_DIR} \ $${ONLINE_ACCOUNTS_SERVICE_DIR} check.commands = "xvfb-run -s '-screen 0 640x480x24' -a ./$${TARGET}" check.depends = $${TARGET} QMAKE_EXTRA_TARGETS += check ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-service/data/0000755000015600001650000000000012674252771032350 5ustar pbuserpbgroup00000000000000././@LongLink0000000000000000000000000000017700000000000011222 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-service/data/com.ubuntu.test_confined.providerubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-service/data/com.ubu0000644000015600001650000000031612674252514033636 0ustar pbuserpbgroup00000000000000 Click provider general_myprovider com.ubuntu.test_confined_0.2 ././@LongLink0000000000000000000000000000016400000000000011216 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-service/tst_libaccounts_service.cppubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-service/tst_libaccou0000644000015600001650000003306612674252514034040 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "debug.h" #include "libaccounts-service.h" #include #include #include #include #include #include #include #include #include using namespace OnlineAccountsUi; #define TEST_SERVICE_NAME \ "com.ubuntu.OnlineAccountsUi.LibaccountsService.Test" #define TEST_OBJECT_PATH "/" class LibaccountsServiceTest: public QObject { Q_OBJECT public: LibaccountsServiceTest(); private: QProcess *requestStore(const QString &args, bool showError = false) { QString command = QStringLiteral("gdbus call --session " "--dest " TEST_SERVICE_NAME " " "--object-path " TEST_OBJECT_PATH " " "--method com.google.code.AccountsSSO.Accounts.Manager.store "); QProcess *process = new QProcess(this); if (showError) { process->setProcessChannelMode(QProcess::ForwardedErrorChannel); } process->start(command + args); process->waitForStarted(); return process; } private Q_SLOTS: void init(); void testProfile_data(); void testProfile(); void testFailure(); void testAccount_data(); void testAccount(); void testSettings_data(); void testSettings(); private: LibaccountsService m_service; }; /* Mocking libaccounts-qt { */ class ManagerController { public: ManagerController(): lastLoadedAccount(0) { m_instance = this; } ~ManagerController() { m_instance = 0; } static ManagerController *instance() { return m_instance; } void setServices(const QStringList &services) { m_services = services; } public: Accounts::Account *lastLoadedAccount; private: friend class Accounts::Manager; QStringList m_services; static ManagerController *m_instance; }; ManagerController *ManagerController::m_instance = 0; typedef QHash ServiceSettings; typedef QHash > RemovedKeys; class AccountController: public QObject { Q_OBJECT public: AccountController(Accounts::Account *account): QObject(account), m_id(0), m_wasDeleted(false), m_syncWasCalled(false), m_account(account) { m_controllers[account] = this; } static AccountController *mock(Accounts::Account *account) { return m_controllers[account]; } bool syncWasCalled() const { return m_syncWasCalled; } void doSync(Accounts::Error error = Accounts::Error()) { if (error.type() == Accounts::Error::NoError) { QMetaObject::invokeMethod(m_account, "synced", Qt::QueuedConnection); } else { QMetaObject::invokeMethod(m_account, "error", Qt::QueuedConnection, Q_ARG(Accounts::Error, error)); } } protected: void syncCalled() { m_syncWasCalled = true; } public: quint32 m_id; QString m_provider; ServiceSettings m_serviceSettings; RemovedKeys m_removedKeys; bool m_wasDeleted; bool m_syncWasCalled; private: friend class Accounts::Account; static QHash m_controllers; Accounts::Account *m_account; }; QHash AccountController::m_controllers; struct _AgService { _AgService(const QString &name): name(name) {} QString name; }; namespace Accounts { Service::Service(): m_service(0), m_tags(0) { } Service::Service(AgService *service, ReferenceMode): m_service(service), m_tags(0) { } Service::Service(const Service &other): m_service(other.m_service ? new _AgService(other.m_service->name) : 0), m_tags(0) { } Service &Service::operator=(const Service &other) { delete m_service; m_service = other.m_service ? new _AgService(other.m_service->name) : 0; return *this; } Service::~Service() { delete m_service; } bool Service::isValid() const { return m_service != 0; } class Account::Private { public: Private() {} QString m_selectedService; AccountController *m_controller; }; Account::Account(Private *d, QObject *parent): QObject(parent), d(d) { d->m_controller = new AccountController(this); } Account::~Account() { delete d; } AccountId Account::id() const { return d->m_controller->m_id; } void Account::selectService(const Service &service) { d->m_selectedService = service.m_service ? service.m_service->name : QString(); } void Account::setValue(const QString &key, const QVariant &value) { QVariantMap &settings = d->m_controller->m_serviceSettings[d->m_selectedService]; settings.insert(key, value); } void Account::remove(const QString &key) { QSet &removedKeys = d->m_controller->m_removedKeys[d->m_selectedService]; removedKeys.insert(key); } void Account::sync() { d->m_controller->syncCalled(); } void Account::remove() { d->m_controller->m_wasDeleted = true; } Watch::~Watch() { } class Manager::Private { public: Private() {} ManagerController m_controller; }; Manager::Manager(QObject *parent): QObject(parent), d(new Private()) { } Manager::~Manager() { delete d; } Account *Manager::account(const AccountId &id) const { Account::Private *accountD = new Account::Private(); d->m_controller.lastLoadedAccount = new Account(accountD, const_cast(this)); accountD->m_controller->m_id = id; return d->m_controller.lastLoadedAccount; } Account *Manager::createAccount(const QString &providerName) { Account::Private *accountD = new Account::Private(); d->m_controller.lastLoadedAccount = new Account(accountD, this); accountD->m_controller->m_provider = providerName; return d->m_controller.lastLoadedAccount; } Service Manager::service(const QString &serviceName) const { if (d->m_controller.m_services.contains(serviceName)) { return Service(new _AgService(serviceName)); } else { return Service(); } } } // namespace /* } mocking libaccounts-qt */ /* mocking utils.cpp { */ namespace OnlineAccountsUi { static QString staticApparmorProfile; QString apparmorProfileOfPeer(const QDBusMessage &) { return staticApparmorProfile; } void setApparmorProfile(const QString &profile) { staticApparmorProfile = profile; } } // namespace /* } mocking utils.cpp */ Q_DECLARE_METATYPE(QProcess::ExitStatus) LibaccountsServiceTest::LibaccountsServiceTest(): QObject(0) { QDBusConnection conn = QDBusConnection::sessionBus(); conn.registerService(TEST_SERVICE_NAME); conn.registerObject(TEST_OBJECT_PATH, &m_service, QDBusConnection::ExportAllContents); qRegisterMetaType(); setLoggingLevel(2); } void LibaccountsServiceTest::init() { ManagerController *mc = ManagerController::instance(); mc->lastLoadedAccount = 0; } void LibaccountsServiceTest::testProfile_data() { QTest::addColumn("profile"); QTest::addColumn("provider"); QTest::addColumn("mustPass"); QTest::newRow("non click, mismatch") << "appProfile" << "OneProvider" << false; QTest::newRow("non click, match") << "theProfile" << "theProfile" << true; QTest::newRow("click, mismatch") << "com.ubuntu.package_app_0.1" << "com.ubuntu.package_other" << false; QTest::newRow("click, match") << "com.ubuntu.package_app_0.2" << "com.ubuntu.package_app" << true; } void LibaccountsServiceTest::testProfile() { QFETCH(QString, profile); QFETCH(QString, provider); QFETCH(bool, mustPass); setApparmorProfile(profile); QString params = QString::fromUtf8("0 true false %1 []").arg(provider); QProcess *client = requestStore(params); QSignalSpy finished(client, SIGNAL(finished(int,QProcess::ExitStatus))); if (mustPass) { ManagerController *mc = ManagerController::instance(); QTRY_VERIFY(mc->lastLoadedAccount != 0); AccountController *ac = AccountController::mock(mc->lastLoadedAccount); QTRY_COMPARE(ac->syncWasCalled(), true); ac->doSync(); } finished.wait(); QByteArray stdErr = client->readAllStandardError(); QCOMPARE(stdErr.contains("Profile/provider mismatch"), !mustPass); } void LibaccountsServiceTest::testFailure() { setApparmorProfile("MyProvider"); QProcess *client = requestStore("0 true false MyProvider []"); QSignalSpy finished(client, SIGNAL(finished(int,QProcess::ExitStatus))); ManagerController *mc = ManagerController::instance(); QTRY_VERIFY(mc->lastLoadedAccount != 0); AccountController *ac = AccountController::mock(mc->lastLoadedAccount); QTRY_COMPARE(ac->syncWasCalled(), true); // return an error Accounts::Error error(Accounts::Error::Database, "hi there"); ac->doSync(error); finished.wait(); QVERIFY(client->readAllStandardError().contains("hi there")); } void LibaccountsServiceTest::testAccount_data() { QTest::addColumn("clientSettings"); QTest::addColumn("provider"); QTest::addColumn("accountId"); QTest::addColumn("deleted"); QTest::newRow("new account") << "0 true false Cool" << "Cool" << quint32(0) << false; QTest::newRow("existing account") << "5 false false Bad" << "Bad" << quint32(5) << false; QTest::newRow("deleting account") << "7 false true Die" << "Die" << quint32(7) << true; } void LibaccountsServiceTest::testAccount() { QFETCH(QString, clientSettings); QFETCH(QString, provider); QFETCH(quint32, accountId); QFETCH(bool, deleted); setApparmorProfile(provider); ManagerController *mc = ManagerController::instance(); QString params = QString::fromUtf8("%1 []").arg(clientSettings); QProcess *client = requestStore(params, true); QSignalSpy finished(client, SIGNAL(finished(int,QProcess::ExitStatus))); QTRY_VERIFY(mc->lastLoadedAccount != 0); AccountController *ac = AccountController::mock(mc->lastLoadedAccount); QTRY_COMPARE(ac->syncWasCalled(), true); QCOMPARE(ac->m_id, accountId); if (accountId == 0) { QCOMPARE(ac->m_provider, provider); } QCOMPARE(ac->m_wasDeleted, deleted); ac->doSync(); finished.wait(); } void LibaccountsServiceTest::testSettings_data() { QTest::addColumn("clientSettings"); QTest::addColumn("settings"); QTest::addColumn("removedKeys"); QHash settings; QHash > removedKeys; QTest::newRow("no services") << "\"[]\"" << settings << removedKeys; QTest::newRow("no settings") << "\"[('cool', 'type', 3, {}, [])]\"" << settings << removedKeys; settings["cool"].insert("enabled", false); settings["cool"].insert("name", QString("Bob")); QTest::newRow("some keys changed") << "\"[('cool', 'type', 3, {'enabled': , 'name': <'Bob'>}, [])]\"" << settings << removedKeys; settings.clear(); removedKeys["cool"].insert("enabled"); removedKeys["cool"].insert("id"); QTest::newRow("some keys removed") << "\"[('cool', 'type', 3, {}, ['enabled','id'])]\"" << settings << removedKeys; removedKeys.clear(); settings["cool"].insert("enabled", true); settings["cool"].insert("name", QString("Tom")); removedKeys["cool"].insert("id"); settings["bad"].insert("port", quint32(4000)); removedKeys["bad"].insert("name"); QTest::newRow("two services, lots of changes") << "\"[" "('cool', 'type', 3, {'enabled': , 'name': <'Tom'>}, ['id'])," "('bad', 'btype', 2, {'port': }, ['name'])" "]\"" << settings << removedKeys; settings.clear(); removedKeys.clear(); QTest::newRow("invalid service") << "\"[('findme', 'type', 3, {}, ['enabled','id'])]\"" << settings << removedKeys; } void LibaccountsServiceTest::testSettings() { QFETCH(QString, clientSettings); QFETCH(ServiceSettings, settings); QFETCH(RemovedKeys, removedKeys); setApparmorProfile("MyProvider"); ManagerController *mc = ManagerController::instance(); mc->setServices(QStringList() << "cool" << "bad"); QString params = QString::fromUtf8("0 true false MyProvider %1").arg(clientSettings); QProcess *client = requestStore(params, true); QSignalSpy finished(client, SIGNAL(finished(int,QProcess::ExitStatus))); QTRY_VERIFY(mc->lastLoadedAccount != 0); AccountController *ac = AccountController::mock(mc->lastLoadedAccount); QTRY_COMPARE(ac->syncWasCalled(), true); QCOMPARE(ac->m_serviceSettings, settings); QCOMPARE(ac->m_removedKeys, removedKeys); ac->doSync(); finished.wait(); } QTEST_MAIN(LibaccountsServiceTest); #include "tst_libaccounts_service.moc" ././@LongLink0000000000000000000000000000016400000000000011216 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-service/tst_libaccounts_service.proubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-service/tst_libaccou0000644000015600001650000000176112674252514034035 0ustar pbuserpbgroup00000000000000include(../../common-project-config.pri) TARGET = tst_libaccounts_service CONFIG += \ debug \ link_pkgconfig QT += \ core \ dbus \ testlib \ xml ONLINE_ACCOUNTS_SERVICE_DIR = $${TOP_SRC_DIR}/online-accounts-service COMMON_SRC_DIR = $${TOP_SRC_DIR}/online-accounts-ui LIBACCOUNTS_QT_DIR = $$system(pkg-config --variable=includedir accounts-qt5)/Accounts SOURCES += \ $${COMMON_SRC_DIR}/debug.cpp \ $${ONLINE_ACCOUNTS_SERVICE_DIR}/libaccounts-service.cpp \ tst_libaccounts_service.cpp HEADERS += \ $${ONLINE_ACCOUNTS_SERVICE_DIR}/libaccounts-service.h \ $${ONLINE_ACCOUNTS_SERVICE_DIR}/utils.h \ $${LIBACCOUNTS_QT_DIR}/account.h \ $${LIBACCOUNTS_QT_DIR}/manager.h INCLUDEPATH += \ $${ONLINE_ACCOUNTS_SERVICE_DIR} \ $${COMMON_SRC_DIR} \ $$system(pkg-config --variable=includedir accounts-qt5) check.commands = "xvfb-run -s '-screen 0 640x480x24' -a dbus-test-runner -t ./$${TARGET}" check.depends = $${TARGET} QMAKE_EXTRA_TARGETS += check ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/0000755000015600001650000000000012674252771030414 5ustar pbuserpbgroup00000000000000././@LongLink0000000000000000000000000000015000000000000011211 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/tst_access_model.cppubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/tst_access_model.0000644000015600001650000002035112674252514033724 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "access-model.h" #include "debug.h" #include #include #include #include #include #include #include #include #include #include using namespace OnlineAccountsUi; class AccessModelTest: public QObject { Q_OBJECT public: AccessModelTest(); private Q_SLOTS: void initTestCase(); void testEmpty(); void testProxy(); void testEnabling(); private: void clearDb(); }; AccessModelTest::AccessModelTest(): QObject(0) { setLoggingLevel(2); } void AccessModelTest::clearDb() { QDir dbroot(QString::fromLatin1(qgetenv("ACCOUNTS"))); dbroot.remove("accounts.db"); } void AccessModelTest::initTestCase() { qputenv("ACCOUNTS", "/tmp/"); qputenv("AG_APPLICATIONS", TEST_DATA_DIR); qputenv("AG_SERVICES", TEST_DATA_DIR); qputenv("AG_SERVICE_TYPES", TEST_DATA_DIR); qputenv("AG_PROVIDERS", TEST_DATA_DIR); qputenv("XDG_DATA_HOME", TEST_DATA_DIR); clearDb(); } void AccessModelTest::testEmpty() { QQmlEngine engine; QQmlComponent component(&engine); component.setData("import Ubuntu.OnlineAccounts 0.1\n" "AccountServiceModel {\n" " provider: \"cool\"\n" " service: \"global\"\n" "}", QUrl()); QAbstractListModel *accountModel = qobject_cast(component.create()); QVERIFY(accountModel != 0); QCOMPARE(accountModel->property("count").toInt(), 0); /* Create the access model */ AccessModel *model = new AccessModel(this); QVERIFY(model != 0); QSignalSpy countChanged(model, SIGNAL(countChanged())); QSignalSpy rowsInserted(model, SIGNAL(rowsInserted(const QModelIndex&,int,int))); QSignalSpy rowsRemoved(model, SIGNAL(rowsRemoved(const QModelIndex&,int,int))); QCOMPARE(model->applicationId(), QString()); QVERIFY(model->accountModel() == 0); QCOMPARE(model->rowCount(), 0); model->setAccountModel(accountModel); QCOMPARE(model->rowCount(), 0); QCOMPARE(countChanged.count(), 0); QCOMPARE(rowsInserted.count(), 0); QCOMPARE(rowsRemoved.count(), 0); delete model; delete accountModel; } void AccessModelTest::testProxy() { QQmlEngine engine; QQmlComponent component(&engine); component.setData("import Ubuntu.OnlineAccounts 0.1\n" "AccountServiceModel {\n" " provider: \"cool\"\n" " service: \"global\"\n" "}", QUrl()); QAbstractListModel *accountModel = qobject_cast(component.create()); QVERIFY(accountModel != 0); QCOMPARE(accountModel->property("count").toInt(), 0); /* Create the access model */ AccessModel *model = new AccessModel(this); QVERIFY(model != 0); model->setAccountModel(accountModel); model->setApplicationId("mailer"); QCOMPARE(model->rowCount(), 0); /* Now add and remove accounts, and see that the accessModel picks them up */ QSignalSpy rowsInserted(model, SIGNAL(rowsInserted(const QModelIndex&,int,int))); QSignalSpy rowsRemoved(model, SIGNAL(rowsRemoved(const QModelIndex&,int,int))); Accounts::Manager *manager = new Accounts::Manager(this); Accounts::Account *account1 = manager->createAccount("cool"); QVERIFY(account1 != 0); account1->setEnabled(true); account1->setDisplayName("CoolAccount"); account1->syncAndBlock(); rowsInserted.wait(); QCOMPARE(model->rowCount(), 1); QCOMPARE(rowsInserted.count(), 1); QCOMPARE(rowsRemoved.count(), 0); rowsInserted.clear(); QCOMPARE(model->get(0, "displayName").toString(), QString("CoolAccount")); /* Create a second account */ Accounts::Account *account2 = manager->createAccount("cool"); QVERIFY(account2 != 0); account2->setEnabled(true); account2->setDisplayName("UncoolAccount"); account2->syncAndBlock(); rowsInserted.wait(); QCOMPARE(model->rowCount(), 2); QCOMPARE(rowsInserted.count(), 1); int row = rowsInserted.at(0).at(1).toInt(); QCOMPARE(rowsRemoved.count(), 0); rowsInserted.clear(); QCOMPARE(model->get(row, "displayName").toString(), QString("UncoolAccount")); /* Delete the first account */ account1->remove(); account1->syncAndBlock(); rowsRemoved.wait(); QCOMPARE(model->rowCount(), 1); QCOMPARE(rowsInserted.count(), 0); QCOMPARE(rowsRemoved.count(), 1); rowsRemoved.clear(); QCOMPARE(model->get(0, "displayName").toString(), QString("UncoolAccount")); /* Delete also the second account */ account2->remove(); account2->syncAndBlock(); rowsRemoved.wait(); QCOMPARE(model->rowCount(), 0); QCOMPARE(rowsInserted.count(), 0); QCOMPARE(rowsRemoved.count(), 1); rowsRemoved.clear(); delete model; delete accountModel; } void AccessModelTest::testEnabling() { QQmlEngine engine; QQmlComponent component(&engine); component.setData("import Ubuntu.OnlineAccounts 0.1\n" "AccountServiceModel {\n" " provider: \"cool\"\n" " service: \"global\"\n" "}", QUrl()); QAbstractListModel *accountModel = qobject_cast(component.create()); QVERIFY(accountModel != 0); QCOMPARE(accountModel->property("count").toInt(), 0); /* Create the access model */ AccessModel *model = new AccessModel(this); QVERIFY(model != 0); model->setAccountModel(accountModel); model->setApplicationId("mailer"); QCOMPARE(model->rowCount(), 0); /* Now add two accounts, but verify that the model should expose only the * one which has at least one service disabled */ QSignalSpy rowsInserted(model, SIGNAL(rowsInserted(const QModelIndex&,int,int))); QSignalSpy rowsRemoved(model, SIGNAL(rowsRemoved(const QModelIndex&,int,int))); Accounts::Manager *manager = new Accounts::Manager(this); Accounts::Service coolMail = manager->service("coolmail"); Accounts::Service coolShare = manager->service("coolshare"); Accounts::Account *account1 = manager->createAccount("cool"); QVERIFY(account1 != 0); account1->setEnabled(true); account1->setDisplayName("CoolAccount"); account1->selectService(coolMail); account1->setEnabled(true); account1->syncAndBlock(); rowsInserted.wait(); QCOMPARE(model->rowCount(), 1); QCOMPARE(rowsInserted.count(), 1); QCOMPARE(rowsRemoved.count(), 0); rowsInserted.clear(); QCOMPARE(model->get(0, "displayName").toString(), QString("CoolAccount")); /* Create a second account, enable all of its services */ Accounts::Account *account2 = manager->createAccount("cool"); QVERIFY(account2 != 0); account2->setEnabled(true); account2->setDisplayName("UncoolAccount"); account2->selectService(coolMail); account2->setEnabled(true); account2->selectService(coolShare); account2->setEnabled(true); account2->syncAndBlock(); /* Verify that a row is *not* added */ QTest::qWait(50); QCOMPARE(model->rowCount(), 1); QCOMPARE(rowsInserted.count(), 0); QCOMPARE(rowsRemoved.count(), 0); rowsInserted.clear(); delete model; delete accountModel; } QTEST_MAIN(AccessModelTest); #include "tst_access_model.moc" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/mock/0000755000015600001650000000000012674252771031345 5ustar pbuserpbgroup00000000000000././@LongLink0000000000000000000000000000014700000000000011217 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/mock/request-mock.hubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/mock/request-mock0000644000015600001650000000324212674252514033703 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef MOCK_REQUEST_H #define MOCK_REQUEST_H #include "request.h" #include #include #include namespace OnlineAccountsUi { class RequestPrivate: public QObject { Q_OBJECT Q_DECLARE_PUBLIC(Request) public: RequestPrivate(const QString &interface, int id, const QString &clientProfile, const QVariantMap ¶meters, Request *request); ~RequestPrivate(); static RequestPrivate *mocked(Request *r) { return r->d_ptr; } Q_SIGNALS: void setWindowCalled(QWindow *); void failCalled(const QString &name, const QString &message); void setResultCalled(const QVariantMap &result); private: mutable Request *q_ptr; QVariantMap m_parameters; QString m_clientApparmorProfile; QWindow *m_window; int m_delay; bool m_inProgress; }; } // namespace #endif // MOCK_REQUEST_H ././@LongLink0000000000000000000000000000015300000000000011214 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/mock/ui-server-mock.cppubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/mock/ui-server-mo0000644000015600001650000000262112674252514033616 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "ui-server-mock.h" #include using namespace OnlineAccountsUi; static UiServer *m_instance = 0; UiServerPrivate::UiServerPrivate(const QString &address, UiServer *server): QObject(server), q_ptr(server), m_address(address) { } UiServerPrivate::~UiServerPrivate() { } UiServer::UiServer(const QString &address, QObject *parent): QObject(parent), d_ptr(new UiServerPrivate(address, this)) { m_instance = this; } UiServer::~UiServer() { m_instance = 0; } UiServer *UiServer::instance() { return m_instance; } bool UiServer::init() { return true; } ././@LongLink0000000000000000000000000000015400000000000011215 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/mock/notification-mock.hubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/mock/notification0000644000015600001650000000326412674252514033756 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef MOCK_NOTIFICATiON_H #define MOCK_NOTIFICATiON_H #include "notification.h" #include #include #include #include using namespace OnlineAccountsUi; namespace OnlineAccountsUi { typedef QPair ActionPair; class NotificationPrivate: public QObject { Q_OBJECT Q_DECLARE_PUBLIC(Notification) public: NotificationPrivate(const QString &summary, const QString &body, Notification *notification); ~NotificationPrivate(); static NotificationPrivate *mocked(Notification *n) { return n->d_ptr; } static QList allNotifications; void invokeAction(const QString &action); Q_SIGNALS: void showCalled(); public: QString m_summary; QString m_body; QList m_actions; bool m_isSnapDecision; mutable Notification *q_ptr; }; } // namespace #endif // MOCK_NOTIFICATiON_H ././@LongLink0000000000000000000000000000015100000000000011212 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/mock/request-mock.cppubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/mock/request-mock0000644000015600001650000000630212674252514033703 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "globals.h" #include "request-mock.h" #include using namespace OnlineAccountsUi; RequestPrivate::RequestPrivate(const QString &interface, int id, const QString &clientProfile, const QVariantMap ¶meters, Request *request): QObject(request), q_ptr(request), m_parameters(parameters), m_clientApparmorProfile(clientProfile), m_window(0), m_delay(0), m_inProgress(false) { Q_UNUSED(interface); Q_UNUSED(id); } RequestPrivate::~RequestPrivate() { } Request::Request(const QString &interface, int id, const QString &clientProfile, const QVariantMap ¶meters, QObject *parent): QObject(parent), d_ptr(new RequestPrivate(interface, id, clientProfile, parameters, this)) { } Request::~Request() { } void Request::setWindow(QWindow *window) { Q_D(Request); Q_EMIT d->setWindowCalled(window); } WId Request::windowId() const { Q_D(const Request); return d->m_parameters[OAU_KEY_WINDOW_ID].toUInt(); } bool Request::isInProgress() const { Q_D(const Request); return d->m_inProgress; } const QVariantMap &Request::parameters() const { Q_D(const Request); return d->m_parameters; } QString Request::clientApparmorProfile() const { Q_D(const Request); return d->m_clientApparmorProfile; } QWindow *Request::window() const { Q_D(const Request); return d->m_window; } void Request::setDelay(int delay) { Q_D(Request); d->m_delay = delay; } int Request::delay() const { Q_D(const Request); return d->m_delay; } void Request::start() { Q_D(Request); if (d->m_inProgress) { qWarning() << "Request already started!"; return; } d->m_inProgress = true; } void Request::cancel() { setCanceled(); } void Request::fail(const QString &name, const QString &message) { Q_D(Request); Q_EMIT d->failCalled(name, message); Q_EMIT completed(); } void Request::setCanceled() { Q_D(Request); if (d->m_inProgress) { fail(OAU_ERROR_USER_CANCELED, QStringLiteral("Canceled")); d->m_inProgress = false; } } void Request::setResult(const QVariantMap &result) { Q_D(Request); if (d->m_inProgress) { Q_EMIT d->setResultCalled(result); Q_EMIT completed(); d->m_inProgress = false; } } ././@LongLink0000000000000000000000000000015100000000000011212 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/mock/ui-server-mock.hubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/mock/ui-server-mo0000644000015600001650000000246012674252514033617 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef MOCK_UI_SERVER_H #define MOCK_UI_SERVER_H #include "ui-server.h" #include #include namespace OnlineAccountsUi { class UiServerPrivate: public QObject { Q_OBJECT Q_DECLARE_PUBLIC(UiServer) public: UiServerPrivate(const QString &address, UiServer *pluginServer); ~UiServerPrivate(); static UiServerPrivate *mocked(UiServer *r) { return r->d_ptr; } void emitFinished() { Q_EMIT q_ptr->finished(); } public: mutable UiServer *q_ptr; QString m_address; }; } // namespace #endif // MOCK_UI_SERVER_H ././@LongLink0000000000000000000000000000016200000000000011214 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/mock/signonui-request-mock.cppubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/mock/signonui-req0000644000015600001650000000526612674252514033714 0ustar pbuserpbgroup00000000000000/* * This file is part of online-accounts-ui * * Copyright (C) 2011-2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "globals.h" #include "signonui-request-mock.h" #include #include #include using namespace SignOnUi; RequestPrivate::RequestPrivate(Request *request): QObject(request), q_ptr(request), m_handler(0) { const QVariantMap ¶meters = request->parameters(); if (parameters.contains(SSOUI_KEY_CLIENT_DATA)) { m_clientData = parameters[SSOUI_KEY_CLIENT_DATA].toMap(); } } RequestPrivate::~RequestPrivate() { } Request::Request(int id, const QString &clientProfile, const QVariantMap ¶meters, QObject *parent): OnlineAccountsUi::Request(SIGNONUI_INTERFACE, id, clientProfile, parameters, parent), d_ptr(new RequestPrivate(this)) { } Request::~Request() { } QString Request::ssoId(const QVariantMap ¶meters) { return parameters[SSOUI_KEY_REQUESTID].toString(); } QString Request::ssoId() const { return Request::ssoId(parameters()); } void Request::setWindow(QWindow *window) { OnlineAccountsUi::Request::setWindow(window); } uint Request::identity() const { return parameters().value(SSOUI_KEY_IDENTITY).toUInt(); } QString Request::method() const { return parameters().value(SSOUI_KEY_METHOD).toString(); } QString Request::mechanism() const { return parameters().value(SSOUI_KEY_MECHANISM).toString(); } QString Request::providerId() const { Q_D(const Request); return d->m_providerId; } const QVariantMap &Request::clientData() const { Q_D(const Request); return d->m_clientData; } void Request::setHandler(RequestHandler *handler) { Q_D(Request); d->m_handler = handler; } RequestHandler *Request::handler() const { Q_D(const Request); return d->m_handler; } void Request::setCanceled() { QVariantMap result; result[SSOUI_KEY_ERROR] = SignOn::QUERY_ERROR_CANCELED; setResult(result); } ././@LongLink0000000000000000000000000000015600000000000011217 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/mock/notification-mock.cppubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/mock/notification0000644000015600001650000000411512674252514033752 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "notification-mock.h" #include #include #include using namespace OnlineAccountsUi; QList NotificationPrivate::allNotifications; NotificationPrivate::NotificationPrivate(const QString &summary, const QString &body, Notification *notification): QObject(notification), m_summary(summary), m_body(body), q_ptr(notification) { allNotifications.append(notification); } NotificationPrivate::~NotificationPrivate() { allNotifications.removeAll(q_ptr); } void NotificationPrivate::invokeAction(const QString &action) { Q_Q(Notification); Q_EMIT q->actionInvoked(action); } Notification::Notification(const QString &summary, const QString &body, QObject *parent): QObject(parent), d_ptr(new NotificationPrivate(summary, body, this)) { } Notification::~Notification() { } void Notification::addAction(const QString &action, const QString &label) { Q_D(Notification); d->m_actions.append(ActionPair(action, label)); } void Notification::setSnapDecision(bool snapDecision) { Q_D(Notification); d->m_isSnapDecision = snapDecision; } void Notification::show() { Q_D(Notification); Q_EMIT d->showCalled(); } ././@LongLink0000000000000000000000000000016500000000000011217 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/mock/application-manager-mock.cppubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/mock/application-0000644000015600001650000000355112674252514033647 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "application-manager-mock.h" #include using namespace OnlineAccountsUi; ApplicationManager *ApplicationManager::m_instance = 0; ApplicationManagerPrivate::ApplicationManagerPrivate(ApplicationManager *q): QObject(q), q_ptr(q) { } ApplicationManagerPrivate::~ApplicationManagerPrivate() { } ApplicationManager::ApplicationManager(QObject *parent): QObject(parent), d_ptr(new ApplicationManagerPrivate(this)) { m_instance = this; } ApplicationManager::~ApplicationManager() { m_instance = 0; } ApplicationManager *ApplicationManager::instance() { if (!m_instance) { new ApplicationManager; } return m_instance; } QVariantMap ApplicationManager::applicationInfo(const QString &applicationId, const QString &profile) { Q_D(ApplicationManager); Q_EMIT d->applicationInfoCalled(applicationId, profile); return d->m_applicationInfo[applicationId]; } QVariantMap ApplicationManager::providerInfo(const QString &providerId) const { Q_D(const ApplicationManager); return d->m_providerInfo[providerId]; } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/mock/qwindow.cpp0000644000015600001650000000265712674252514033546 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "window-watcher.h" #include #include #define TRANSIENT_PARENT "transientParent" #define WIN_ID "winId" WindowWatcher *WindowWatcher::m_instance = 0; QWindow::QWindow(QWindow *parent): QObject(parent), QSurface(QSurface::Window) { qDebug() << Q_FUNC_INFO; } QWindow::~QWindow() { } void QWindow::show() { WindowWatcher::instance()->emitWindowShown(this); } void QWindow::setTransientParent(QWindow *parent) { setProperty(TRANSIENT_PARENT, QVariant::fromValue(parent)); } QWindow *QWindow::fromWinId(WId winId) { QWindow *window = new QWindow; window->setProperty(WIN_ID, winId); return window; } ././@LongLink0000000000000000000000000000016300000000000011215 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/mock/application-manager-mock.hubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/mock/application-0000644000015600001650000000345112674252514033646 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef MOCK_APPLICATION_MANAGER_H #define MOCK_APPLICATION_MANAGER_H #include #include #include namespace OnlineAccountsUi { class ApplicationManagerPrivate: public QObject { Q_OBJECT Q_DECLARE_PUBLIC(ApplicationManager) public: ApplicationManagerPrivate(ApplicationManager *q); ~ApplicationManagerPrivate(); static ApplicationManagerPrivate *mocked(ApplicationManager *r) { return r->d_ptr; } void setApplicationInfo(const QString &applicationId, const QVariantMap &info) { m_applicationInfo[applicationId] = info; } void setProviderInfo(const QString &providerId, const QVariantMap &info) { m_providerInfo[providerId] = info; } Q_SIGNALS: void applicationInfoCalled(QString applicationId, QString profile); public: QHash m_applicationInfo; QHash m_providerInfo; mutable ApplicationManager *q_ptr; }; } // namespace #endif // MOCK_APPLICATION_MANAGER_H ././@LongLink0000000000000000000000000000016000000000000011212 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/mock/signonui-request-mock.hubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/mock/signonui-req0000644000015600001650000000265612674252514033714 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef MOCK_SIGNON_UI_REQUEST_H #define MOCK_SIGNON_UI_REQUEST_H #include "signonui-request.h" #include #include #include namespace SignOnUi { class RequestPrivate: public QObject { Q_OBJECT Q_DECLARE_PUBLIC(Request) public: RequestPrivate(Request *request); ~RequestPrivate(); static RequestPrivate *mocked(Request *r) { return r->d_ptr; } void setProviderId(const QString &id) { m_providerId = id; } private: mutable Request *q_ptr; QVariantMap m_clientData; QPointer m_handler; QString m_providerId; }; } // namespace #endif // MOCK_SIGNON_UI_REQUEST_H ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/qml/0000755000015600001650000000000012674252771031205 5ustar pbuserpbgroup00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/qml/Source/0000755000015600001650000000000012674252771032445 5ustar pbuserpbgroup00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/qml/Source/qmldir0000644000015600001650000000037112674252514033654 0ustar pbuserpbgroup00000000000000module Source AccountCreationPage 1.0 ../../../../online-accounts-ui/qml/AccountCreationPage.qml AuthorizationPage 1.0 ../../../../online-accounts-ui/qml/AuthorizationPage.qml SignOnUiDialog 1.0 ../../../../online-accounts-ui/qml/SignOnUiDialog.qml ././@LongLink0000000000000000000000000000015600000000000011217 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/qml/tst_SignOnUiDialog.qmlubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/qml/tst_SignOnUiD0000644000015600001650000001270612674252514033622 0ustar pbuserpbgroup00000000000000import QtQuick 2.0 import QtTest 1.0 import Source 1.0 import Ubuntu.Test 0.1 Item { id: root width: 400 height: 400 QtObject { id: request property string title property string message property string loginText property bool queryUserName: false property string userNameText property string userName property bool queryPassword: false property string passwordText property string password property string forgotPasswordText property url forgotPasswordUrl property string registerText property url registerUrl signal accept() signal cancel() } SignalSpy { id: spyAccept target: request signalName: "accept" } SignalSpy { id: spyCancel target: request signalName: "cancel" } Component { id: pageComponent SignOnUiDialog {} } UbuntuTestCase { name: "SignOnUiDialog" when: windowShown function tapButton(button) { mouseClick(button, button.width / 2, button.height / 2, Qt.LeftButton, 0, 0) } function createPage() { var page = pageComponent.createObject(root) spyCancel.clear() spyAccept.clear() return page } function test_request_data() { return [ { tag: "only password", request: { queryPassword: true, queryUserName: false, passwordText: "What's your password?", password: "prefilled pw" } }, { tag: "only username", request: { queryPassword: false, queryUserName: true, userNameText: "What's your name?", userName: "Tommy" } }, { tag: "username and password", request: { queryPassword: true, passwordText: "What's your password?", password: "prefilled pw", queryUserName: true, userNameText: "What's your name?", userName: "Tommy" } }, { tag: "forgot password", request: { queryPassword: true, passwordText: "What's your password?", password: "prefilled pw", forgotPasswordUrl: "http://localhost/remember", forgotPasswordText: "Reset your password" } } ] } function test_request(data) { for (var p in data.request) { request[p] = data.request[p] } var page = createPage() verify(page != null) var passwordLabel = findChild(page, "passwordLabel") verify(passwordLabel != null) compare(passwordLabel.visible, request.queryPassword) var passwordField = findChild(page, "passwordField") verify(passwordField != null) compare(passwordField.visible, request.queryPassword) if (request.queryPassword) { compare(passwordLabel.text, request.passwordText) compare(passwordField.text, request.password) } var userNameLabel = findChild(page, "userNameLabel") verify(userNameLabel != null) compare(userNameLabel.visible, request.queryUserName) var userNameField = findChild(page, "userNameField") verify(userNameField != null) compare(userNameField.visible, request.queryUserName) if (request.queryUserName) { compare(userNameLabel.text, request.userNameText) compare(userNameField.text, request.userName) } var forgotPasswordLabel = findChild(page, "forgotPasswordLabel") verify(forgotPasswordLabel != null) compare(forgotPasswordLabel.visible, request.forgotPasswordUrl.toString() != "") page.destroy() } function test_buttons_data() { return [ { tag: "cancel", buttonName: "cancelButton", expectedCancelCount: 1, expectedAcceptCount: 0 }, { tag: "accept", buttonName: "acceptButton", expectedCancelCount: 0, expectedAcceptCount: 1 } ] } function test_buttons(data) { request.queryPassword = true request.passwordText = "Enter your password" var page = createPage() verify(page != null) var button = findChild(page, data.buttonName) verify(button != null) verify(button.visible) tapButton(button) compare(spyAccept.count, data.expectedAcceptCount) compare(spyCancel.count, data.expectedCancelCount) page.destroy() } } } ././@LongLink0000000000000000000000000000016300000000000011215 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/qml/tst_online_accounts_qml.cppubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/qml/tst_online_ac0000644000015600001650000000126112674252514033744 0ustar pbuserpbgroup00000000000000#include #include int main(int argc, char **argv) { QTemporaryDir accountsDir; if (Q_UNLIKELY(!accountsDir.isValid())) { qFatal("Could not create temporary directory!"); return EXIT_FAILURE; } qputenv("ACCOUNTS", accountsDir.path().toUtf8()); qputenv("AG_APPLICATIONS", TEST_DATA_DIR); qputenv("AG_SERVICES", TEST_DATA_DIR); qputenv("AG_SERVICE_TYPES", TEST_DATA_DIR); qputenv("AG_PROVIDERS", TEST_DATA_DIR); qputenv("XDG_DATA_HOME", TEST_DATA_DIR); qputenv("QML2_IMPORT_PATH", SOURCE_MODULE_PATH); return quick_test_main(argc, argv, "online_accounts_qml", QUICK_TEST_SOURCE_DIR); } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/qml/qml.pro0000644000015600001650000000061712674252514032517 0ustar pbuserpbgroup00000000000000include(../../../common-project-config.pri) TARGET = tst_online_accounts_qml CONFIG += \ qmltestcase \ warn_on DEFINES += \ SOURCE_MODULE_PATH=\\\"$${PWD}\\\" \ TEST_DATA_DIR=\\\"$${PWD}/../data\\\" SOURCES += \ tst_online_accounts_qml.cpp check.commands = "xvfb-run -s '-screen 0 640x480x24' -a dbus-test-runner -t " check.depends = $${TARGET} QMAKE_EXTRA_TARGETS += check ././@LongLink0000000000000000000000000000016300000000000011215 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/qml/tst_AccountCreationPage.qmlubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/qml/tst_AccountCr0000644000015600001650000000167012674252514033702 0ustar pbuserpbgroup00000000000000import QtQuick 2.0 import QtTest 1.0 import Source 1.0 Item { property string localQmlPluginPath: "../../tests/online-accounts-ui/qml/" property string systemQmlPluginPath: "../../tests/online-accounts-ui/qml/" width: 200 height: 200 Component { id: pageComponent AccountCreationPage {} } TestCase { name: "AccountCreationPage" function test_flickable() { var page = pageComponent.createObject(null, { "providerId": "testPlugin" }) verify(page.flickable != null) page.destroy() } function test_fallback() { localQmlPluginPath = "/dummy/path/" var page = pageComponent.createObject(null, { "providerId": "testPlugin" }) // If flickable is set then the plugin was loaded correctly verify(page.flickable != null) page.destroy() } } } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/qml/testPlugin/0000755000015600001650000000000012674252771033343 5ustar pbuserpbgroup00000000000000././@LongLink0000000000000000000000000000015300000000000011214 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/qml/testPlugin/Main.qmlubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/qml/testPlugin/Ma0000644000015600001650000000045312674252514033620 0ustar pbuserpbgroup00000000000000import QtQuick 2.0 Rectangle { id: root property Item flickable: flickableItem signal finished width: 200 height: 200 Timer { interval: 50; running: true; repeat: false onTriggered: root.finished() } Flickable { id: flickableItem } } ././@LongLink0000000000000000000000000000016100000000000011213 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/qml/tst_AuthorizationPage.qmlubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/qml/tst_Authoriza0000644000015600001650000001421412674252514033765 0ustar pbuserpbgroup00000000000000import QtQuick 2.0 import QtTest 1.0 import Source 1.0 import Ubuntu.OnlineAccounts 0.1 import Ubuntu.Test 0.1 Item { id: root width: 400 height: 400 AccountServiceModel { id: accountsModel includeDisabled: true provider: "cool" service: "coolmail" } SignalSpy { id: spyDenied signalName: "denied" } SignalSpy { id: spyCreateAccount signalName: "createAccount" } SignalSpy { id: spyAllowed signalName: "allowed" } SignalSpy { id: spyAccount signalName: "synced" } Component { id: accountComponent Account {} } Component { id: pageComponent AuthorizationPage { model: accountsModel } } UbuntuTestCase { name: "AuthorizationPage" when: windowShown function createAccount(displayName) { spyAccount.clear() var accountHandle = Manager.createAccount("cool") var account = accountComponent.createObject(null, { "objectHandle": accountHandle }) account.updateDisplayName(displayName) account.updateEnabled(false) spyAccount.target = account account.sync() if (spyAccount.count === 0) { spyAccount.wait() } compare(spyAccount.count, 1) account.destroy(1000) } function tapButton(button) { mouseClick(button, button.width / 2, button.height / 2, Qt.LeftButton, 0, 0) } function createPage(params) { var page = pageComponent.createObject(root, params) spyAllowed.clear() spyAllowed.target = page spyDenied.clear() spyDenied.target = page spyCreateAccount.clear() spyCreateAccount.target = page return page } function test_1_one_account() { createAccount("My account") var page = createPage({ "application": { "displayName": "My app", "displayId": "com.ubuntu/MyApp", }, "provider": { "displayName": "My provider" } }) verify(page != null) var label = findChild(page, "appLabel") verify(label != null) compare(label.text, "My app") label = findChild(page, "pkgLabel") verify(label != null) compare(label.text, "com.ubuntu/MyApp") label = findChild(page, "msgLabel") verify(label != null) compare(label.text, "wants to access your My provider account") var accountLabel = findChild(page, "accountLabel") verify(accountLabel != null) compare(accountLabel.visible, true) compare(accountLabel.text, "My account") // Check that the selector is *not* visible var accountSelector = findChild(page, "accountSelector") verify(accountSelector != null) compare(accountSelector.visible, false) // Test the buttons var allowButton = findChild(page, "allowButton") verify(allowButton != null) compare(allowButton.visible, true) tapButton(allowButton) compare(spyAllowed.count, 1) compare(spyAllowed.signalArguments[0][0], accountsModel.get(0, "accountId")) compare(spyDenied.count, 0) compare(spyCreateAccount.count, 0) var denyButton = findChild(page, "denyButton") verify(denyButton != null) compare(denyButton.visible, true) tapButton(denyButton) compare(spyAllowed.count, 1) compare(spyDenied.count, 1) compare(spyCreateAccount.count,0) page.destroy() } function test_2_add_another_data() { return [ { tag: "with button", canAdd: true }, { tag: "without button", canAdd: false } ] } function test_2_add_another(data) { var page = createPage({ "application": { "displayName": "My app" }, "provider": { "displayName": "My provider" }, "canAddAnotherAccount": data.canAdd }) verify(page != null) var addAnotherButton = findChild(page, "addAnotherButton") verify(addAnotherButton != null) compare(addAnotherButton.visible, data.canAdd) if (addAnotherButton.visible) { tapButton(addAnotherButton) compare(spyAllowed.count, 0) compare(spyDenied.count, 0) compare(spyCreateAccount.count, 1) } page.destroy() } function test_3_many_accounts_data() { return [ { tag: "first account", index: 0 }, { tag: "second account", index: 1 } ] } function test_3_many_accounts(data) { createAccount("Your account") var page = createPage({ "application": { "displayName": "My app" }, "provider": { "displayName": "My provider" } }) verify(page != null) var accountLabel = findChild(page, "accountLabel") verify(accountLabel != null) compare(accountLabel.visible, false) var accountSelector = findChild(page, "accountSelector") verify(accountSelector != null) compare(accountSelector.visible, true) accountSelector.selectedIndex = data.index var allowButton = findChild(page, "allowButton") verify(allowButton != null) compare(allowButton.visible, true) tapButton(allowButton) compare(spyAllowed.count, 1) compare(spyAllowed.signalArguments[0][0], accountsModel.get(data.index, "accountId")) compare(spyDenied.count, 0) compare(spyCreateAccount.count, 0) page.destroy() } } } ././@LongLink0000000000000000000000000000015300000000000011214 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/tst_browser_request.proubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/tst_browser_reque0000644000015600001650000000254012674252514034111 0ustar pbuserpbgroup00000000000000include(online-accounts-ui.pri) TARGET = tst_browser_request CONFIG += \ link_pkgconfig QT += \ dbus \ gui \ network \ quick PKGCONFIG += \ libsignon-qt5 \ signon-plugins-common INCLUDEPATH += \ $${TOP_SRC_DIR}/plugins QMAKE_LIBDIR = $${TOP_BUILD_DIR}/plugins/OnlineAccountsPlugin LIBS += -lonline-accounts-plugin DEFINES += \ NO_REQUEST_FACTORY \ PLUGIN_PRIVATE_MODULE_DIR=\\\"/tmp\\\" \ SIGNONUI_FAIL_TIMEOUT=100 \ SIGNONUI_I18N_DOMAIN=\\\"translations\\\" \ TEST_DATA_DIR=\\\"$${PWD}/data\\\" SOURCES += \ $${ONLINE_ACCOUNTS_UI_DIR}/browser-request.cpp \ $${ONLINE_ACCOUNTS_UI_DIR}/debug.cpp \ $${ONLINE_ACCOUNTS_UI_DIR}/dialog.cpp \ $${ONLINE_ACCOUNTS_UI_DIR}/i18n.cpp \ mock/request-mock.cpp \ mock/signonui-request-mock.cpp \ mock/ui-server-mock.cpp \ tst_browser_request.cpp HEADERS += \ $${ONLINE_ACCOUNTS_UI_DIR}/browser-request.h \ $${ONLINE_ACCOUNTS_UI_DIR}/dialog.h \ $${ONLINE_ACCOUNTS_UI_DIR}/i18n.h \ $${ONLINE_ACCOUNTS_UI_DIR}/request.h \ $${ONLINE_ACCOUNTS_UI_DIR}/signonui-request.h \ $${ONLINE_ACCOUNTS_UI_DIR}/ui-server.h \ mock/request-mock.h \ mock/signonui-request-mock.h \ mock/ui-server-mock.h check.commands += "xvfb-run -s '-screen 0 640x480x24' -a ./$${TARGET}" check.depends = $${TARGET} QMAKE_EXTRA_TARGETS += check ././@LongLink0000000000000000000000000000015400000000000011215 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/tst_provider_request.qrcubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/tst_provider_requ0000644000015600001650000000016412674252514034113 0ustar pbuserpbgroup00000000000000 ProviderRequest.qml ././@LongLink0000000000000000000000000000015400000000000011215 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/tst_provider_request.proubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/tst_provider_requ0000644000015600001650000000243712674252514034120 0ustar pbuserpbgroup00000000000000include(online-accounts-ui.pri) TARGET = tst_provider_request CONFIG += \ link_pkgconfig QT += \ gui \ quick PKGCONFIG += \ accounts-qt5 INCLUDEPATH += \ $${TOP_SRC_DIR}/plugins QMAKE_LIBDIR = $${TOP_BUILD_DIR}/plugins/OnlineAccountsPlugin LIBS += -lonline-accounts-plugin DEFINES += \ NO_REQUEST_FACTORY \ OAU_PLUGIN_DIR=\\\"/tmp\\\" \ PLUGIN_PRIVATE_MODULE_DIR=\\\"/tmp\\\" \ TEST_DATA_DIR=\\\"$${PWD}/data\\\" SOURCES += \ $${ONLINE_ACCOUNTS_UI_DIR}/access-model.cpp \ $${ONLINE_ACCOUNTS_UI_DIR}/debug.cpp \ $${ONLINE_ACCOUNTS_UI_DIR}/i18n.cpp \ $${ONLINE_ACCOUNTS_UI_DIR}/provider-request.cpp \ mock/application-manager-mock.cpp \ mock/request-mock.cpp \ mock/ui-server-mock.cpp \ tst_provider_request.cpp HEADERS += \ $${ONLINE_ACCOUNTS_UI_DIR}/access-model.h \ $${ONLINE_ACCOUNTS_UI_DIR}/i18n.h \ $${ONLINE_ACCOUNTS_UI_DIR}/provider-request.h \ $${ONLINE_ACCOUNTS_UI_DIR}/request.h \ $${ONLINE_ACCOUNTS_UI_DIR}/ui-server.h \ mock/application-manager-mock.h \ mock/request-mock.h \ mock/ui-server-mock.h RESOURCES += \ tst_provider_request.qrc check.commands += "xvfb-run -s '-screen 0 640x480x24' -a dbus-test-runner -t ./$${TARGET}" check.depends = $${TARGET} QMAKE_EXTRA_TARGETS += check ././@LongLink0000000000000000000000000000015000000000000011211 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/tst_access_model.proubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/tst_access_model.0000644000015600001650000000127512674252514033730 0ustar pbuserpbgroup00000000000000include(online-accounts-ui.pri) TARGET = tst_access_model CONFIG += \ link_pkgconfig QT += \ dbus \ qml PKGCONFIG += \ accounts-qt5 INCLUDEPATH += \ $${TOP_SRC_DIR}/plugins QMAKE_LIBDIR = $${TOP_BUILD_DIR}/plugins/OnlineAccountsPlugin LIBS += -lonline-accounts-plugin DEFINES += \ TEST_DATA_DIR=\\\"$${PWD}/data\\\" SOURCES += \ $${ONLINE_ACCOUNTS_UI_DIR}/access-model.cpp \ $${ONLINE_ACCOUNTS_UI_DIR}/debug.cpp \ tst_access_model.cpp HEADERS += \ $${ONLINE_ACCOUNTS_UI_DIR}/access-model.h \ $${ONLINE_ACCOUNTS_UI_DIR}/debug.h check.commands += "xvfb-run -a dbus-test-runner -t ./$${TARGET}" check.depends = $${TARGET} QMAKE_EXTRA_TARGETS += check ././@LongLink0000000000000000000000000000015400000000000011215 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/tst_signonui_request.cppubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/tst_signonui_requ0000644000015600001650000001057612674252514034124 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "globals.h" #include "signonui-request.h" #include "mock/request-mock.h" #include "mock/ui-server-mock.h" #include #include #include #include #include #include #include #include #include using namespace OnlineAccountsUi; class TestRequest: public SignOnUi::Request { Q_OBJECT public: TestRequest(const QString &clientProfile, const QVariantMap ¶meters, QObject *parent = 0): Request(0, clientProfile, parameters, parent) { } void setWindow(QWindow *window) { Request::setWindow(window); } void sendResult(const QVariantMap &result) { setResult(result); } }; class SignonuiRequestTest: public QObject { Q_OBJECT public: SignonuiRequestTest(); private Q_SLOTS: void initTestCase(); void testParameters_data(); void testParameters(); void testHandler(); private: bool mustCreateAccount(uint credentialsId) { return credentialsId > 10; } private: QTemporaryDir m_accountsDir; UiServer m_uiServer; }; SignonuiRequestTest::SignonuiRequestTest(): QObject(), m_uiServer("fake") { } void SignonuiRequestTest::initTestCase() { QVERIFY(m_accountsDir.isValid()); qputenv("ACCOUNTS", m_accountsDir.path().toUtf8()); qputenv("AG_APPLICATIONS", TEST_DATA_DIR); qputenv("AG_PROVIDERS", TEST_DATA_DIR); qputenv("AG_SERVICES", TEST_DATA_DIR); qputenv("XDG_DATA_HOME", TEST_DATA_DIR); } void SignonuiRequestTest::testParameters_data() { QTest::addColumn("parameters"); QTest::addColumn("identity"); QTest::addColumn("method"); QTest::addColumn("mechanism"); QTest::addColumn("ssoId"); QTest::addColumn("clientData"); QTest::newRow("empty") << QVariantMap() << uint(0) << QString() << QString() << QString() << QVariantMap(); QVariantMap clientData; clientData.insert("some number", 4); QVariantMap parameters; parameters.insert(SSOUI_KEY_CLIENT_DATA, clientData); parameters.insert(SSOUI_KEY_IDENTITY, uint(45)); parameters.insert(SSOUI_KEY_METHOD, QString("a method")); parameters.insert(SSOUI_KEY_MECHANISM, QString("a mechanism")); parameters.insert(SSOUI_KEY_REQUESTID, QString("/id-4")); QTest::newRow("basic") << parameters << uint(45) << "a method" << "a mechanism" << "/id-4" << clientData; } void SignonuiRequestTest::testParameters() { QFETCH(QVariantMap, parameters); QFETCH(QString, method); QFETCH(QString, mechanism); QFETCH(QString, ssoId); QFETCH(QVariantMap, clientData); TestRequest request("unconfined", parameters); QCOMPARE(request.method(), method); QCOMPARE(request.mechanism(), mechanism); QCOMPARE(request.ssoId(), ssoId); QCOMPARE(request.clientData(), clientData); } void SignonuiRequestTest::testHandler() { QVariantMap parameters; TestRequest request("unconfined", parameters); QVERIFY(request.handler() == 0); SignOnUi::RequestHandler *handler = new SignOnUi::RequestHandler; request.setHandler(handler); QCOMPARE(request.handler(), handler); /* Try to set another handler; this won't be allowed */ SignOnUi::RequestHandler *handler2 = new SignOnUi::RequestHandler; request.setHandler(handler2); QCOMPARE(request.handler(), handler); delete handler2; delete handler; } QTEST_MAIN(SignonuiRequestTest); #include "tst_signonui_request.moc" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/data/0000755000015600001650000000000012674252771031325 5ustar pbuserpbgroup00000000000000././@LongLink0000000000000000000000000000015100000000000011212 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/data/coolmail.serviceubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/data/coolmail.ser0000644000015600001650000000105312674252514033631 0ustar pbuserpbgroup00000000000000 e-mail Cool Mail general_myservice cool ././@LongLink0000000000000000000000000000014600000000000011216 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/data/applications/ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/data/applications0000755000015600001650000000000012674252771033734 5ustar pbuserpbgroup00000000000000././@LongLink0000000000000000000000000000016400000000000011216 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/data/applications/mailer.desktopubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/data/applications0000644000015600001650000000024312674252514033730 0ustar pbuserpbgroup00000000000000[Desktop Entry] Name=Easy Mailer Comment=Send and receive mail Exec=/bin/sh Icon=mailer-icon Terminal=false Type=Application Categories=Application;Network;Email; ././@LongLink0000000000000000000000000000015300000000000011214 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/data/mailer.applicationubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/data/mailer.appli0000644000015600001650000000101412674252514033614 0ustar pbuserpbgroup00000000000000 Mailer application mailer-catalog mailer.desktop Mailer can retrieve your e-mails Mailer can even share stuff on CoolShare ././@LongLink0000000000000000000000000000020100000000000011206 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/data/com.ubuntu.tests_application.applicationubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/data/com.ubuntu.t0000644000015600001650000000111312674252514033600 0ustar pbuserpbgroup00000000000000 Mailer mailer-catalog mailer.desktop Mailer can retrieve your e-mails Mailer can even share stuff on CoolShare com.ubuntu.tests_application_0.3 ././@LongLink0000000000000000000000000000015200000000000011213 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/data/coolshare.serviceubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/data/coolshare.se0000644000015600001650000000027512674252514033634 0ustar pbuserpbgroup00000000000000 sharing Cool Share general_otherservice cool ././@LongLink0000000000000000000000000000014600000000000011216 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/data/cool.providerubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/data/cool.provide0000644000015600001650000000026012674252514033644 0ustar pbuserpbgroup00000000000000 Cool provider general_myprovider true ././@LongLink0000000000000000000000000000015000000000000011211 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/tst_notification.cppubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/tst_notification.0000644000015600001650000002013212674252514033766 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "notification.h" #include #include #include #include #include #include #include #include #include using namespace OnlineAccountsUi; /* Mocking libnotify: */ static char *appName = NULL; gboolean notify_init(const char *app_name) { appName = g_strdup(app_name); return true; } gboolean notify_is_initted() { return appName != NULL; } typedef QPair ActionPair; struct MockNotification { QString summary; QString body; QList actions; QVariantMap hints; bool visible; MockNotification(); ~MockNotification(); bool invokeAction(const QByteArray &action); void close(); struct CallbackData { NotifyActionCallback callback; gpointer userData; }; QMap callbacks; /* "closed" signal connection */ void (*closedCallback)(gpointer, gpointer); gpointer closedUserData; }; static QSet notifications; MockNotification::MockNotification(): visible(false) { notifications.insert(this); } MockNotification::~MockNotification() { notifications.remove(this); } bool MockNotification::invokeAction(const QByteArray &action) { if (!callbacks.contains(action)) return false; CallbackData &callbackData = callbacks[action]; callbackData.callback(reinterpret_cast(this), (char *)action.data(), callbackData.userData); return true; } void MockNotification::close() { if (!closedCallback) return; closedCallback(closedUserData, this); } gulong g_signal_connect_data(gpointer instance, const gchar *detailed_signal, GCallback c_handler, gpointer data, GClosureNotify destroy_data, GConnectFlags connect_flags) { Q_UNUSED(destroy_data); Q_UNUSED(connect_flags); MockNotification *mock = reinterpret_cast(instance); if (qstrcmp(detailed_signal, "closed") == 0) { mock->closedCallback = (void (*)(gpointer,gpointer))c_handler; mock->closedUserData = data; } else { qWarning() << "Unmocked signal" << detailed_signal; return 0; } return 1; } void g_object_unref(gpointer object) { MockNotification *mock = reinterpret_cast(object); delete mock; } NotifyNotification * notify_notification_new(const char *summary, const char *body, const char *icon) { Q_UNUSED(icon); MockNotification *notification = new MockNotification; notification->summary = QString::fromUtf8(summary); notification->body = QString::fromUtf8(body); return reinterpret_cast(notification); } gboolean notify_notification_show(NotifyNotification *notification, GError **error) { Q_UNUSED(error); MockNotification *mock = reinterpret_cast(notification); mock->visible = true; return true; } void notify_notification_add_action(NotifyNotification *notification, const char *action, const char *label, NotifyActionCallback callback, gpointer user_data, GFreeFunc free_func) { Q_UNUSED(free_func); MockNotification *mock = reinterpret_cast(notification); mock->actions.append(ActionPair(action, label)); MockNotification::CallbackData &callbackData = mock->callbacks[action]; callbackData.callback = callback; callbackData.userData = user_data; } void notify_notification_set_hint(NotifyNotification *notification, const char *key, GVariant *value) { MockNotification *mock = reinterpret_cast(notification); QVariant variant; if (g_variant_is_of_type(value, G_VARIANT_TYPE_BOOLEAN)) { variant = bool(g_variant_get_boolean(value)); } else { /* Add support for any needed types */ qWarning() << "Unsupported variant type"; } mock->hints.insert(QString::fromUtf8(key), variant); } /* End of mock code */ class NotificationTest: public QObject { Q_OBJECT public: NotificationTest(); private Q_SLOTS: void testInitialization(); void testDestruction(); void testContents(); void testSnapDecision(); void testVisibility(); void testClosing(); void testActions(); }; NotificationTest::NotificationTest(): QObject(0) { } void NotificationTest::testInitialization() { Notification first("summary", "body"); QVERIFY(notify_is_initted()); } void NotificationTest::testDestruction() { QVERIFY(notifications.isEmpty()); { Notification one("one", "One"); QCOMPARE(notifications.count(), 1); { Notification two("two", "Two"); QCOMPARE(notifications.count(), 2); } QCOMPARE(notifications.count(), 1); } QCOMPARE(notifications.count(), 0); } void NotificationTest::testContents() { Notification first("Summary", "Body"); MockNotification *mock = *(notifications.begin()); QCOMPARE(mock->summary, QString("Summary")); QCOMPARE(mock->body, QString("Body")); QVERIFY(mock->hints.isEmpty()); } void NotificationTest::testSnapDecision() { Notification first("Summary", "Body"); MockNotification *mock = *(notifications.begin()); QVERIFY(mock->hints.isEmpty()); first.setSnapDecision(true); QCOMPARE(mock->hints["x-canonical-snap-decisions"].toBool(), true); first.setSnapDecision(false); QCOMPARE(mock->hints["x-canonical-snap-decisions"].toBool(), false); } void NotificationTest::testVisibility() { Notification first("Summary", "Body"); MockNotification *mock = *(notifications.begin()); QVERIFY(!mock->visible); first.show(); QVERIFY(mock->visible); } void NotificationTest::testClosing() { Notification notification("Something", "Here"); MockNotification *mock = *(notifications.begin()); QSignalSpy closed(¬ification, SIGNAL(closed())); mock->close(); QCOMPARE(closed.count(), 1); } void NotificationTest::testActions() { Notification notification("Something", "Here"); MockNotification *mock = *(notifications.begin()); QSignalSpy actionInvoked(¬ification, SIGNAL(actionInvoked(const QString &))); notification.addAction("SayHello", "Say Hello"); notification.addAction("ok", "OK"); notification.addAction("cancel", "Cancel"); QCOMPARE(actionInvoked.count(), 0); mock->invokeAction("ok"); QCOMPARE(actionInvoked.count(), 1); QCOMPARE(actionInvoked.at(0).at(0).toString(), QString("ok")); actionInvoked.clear(); mock->invokeAction("cancel"); QCOMPARE(actionInvoked.count(), 1); QCOMPARE(actionInvoked.at(0).at(0).toString(), QString("cancel")); actionInvoked.clear(); mock->invokeAction("SayHello"); QCOMPARE(actionInvoked.count(), 1); QCOMPARE(actionInvoked.at(0).at(0).toString(), QString("SayHello")); } QTEST_MAIN(NotificationTest); #include "tst_notification.moc" ././@LongLink0000000000000000000000000000015400000000000011215 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/tst_signonui_request.proubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/tst_signonui_requ0000644000015600001650000000200612674252514034111 0ustar pbuserpbgroup00000000000000include(online-accounts-ui.pri) TARGET = tst_signonui_request CONFIG += \ link_pkgconfig QT += \ dbus PKGCONFIG += \ accounts-qt5 \ libapparmor \ libsignon-qt5 \ signon-plugins-common INCLUDEPATH += \ $${TOP_SRC_DIR}/plugins QMAKE_LIBDIR = $${TOP_BUILD_DIR}/plugins/OnlineAccountsPlugin LIBS += -lonline-accounts-plugin DEFINES += \ NO_REQUEST_FACTORY \ TEST_DATA_DIR=\\\"$${PWD}/data\\\" SOURCES += \ $${ONLINE_ACCOUNTS_UI_DIR}/debug.cpp \ $${ONLINE_ACCOUNTS_UI_DIR}/signonui-request.cpp \ mock/request-mock.cpp \ mock/qwindow.cpp \ mock/ui-server-mock.cpp \ tst_signonui_request.cpp HEADERS += \ $${ONLINE_ACCOUNTS_UI_DIR}/request.h \ $${ONLINE_ACCOUNTS_UI_DIR}/signonui-request.h \ $${ONLINE_ACCOUNTS_UI_DIR}/ui-server.h \ mock/request-mock.h \ mock/ui-server-mock.h \ window-watcher.h check.commands += "xvfb-run -s '-screen 0 640x480x24' -a dbus-test-runner -t ./$${TARGET}" check.depends = $${TARGET} QMAKE_EXTRA_TARGETS += check ././@LongLink0000000000000000000000000000015200000000000011213 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/online-accounts-ui.proubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/online-accounts-u0000644000015600001650000000027112674252514033675 0ustar pbuserpbgroup00000000000000TEMPLATE = subdirs SUBDIRS = \ qml \ tst_access_model.pro \ tst_browser_request.pro \ tst_notification.pro \ tst_provider_request.pro \ tst_signonui_request.pro ././@LongLink0000000000000000000000000000015300000000000011214 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/tst_browser_request.cppubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/tst_browser_reque0000644000015600001650000002425712674252514034122 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "browser-request.h" #include "debug.h" #include "globals.h" #include "mock/request-mock.h" #include "mock/signonui-request-mock.h" #include "mock/ui-server-mock.h" #include #include #include #include #include #include #include #include using namespace OnlineAccountsUi; class TestRequest: public SignOnUi::BrowserRequest { Q_OBJECT public: TestRequest(const QVariantMap ¶meters, QObject *parent = 0): SignOnUi::BrowserRequest(0, "profile", parameters, parent) { } }; class BrowserRequestTest: public QObject { Q_OBJECT public: BrowserRequestTest(); private Q_SLOTS: void initTestCase(); void testParametersWithHandler_data(); void testParametersWithHandler(); void testSuccessWithHandler(); void testFailureWithHandler(); void testCancelWithHandler(); private: QTemporaryDir m_dataDir; UiServer m_uiServer; }; BrowserRequestTest::BrowserRequestTest(): QObject(), m_uiServer("fake") { } void BrowserRequestTest::initTestCase() { QVERIFY(m_dataDir.isValid()); qputenv("XDG_CACHE_HOME", m_dataDir.path().toUtf8()); } void BrowserRequestTest::testParametersWithHandler_data() { QTest::addColumn("parameters"); QTest::addColumn("providerId"); QTest::addColumn("pageComponentUrl"); QTest::addColumn("startUrl"); QTest::addColumn("finalUrl"); QTest::addColumn("rootDir"); QString baseCacheDir = QString("file://%1/tst_browser_request"). arg(m_dataDir.path()); QTest::newRow("empty") << QVariantMap() << QString() << "DefaultPage.qml" << QString() << QString() << baseCacheDir + "/id-0-"; QVariantMap parameters; QVariantMap clientData; parameters.insert(SSOUI_KEY_OPENURL, "http://localhost/start.html"); parameters.insert(SSOUI_KEY_FINALURL, "http://localhost/end.html"); parameters.insert(SSOUI_KEY_IDENTITY, uint(4)); QTest::newRow("with URLs and ID") << parameters << "google" << "DefaultPage.qml" << "http://localhost/start.html" << "http://localhost/end.html" << baseCacheDir + "/id-4-google"; parameters.clear(); clientData.insert("X-PageComponent", QUrl("file:///usr/share/signon-ui/MyPage.qml")); parameters.insert(SSOUI_KEY_CLIENT_DATA, clientData); parameters.insert(SSOUI_KEY_OPENURL, "http://localhost/start.html"); parameters.insert(SSOUI_KEY_FINALURL, "http://localhost/end.html"); parameters.insert(SSOUI_KEY_IDENTITY, uint(4)); QTest::newRow("with page component") << parameters << "com.ubuntu.app_plugin" << "file:///usr/share/signon-ui/MyPage.qml" << "http://localhost/start.html" << "http://localhost/end.html" << baseCacheDir + "/id-4-com.ubuntu.app_plugin"; parameters.clear(); } void BrowserRequestTest::testParametersWithHandler() { QFETCH(QVariantMap, parameters); QFETCH(QString, providerId); QFETCH(QString, pageComponentUrl); QFETCH(QString, startUrl); QFETCH(QString, finalUrl); QFETCH(QString, rootDir); SignOnUi::RequestHandler handler; QSignalSpy requestChanged(&handler, SIGNAL(requestChanged())); TestRequest request(parameters); SignOnUi::RequestPrivate *mockedRequest = SignOnUi::RequestPrivate::mocked(&request); mockedRequest->setProviderId(providerId); request.setHandler(&handler); request.start(); QCOMPARE(requestChanged.count(), 1); QObject *req = handler.request(); QCOMPARE(req->property("pageComponentUrl").toUrl().toString(), pageComponentUrl); QCOMPARE(req->property("currentUrl").toUrl().toString(), QString()); QCOMPARE(req->property("startUrl").toUrl().toString(), startUrl); QCOMPARE(req->property("finalUrl").toUrl().toString(), finalUrl); QCOMPARE(req->property("rootDir").toString(), rootDir); } void BrowserRequestTest::testSuccessWithHandler() { SignOnUi::RequestHandler handler; QSignalSpy requestChanged(&handler, SIGNAL(requestChanged())); QVariantMap parameters; parameters.insert(SSOUI_KEY_OPENURL, "http://localhost/start.html"); parameters.insert(SSOUI_KEY_FINALURL, "http://localhost/end.html"); parameters.insert(SSOUI_KEY_IDENTITY, uint(4)); TestRequest request(parameters); QSignalSpy completed(&request, SIGNAL(completed())); OnlineAccountsUi::RequestPrivate *mockedRequest = OnlineAccountsUi::RequestPrivate::mocked(&request); QSignalSpy setResultCalled(mockedRequest, SIGNAL(setResultCalled(const QVariantMap &))); request.setHandler(&handler); request.start(); QCOMPARE(requestChanged.count(), 1); QObject *req = handler.request(); QSignalSpy authenticated(req, SIGNAL(authenticated())); /* Go through a couple of pages */ QMetaObject::invokeMethod(req, "onLoadStarted"); QMetaObject::invokeMethod(req, "onLoadFinished", Q_ARG(bool, true)); req->setProperty("currentUrl", QUrl("http://localhost/somewhere")); QCOMPARE(authenticated.count(), 0); /* Pretend a page is failing, but then go to the destination URL before the * fail timer is triggered */ QMetaObject::invokeMethod(req, "onLoadStarted"); QMetaObject::invokeMethod(req, "onLoadFinished", Q_ARG(bool, false)); req->setProperty("currentUrl", QUrl("http://localhost/somewhere-else")); QCOMPARE(authenticated.count(), 0); /* Finally, arrive at the destination URL */ QMetaObject::invokeMethod(req, "onLoadStarted"); QMetaObject::invokeMethod(req, "onLoadFinished", Q_ARG(bool, true)); req->setProperty("currentUrl", QUrl("http://localhost/end.html?code=ciao")); QCOMPARE(authenticated.count(), 1); QCOMPARE(completed.count(), 0); /* Store some cookies */ QVariantList cookieList; QList expectedCookies = QNetworkCookie::parseCookies( "a=1\nb=2"); Q_FOREACH(const QNetworkCookie &c, expectedCookies) { cookieList.append(QVariant::fromValue(c)); } QVariant cookies(cookieList); QMetaObject::invokeMethod(req, "setCookies", Qt::QueuedConnection, Q_ARG(QVariant, cookies)); QVERIFY(completed.wait()); QCOMPARE(completed.count(), 1); QCOMPARE(setResultCalled.count(), 1); QVariantMap results = setResultCalled.at(0).at(0).toMap(); QCOMPARE(results.value(SSOUI_KEY_URLRESPONSE).toString(), QString("http://localhost/end.html?code=ciao")); } void BrowserRequestTest::testFailureWithHandler() { SignOnUi::RequestHandler handler; QSignalSpy requestChanged(&handler, SIGNAL(requestChanged())); QVariantMap parameters; parameters.insert(SSOUI_KEY_OPENURL, "http://localhost/start.html"); parameters.insert(SSOUI_KEY_FINALURL, "http://localhost/end.html"); parameters.insert(SSOUI_KEY_IDENTITY, uint(4)); TestRequest request(parameters); QSignalSpy completed(&request, SIGNAL(completed())); OnlineAccountsUi::RequestPrivate *mockedRequest = OnlineAccountsUi::RequestPrivate::mocked(&request); QSignalSpy setResultCalled(mockedRequest, SIGNAL(setResultCalled(const QVariantMap &))); request.setHandler(&handler); request.start(); QCOMPARE(requestChanged.count(), 1); QObject *req = handler.request(); QSignalSpy authenticated(req, SIGNAL(authenticated())); /* Fail to load a page */ QMetaObject::invokeMethod(req, "onLoadStarted"); QMetaObject::invokeMethod(req, "onLoadFinished", Q_ARG(bool, false)); QVERIFY(completed.wait()); QCOMPARE(completed.count(), 1); QCOMPARE(authenticated.count(), 0); QCOMPARE(setResultCalled.count(), 1); QVariantMap results = setResultCalled.at(0).at(0).toMap(); QVERIFY(results.contains(SSOUI_KEY_ERROR)); } void BrowserRequestTest::testCancelWithHandler() { SignOnUi::RequestHandler handler; QSignalSpy requestChanged(&handler, SIGNAL(requestChanged())); QVariantMap parameters; parameters.insert(SSOUI_KEY_OPENURL, "http://localhost/start.html"); parameters.insert(SSOUI_KEY_FINALURL, "http://localhost/end.html"); parameters.insert(SSOUI_KEY_IDENTITY, uint(4)); TestRequest request(parameters); QSignalSpy completed(&request, SIGNAL(completed())); OnlineAccountsUi::RequestPrivate *mockedRequest = OnlineAccountsUi::RequestPrivate::mocked(&request); QSignalSpy setResultCalled(mockedRequest, SIGNAL(setResultCalled(const QVariantMap &))); request.setHandler(&handler); request.start(); QCOMPARE(requestChanged.count(), 1); requestChanged.clear(); QObject *req = handler.request(); QSignalSpy authenticated(req, SIGNAL(authenticated())); /* Start loading a page, then cancel */ QMetaObject::invokeMethod(req, "onLoadStarted"); QMetaObject::invokeMethod(req, "cancel", Qt::QueuedConnection); QVERIFY(requestChanged.wait()); QCOMPARE(requestChanged.count(), 1); QVERIFY(!handler.request()); QCOMPARE(completed.count(), 1); QCOMPARE(authenticated.count(), 0); QCOMPARE(setResultCalled.count(), 1); QVariantMap results = setResultCalled.at(0).at(0).toMap(); QCOMPARE(results.value(SSOUI_KEY_ERROR).toInt(), int(SignOn::QUERY_ERROR_CANCELED)); } QTEST_MAIN(BrowserRequestTest); #include "tst_browser_request.moc" ././@LongLink0000000000000000000000000000014700000000000011217 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/ProviderRequest.qmlubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/ProviderRequest.q0000644000015600001650000000152312674252514033735 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2015 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ import QtQuick 2.0 Item { id: root property bool wasDenied: false signal denied signal allowed(int accountId) } ././@LongLink0000000000000000000000000000015400000000000011215 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/tst_provider_request.cppubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/tst_provider_requ0000644000015600001650000001303012674252514034107 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "debug.h" #include "globals.h" #include "mock/application-manager-mock.h" #include "mock/request-mock.h" #include "mock/ui-server-mock.h" #include "provider-request.h" #include #include #include #include #include #include #include #include using namespace OnlineAccountsUi; namespace QTest { template<> char *toString(const QVariantMap &p) { QJsonDocument doc(QJsonObject::fromVariantMap(p)); QByteArray ba = doc.toJson(QJsonDocument::Compact); return qstrdup(ba.data()); } } // QTest namespace class TestRequest: public ProviderRequest { Q_OBJECT public: TestRequest(const QVariantMap ¶meters, const QString &profile, QObject *parent = 0): ProviderRequest("interface", 0, profile, parameters, parent) { } }; class ProviderRequestTest: public QObject { Q_OBJECT public: ProviderRequestTest(); private Q_SLOTS: void initTestCase(); void testParameters_data(); void testParameters(); private: UiServer m_uiServer; }; ProviderRequestTest::ProviderRequestTest(): QObject(), m_uiServer("fake") { } void ProviderRequestTest::initTestCase() { qputenv("ACCOUNTS", "/tmp/"); qputenv("AG_APPLICATIONS", TEST_DATA_DIR); qputenv("AG_SERVICES", TEST_DATA_DIR); qputenv("AG_SERVICE_TYPES", TEST_DATA_DIR); qputenv("AG_PROVIDERS", TEST_DATA_DIR); qputenv("XDG_DATA_HOME", TEST_DATA_DIR); } void ProviderRequestTest::testParameters_data() { QTest::addColumn("parameters"); QTest::addColumn("profile"); QTest::addColumn("providerId"); QTest::addColumn("providerInfo"); QTest::addColumn("applicationInfo"); QTest::addColumn("errorName"); QTest::newRow("empty") << QVariantMap() << QString() << QString() << QVariantMap() << QVariantMap() << OAU_ERROR_INVALID_APPLICATION; QVariantMap parameters; QVariantMap providerInfo; QVariantMap applicationInfo; parameters.insert(OAU_KEY_APPLICATION, "Gallery"); parameters.insert(OAU_KEY_PROVIDER, "my provider"); providerInfo.insert("some", "value"); applicationInfo.insert("one", "two"); QTest::newRow("confined app") << parameters << "my-app" << "my provider" << providerInfo << applicationInfo << ""; parameters.clear(); providerInfo.clear(); applicationInfo.clear(); parameters.insert(OAU_KEY_APPLICATION, "Gallery"); parameters.insert(OAU_KEY_SERVICE_ID, "coolmail"); providerInfo.insert("name", "cool"); applicationInfo.insert("one", "two"); QTest::newRow("by service ID") << parameters << "my-app" << "cool" << providerInfo << applicationInfo << ""; parameters.clear(); providerInfo.clear(); applicationInfo.clear(); } void ProviderRequestTest::testParameters() { QFETCH(QVariantMap, parameters); QFETCH(QString, profile); QFETCH(QString, providerId); QFETCH(QVariantMap, providerInfo); QFETCH(QVariantMap, applicationInfo); QFETCH(QString, errorName); TestRequest request(parameters, profile); RequestPrivate *mockedRequest = RequestPrivate::mocked(&request); QSignalSpy setWindowCalled(mockedRequest, SIGNAL(setWindowCalled(QWindow*))); QSignalSpy failCalled(mockedRequest, SIGNAL(failCalled(const QString&, const QString&))); ApplicationManager *appManager = ApplicationManager::instance(); ApplicationManagerPrivate *mockedAppManager = ApplicationManagerPrivate::mocked(appManager); mockedAppManager->setApplicationInfo(parameters[OAU_KEY_APPLICATION].toString(), applicationInfo); mockedAppManager->setProviderInfo(providerId, providerInfo); QSignalSpy applicationInfoCalled(mockedAppManager, SIGNAL(applicationInfoCalled(QString,QString))); request.start(); if (errorName.isEmpty()) { QTRY_COMPARE(setWindowCalled.count(), 1); QQuickView *view = static_cast(setWindowCalled.at(0).at(0).value()); QQmlContext *context = view->engine()->rootContext(); QCOMPARE(applicationInfoCalled.count(), 1); QCOMPARE(applicationInfoCalled.at(0).at(1).toString(), profile); QCOMPARE(context->contextProperty("provider").toMap(), providerInfo); QCOMPARE(context->contextProperty("application").toMap(), applicationInfo); } else { QTRY_COMPARE(failCalled.count(), 1); QCOMPARE(failCalled.at(0).at(0).toString(), errorName); } } QTEST_MAIN(ProviderRequestTest); #include "tst_provider_request.moc" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/window-watcher.h0000644000015600001650000000244412674252514033526 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef WINDOW_WATCHER_H #define WINDOW_WATCHER_H #include #include class WindowWatcher: public QObject { Q_OBJECT public: static WindowWatcher *instance() { if (!m_instance) { m_instance = new WindowWatcher; } return m_instance; } void emitWindowShown(QWindow *w) { Q_EMIT windowShown(w); } Q_SIGNALS: void windowShown(QObject *); protected: WindowWatcher(): QObject() {} private: static WindowWatcher *m_instance; }; #endif // WINDOW_WATCHER_H ././@LongLink0000000000000000000000000000015000000000000011211 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/tst_notification.proubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/tst_notification.0000644000015600001650000000061712674252514033774 0ustar pbuserpbgroup00000000000000include(online-accounts-ui.pri) TARGET = tst_notification CONFIG += \ link_pkgconfig \ no_keywords PKGCONFIG += \ libnotify SOURCES += \ $${COMMON_SRC_DIR}/notification.cpp \ tst_notification.cpp HEADERS += \ $${COMMON_SRC_DIR}/notification.h check.commands = "xvfb-run -s '-screen 0 640x480x24' -a ./$${TARGET}" check.depends = $${TARGET} QMAKE_EXTRA_TARGETS += check ././@LongLink0000000000000000000000000000015200000000000011213 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/online-accounts-ui.priubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/online-accounts-ui/online-accounts-u0000644000015600001650000000064712674252514033704 0ustar pbuserpbgroup00000000000000include(../../common-project-config.pri) CONFIG += \ debug QT += \ core \ testlib DEFINES += \ DEBUG_ENABLED ONLINE_ACCOUNTS_UI_DIR = $${TOP_SRC_DIR}/online-accounts-ui COMMON_SRC_DIR = $${TOP_SRC_DIR}/online-accounts-ui INCLUDEPATH += \ $${ONLINE_ACCOUNTS_SERVICE_DIR} \ $${COMMON_SRC_DIR} check.commands = "LD_LIBRARY_PATH=$${TOP_BUILD_DIR}/plugins/OnlineAccountsPlugin:${LD_LIBRARY_PATH} " ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/plugin/0000755000015600001650000000000012674252771026176 5ustar pbuserpbgroup00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/plugin/tst_application_manager.cpp0000644000015600001650000005536712674252514033604 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "application-manager.h" #include #include #include #include #include #include #include #include #include #define TEST_DIR "/tmp/tst_application_manager" using namespace OnlineAccountsUi; namespace QTest { template<> char *toString(const QSet &set) { QByteArray ba = "QSet("; QStringList list = set.toList(); ba += list.join(", "); ba += ")"; return qstrdup(ba.data()); } } // QTest namespace class ApplicationManagerTest: public QObject { Q_OBJECT public: ApplicationManagerTest(); private Q_SLOTS: void initTestCase(); void testNonExistingApp(); void testApplicationInfo_data(); void testApplicationInfo(); void testAclAdd_data(); void testAclAdd(); void testAclRemove_data(); void testAclRemove(); void testApplicationFromProfile_data(); void testApplicationFromProfile(); void testProviderInfo_data(); void testProviderInfo(); void testUsefulProviders_data(); void testUsefulProviders(); private: void clearApplicationsDir(); void clearProvidersDir(); void clearTestDir(); void writeAccountsFile(const QString &name, const QString &contents); private: QDir m_testDir; QDir m_accountsDir; }; ApplicationManagerTest::ApplicationManagerTest(): QObject(0), m_testDir(TEST_DIR), m_accountsDir(TEST_DIR "/accounts") { } void ApplicationManagerTest::clearApplicationsDir() { QDir applicationsDir = m_accountsDir; if (applicationsDir.cd("applications")) { applicationsDir.removeRecursively(); applicationsDir.mkpath("."); } } void ApplicationManagerTest::clearProvidersDir() { QDir providersDir = m_accountsDir; if (providersDir.cd("providers")) { providersDir.removeRecursively(); providersDir.mkpath("."); } } void ApplicationManagerTest::clearTestDir() { m_testDir.removeRecursively(); m_testDir.mkpath("."); } void ApplicationManagerTest::writeAccountsFile(const QString &name, const QString &contents) { /* Create files into the appropriate directory: * .provider files go in "providers", .application in "applications" and so * on: so we just need to take the file extension and add one "s". */ QFileInfo fileInfo(name); QString subDirName = fileInfo.suffix() + "s"; m_accountsDir.mkpath(subDirName); QDir subDir = m_accountsDir; subDir.cd(subDirName); QFile file(subDir.filePath(name)); if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) { qWarning() << "Could not write file" << name; return; } file.write(contents.toUtf8()); } void ApplicationManagerTest::initTestCase() { qputenv("ACCOUNTS", TEST_DIR); qputenv("XDG_DATA_HOME", TEST_DIR); qputenv("XDG_DATA_DIRS", TEST_DIR); clearTestDir(); /* Create a few service files */ writeAccountsFile("cool-mail.service", "\n" "\n" " tstemail\n" " Cool Mail\n" " cool\n" ""); writeAccountsFile("cool-sharing.service", "\n" "\n" " tstsharing\n" " Cool Sharing\n" " cool\n" ""); writeAccountsFile("bad-mail.service", "\n" "\n" " tstemail\n" " Bad Mail\n" " bad\n" ""); writeAccountsFile("bad-sharing.service", "\n" "\n" " tstsharing\n" " Bad Sharing\n" " bad\n" ""); /* And the relative providers */ writeAccountsFile("cool.provider", "\n" "\n" " Cool provider\n" ""); writeAccountsFile("bad.provider", "\n" "\n" " Bad provider\n" ""); } void ApplicationManagerTest::testNonExistingApp() { ApplicationManager manager; QVariantMap info = manager.applicationInfo("com.ubuntu.test_MyApp", "com.ubuntu.test_MyApp_0.1"); QVERIFY(info.isEmpty()); QStringList acl; acl << "one" << "two"; QStringList newAcl = manager.addApplicationToAcl(acl, "com.ubuntu.test_MyApp"); QCOMPARE(newAcl, acl); newAcl = manager.removeApplicationFromAcl(acl, "com.ubuntu.test_MyApp"); QCOMPARE(newAcl, acl); } void ApplicationManagerTest::testApplicationInfo_data() { QTest::addColumn("applicationId"); QTest::addColumn("contents"); QTest::addColumn("inputProfile"); QTest::addColumn("expectedProfile"); QTest::addColumn("services"); QTest::newRow("no-services") << "com.ubuntu.test_MyApp" << "\n" "\n" " My application\n" " com.ubuntu.test_MyApp_0.2\n" "" << "com.ubuntu.test_MyApp_0.2" << "com.ubuntu.test_MyApp_0.2" << QStringList(); QTest::newRow("no-valid-services") << "com.ubuntu.test_MyApp2" << "\n" "\n" " My application 2\n" " \n" " Do something\n" " \n" " com.ubuntu.test_MyApp2_0.2\n" "" << "com.ubuntu.test_MyApp2_0.2" << "com.ubuntu.test_MyApp2_0.2" << QStringList(); QTest::newRow("email-services") << "com.ubuntu.test_MyApp3" << "\n" "\n" " My application 3\n" " \n" " \n" " Send email\n" " \n" " \n" " com.ubuntu.test_MyApp3_0.2\n" "" << "com.ubuntu.test_MyApp3_0.2" << "com.ubuntu.test_MyApp3_0.2" << (QStringList() << "cool-mail" << "bad-mail"); QTest::newRow("cool-services") << "com.ubuntu.test_MyApp4" << "\n" "\n" " My application 4\n" " \n" " \n" " Send email\n" " \n" " \n" " Share stuff\n" " \n" " \n" " com.ubuntu.test_MyApp4_0.2\n" "" << "com.ubuntu.test_MyApp4_0.2" << "com.ubuntu.test_MyApp4_0.2" << (QStringList() << "cool-mail" << "cool-sharing"); QTest::newRow("unconfined app") << "com.ubuntu.test_UnconfinedApp" << "\n" "\n" " My application 5\n" " \n" " \n" " Send email\n" " \n" " \n" " com.ubuntu.test_UnconfinedApp_0.2\n" "" << "unconfined" << "com.ubuntu.test_UnconfinedApp_0.2" << (QStringList() << "cool-mail"); QTest::newRow("unconfined app, no profile") << "com.ubuntu.test_UnconfinedApp2" << "\n" "\n" " My application 6\n" " \n" " \n" " Send email\n" " \n" " \n" "" << "unconfined" << "unconfined" << (QStringList() << "cool-mail"); } void ApplicationManagerTest::testApplicationInfo() { clearApplicationsDir(); QFETCH(QString, applicationId); QFETCH(QString, contents); QFETCH(QString, inputProfile); QFETCH(QString, expectedProfile); QFETCH(QStringList, services); writeAccountsFile(applicationId + ".application", contents); ApplicationManager manager; QVariantMap info = manager.applicationInfo(applicationId, inputProfile); QCOMPARE(info.value("id").toString(), applicationId); QCOMPARE(info.value("profile").toString(), expectedProfile); QCOMPARE(info.value("services").toStringList().toSet(), services.toSet()); } void ApplicationManagerTest::testAclAdd_data() { QTest::addColumn("applicationId"); QTest::addColumn("oldAcl"); QTest::addColumn("newAcl"); QTest::newRow("add to empty") << "com.ubuntu.test_One" << QStringList() << (QStringList() << "com.ubuntu.test_One_0.1"); QTest::newRow("add to one") << "com.ubuntu.test_One" << (QStringList() << "some app") << (QStringList() << "some app" << "com.ubuntu.test_One_0.1"); QTest::newRow("add existing") << "com.ubuntu.test_One" << (QStringList() << "com.ubuntu.test_One_0.1" << "some app") << (QStringList() << "com.ubuntu.test_One_0.1" << "some app"); } void ApplicationManagerTest::testAclAdd() { clearApplicationsDir(); writeAccountsFile("com.ubuntu.test_One.application", "\n" "\n" " My application\n" " com.ubuntu.test_One_0.1\n" ""); writeAccountsFile("com.ubuntu.test_Two.application", "\n" "\n" " My application\n" " com.ubuntu.test_Two_0.2\n" ""); QFETCH(QString, applicationId); QFETCH(QStringList, oldAcl); QFETCH(QStringList, newAcl); ApplicationManager manager; QStringList acl = manager.addApplicationToAcl(oldAcl, applicationId); QCOMPARE(acl.toSet(), newAcl.toSet()); } void ApplicationManagerTest::testAclRemove_data() { QTest::addColumn("applicationId"); QTest::addColumn("oldAcl"); QTest::addColumn("newAcl"); QTest::newRow("remove from empty") << "com.ubuntu.test_One" << QStringList() << QStringList(); QTest::newRow("remove from one") << "com.ubuntu.test_One" << (QStringList() << "com.ubuntu.test_One_0.1") << QStringList(); QTest::newRow("remove from two") << "com.ubuntu.test_One" << (QStringList() << "com.ubuntu.test_One_0.1" << "some app") << (QStringList() << "some app"); QTest::newRow("remove from missing") << "com.ubuntu.test_One" << (QStringList() << "some other app" << "some app") << (QStringList() << "some other app" << "some app"); QTest::newRow("remove multiple versions") << "com.ubuntu.test_One" << (QStringList() << "some other app" << "com.ubuntu.test_One_0.1" << "com.ubuntu.test_One_0.3" << "some app" << "com.ubuntu.test_One_0.2") << (QStringList() << "some other app" << "some app"); } void ApplicationManagerTest::testAclRemove() { clearApplicationsDir(); writeAccountsFile("com.ubuntu.test_One.application", "\n" "\n" " My application\n" " com.ubuntu.test_One_0.1\n" ""); writeAccountsFile("com.ubuntu.test_Two.application", "\n" "\n" " My application\n" " com.ubuntu.test_Two_0.2\n" ""); QFETCH(QString, applicationId); QFETCH(QStringList, oldAcl); QFETCH(QStringList, newAcl); ApplicationManager manager; QStringList acl = manager.removeApplicationFromAcl(oldAcl, applicationId); QCOMPARE(acl.toSet(), newAcl.toSet()); } void ApplicationManagerTest::testApplicationFromProfile_data() { QTest::addColumn("applicationId"); QTest::addColumn("contents"); QTest::addColumn("profile"); QTest::addColumn("isValid"); QTest::newRow("id-same-as-profile") << "com.ubuntu.test_MyApp_0.2" << "\n" "\n" " My application\n" " com.ubuntu.test_MyApp_0.2\n" "" << "com.ubuntu.test_MyApp_0.2" << true; QTest::newRow("id-with-no-version") << "com.ubuntu.test_MyApp2" << "\n" "\n" " My application 2\n" " com.ubuntu.test_MyApp2_0.2\n" "" << "com.ubuntu.test_MyApp2_0.2" << true; QTest::newRow("id-is-just-package") << "com.ubuntu.test" << "\n" "\n" " My application 3\n" " com.ubuntu.test_MyApp3_0.2\n" "" << "com.ubuntu.test_MyApp3_0.2" << true; QTest::newRow("not found") << "com.ubuntu.test_MyApp5" << "\n" "\n" " My application 4\n" " com.ubuntu.test_MyApp4_0.2\n" "" << "com.ubuntu.test_MyApp4_0.2" << false; } void ApplicationManagerTest::testApplicationFromProfile() { clearApplicationsDir(); QFETCH(QString, applicationId); QFETCH(QString, contents); QFETCH(QString, profile); QFETCH(bool, isValid); writeAccountsFile(applicationId + ".application", contents); ApplicationManager manager; Accounts::Application app = manager.applicationFromProfile(profile); if (!isValid) { QVERIFY(!app.isValid()); } else { QVERIFY(app.isValid()); QCOMPARE(app.name(), applicationId); } } void ApplicationManagerTest::testProviderInfo_data() { QTest::addColumn("providerId"); QTest::addColumn("contents"); QTest::addColumn("profile"); QTest::addColumn("packageDir"); QTest::addColumn("isSingleAccount"); QTest::newRow("no profile") << "com.ubuntu.test_MyPlugin" << "\n" "\n" " My Plugin\n" "" << QString() << QString() << false; QTest::newRow("single account") << "com.ubuntu.test_MyPlugin" << "\n" "\n" " My Plugin\n" " true\n" "" << QString() << QString() << true; QTest::newRow("no package-dir") << "com.ubuntu.test_MyPlugin2" << "\n" "\n" " My Plugin\n" " com.ubuntu.test_MyPlugin2_0.2\n" " false\n" "" << "com.ubuntu.test_MyPlugin2_0.2" << QString() << false; QTest::newRow("with package-dir") << "com.ubuntu.test_MyPlugin3" << "\n" "\n" " My Plugin\n" " com.ubuntu.test_MyPlugin3_0.2\n" " /opt/click.ubuntu.com/something\n" "" << "com.ubuntu.test_MyPlugin3_0.2" << "/opt/click.ubuntu.com/something" << false; } void ApplicationManagerTest::testProviderInfo() { clearProvidersDir(); QFETCH(QString, providerId); QFETCH(QString, contents); QFETCH(QString, profile); QFETCH(QString, packageDir); QFETCH(bool, isSingleAccount); writeAccountsFile(providerId + ".provider", contents); ApplicationManager manager; QVariantMap info = manager.providerInfo(providerId); QCOMPARE(info.value("id").toString(), providerId); QCOMPARE(info.value("profile").toString(), profile); QCOMPARE(info.value("package-dir").toString(), packageDir); QCOMPARE(info.value("isSingleAccount").toBool(), isSingleAccount); } void ApplicationManagerTest::testUsefulProviders_data() { QTest::addColumn("applicationIds"); QTest::addColumn("contents"); QTest::addColumn("expectedProviders"); QStringList applicationIds; QStringList contents; applicationIds << "com.ubuntu.test_MyApp"; contents << "\n" "\n" " My application\n" ""; QTest::newRow("no-services") << applicationIds << contents << QStringList(); applicationIds.clear(); contents.clear(); applicationIds << "com.ubuntu.test_MyApp2"; contents << "\n" "\n" " My application 2\n" " \n" " Do something\n" " \n" ""; QTest::newRow("no-valid-services") << applicationIds << contents << QStringList(); applicationIds.clear(); contents.clear(); applicationIds << "com.ubuntu.test_MyApp3"; contents << "\n" "\n" " My application 3\n" " \n" " \n" " Send email\n" " \n" " \n" ""; QTest::newRow("email-services") << applicationIds << contents << (QStringList() << "cool" << "bad"); applicationIds.clear(); contents.clear(); applicationIds << "com.ubuntu.test_MyApp4"; contents << "\n" "\n" " My application 4\n" " \n" " \n" " Send email\n" " \n" " \n" " Share stuff\n" " \n" " \n" ""; QTest::newRow("cool-services") << applicationIds << contents << (QStringList() << "cool"); applicationIds.clear(); contents.clear(); applicationIds << "com.ubuntu.test_MyApp5" << "com.ubuntu.test_MyApp6"; contents << "\n" "\n" " My application 5\n" " \n" " \n" " Send email\n" " \n" " \n" "" << "\n" "\n" " My application 6\n" " \n" " \n" " Share stuff\n" " \n" " \n" ""; QTest::newRow("two apps") << applicationIds << contents << (QStringList() << "cool" << "bad"); applicationIds.clear(); contents.clear(); } void ApplicationManagerTest::testUsefulProviders() { clearApplicationsDir(); QFETCH(QStringList, applicationIds); QFETCH(QStringList, contents); QFETCH(QStringList, expectedProviders); for (int i = 0; i < applicationIds.count(); i++) { writeAccountsFile(applicationIds[i] + ".application", contents[i]); } ApplicationManager manager; QStringList providers = manager.usefulProviders(); QCOMPARE(providers.toSet(), expectedProviders.toSet()); } QTEST_GUILESS_MAIN(ApplicationManagerTest); #include "tst_application_manager.moc" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/plugin/tst_application_manager.pro0000644000015600001650000000115512674252514033604 0ustar pbuserpbgroup00000000000000include(plugin.pri) TARGET = tst_application_manager CONFIG += \ link_pkgconfig QT += \ dbus \ qml QT -= gui PKGCONFIG += \ accounts-qt5 DEFINES += \ TEST_DATA_DIR=\\\"$${PWD}/data\\\" SOURCES += \ $${ONLINE_ACCOUNTS_PLUGIN_DIR}/application-manager.cpp \ $${ONLINE_ACCOUNTS_PLUGIN_DIR}/account-manager.cpp \ tst_application_manager.cpp HEADERS += \ $${ONLINE_ACCOUNTS_PLUGIN_DIR}/application-manager.h \ $${ONLINE_ACCOUNTS_PLUGIN_DIR}/account-manager.h check.commands = "xvfb-run -a dbus-test-runner -t ./$${TARGET}" check.depends = $${TARGET} QMAKE_EXTRA_TARGETS += check ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/plugin/plugin.pro0000644000015600001650000000007712674252514030215 0ustar pbuserpbgroup00000000000000TEMPLATE = subdirs SUBDIRS = \ tst_application_manager.pro ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/plugin/plugin.pri0000644000015600001650000000051512674252514030204 0ustar pbuserpbgroup00000000000000include(../../common-project-config.pri) CONFIG += \ debug QT += \ core \ testlib DEFINES += \ DEBUG_ENABLED ONLINE_ACCOUNTS_PLUGIN_DIR = $${TOP_SRC_DIR}/plugins/OnlineAccountsPlugin COMMON_SRC_DIR = $${TOP_SRC_DIR}/online-accounts-ui INCLUDEPATH += \ $${ONLINE_ACCOUNTS_PLUGIN_DIR} \ $${COMMON_SRC_DIR} ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/autopilot/0000755000015600001650000000000012674252771026720 5ustar pbuserpbgroup00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/autopilot/autopilot.pro0000644000015600001650000000125712674252514031462 0ustar pbuserpbgroup00000000000000include(../../common-project-config.pri) TEMPLATE = aux autopilot.path = $${INSTALL_PREFIX}/lib/python3/dist-packages/ autopilot.files = online_accounts_ui INSTALLS += autopilot service.path = $${INSTALL_PREFIX}/share/accounts/services service.files = \ data/ussoa-fake-service.service \ data/ussoa-test-login-photos.service INSTALLS += service provider.path = $${INSTALL_PREFIX}/share/accounts/providers provider.files = \ data/ussoa-fake-oauth.provider \ data/ussoa-test-login.provider INSTALLS += provider application.path = $${INSTALL_PREFIX}/share/accounts/applications application.files = \ data/ussoa-integration-tests.application INSTALLS += application ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/autopilot/online_accounts_ui/0000755000015600001650000000000012674252771032600 5ustar pbuserpbgroup00000000000000././@LongLink0000000000000000000000000000015100000000000011212 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/autopilot/online_accounts_ui/__init__.pyubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/autopilot/online_accounts_ui/__init_0000644000015600001650000001511412674252514034120 0ustar pbuserpbgroup00000000000000# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- # # Copyright (C) 2013, 2014 Canonical Ltd. # # This file is part of ubuntu-system-settings-online-accounts. # # ubuntu-system-settings-online-accounts is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public # License as published by the Free Software Foundation; version 3. # # ubuntu-system-settings-online-accounts is distributed in the hope that it # will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . import logging # TODO This is a workaround for bug #1327325 that will make phabet-test-run # fail if something is printed to stdout. --elopio - 2014-07-03 logging.basicConfig(filename='warning.log', level=logging.WARNING) import autopilot.logging import ubuntuuitoolkit logger = logging.getLogger(__name__) class OnlineAccountsUIException(ubuntuuitoolkit.ToolkitException): """Exception raised when there is a problem with Online Accounts UI.""" class OnlineAccountsUI(): """Autopilot helper for the Online Accounts UI.""" def __init__(self, application_proxy): super().__init__() self.application_proxy = application_proxy self.main_view = self.application_proxy.wait_select_single(MainWindow) class MainWindow(ubuntuuitoolkit.MainView): """Autopilot helper for the Main View.""" @property def no_accounts_page(self): page = self.select_single(NoAccountsPage) try: page.visible.wait_for(True) return page except AssertionError: raise OnlineAccountsUIException( 'The No Accounts page is not visible.') @property def accounts_page(self): page = self.select_single(AccountsPage) try: page.visible.wait_for(True) return page except AssertionError: raise OnlineAccountsUIException('The Accounts page is not visible') @autopilot.logging.log_action(logger.info) def add_test_login_account(self, user_name, password): account_creation_page = self.no_accounts_page.go_to_add_account( 'TestLogin') account_creation_page.create_new_account(user_name, password) return self.accounts_page class NoAccountsPage(ubuntuuitoolkit.QQuickFlickable): """Autopilot helper for the No Accounts Page.""" def get_providers(self): """Return the list of account providers.""" provider_plugin_list = self._get_provider_plugin_list() provider_items = provider_plugin_list.select_many( ubuntuuitoolkit.listitems.Standard) # sort by y provider_items = sorted( provider_items, key=lambda item: (item.globalRect.y, item.globalRect.x)) result = [] for item in provider_items: result.append(item.text) return result def _get_provider_plugin_list(self): return self.select_single(ProviderPluginList) class ProviderPluginList(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase): """Autopilot helper for the Provider Plugin list.""" @autopilot.logging.log_action(logger.debug) def click_provider(self, name): """Click a provider item. :param name: The name of the provider to click. """ provider_item = self.select_single( ubuntuuitoolkit.listitems.Standard, text=name) provider_item.swipe_into_view() self.pointing_device.click_object(provider_item) class NewAccount(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase): """Autopilot helper for the New Account form.""" @autopilot.logging.log_action(logger.debug) def fill(self, user_name, password): """Fill the form. :param user_name: The user name of the account. :param password: The password of the account. """ username_text_field = self.select_single( ubuntuuitoolkit.TextField, objectName='usernameField') username_text_field.write(user_name) password_text_field = self.select_single( ubuntuuitoolkit.TextField, objectName='passwordField') password_text_field.write(password) self._click_continue() @autopilot.logging.log_action(logger.debug) def _click_continue(self): continue_button = self.select_single( 'Button', objectName='continueButton') self.pointing_device.click_object(continue_button) class AccountsPage(ubuntuuitoolkit.QQuickFlickable): """Autopilot helper for the Accounts Page.""" def get_accounts(self): """Return the list of accounts.""" account_items = self.select_many(AccountItem) # sort by y account_items = sorted( account_items, key=lambda item: (item.globalRect.y, item.globalRect.x)) result = [] for item in account_items: result.append(item.get_information()) return result @autopilot.logging.log_action(logger.info) def delete_account(self, provider_name, user_name): account_item = self.select_single( AccountItem, text=provider_name, subText=user_name) self.pointing_device.click_object(account_item) account_edit_page = self.get_root_instance().select_single( AccountEditPage) account_edit_page.visible.wait_for(True) account_edit_page.remove_account() account_item.wait_until_destroyed() class AccountItem(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase): """Autopilot helper for the Account item.""" def get_information(self): """Return the information of the account. :return: A tuple with the provider name and the user name. """ return self.text, self.subText class AccountEditPage(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase): """Autopilot helper for the Account Edit page.""" @autopilot.logging.log_action(logger.debug) def remove_account(self): remove_account_button = self.select_single('Button') self.pointing_device.click_object(remove_account_button) self._confirm_removal() def _confirm_removal(self): removal_dialog = self.get_root_instance().select_single( 'RemovalConfirmation') remove_button = removal_dialog.select_single('Button', text='Remove') self.pointing_device.click_object(remove_button) ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/autopilot/online_accounts_ui/tests/0000755000015600001650000000000012674252771033742 5ustar pbuserpbgroup00000000000000././@LongLink0000000000000000000000000000015700000000000011220 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/autopilot/online_accounts_ui/tests/__init__.pyubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/autopilot/online_accounts_ui/tests/_0000644000015600001650000000352212674252514034100 0ustar pbuserpbgroup00000000000000# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- # # Copyright (C) 2013, 2014 Canonical Ltd. # # This file is part of ubuntu-system-settings-online-accounts. # # ubuntu-system-settings-online-accounts is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public # License as published by the Free Software Foundation; version 3. # # ubuntu-system-settings-online-accounts is distributed in the hope that it # will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . import fixtures import subprocess import time import ubuntuuitoolkit from autopilot import platform from autopilot.matchers import Eventually from testtools.matchers import Equals import online_accounts_ui class BaseOnlineAccountsUITestCase( ubuntuuitoolkit.base.UbuntuUIToolkitAppTestCase): def setUp(self): super(BaseOnlineAccountsUITestCase, self).setUp() application_proxy = self.launch_application() self.application = online_accounts_ui.OnlineAccountsUI( application_proxy) self.assertThat( self.application.main_view.visible, Eventually(Equals(True))) def launch_application(self): application = self.launch_test_application( 'system-settings', 'online-accounts', '--desktop_file_hint=' '/usr/share/applications/ubuntu-system-settings.desktop', app_type='qt', emulator_base=ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase, capture_output=True) time.sleep(1) return application ././@LongLink0000000000000000000000000000017600000000000011221 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/autopilot/online_accounts_ui/tests/test_online_accounts_ui.pyubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/autopilot/online_accounts_ui/tests/t0000644000015600001650000000435612674252514034133 0ustar pbuserpbgroup00000000000000#! /usr/bin/env python3 # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- # # Copyright (C) 2013, 2014 Canonical Ltd. # Contact: Alberto Mardegan # # This file is part of ubuntu-system-settings-online-accounts. # # ubuntu-system-settings-online-accounts is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public # License as published by the Free Software Foundation; version 3. # # ubuntu-system-settings-online-accounts is distributed in the hope that it # will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . from online_accounts_ui import tests # You can find a couple of OAuth 1.0a and 2.0 tests in the repository history # (bazaar revision 100). # These tests were removed because the signon-ui window where the webview is # hosted will not be focused properly, both in Mir # (https://bugs.launchpad.net/bugs/1231968) and Compiz # (https://bugs.launchpad.net/bugs/455241) # This issue will be solved when we move the signon-ui implementation in the # same process as online-accounts-ui class MainViewTestCase(tests.BaseOnlineAccountsUITestCase): def test_title(self): """Checks whether the Online Accounts window title is correct.""" # TODO turn this into a QML test. --elopio - 2014-07-03 header = self.application.main_view.get_header() self.assertTrue(header.visible) self.assertEquals(header.title, 'Accounts') class AvailableProvidersTestCase(tests.BaseOnlineAccountsUITestCase): required_providers = ['FakeOAuth', 'TestLogin'] scenarios = [(provider, {'provider': provider}) for provider in required_providers] def test_available_providers(self): """Checks whether all the expected providers are available.""" no_accounts_page = self.application.main_view.no_accounts_page available_providers = no_accounts_page.get_providers() self.assertIn(self.provider, available_providers) ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/autopilot/data/0000755000015600001650000000000012674252771027631 5ustar pbuserpbgroup00000000000000././@LongLink0000000000000000000000000000016300000000000011215 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/autopilot/data/ussoa-integration-tests.applicationubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/autopilot/data/ussoa-integration-tes0000644000015600001650000000060112674252514034010 0ustar pbuserpbgroup00000000000000 IntegrationTests Integration test 1 Integration test 2 ././@LongLink0000000000000000000000000000015100000000000011212 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/autopilot/data/ussoa-fake-oauth.providerubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/autopilot/data/ussoa-fake-oauth.prov0000644000015600001650000000171312674252514033712 0ustar pbuserpbgroup00000000000000 FakeOAuth fake-oauth account-plugins .*example\.com generic-oauth ././@LongLink0000000000000000000000000000015100000000000011212 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/autopilot/data/ussoa-test-login.providerubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/autopilot/data/ussoa-test-login.prov0000644000015600001650000000057612674252514033761 0ustar pbuserpbgroup00000000000000 TestLogin test-login account-plugins .*example\.com ././@LongLink0000000000000000000000000000015700000000000011220 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/autopilot/data/ussoa-test-login-photos.serviceubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/autopilot/data/ussoa-test-login-phot0000644000015600001650000000030212674252514033727 0ustar pbuserpbgroup00000000000000 ussoa-test-photos TestLogin Photos ussoa-test-login ././@LongLink0000000000000000000000000000015200000000000011213 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/autopilot/data/ussoa-fake-service.serviceubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/autopilot/data/ussoa-fake-service.se0000644000015600001650000000026212674252514033651 0ustar pbuserpbgroup00000000000000 other Integration tests ussoa-fake-oauth ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/click-hooks/0000755000015600001650000000000012674252771027106 5ustar pbuserpbgroup00000000000000././@LongLink0000000000000000000000000000015300000000000011214 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/click-hooks/tst_online_accounts_hooks2.cppubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/click-hooks/tst_online_accounts_hook0000644000015600001650000007203312674252514034126 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "fake_signond.h" #define TEST_DIR "/tmp/hooks-test2" namespace QTest { template<> char *toString(const QSet &set) { QByteArray ba = "QSet("; QStringList list = set.toList(); ba += list.join(", "); ba += ")"; return qstrdup(ba.data()); } } // QTest namespace // map file name -> contents typedef QHash FileData; class OnlineAccountsHooksTest: public QObject { Q_OBJECT public: OnlineAccountsHooksTest(); private Q_SLOTS: void initTestCase(); void cleanup() { if (!QTest::currentTestFailed()) { clearHooksDir(); clearInstallDir(); clearPackageDir(); } } void testNoFiles(); void testValidHooks_data(); void testValidHooks(); void testRemoval(); void testRemovalWithAcl(); void testTimestampRemoval(); private: void clearHooksDir(); void clearInstallDir(); void clearPackageDir(); bool runHookProcess(); bool runXmlDiff(const QString &generated, const QString &expected); void writeHookFile(const QString &name, const QString &contents); void writeInstalledFile(const QString &name, const QString &contents); void writePackageFile(const QString &name, const QString &contents = QString()); QStringList findGeneratedFiles() const; private: QtDBusTest::DBusTestRunner m_dbus; QtDBusMock::DBusMock m_mock; FakeSignond m_signond; QByteArray m_busAddress; QDir m_testDir; QDir m_hooksDir; QDir m_installDir; QDir m_packageDir; }; OnlineAccountsHooksTest::OnlineAccountsHooksTest(): QObject(0), m_dbus(), m_mock(m_dbus), m_signond(&m_mock), m_testDir(TEST_DIR), m_hooksDir(TEST_DIR "/online-accounts-hooks2"), m_installDir(TEST_DIR "/accounts"), m_packageDir(TEST_DIR "/package") { m_busAddress = qgetenv("DBUS_SESSION_BUS_ADDRESS"); } void OnlineAccountsHooksTest::clearHooksDir() { m_hooksDir.removeRecursively(); m_hooksDir.mkpath("."); } void OnlineAccountsHooksTest::clearInstallDir() { m_installDir.removeRecursively(); m_installDir.mkpath("."); } void OnlineAccountsHooksTest::clearPackageDir() { m_packageDir.removeRecursively(); m_packageDir.mkpath("."); } bool OnlineAccountsHooksTest::runHookProcess() { QProcess process; process.setProcessChannelMode(QProcess::ForwardedChannels); process.start(HOOK_PROCESS); if (!process.waitForFinished()) return false; return process.exitCode() == EXIT_SUCCESS; } bool OnlineAccountsHooksTest::runXmlDiff(const QString &generated, const QString &expected) { QProcess process; process.setProcessChannelMode(QProcess::ForwardedChannels); QStringList args; args.append(generated); args.append(expected); process.start("xmldiff", args); if (!process.waitForFinished()) return false; int exitCode = process.exitCode(); if (exitCode != EXIT_SUCCESS) { process.start("cat", args); process.waitForFinished(); } return exitCode == EXIT_SUCCESS; } void OnlineAccountsHooksTest::writeHookFile(const QString &name, const QString &contents) { QFile file(m_hooksDir.filePath(name)); if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) { qWarning() << "Could not write file" << name; return; } file.write(contents.toUtf8()); } void OnlineAccountsHooksTest::writeInstalledFile(const QString &name, const QString &contents) { QFileInfo fileInfo(name); m_installDir.mkpath(fileInfo.path()); QFile file(m_installDir.filePath(name)); if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) { qWarning() << "Could not write file" << name; return; } file.write(contents.toUtf8()); } void OnlineAccountsHooksTest::writePackageFile(const QString &name, const QString &contents) { QFileInfo fileInfo(name); m_packageDir.mkpath(fileInfo.path()); QFile file(m_packageDir.filePath(name)); if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) { qWarning() << "Could not write file" << name; return; } file.write(contents.toUtf8()); } static QStringList findFiles(const QDir &dir) { QStringList files = dir.entryList(QDir::Files); QStringList dirs = dir.entryList(QDir::Dirs | QDir::NoDotAndDotDot); Q_FOREACH(const QString &d, dirs) { QStringList dirFiles = findFiles(QDir(dir.filePath(d))); Q_FOREACH(const QString &file, dirFiles) { files.append(dir.relativeFilePath(d + "/" + file)); } } return files; } QStringList OnlineAccountsHooksTest::findGeneratedFiles() const { return findFiles(m_installDir); } void OnlineAccountsHooksTest::initTestCase() { qputenv("XDG_DATA_HOME", TEST_DIR); qputenv("OAH_CLICK_DIR", m_packageDir.path().toUtf8()); qputenv("ACCOUNTS", TEST_DIR); qputenv("SSO_USE_PEER_BUS", "0"); // The hook must be able to run without a D-Bus session qunsetenv("DBUS_SESSION_BUS_ADDRESS"); clearHooksDir(); clearInstallDir(); clearPackageDir(); } void OnlineAccountsHooksTest::testNoFiles() { QVERIFY(runHookProcess()); QVERIFY(m_hooksDir.entryList(QDir::Files).isEmpty()); QVERIFY(findGeneratedFiles().isEmpty()); } void OnlineAccountsHooksTest::testValidHooks_data() { QTest::addColumn("hookName"); QTest::addColumn("contents"); QTest::addColumn("packageFiles"); QTest::addColumn("expectedFiles"); FileData files; FileData package; QTest::newRow("empty file") << "com.ubuntu.test_MyApp_0.1.accounts" << "" << package << files; QTest::newRow("empty dictionary") << "com.ubuntu.test_MyApp_0.1.accounts" << "{}" << package << files; files["applications/com.ubuntu.test_MyApp.application"] = "\n" "\n" "\n" " com.ubuntu.test_MyApp_0.2\n" " /tmp/hooks-test2/package\n" " com.ubuntu.test_MyApp_0.2\n" " \n" " \n" " Publish to Picasa\n" " \n" " \n" "\n"; files["services/com.ubuntu.test_MyApp_google.service"] = "\n" "\n" "\n" " com.ubuntu.test_MyApp\n" " google\n" " Picasa\n" " com.ubuntu.test_MyApp_0.2\n" " \n" "\n"; QTest::newRow("one service") << "com.ubuntu.test_MyApp_0.2.accounts" << "{" " \"services\": [" " {" " \"provider\": \"google\"," " \"description\": \"Publish to Picasa\"," " \"name\": \"Picasa\"," " \"settings\": {" " \"Key\": \"value\"," " \"subgroup\": {" " \"Key2\": \"value2\"" " }," " \"a/b/c\": {" " \"Key3\": \"value3\"," " \"Key4\": \"value4\"" " }," " \"other/key\": \"value5\"" " }" " }" " ]" "}" << package << files; files["applications/com.ubuntu.test_MyApp.application"] = "\n" "\n" "\n" " com.ubuntu.test_MyApp_0.2\n" " /tmp/hooks-test2/package\n" " com.ubuntu.test_MyApp_0.2\n" " \n" " \n" " .\n" " \n" " \n" "\n"; files["services/com.ubuntu.test_MyApp_google.service"] = "\n" "\n" "\n" " com.ubuntu.test_MyApp\n" " google\n" " .\n" " com.ubuntu.test_MyApp_0.2\n" "\n"; QTest::newRow("minimal") << "com.ubuntu.test_MyApp_0.2.accounts" << "{" " \"services\": [" " {" " \"provider\": \"google\"" " }" " ]" "}" << package << files; files.clear(); files["applications/com.ubuntu.test_MyApp.application"] = "\n" "\n" "\n" " com.ubuntu.test_MyApp_0.3\n" " /tmp/hooks-test2/package\n" " com.ubuntu.test_MyApp_0.3\n" " my-app\n" " \n" " \n" " Publish to Facebook\n" " \n" " \n" " Publish to Picasa\n" " \n" " \n" "\n"; files["services/com.ubuntu.test_MyApp_google.service"] = "\n" "\n" "\n" " com.ubuntu.test_MyApp\n" " google\n" " Picasa\n" " com.ubuntu.test_MyApp_0.3\n" " my-app\n" "\n"; files["services/com.ubuntu.test_MyApp_facebook.service"] = "\n" "\n" "\n" " com.ubuntu.test_MyApp\n" " facebook\n" " Facebook photos\n" " com.ubuntu.test_MyApp_0.3\n" " my-app\n" "\n"; QTest::newRow("two services") << "com.ubuntu.test_MyApp_0.3.accounts" << "{" " \"translations\": \"my-app\"," " \"services\": [" " {" " \"provider\": \"facebook\"," " \"description\": \"Publish to Facebook\"," " \"name\": \"Facebook photos\"" " }," " {" " \"provider\": \"google\"," " \"description\": \"Publish to Picasa\"," " \"name\": \"Picasa\"" " }" " ]" "}" << package << files; files.clear(); files["applications/com.ubuntu.test_MyApp2.application"] = "\n" "\n" "\n" " com.ubuntu.test_MyApp2_0.2\n" " /tmp/hooks-test2/package\n" " com.ubuntu.test_MyApp2_0.2\n" " \n" " \n" " Publish to Picasa\n" " \n" " \n" "\n"; files["services/com.ubuntu.test_MyApp2_google.service"] = "\n" "\n" "\n" " com.ubuntu.test_MyApp2\n" " google\n" " Picasa\n" " com.ubuntu.test_MyApp2_0.2\n" " \n" "\n"; QTest::newRow("one service, with auth data") << "com.ubuntu.test_MyApp2_0.2.accounts" << "{" " \"services\": [" " {" " \"provider\": \"google\"," " \"description\": \"Publish to Picasa\"," " \"name\": \"Picasa\"," " \"auth\": {" " \"oauth2/web_server\": {" " \"ClientId\": \"foo\"," " \"ClientSecret\": \"bar\"," " \"UseSSL\": false," " \"Scopes\": [\"one scope\",\"and another\"]" " }" " }" " }" " ]" "}" << package << files; package["myapp/Main.qml"] = "Something here"; package["google.svg"] = "icon contents"; files.clear(); files["applications/com.ubuntu.test_MyApp.application"] = "\n" "\n" "\n" " com.ubuntu.test_MyApp_0.2\n" " /tmp/hooks-test2/package\n" " com.ubuntu.test_MyApp_0.2\n" " \n" " \n" " .\n" " \n" " \n" "\n"; files["services/com.ubuntu.test_MyApp_google.service"] = "\n" "\n" "\n" " com.ubuntu.test_MyApp\n" " google\n" " .\n" " com.ubuntu.test_MyApp_0.2\n" "\n"; files["providers/com.ubuntu.test_MyApp.provider"] = QString("\n" "\n" "\n" " Google\n" " %1/google.svg\n" " com.ubuntu.test_MyApp_0.2\n" " /tmp/hooks-test2/package\n" "\n").arg(m_packageDir.path()); files["qml-plugins/com.ubuntu.test_MyApp/Main.qml"] = "Something here"; QTest::newRow("account plugin, icon file") << "com.ubuntu.test_MyApp_0.2.accounts" << "{" " \"services\": [" " {" " \"provider\": \"google\"" " }" " ]," " \"plugin\": {" " \"name\": \"Google\"," " \"icon\": \"google.svg\"," " \"qml\": \"myapp\"" " }" "}" << package << files; files.clear(); package.clear(); package["myapp/Main.qml"] = "Something herez"; files["applications/com.ubuntu.test_MyApp.application"] = "\n" "\n" "\n" " com.ubuntu.test_MyApp_0.3\n" " /tmp/hooks-test2/package\n" " com.ubuntu.test_MyApp_0.3\n" " \n" " \n" " .\n" " \n" " \n" "\n"; files["services/com.ubuntu.test_MyApp_abc.service"] = "\n" "\n" "\n" " com.ubuntu.test_MyApp\n" " abc\n" " .\n" " com.ubuntu.test_MyApp_0.3\n" "\n"; files["providers/com.ubuntu.test_MyApp.provider"] = "\n" "\n" "\n" " A B C\n" " abc.svg\n" " com.ubuntu.test_MyApp_0.3\n" " /tmp/hooks-test2/package\n" "\n"; files["qml-plugins/com.ubuntu.test_MyApp/Main.qml"] = "Something herez"; QTest::newRow("account plugin, stock icon") << "com.ubuntu.test_MyApp_0.3.accounts" << "{" " \"services\": [" " {" " \"provider\": \"abc\"" " }" " ]," " \"plugin\": {" " \"name\": \"A B C\"," " \"icon\": \"abc.svg\"," " \"qml\": \"myapp\"" " }" "}" << package << files; } void OnlineAccountsHooksTest::testValidHooks() { QFETCH(QString, hookName); QFETCH(QString, contents); QFETCH(FileData, packageFiles); QFETCH(FileData, expectedFiles); writeHookFile(hookName, contents); for (FileData::const_iterator i = packageFiles.constBegin(); i != packageFiles.constEnd(); i++) { writePackageFile(i.key(), i.value()); } QVERIFY(runHookProcess()); QCOMPARE(findGeneratedFiles().toSet(), expectedFiles.keys().toSet()); QStringList xmlSuffixes; xmlSuffixes << "provider" << "service" << "application"; for (FileData::const_iterator i = expectedFiles.constBegin(); i != expectedFiles.constEnd(); i++) { QFileInfo generatedFile(m_installDir.filePath(i.key())); if (xmlSuffixes.contains(generatedFile.suffix())) { /* Dump the expected XML into a file */ QString expectedXml = generatedFile.filePath() + ".expected"; QFile file(expectedXml); QVERIFY(file.open(QIODevice::WriteOnly)); QByteArray expectedContents = i.value().toUtf8(); QCOMPARE(file.write(expectedContents), expectedContents.length()); file.close(); QVERIFY(runXmlDiff(generatedFile.filePath(), expectedXml)); } else { // direct comparison QFile file(generatedFile.filePath()); QVERIFY(file.open(QIODevice::ReadOnly)); QByteArray expectedContents = i.value().toUtf8(); QCOMPARE(file.readAll(), expectedContents); } } } void OnlineAccountsHooksTest::testRemoval() { QString stillInstalled("applications/com.ubuntu.test_StillInstalled.application"); writeInstalledFile(stillInstalled, "\n" "\n" "\n" " My application\n" " \n" " some type\n" " \n" " com-ubuntu.test_StillInstalled_2.0\n" ""); QVERIFY(m_installDir.exists(stillInstalled)); QString myApp("applications/com.ubuntu.test_MyApp.application"); writeInstalledFile(myApp, "\n" "\n" "\n" " My application\n" " \n" " \n" " Publish somewhere\n" " \n" " \n" " com-ubuntu.test_MyApp_3.0\n" ""); QVERIFY(m_installDir.exists(myApp)); QString myService("services/com.ubuntu.test_MyApp_example.service"); writeInstalledFile(myService, "\n" "\n" "\n" " Hello world\n" " example\n" " My application\n" " com-ubuntu.test_MyApp_3.0\n" ""); QVERIFY(m_installDir.exists(myService)); QString noProfile("applications/com.ubuntu.test_NoProfile.application"); writeInstalledFile(noProfile, "\n" "\n" " My application\n" " \n" " some type\n" " \n" ""); QVERIFY(m_installDir.exists(noProfile)); QString notOurs("applications/com.ubuntu.test_NotOurs.application"); writeInstalledFile(notOurs, "\n" "\n" "\n" " My application\n" " \n" " some type\n" " \n" " com-ubuntu.test_NotOurs_0.1.0\n" ""); QVERIFY(m_installDir.exists(notOurs)); writeHookFile("com-ubuntu.test_StillInstalled_2.0.accounts", "{" " \"services\": [" " {" " \"provider\": \"example\"," " \"description\": \"Publish somewhere\"," " \"name\": \"Hello world\"" " }" " ]" "}"); QVERIFY(runHookProcess()); QVERIFY(m_installDir.exists(stillInstalled)); QVERIFY(!m_installDir.exists(myApp)); QVERIFY(!m_installDir.exists(myService)); QVERIFY(m_installDir.exists(noProfile)); QVERIFY(m_installDir.exists(notOurs)); } void OnlineAccountsHooksTest::testRemovalWithAcl() { qputenv("DBUS_SESSION_BUS_ADDRESS", m_busAddress); m_dbus.startServices(); QString myApp("applications/com.ubuntu.test_MyAcl.application"); writeInstalledFile(myApp, "\n" "\n" "\n" " My application\n" " \n" " \n" " Publish somewhere\n" " \n" " \n" " com-ubuntu.test_MyAcl_3.0\n" ""); QVERIFY(m_installDir.exists(myApp)); QString myService("services/com.ubuntu.test_MyAcl_example.service"); writeInstalledFile(myService, "\n" "\n" "\n" " Hello world\n" " com-ubuntu.test_MyAcl\n" " example\n" " My application\n" " com-ubuntu.test_MyAcl_3.0\n" ""); QVERIFY(m_installDir.exists(myService)); /* Create an account, enable the app and add it to the ACL */ Accounts::Manager manager; Accounts::Service service = manager.service("com.ubuntu.test_MyAcl_example"); QVERIFY(service.isValid()); Accounts::Account *account = manager.createAccount("example"); account->setDisplayName("Example account"); account->setEnabled(true); account->setCredentialsId(25); account->selectService(service); account->setEnabled(true); account->syncAndBlock(); Accounts::AccountId accountId = account->id(); QVERIFY(accountId > 0); QVariantMap initialInfo; QStringList initialAcl; initialAcl << "one" << "com-ubuntu.test_MyAcl_0.1" << "two_click"; initialInfo["ACL"] = initialAcl; initialInfo["Id"] = 25; m_signond.addIdentity(25, initialInfo); /* Now run the hook process; it should delete the .service and .application * files, and also disable the service and remove the app from the ACL */ QVERIFY(runHookProcess()); QVERIFY(!m_installDir.exists(myApp)); QVERIFY(!m_installDir.exists(myService)); QTRY_COMPARE(account->isEnabled(), false); SignOn::Identity *identity = SignOn::Identity::existingIdentity(25, this); QSignalSpy gotInfo(identity, SIGNAL(info(const SignOn::IdentityInfo&))); identity->queryInfo(); QTRY_COMPARE(gotInfo.count(), 1); SignOn::IdentityInfo info = gotInfo.at(0).at(0).value(); QStringList expectedAcl; expectedAcl << "one" << "two_click"; QCOMPARE(info.accessControlList().toSet(), expectedAcl.toSet()); } void OnlineAccountsHooksTest::testTimestampRemoval() { QString stillInstalled("com-ubuntu.test_MyApp_2.0.accounts"); writeHookFile(stillInstalled, "{}"); QString stillInstalledTimestamp("com-ubuntu.test_MyApp_2.0.accounts.processed"); writeHookFile(stillInstalledTimestamp, ""); QString oldTimestamp("com-ubuntu.test_MyApp_1.0.accounts.processed"); writeHookFile(oldTimestamp, ""); QString staleTimestamp1("com-ubuntu.app_MyOtherApp_2.0.accounts.processed"); writeHookFile(staleTimestamp1, ""); QString staleTimestamp2("com-ubuntu.app_MyOtherApp_1.0.accounts.processed"); writeHookFile(staleTimestamp2, ""); QVERIFY(runHookProcess()); QVERIFY(m_hooksDir.exists(stillInstalled)); QVERIFY(m_hooksDir.exists(stillInstalledTimestamp)); QVERIFY(!m_hooksDir.exists(oldTimestamp)); QVERIFY(!m_hooksDir.exists(staleTimestamp1)); QVERIFY(!m_hooksDir.exists(staleTimestamp2)); } QTEST_GUILESS_MAIN(OnlineAccountsHooksTest); #include "tst_online_accounts_hooks2.moc" ././@LongLink0000000000000000000000000000015200000000000011213 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/click-hooks/tst_online_accounts_hooks.cppubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/click-hooks/tst_online_accounts_hook0000644000015600001650000005344212674252514034131 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #define TEST_DIR "/tmp/hooks-test" class OnlineAccountsHooksTest: public QObject { Q_OBJECT public: OnlineAccountsHooksTest(); private Q_SLOTS: void initTestCase(); void testNoFiles(); void testValidHooks_data(); void testValidHooks(); void testRemoval(); void testAccountRemoval(); void testUpdate(); void testDesktopEntry_data(); void testDesktopEntry(); void testServiceType_data(); void testServiceType(); private: void clearHooksDir(); void clearInstallDir(); bool runHookProcess(); void writeHookFile(const QString &name, const QString &contents); void writeInstalledFile(const QString &name, const QString &contents); void writePackageFile(const QString &name, const QString &contents = QString()); private: QDir m_testDir; QDir m_hooksDir; QDir m_installDir; QDir m_packageDir; }; OnlineAccountsHooksTest::OnlineAccountsHooksTest(): QObject(0), m_testDir(TEST_DIR), m_hooksDir(TEST_DIR "/online-accounts-hooks"), m_installDir(TEST_DIR "/accounts"), m_packageDir(TEST_DIR "/package") { } void OnlineAccountsHooksTest::clearHooksDir() { m_hooksDir.removeRecursively(); m_hooksDir.mkpath("."); } void OnlineAccountsHooksTest::clearInstallDir() { m_installDir.removeRecursively(); m_installDir.mkpath("."); } bool OnlineAccountsHooksTest::runHookProcess() { QProcess process; process.setProcessChannelMode(QProcess::ForwardedChannels); process.start(HOOK_PROCESS); if (!process.waitForFinished()) return false; return process.exitCode() == EXIT_SUCCESS; } void OnlineAccountsHooksTest::writeHookFile(const QString &name, const QString &contents) { QFile file(m_hooksDir.filePath(name)); if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) { qWarning() << "Could not write file" << name; return; } file.write(contents.toUtf8()); } void OnlineAccountsHooksTest::writeInstalledFile(const QString &name, const QString &contents) { QFileInfo fileInfo(name); m_installDir.mkpath(fileInfo.path()); QFile file(m_installDir.filePath(name)); if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) { qWarning() << "Could not write file" << name; return; } file.write(contents.toUtf8()); } void OnlineAccountsHooksTest::writePackageFile(const QString &name, const QString &contents) { QFileInfo fileInfo(name); m_packageDir.mkpath(fileInfo.path()); QFile file(m_packageDir.filePath(name)); if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) { qWarning() << "Could not write file" << name; return; } file.write(contents.toUtf8()); } void OnlineAccountsHooksTest::initTestCase() { qputenv("XDG_DATA_HOME", TEST_DIR); qputenv("OAH_CLICK_DIR", m_packageDir.path().toUtf8()); qputenv("ACCOUNTS", TEST_DIR); // The hook must be able to run without a D-Bus session qunsetenv("DBUS_SESSION_BUS_ADDRESS"); clearHooksDir(); clearInstallDir(); } void OnlineAccountsHooksTest::testNoFiles() { clearHooksDir(); clearInstallDir(); QVERIFY(runHookProcess()); QVERIFY(m_hooksDir.entryList(QDir::Files).isEmpty()); QVERIFY(m_installDir.entryList(QDir::AllEntries | QDir::NoDotAndDotDot).isEmpty()); /* Create an unsupported hook file */ writeHookFile("file.unsupported", "\n" ""); QVERIFY(!m_hooksDir.entryList(QDir::Files).isEmpty()); QVERIFY(runHookProcess()); QVERIFY(m_installDir.entryList(QDir::AllEntries | QDir::NoDotAndDotDot).isEmpty()); } void OnlineAccountsHooksTest::testValidHooks_data() { QTest::addColumn("hookName"); QTest::addColumn("contents"); QTest::addColumn("installedName"); QTest::addColumn("profile"); QTest::addColumn("icon"); QTest::addColumn("isValid"); QTest::newRow("service") << "com.ubuntu.test_MyApp_0.1.service" << "\n" "\n" " some type\n" " my app service\n" " example\n" "" << "services/com.ubuntu.test_MyApp.service" << "com.ubuntu.test_MyApp_0.1" << QString() << true; QTest::newRow("application") << "com.ubuntu.test_MyApp_0.2.application" << "\n" "\n" " My application\n" " \n" " some type\n" " \n" "" << "applications/com.ubuntu.test_MyApp.application" << "com.ubuntu.test_MyApp_0.2" << QString() << true; QTest::newRow("provider") << "com.ubuntu.test_Plugin_0.1.provider" << "\n" "\n" " My provider\n" "" << "providers/com.ubuntu.test_Plugin.provider" << "com.ubuntu.test_Plugin_0.1" << QString() << true; QTest::newRow("provider-with-icon") << "com.ubuntu.test_Plugin2_0.1.provider" << "\n" "\n" " My provider\n" " MyApp.svg\n" "" << "providers/com.ubuntu.test_Plugin2.provider" << "com.ubuntu.test_Plugin2_0.1" << m_packageDir.filePath("MyApp.svg") << true; QTest::newRow("provider-with-wrong-icon") << "com.ubuntu.test_Plugin3_0.1.provider" << "\n" "\n" " My provider\n" " NonExisting.svg\n" "" << "providers/com.ubuntu.test_Plugin3.provider" << "com.ubuntu.test_Plugin3_0.1" << "NonExisting.svg" << true; QTest::newRow("provider-with-icon-subdir") << "com.ubuntu.test_Plugin4_0.1.provider" << "\n" "\n" " My provider\n" " subdir/pict.png\n" "" << "providers/com.ubuntu.test_Plugin4.provider" << "com.ubuntu.test_Plugin4_0.1" << m_packageDir.filePath("subdir/pict.png") << true; QTest::newRow("invalid application") << "com.ubuntu.test_Invalid_0.1.application" << "\n" "\n" " My application\n" " \n" " some type\n" " \n" "\n" "\n" " My application\n" " \n" " some type\n" " \n" "" << "applications/com.ubuntu.test_MyAppId.application" << "com.ubuntu.test_MyAppId_0.1" << QString() << true; } void OnlineAccountsHooksTest::testValidHooks() { QFETCH(QString, hookName); QFETCH(QString, contents); QFETCH(QString, installedName); QFETCH(QString, profile); QFETCH(QString, icon); QFETCH(bool, isValid); /* Create the needed files in the package directory */ writePackageFile("MyApp.svg"); writePackageFile("subdir/pict.png"); writeHookFile(hookName, contents); QVERIFY(runHookProcess()); // check that the file has been created, if the file was valid QFileInfo fileInfo(m_installDir.absoluteFilePath(installedName)); QCOMPARE(fileInfo.exists(), isValid); if (!isValid) return; QFile file(fileInfo.absoluteFilePath()); QVERIFY(file.open(QIODevice::ReadOnly)); // check that's a valid XML file QDomDocument doc; QVERIFY(doc.setContent(&file)); // Check that the "id" attribute matches the file name QDomElement root = doc.documentElement(); QCOMPARE(root.attribute("id"), fileInfo.completeBaseName()); /* Check that a "profile" element has been added and that matches the * expected profile. */ QDomElement profileElement = root.firstChildElement("profile"); QVERIFY(!profileElement.isNull()); QCOMPARE(profileElement.text(), profile); /* Check that the icon is correct */ QDomElement iconElement = root.firstChildElement("icon"); QCOMPARE(iconElement.text(), icon); } void OnlineAccountsHooksTest::testRemoval() { clearHooksDir(); clearInstallDir(); QString stillInstalled("applications/com.ubuntu.test_StillInstalled.application"); writeInstalledFile(stillInstalled, "\n" "\n" "\n" " My application\n" " \n" " some type\n" " \n" " com-ubuntu.test_StillInstalled_2.0\n" ""); QVERIFY(m_installDir.exists(stillInstalled)); QString myApp("applications/com.ubuntu.test_MyApp.application"); writeInstalledFile(myApp, "\n" "\n" "\n" " My application\n" " \n" " some type\n" " \n" " com-ubuntu.test_MyApp_3.0\n" ""); QVERIFY(m_installDir.exists(myApp)); QString noProfile("applications/com.ubuntu.test_NoProfile.application"); writeInstalledFile(noProfile, "\n" "\n" " My application\n" " \n" " some type\n" " \n" ""); QVERIFY(m_installDir.exists(noProfile)); QString notOurs("applications/com.ubuntu.test_NotOurs.application"); writeInstalledFile(notOurs, "\n" "\n" "\n" " My application\n" " \n" " some type\n" " \n" " com-ubuntu.test_NotOurs_0.1.0\n" ""); QVERIFY(m_installDir.exists(notOurs)); writeHookFile("com-ubuntu.test_StillInstalled_2.0.application", "\n" "\n" " My application\n" " \n" " some type\n" " \n" ""); QVERIFY(runHookProcess()); QVERIFY(m_installDir.exists(stillInstalled)); QVERIFY(!m_installDir.exists(myApp)); QVERIFY(m_installDir.exists(noProfile)); QVERIFY(m_installDir.exists(noProfile)); } void OnlineAccountsHooksTest::testAccountRemoval() { clearHooksDir(); clearInstallDir(); Accounts::Manager *manager = new Accounts::Manager(Accounts::Manager::DisableNotifications); QString stillInstalled("providers/com.ubuntu.test_StillInstalled.provider"); writeInstalledFile(stillInstalled, "\n" "\n" "\n" " com-ubuntu.test_StillInstalled_2.0\n" ""); QVERIFY(m_installDir.exists(stillInstalled)); /* Write a newer version of the hook, to make sure that accounts created * with older versions of the app are preserved */ writeHookFile("com-ubuntu.test_StillInstalled_3.0.provider", "\n" "\n" ""); Accounts::Account *account = manager->createAccount("com.ubuntu.test_StillInstalled"); account->setDisplayName("Still alive"); account->syncAndBlock(); Accounts::AccountId idPreserved = account->id(); QVERIFY(idPreserved > 0); QString myProvider("providers/com.ubuntu.test_MyProvider.provider"); writeInstalledFile(myProvider, "\n" "\n" "\n" " com-ubuntu.test_MyProvider_3.0\n" ""); QVERIFY(m_installDir.exists(myProvider)); account = manager->createAccount("com.ubuntu.test_MyProvider"); account->setDisplayName("Must die"); account->syncAndBlock(); Accounts::AccountId idRemoved = account->id(); QVERIFY(idRemoved > 0); delete manager; QVERIFY(runHookProcess()); QVERIFY(m_installDir.exists(stillInstalled)); QVERIFY(!m_installDir.exists(myProvider)); manager = new Accounts::Manager(Accounts::Manager::DisableNotifications); account = manager->account(idPreserved); QVERIFY(account != 0); account = manager->account(idRemoved); QVERIFY(account == 0); delete manager; } void OnlineAccountsHooksTest::testUpdate() { clearHooksDir(); clearInstallDir(); time_t oldTime = time(NULL) - 3; writeHookFile("com-ubuntu.test_MyApp_1.0.application", "\n" "\n" " My application\n" " \n" " some type\n" " \n" ""); QVERIFY(runHookProcess()); QString installedName("applications/com-ubuntu.test_MyApp.application"); // check that the file has been created, and with the correct profile QFile file(m_installDir.absoluteFilePath(installedName)); QVERIFY(file.open(QIODevice::ReadOnly)); // check that's a valid XML file QDomDocument doc; QVERIFY(doc.setContent(&file)); QDomElement root = doc.documentElement(); QCOMPARE(root.firstChildElement("profile").text(), QString("com-ubuntu.test_MyApp_1.0")); /* Now remove the hook file and write a newer version of it */ clearHooksDir(); QTest::qWait(1500); // make sure that the timestamp is newer writeHookFile("com-ubuntu.test_MyApp_1.1.application", "\n" "\n" " My application\n" " \n" " some type\n" " \n" ""); QVERIFY(runHookProcess()); // check that the file has been updated with the correct profile file.close(); file.setFileName(m_installDir.absoluteFilePath(installedName)); QVERIFY(file.open(QIODevice::ReadOnly)); QVERIFY(doc.setContent(&file)); root = doc.documentElement(); QCOMPARE(root.firstChildElement("profile").text(), QString("com-ubuntu.test_MyApp_1.1")); // Create an *older* file clearHooksDir(); QString fileName("com-ubuntu.test_MyApp_1.2.application"); writeHookFile(fileName, "\n" "\n" " My application\n" " \n" " some type\n" " \n" ""); struct utimbuf sourceTime; sourceTime.actime = sourceTime.modtime = oldTime; utime(m_hooksDir.filePath(fileName).toUtf8().constData(), &sourceTime); QVERIFY(runHookProcess()); // check that the file has been updated with the correct profile file.close(); file.setFileName(m_installDir.absoluteFilePath(installedName)); QVERIFY(file.open(QIODevice::ReadOnly)); QVERIFY(doc.setContent(&file)); root = doc.documentElement(); QCOMPARE(root.firstChildElement("profile").text(), QString("com-ubuntu.test_MyApp_1.2")); } void OnlineAccountsHooksTest::testDesktopEntry_data() { QTest::addColumn("hookName"); QTest::addColumn("contents"); QTest::addColumn("installedName"); QTest::addColumn("expectedDesktopEntry"); QTest::newRow("no-entry") << "com.ubuntu.test_MyApp_0.2.application" << "\n" "\n" " My application\n" " \n" " some type\n" " \n" "" << "applications/com.ubuntu.test_MyApp.application" << "com.ubuntu.test_MyApp_0.2"; QTest::newRow("with-desktop-entry") << "com.ubuntu.test_Desktop_0.1.application" << "\n" "\n" " My application\n" " something here\n" " \n" " some type\n" " \n" "" << "applications/com.ubuntu.test_Desktop.application" << "something here"; } void OnlineAccountsHooksTest::testDesktopEntry() { QFETCH(QString, hookName); QFETCH(QString, contents); QFETCH(QString, installedName); QFETCH(QString, expectedDesktopEntry); writeHookFile(hookName, contents); QVERIFY(runHookProcess()); // check that the file has been created, if the file was valid QFileInfo fileInfo(m_installDir.absoluteFilePath(installedName)); QVERIFY(fileInfo.exists()); QFile file(fileInfo.absoluteFilePath()); QVERIFY(file.open(QIODevice::ReadOnly)); // check that's a valid XML file QDomDocument doc; QVERIFY(doc.setContent(&file)); QDomElement root = doc.documentElement(); /* Check that a "desktop-entry" element has been added and that matches the * expected value. */ QDomElement desktopEntryElement = root.firstChildElement("desktop-entry"); QCOMPARE(desktopEntryElement.text(), expectedDesktopEntry); } void OnlineAccountsHooksTest::testServiceType_data() { QTest::addColumn("hookName"); QTest::addColumn("contents"); QTest::addColumn("installedName"); QTest::addColumn("expectedServiceType"); QTest::newRow("no type") << "com.ubuntu.test_MyApp_0.2.service" << "\n" "\n" " google\n" "" << "services/com.ubuntu.test_MyApp.service" << "com.ubuntu.test_MyApp"; QTest::newRow("with service type") << "com.ubuntu.test_Desktop_0.1.service" << "\n" "\n" " facebook\n" " a random type\n" "" << "services/com.ubuntu.test_Desktop.service" << "a random type"; } void OnlineAccountsHooksTest::testServiceType() { QFETCH(QString, hookName); QFETCH(QString, contents); QFETCH(QString, installedName); QFETCH(QString, expectedServiceType); writeHookFile(hookName, contents); QVERIFY(runHookProcess()); // check that the file has been created, if the file was valid QFileInfo fileInfo(m_installDir.absoluteFilePath(installedName)); QVERIFY(fileInfo.exists()); QFile file(fileInfo.absoluteFilePath()); QVERIFY(file.open(QIODevice::ReadOnly)); // check that's a valid XML file QDomDocument doc; QVERIFY(doc.setContent(&file)); QDomElement root = doc.documentElement(); /* Check that a "type" element has been added and that matches the * expected value. */ QDomElement serviceTypeElement = root.firstChildElement("type"); QCOMPARE(serviceTypeElement.text(), expectedServiceType); } QTEST_MAIN(OnlineAccountsHooksTest); #include "tst_online_accounts_hooks.moc" ././@LongLink0000000000000000000000000000015300000000000011214 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/click-hooks/tst_online_accounts_hooks2.proubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/click-hooks/tst_online_accounts_hook0000644000015600001650000000114712674252514034124 0ustar pbuserpbgroup00000000000000include(../../common-project-config.pri) TARGET = tst_online_accounts_hooks2 CONFIG += \ c++11 \ debug \ link_pkgconfig QT += \ core \ dbus \ testlib \ xml PKGCONFIG += \ accounts-qt5 \ libqtdbusmock-1 \ libqtdbustest-1 \ libsignon-qt5 DEFINES += \ DEBUG_ENABLED \ HOOK_PROCESS=\\\"../../click-hooks/online-accounts-hooks2\\\" \ SIGNOND_MOCK_TEMPLATE=\\\"$${PWD}/signond.py\\\" SOURCES += \ tst_online_accounts_hooks2.cpp check.commands = "xvfb-run -s '-screen 0 640x480x24' -a ./$${TARGET}" check.depends = $${TARGET} QMAKE_EXTRA_TARGETS += check ././@LongLink0000000000000000000000000000015200000000000011213 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/click-hooks/tst_online_accounts_hooks.proubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/click-hooks/tst_online_accounts_hook0000644000015600001650000000072612674252514034126 0ustar pbuserpbgroup00000000000000include(../../common-project-config.pri) TARGET = tst_online_accounts_hooks CONFIG += \ debug \ link_pkgconfig QT += \ core \ testlib \ xml PKGCONFIG += \ accounts-qt5 DEFINES += \ DEBUG_ENABLED \ HOOK_PROCESS=\\\"../../click-hooks/online-accounts-hooks\\\" SOURCES += \ tst_online_accounts_hooks.cpp check.commands = "xvfb-run -s '-screen 0 640x480x24' -a ./$${TARGET}" check.depends = $${TARGET} QMAKE_EXTRA_TARGETS += check ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/click-hooks/click-hooks.pro0000644000015600001650000000014612674252514032032 0ustar pbuserpbgroup00000000000000TEMPLATE = subdirs SUBDIRS = \ tst_online_accounts_hooks.pro \ tst_online_accounts_hooks2.pro ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/click-hooks/fake_signond.h0000644000015600001650000000337512674252514031711 0ustar pbuserpbgroup00000000000000/* * This file is part of libOnlineAccounts * * Copyright (C) 2015 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License version 3, as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see . */ #ifndef OAD_FAKE_SIGNOND_H #define OAD_FAKE_SIGNOND_H #include #include class FakeSignond { public: FakeSignond(QtDBusMock::DBusMock *mock): m_mock(mock) { m_mock->registerTemplate("com.google.code.AccountsSSO.SingleSignOn", SIGNOND_MOCK_TEMPLATE, QDBusConnection::SessionBus); } void addIdentity(uint id, const QVariantMap &info) { mockedAuthService().call("AddIdentity", id, info); } private: OrgFreedesktopDBusMockInterface &mockedAuthService() { return m_mock->mockInterface("com.google.code.AccountsSSO.SingleSignOn", "/com/google/code/AccountsSSO/SingleSignOn", "com.google.code.AccountsSSO.SingleSignOn.AuthService", QDBusConnection::SessionBus); } private: QtDBusMock::DBusMock *m_mock; }; #endif // OAD_FAKE_SIGNOND_H ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/click-hooks/signond.py0000644000015600001650000000731312674252514031120 0ustar pbuserpbgroup00000000000000'''signond mock template This creates the expected methods and properties of the com.google.code.AccountsSSO.SingleSignOn service. ''' # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 3 of the License, or (at your option) any # later version. See http://www.gnu.org/copyleft/lgpl.html for the full text # of the license. __author__ = 'Alberto Mardegan' __email__ = 'alberto.mardegan@canonical.com' __copyright__ = '(c) 2015 Canonical Ltd.' __license__ = 'LGPL 3+' import dbus import time from dbusmock import MOCK_IFACE import dbusmock BUS_NAME = 'com.google.code.AccountsSSO.SingleSignOn' MAIN_OBJ = '/com/google/code/AccountsSSO/SingleSignOn' AUTH_SERVICE_IFACE = 'com.google.code.AccountsSSO.SingleSignOn.AuthService' MAIN_IFACE = AUTH_SERVICE_IFACE IDENTITY_IFACE = 'com.google.code.AccountsSSO.SingleSignOn.Identity' AUTH_SESSION_IFACE = 'com.google.code.AccountsSSO.SingleSignOn.AuthSession' SYSTEM_BUS = False ERROR_PREFIX = 'com.google.code.AccountsSSO.SingleSignOn.Error.' ERROR_IDENTITY_NOT_FOUND = ERROR_PREFIX + 'IdentityNotFound' ERROR_PERMISSION_DENIED = ERROR_PREFIX + 'PermissionDenied' ERROR_USER_INTERACTION= ERROR_PREFIX + 'UserInteraction' def identity_store(self, new_info): self.info.update(new_info) return self.info['Id'] def get_identity(self, identity): if identity not in self.identities: raise dbus.exceptions.DBusException('Identity not found', name=ERROR_IDENTITY_NOT_FOUND) path = '/Identity%s' % identity if not path in dbusmock.get_objects(): self.AddObject(path, IDENTITY_IFACE, {}, [ ('getInfo', '', 'a{sv}', 'ret = self.parent.identities[%s]' % identity), ('store', 'a{sv}', 'u', 'ret = self.store(self, args[0])'), ]) identity_obj = dbusmock.get_object(path) identity_obj.parent = self identity_obj.store = identity_store identity_obj.info = self.identities[identity] return (path, self.identities[identity]) def auth_session_process(identity, params, method): if 'errorName' in params: raise dbus.exceptions.DBusException('Authentication error', name=params['errorName']) if 'delay' in params: time.sleep(params['delay']) return params def get_auth_session_object_path(self, identity, method): if identity != 0 and (identity not in self.identities): raise dbus.exceptions.DBusException('Identity not found', name=ERROR_IDENTITY_NOT_FOUND) path = '/AuthSession%s' % self.sessions_counter self.sessions_counter += 1 self.AddObject(path, AUTH_SESSION_IFACE, {}, [ ('process', 'a{sv}s', 'a{sv}', 'ret = self.auth_session_process(self.identity, args[0], args[1])'), ]) auth_session = dbusmock.get_object(path) auth_session.auth_session_process = auth_session_process auth_session.identity = identity auth_session.method = method return path def load(mock, parameters): mock.get_identity = get_identity mock.get_auth_session_object_path = get_auth_session_object_path mock.AddMethods(AUTH_SERVICE_IFACE, [ ('getIdentity', 'u', 'oa{sv}', 'ret = self.get_identity(self, args[0])'), ('getAuthSessionObjectPath', 'us', 's', 'ret = self.get_auth_session_object_path(self, args[0], args[1])'), ]) mock.sessions_counter = 1 mock.identities = {} mock.auth_sessions = {} mock.auth_replies = {} @dbus.service.method(MOCK_IFACE, in_signature='ua{sv}', out_signature='') def AddIdentity(self, identity, data): self.identities[identity] = data ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/system-settings-plugin/0000755000015600001650000000000012674252771031356 5ustar pbuserpbgroup00000000000000././@LongLink0000000000000000000000000000014600000000000011216 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/system-settings-plugin/tst_plugin.cppubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/system-settings-plugin/tst_plugin.cp0000644000015600001650000002151012674252514034064 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include #include #include #include #include #include #include #include #include #include #include #include "plugin.h" namespace QTest { template<> char *toString(const QSet &set) { QByteArray ba = "QSet("; QStringList list = set.toList(); ba += list.join(", "); ba += ")"; return qstrdup(ba.data()); } } // QTest namespace /* mocking libintl { */ static QHash > m_translations; extern "C" { char *dgettext(const char *domainname, const char *msgid) { return (char *)m_translations[domainname].value(msgid).data(); } char *dcgettext(const char *__domainname, const char *__msgid, int __category) { Q_UNUSED(__category); return dgettext(__domainname, __msgid); } } // extern C /* } mocking libintl */ class PluginTest: public QObject { Q_OBJECT struct FileData { FileData() {} FileData(const QString &name, const QString &domain): name(name), domain(domain) {} QString name; QString domain; }; public: PluginTest(); private Q_SLOTS: void testKeywords_data(); void testKeywords(); private: void setDataDir(const QTemporaryDir &dir); void writeProvider(const QString &id, const QString &name, const QString &domain); void writeService(const QString &id, const QString &name, const QString &domain); void writeLibaccountsFile(const QString &type, const QString &id, const QString &name, const QString &domain); void createAccount(const QString &name); private: QHash m_providersData; QHash m_servicesData; QDir m_dataDir; }; PluginTest::PluginTest(): QObject(0) { m_providersData["provider_noname"] = FileData("", ""); m_providersData["provider_nodomain"] = FileData("Happy", ""); m_providersData["provider_translated"] = FileData("Joyful", "translations1"); m_servicesData["service_nodomain"] = FileData("Sad", ""); m_servicesData["service_translated"] = FileData("Depressed", "translations1"); m_servicesData["service_translated2"] = FileData("Depressed", "translations2"); m_translations["translations1"]["Happy"] = "Contento"; m_translations["translations1"]["Joyful"] = "Gioioso"; m_translations["translations1"]["Sad"] = "Triste"; m_translations["translations1"]["Depressed"] = "Depresso1"; m_translations["translations1"]["Black"] = "Nero"; m_translations["translations1"]["White"] = "Bianco"; m_translations["translations2"]["Depressed"] = "Depresso2"; } void PluginTest::setDataDir(const QTemporaryDir &dir) { QVERIFY(dir.isValid()); m_dataDir = QDir(dir.path()); QByteArray dataPath = dir.path().toUtf8(); qputenv("ACCOUNTS", dataPath); qputenv("AG_PROVIDERS", dataPath); qputenv("AG_SERVICES", dataPath); } void PluginTest::writeProvider(const QString &id, const QString &name, const QString &domain) { writeLibaccountsFile("provider", id, name, domain); } void PluginTest::writeService(const QString &id, const QString &name, const QString &domain) { writeLibaccountsFile("service", id, name, domain); } void PluginTest::writeLibaccountsFile(const QString &type, const QString &id, const QString &name, const QString &domain) { QDomDocument doc; QDomElement root = doc.createElement(type); root.setAttribute("id", id); doc.appendChild(root); QDomElement nameTag = doc.createElement("name"); nameTag.appendChild(doc.createTextNode(name)); root.appendChild(nameTag); QDomElement domainTag = doc.createElement("translations"); domainTag.appendChild(doc.createTextNode(domain)); root.appendChild(domainTag); if (type == "service") { QDomElement typeTag = doc.createElement("type"); typeTag.appendChild(doc.createTextNode("something")); root.appendChild(typeTag); } QFile file(m_dataDir.filePath(id + "." + type)); if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) { qWarning() << "Could not write file" << file.fileName(); return; } file.write(doc.toString().toUtf8()); } void PluginTest::createAccount(const QString &name) { Accounts::Manager *manager = new Accounts::Manager; Accounts::Account *account = manager->createAccount("any"); account->setDisplayName(name); account->syncAndBlock(); delete manager; } void PluginTest::testKeywords_data() { QTest::addColumn("providers"); QTest::addColumn("services"); QTest::addColumn("accountNames"); QTest::addColumn("keywords"); QTest::newRow("provider, no name") << (QStringList() << "provider_noname") << QStringList() << QStringList() << (QStringList() << "provider_noname"); QTest::newRow("provider, untranslated") << (QStringList() << "provider_nodomain") << QStringList() << QStringList() << (QStringList() << "provider_nodomain" << "happy"); QTest::newRow("provider, translated") << (QStringList() << "provider_translated") << QStringList() << QStringList() << (QStringList() << "provider_translated" << "joyful" << "gioioso"); QTest::newRow("service, untranslated") << QStringList() << (QStringList() << "service_nodomain") << QStringList() << (QStringList() << "service_nodomain" << "sad"); QTest::newRow("service, translated 1") << QStringList() << (QStringList() << "service_translated") << QStringList() << (QStringList() << "service_translated" << "depressed" << "depresso1"); QTest::newRow("service, translated 2") << QStringList() << (QStringList() << "service_translated2") << QStringList() << (QStringList() << "service_translated2" << "depressed" << "depresso2"); QTest::newRow("one account, one word") << QStringList() << QStringList() << (QStringList() << "tom@example.com") << (QStringList() << "tom@example.com"); QTest::newRow("one account, many words") << QStringList() << QStringList() << (QStringList() << "My little sweet account") << (QStringList() << "my little sweet account"); QTest::newRow("combined") << (QStringList() << "provider_translated" << "provider_nodomain") << (QStringList() << "service_translated" << "service_translated2") << (QStringList() << "john@invalid" << "harry@mysite.com") << (QStringList() << "provider_translated" << "joyful" << "gioioso" << "provider_nodomain" << "happy" << "service_translated" << "depressed" << "depresso1" << "service_translated2" << "depressed" << "depresso2" << "john@invalid" << "harry@mysite.com"); } void PluginTest::testKeywords() { QFETCH(QStringList, providers); QFETCH(QStringList, services); QFETCH(QStringList, accountNames); QFETCH(QStringList, keywords); QTemporaryDir dataDir; setDataDir(dataDir); /* Create the needed files */ Q_FOREACH(const QString &providerId, providers) { writeProvider(providerId, m_providersData[providerId].name, m_providersData[providerId].domain); } Q_FOREACH(const QString &serviceId, services) { writeService(serviceId, m_servicesData[serviceId].name, m_servicesData[serviceId].domain); } /* create the accounts */ Q_FOREACH(const QString &displayName, accountNames) { createAccount(displayName); } /* Now do the actual test */ Plugin plugin; SystemSettings::ItemBase *item = plugin.createItem(QVariantMap()); QStringList pluginKeywords = item->keywords(); QCOMPARE(pluginKeywords.toSet(), keywords.toSet()); } QTEST_MAIN(PluginTest); #include "tst_plugin.moc" ././@LongLink0000000000000000000000000000016200000000000011214 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/system-settings-plugin/system-settings-plugin.proubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/system-settings-plugin/system-settin0000644000015600001650000000114212674252514034122 0ustar pbuserpbgroup00000000000000include(../../common-project-config.pri) TARGET = tst_plugin CONFIG += \ debug \ link_pkgconfig QT += \ core \ qml \ testlib PKGCONFIG += \ SystemSettings \ accounts-qt5 SYSTEM_SETTINGS_PLUGIN_DIR = $${TOP_SRC_DIR}/system-settings-plugin INCLUDEPATH += \ $${SYSTEM_SETTINGS_PLUGIN_DIR} SOURCES += \ $${SYSTEM_SETTINGS_PLUGIN_DIR}/plugin.cpp \ tst_plugin.cpp HEADERS += \ $${SYSTEM_SETTINGS_PLUGIN_DIR}/plugin.h check.commands = "xvfb-run -s '-screen 0 640x480x24' -a dbus-test-runner -t ./$${TARGET}" check.depends = $${TARGET} QMAKE_EXTRA_TARGETS += check ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/client/0000755000015600001650000000000012674252771026156 5ustar pbuserpbgroup00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/client/tst_qml_client.cpp0000644000015600001650000001400612674252514031677 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of OnlineAccountsClient. * * OnlineAccountsClient is free software: you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * OnlineAccountsClient is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with OnlineAccountsClient. If not, see * . */ #include "online-accounts-ui/globals.h" #include #include #include #include #include #include #include #include class Service: public QObject { Q_OBJECT Q_CLASSINFO("D-Bus Interface", "com.ubuntu.OnlineAccountsUi") public: Service(): QObject() {} QVariantMap options() const { return m_options; } public Q_SLOTS: QVariantMap requestAccess(const QVariantMap &options) { m_options = options; return QVariantMap(); } private: QVariantMap m_options; }; class SetupTest: public QObject { Q_OBJECT public: SetupTest(); QVariantMap options() const { return m_service.options(); } private Q_SLOTS: void initTestCase(); void testLoadPlugin(); void testProperties(); void testVersions_data(); void testVersions(); void testExec(); void testExecWithServiceType(); private: Service m_service; }; SetupTest::SetupTest(): QObject(0) { } void SetupTest::initTestCase() { qputenv("QML2_IMPORT_PATH", PLUGIN_PATH); QDBusConnection connection = QDBusConnection::sessionBus(); connection.registerObject(OAU_OBJECT_PATH, &m_service, QDBusConnection::ExportAllContents); connection.registerService(OAU_SERVICE_NAME); } void SetupTest::testLoadPlugin() { QQmlEngine engine; QQmlComponent component(&engine); component.setData("import Ubuntu.OnlineAccounts.Client 0.1\n" "Setup {}", QUrl()); QObject *object = component.create(); if (component.isError()) { Q_FOREACH(const QQmlError &error, component.errors()) { qDebug() << error; } } QVERIFY(object != 0); delete object; } void SetupTest::testProperties() { QQmlEngine engine; QQmlComponent component(&engine); component.setData("import Ubuntu.OnlineAccounts.Client 0.2\n" "Setup { providerId: \"hello\" }", QUrl()); QObject *object = component.create(); QVERIFY(object != 0); QCOMPARE(object->property("providerId").toString(), QString("hello")); QCOMPARE(object->property("serviceTypeId").toString(), QString()); object->setProperty("providerId", QString("ciao")); QCOMPARE(object->property("providerId").toString(), QString("ciao")); object->setProperty("serviceTypeId", QString("hi")); QCOMPARE(object->property("serviceTypeId").toString(), QString("hi")); object->setProperty("serviceId", QString("bonjour")); QCOMPARE(object->property("serviceId").toString(), QString("bonjour")); delete object; } void SetupTest::testVersions_data() { QTest::addColumn("qmlCode"); QTest::addColumn("mustBuild"); QTest::newRow("0.1, regular") << "import Ubuntu.OnlineAccounts.Client 0.1\n" "Setup {\n" " providerId: \"hello\"\n" " serviceTypeId: \"something\"\n" "}" << true; QTest::newRow("0.1, newer prop") << "import Ubuntu.OnlineAccounts.Client 0.1\n" "Setup {\n" " providerId: \"hello\"\n" " serviceTypeId: \"something\"\n" " serviceId: \"wishful\"\n" "}" << false; QTest::newRow("0.2, newer prop") << "import Ubuntu.OnlineAccounts.Client 0.2\n" "Setup {\n" " providerId: \"hello\"\n" " serviceTypeId: \"something\"\n" " serviceId: \"yes we can\"\n" "}" << true; } void SetupTest::testVersions() { QFETCH(QString, qmlCode); QFETCH(bool, mustBuild); if (!mustBuild) { QTest::ignoreMessage(QtWarningMsg, "QQmlComponent: Component is not ready"); } QQmlEngine engine; QQmlComponent component(&engine); component.setData(qmlCode.toUtf8(), QUrl()); QObject *object = component.create(); QCOMPARE(object != 0, mustBuild); delete object; } void SetupTest::testExec() { QQmlEngine engine; QQmlComponent component(&engine); component.setData("import Ubuntu.OnlineAccounts.Client 0.1\n" "Setup {}", QUrl()); QObject *object = component.create(); QVERIFY(object != 0); QSignalSpy finished(object, SIGNAL(finished(QVariantMap))); QVERIFY(QMetaObject::invokeMethod(object, "exec")); QVERIFY(finished.wait()); QCOMPARE(options().contains(OAU_KEY_PROVIDER), false); QCOMPARE(options().contains(OAU_KEY_SERVICE_TYPE), false); QCOMPARE(options().contains(OAU_KEY_SERVICE_ID), false); } void SetupTest::testExecWithServiceType() { QQmlEngine engine; QQmlComponent component(&engine); component.setData("import Ubuntu.OnlineAccounts.Client 0.1\n" "Setup { serviceTypeId: \"e-mail\" }", QUrl()); QObject *object = component.create(); QVERIFY(object != 0); QSignalSpy finished(object, SIGNAL(finished(QVariantMap))); QVERIFY(QMetaObject::invokeMethod(object, "exec")); QVERIFY(finished.wait()); QCOMPARE(options().value(OAU_KEY_SERVICE_TYPE).toString(), QStringLiteral("e-mail")); } QTEST_MAIN(SetupTest); #include "tst_qml_client.moc" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/client/tst_client.cpp0000644000015600001650000001171512674252514031032 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of OnlineAccountsClient. * * OnlineAccountsClient is free software: you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * OnlineAccountsClient is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with OnlineAccountsClient. If not, see * . */ #include "online-accounts-ui/globals.h" #include #include #include #include #include #include #include #include using namespace OnlineAccountsClient; class Service: public QObject, QDBusContext { Q_OBJECT Q_CLASSINFO("D-Bus Interface", "com.ubuntu.OnlineAccountsUi") public: Service(): QObject() {} QVariantMap options() const { return m_options; } void setError(const QString &name) { m_errorName = name; } public Q_SLOTS: QVariantMap requestAccess(const QVariantMap &options) { m_options = options; if (!m_errorName.isEmpty()) { sendErrorReply(m_errorName, "Some error"); m_errorName = QString(); } return QVariantMap(); } private: QVariantMap m_options; QString m_errorName; }; class SetupTest: public QObject { Q_OBJECT public: SetupTest(); QVariantMap options() const { return m_service.options(); } private Q_SLOTS: void initTestCase(); void testProperties(); void testExec(); void testExecWithProvider(); void testExecWithServiceType(); void testExecWithApplication(); void testError(); void testWindowId(); private: Service m_service; }; SetupTest::SetupTest(): QObject(0) { } void SetupTest::initTestCase() { QDBusConnection connection = QDBusConnection::sessionBus(); connection.registerObject(OAU_OBJECT_PATH, &m_service, QDBusConnection::ExportAllContents); connection.registerService(OAU_SERVICE_NAME); } void SetupTest::testProperties() { Setup setup; QCOMPARE(setup.applicationId(), QString()); QCOMPARE(setup.providerId(), QString()); QCOMPARE(setup.serviceTypeId(), QString()); setup.setApplicationId("hi!"); QCOMPARE(setup.applicationId(), QString("hi!")); setup.setProviderId("ciao"); QCOMPARE(setup.providerId(), QString("ciao")); setup.setServiceTypeId("hello"); QCOMPARE(setup.serviceTypeId(), QString("hello")); } void SetupTest::testExec() { Setup setup; QSignalSpy finished(&setup, SIGNAL(finished(QVariantMap))); setup.exec(); QVERIFY(finished.wait(10000)); QCOMPARE(options().contains(OAU_KEY_APPLICATION), false); QCOMPARE(options().contains(OAU_KEY_PROVIDER), false); QCOMPARE(options().contains(OAU_KEY_SERVICE_TYPE), false); QCOMPARE(options().contains(OAU_KEY_WINDOW_ID), false); } void SetupTest::testExecWithProvider() { Setup setup; setup.setProviderId("lethal-provider"); QSignalSpy finished(&setup, SIGNAL(finished(QVariantMap))); setup.exec(); QVERIFY(finished.wait(10000)); QCOMPARE(options().value(OAU_KEY_PROVIDER).toString(), QStringLiteral("lethal-provider")); } void SetupTest::testExecWithServiceType() { Setup setup; setup.setServiceTypeId("e-mail"); QSignalSpy finished(&setup, SIGNAL(finished(QVariantMap))); setup.exec(); QVERIFY(finished.wait(10000)); QCOMPARE(options().value(OAU_KEY_SERVICE_TYPE).toString(), QStringLiteral("e-mail")); } void SetupTest::testExecWithApplication() { Setup setup; setup.setApplicationId("MyApp"); QSignalSpy finished(&setup, SIGNAL(finished(QVariantMap))); setup.exec(); QVERIFY(finished.wait(10000)); QCOMPARE(options().value(OAU_KEY_APPLICATION).toString(), QStringLiteral("MyApp")); } void SetupTest::testWindowId() { Setup setup; QWindow window; QSignalSpy finished(&setup, SIGNAL(finished(QVariantMap))); setup.exec(); QVERIFY(finished.wait()); QCOMPARE(options().value(OAU_KEY_WINDOW_ID).toUInt(), uint(window.winId())); } void SetupTest::testError() { m_service.setError("com.ubuntu.SomeError"); Setup setup; QSignalSpy finished(&setup, SIGNAL(finished(QVariantMap))); setup.exec(); QVERIFY(finished.wait(10000)); QCOMPARE(finished.count(), 1); QCOMPARE(finished.at(0).at(0).toMap().value("errorName").toString(), QString("com.ubuntu.SomeError")); } QTEST_MAIN(SetupTest); #include "tst_client.moc" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/client/tst_client.pro0000644000015600001650000000077012674252514031047 0ustar pbuserpbgroup00000000000000include(../../common-project-config.pri) TARGET = tst_client CONFIG += \ debug QT += \ core \ dbus \ testlib SOURCES += \ tst_client.cpp INCLUDEPATH += \ $${TOP_SRC_DIR}/client \ $${TOP_SRC_DIR} QMAKE_LIBDIR = $${TOP_BUILD_DIR}/client/OnlineAccountsClient QMAKE_RPATHDIR = $${QMAKE_LIBDIR} LIBS += -lonline-accounts-client check.commands = "xvfb-run -s '-screen 0 640x480x24' -a dbus-test-runner -t ./$${TARGET}" check.depends = $${TARGET} QMAKE_EXTRA_TARGETS += check ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/client/tst_qml_client.pro0000644000015600001650000000104012674252514031707 0ustar pbuserpbgroup00000000000000include(../../common-project-config.pri) TARGET = tst_qml_client CONFIG += \ debug QT += \ core \ dbus \ qml \ testlib SOURCES += \ tst_qml_client.cpp INCLUDEPATH += \ $${TOP_SRC_DIR} PLUGIN_PATH = $${TOP_BUILD_DIR}/client/module DEFINES += \ PLUGIN_PATH=\\\"$${PLUGIN_PATH}\\\" check.commands = "LD_LIBRARY_PATH=$${TOP_BUILD_DIR}/client/OnlineAccountsClient:${LD_LIBRARY_PATH} xvfb-run -s '-screen 0 640x480x24' -a dbus-test-runner -t ./$${TARGET}" check.depends = $${TARGET} QMAKE_EXTRA_TARGETS += check ubuntu-system-settings-online-accounts-0.7+16.04.20160322/tests/client/client.pro0000644000015600001650000000011312674252514030144 0ustar pbuserpbgroup00000000000000TEMPLATE = subdirs SUBDIRS = \ tst_client.pro \ tst_qml_client.pro ubuntu-system-settings-online-accounts-0.7+16.04.20160322/common-vars.pri0000644000015600001650000000144012674252514026505 0ustar pbuserpbgroup00000000000000#----------------------------------------------------------------------------- # Common variables for all projects. #----------------------------------------------------------------------------- #----------------------------------------------------------------------------- # Project name (used e.g. in include file and doc install path). # remember to update debian/* files if you changes this #----------------------------------------------------------------------------- PROJECT_NAME = ubuntu-system-settings-online-accounts #----------------------------------------------------------------------------- # Project version # remember to update debian/* files if you changes this #----------------------------------------------------------------------------- PROJECT_VERSION = 0.7 # End of File ubuntu-system-settings-online-accounts-0.7+16.04.20160322/common-installs-config.pri0000644000015600001650000000267412674252514030640 0ustar pbuserpbgroup00000000000000#----------------------------------------------------------------------------- # Common installation configuration for all projects. #----------------------------------------------------------------------------- #----------------------------------------------------------------------------- # default installation target for applications #----------------------------------------------------------------------------- contains(TEMPLATE, app) { target.path = $${INSTALL_PREFIX}/bin INSTALLS += target message("====") message("==== INSTALLS += target") } #----------------------------------------------------------------------------- # default installation target for libraries #----------------------------------------------------------------------------- contains(TEMPLATE, lib) { isEmpty(target.path) { target.path = $${INSTALL_LIBDIR} } INSTALLS += target message("====") message("==== INSTALLS += target") } #----------------------------------------------------------------------------- # target for header files #----------------------------------------------------------------------------- !isEmpty(headers.files) { headers.path = $${INSTALL_PREFIX}/include/$${TARGET} INSTALLS += headers message("====") message("==== INSTALLS += headers") } else { message("====") message("==== NOTE: Remember to add your API headers into `headers.files' for installation!") } # End of File ubuntu-system-settings-online-accounts-0.7+16.04.20160322/README0000644000015600001650000000000112674252514024400 0ustar pbuserpbgroup00000000000000 ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/0000755000015600001650000000000012674252771024154 5ustar pbuserpbgroup00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/pl.po0000644000015600001650000000617012674252514025126 0ustar pbuserpbgroup00000000000000# Polish translation for ubuntu-system-settings-online-accounts # Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2013. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-04-27 12:50+0000\n" "Last-Translator: GTriderXC \n" "Language-Team: Polish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Nazwa użytkownika" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Hasło" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Ładowanie..." #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Anuluj" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "ID" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Usunięcie konta..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Usuń konto" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "Konto %1 zostanie usunięte tylko z telefonu. W przyszłości można je dodać " "ponownie." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Usuń" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Dostęp do tego konta:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Dodaj konto..." #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Zapamiętane tutaj dane logowania pozwolą aplikacjom logować się " "automatycznie na konta użytkownika" #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Konta" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Dodanie konta" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Brak kont" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Dodaj konto:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 prosi o dostęp do Twojego konta %2" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Zezwól" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "Dodaj kolejne konto..." #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Nie zezwalaj" #~ msgid "Add another" #~ msgstr "Dodaj inne" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/bs.po0000644000015600001650000000614612674252514025122 0ustar pbuserpbgroup00000000000000# Bosnian translation for ubuntu-system-settings-online-accounts # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-01-25 21:41+0000\n" "Last-Translator: Kenan Gutić \n" "Language-Team: Bosnian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Korisničko ime" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Šifra" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Učitavanje..." #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Otkaži" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "ID" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Obriši račun..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Obriši račun" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "Račun %1 će biti obrisan sa telefona. Možete ga dodati poslije ponovo." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Obriši" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Pristup ovom računu:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Dodaj nalog…" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Održavanje korisničkih računa ovdeje omogućava aplikacijama korištenje " "računa bez prijavljivanja u pojedinačnim aplikacijama." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Računi" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Dodaj račun" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Nema računa" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Dodaj račun:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 želi pristupiti vaše %2 računu" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Dozvoli" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Zabrani" #~ msgid "Add another" #~ msgstr "Dodaj drugi" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/pa.po0000644000015600001650000000746312674252514025121 0ustar pbuserpbgroup00000000000000# Punjabi translation for ubuntu-system-settings-online-accounts # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-04-24 04:27+0000\n" "Last-Translator: Gursharnjit_Singh \n" "Language-Team: Punjabi \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "ਯੂਜ਼ਰ ਨਾਂ" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "ਪਾਸਵਰਡ" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "…ਲੋਡ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "ਰੱਦ ਕਰੋ" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "ID" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "ਅਕਾਊਂਟ ਹਟਾਓ..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "ਅਕਾਊਂਟ ਹਟਾਓ" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "%1 ਅਕਾਊਂਟ ਕੇਵਲ ਤੁਹਾਡੇ ਫੋਨ ਤੋਂ ਹੀ ਹਟਾਇਆ ਜਾਵੇਗਾ। ਤੁਸੀਂ ਇਸ ਨੂੰ ਬਾਅਦ ਵਿੱਚ ਫੇਰ " "ਜੋੜ ਸਕਦੇ ਹੋ।" #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "ਹਟਾਓ" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "ਇਹ ਅਕਾਊਂਟ ਲਈ ਪਹੁੰਚ:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "...ਅਕਾਊਂਟ ਸ਼ਾਮਿਲ" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "ਇੱਥੇ ਅਕਾਊਂਟ ਵੇਰਵਾ ਸੰਭਾਲਣ ਨਾਲ ਐਪਸ ਤੁਹਾਡੇ ਵਲੋਂ ਹਰੇਕ ਐਪ ਲਈ ਸਾਇਨ ਕੀਤੇ ਬਿਨਾਂ " "ਅਕਾਊਂਟ ਨੂੰ ਵਰਤ ਸਕਦੀਆਂ ਹਨ।" #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "ਅਕਾਊਂਟ" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "ਅਕਾਊਂਟ ਸ਼ਾਮਿਲ" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "ਕੋਈ ਅਕਾਊਂਟ ਨਹੀਂ" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "ਅਕਾਊਂਟ ਸ਼ਾਮਿਲ ਕਰੋ:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 ਤੁਹਾਡੇ %2 ਅਕਾਊਂਟ ਨੂੰ ਵਰਤਣਾ ਚਾਹੁੰਦਾ ਹੈ" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "ਮਨਜ਼ੂਰ" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "ਹੋਰ ਖਾਤਾ ਜੋੜੋ..." #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "ਮਨਜ਼ੂਰੀ ਨਾ ਦਿਓ" #~ msgid "Add another" #~ msgstr "ਹੋਰ ਸ਼ਾਮਿਲ ਕਰੋ" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/az.po0000644000015600001650000000640112674252514025122 0ustar pbuserpbgroup00000000000000# Azerbaijani translation for ubuntu-system-settings-online-accounts # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2014-09-04 12:10+0000\n" "Last-Translator: Nicat Məmmədov \n" "Language-Team: Azerbaijani \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "İstifadəçi adı" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Şifrə" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Yüklənir..." #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "İmtina" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "Kimlik" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Hesabı sil..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Hesabı sil" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "%1 hesabı yalnız telefonunuzdan silinəcək. Daha sonra təzədən əlavə edə " "bilərsiz." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Sil" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Bu hesaba giriş:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Hesab әlavә et" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Hesab məlumatlarınızı buraya qeyd etdiyinizdə, hər tətbiqetmə üçün təzədən " "hesab açmağın qarşısını almaq üçün tətbiqetmələrin hesablardan istifadə " "etməsinə icazə verə bilərsiniz." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Hesablar" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Hesab әlavә et" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Hesab yoxdu" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Hesab əlavə et:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 %2 hesabınıza daxil olmaq istəyir" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "İcazə ver" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "İcazә vermә" #~ msgid "Add another" #~ msgstr "Başqasını əlavə et" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/gl.po0000644000015600001650000000622612674252514025117 0ustar pbuserpbgroup00000000000000# Galician translation for ubuntu-system-settings-online-accounts # Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2013. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-07-21 14:04+0000\n" "Last-Translator: Marcos Lans \n" "Language-Team: Galician \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Nome do usuario" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Contrasinal" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Cargando..." #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Cancelar" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "ID" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Eliminar a conta..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Eliminar esta conta" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "A conta %1 eliminarase só do teléfono. Pode engadila de novo noutro momento." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Eliminar" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Acceder a esta conta:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Engadir unha conta..." #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Gardando aquí a información das contas permitirá que os aplicativos a " "utilicen sen ter que iniciar sesión en cada un deles." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Contas" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Engadir conta" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Non hai contas" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Engadir conta:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 quere acceder á túa conta de %2" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Permitir" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "Engadir outra conta..." #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Rexeitar" #~ msgid "Add another" #~ msgstr "Engadir outra" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/nl.po0000644000015600001650000000630212674252514025121 0ustar pbuserpbgroup00000000000000# Dutch translation for ubuntu-system-settings-online-accounts # Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2013. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-04-22 18:03+0000\n" "Last-Translator: rob \n" "Language-Team: Dutch \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Gebruikersnaam" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Wachtwoord" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Laden…" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Annuleren" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "ID" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Account verwijderen…" #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Account verwijderen" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "De %1-account zal alleen van uw telefoon verwijderd worden. U kunt deze " "later weer toevoegen." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Verwijderen" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Toegang tot deze account:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Account toevoegen…" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Door hier accountgegevens op te slaan, kunnen apps de accounts gebruiken " "zonder dat u zich voor elke app apart hoeft aan te melden." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Accounts" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Account toevoegen" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Geen accounts" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Account toevoegen:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 wil toegang tot uw %2-account" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Toestaan" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "Ander account toevoegen…" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Weigeren" #~ msgid "Add another" #~ msgstr "Nog een andere toevoegen" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/ca.po0000644000015600001650000000643412674252514025101 0ustar pbuserpbgroup00000000000000# Catalan translation for ubuntu-system-settings-online-accounts # Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2013. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-06-18 08:49+0000\n" "Last-Translator: David Planella \n" "Language-Team: Catalan \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Nom d'usuari" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Contrasenya" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "S'està carregant…" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Cancel·la" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "Identificador" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Suprimeix el compte..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Suprimeix el compte" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "Se suprimirà el compte %1 només en aquest dispositiu. Podeu tornar-lo a " "afegir-lo més endavant." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Suprimeix" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Accés a aquest compte:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Afegeix un compte..." #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Si emmagatzemeu els detalls dels vostres comptes aquí, les aplicacions " "podran utilitzar-los sense que hàgiu d'introduir les dades d'accés per a " "cadascuna d'elles." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Comptes" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Afegeix un compte" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "No hi ha cap compte" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Afegeix un compte:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 vol accedir al vostre compte %2" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Permet" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "Afegeix un altre compte..." #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "No ho permetis" #~ msgid "Add another" #~ msgstr "Afegeix-ne una altra" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/ia.po0000644000015600001650000000623312674252514025104 0ustar pbuserpbgroup00000000000000# Interlingua translation for ubuntu-system-settings-online-accounts # Copyright (c) 2015 Rosetta Contributors and Canonical Ltd 2015 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2015. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-04-24 08:27+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Interlingua \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Nomine de usator" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Contrasigno" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Cargamento..." #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Annullar" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "ID" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Remover le conto..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Remove conto" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "Le conto %1 essera removite solmente de tu telephono. Tu potera readder lo " "postea." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Remover" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Accesso a iste conto:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Adder un conto..." #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Memorisar ci le informationes del contos permitte al applicationes de usar " "le contos sin demandar te de inserer tu contrasignos in cata application." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Contos" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Adder un conto" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Nulle conto" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Adde un conto:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 vole utilisar tu conto %2" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Permitter" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Non permitter" #~ msgid "Add another" #~ msgstr "Adder un altere" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/zh_TW.po0000644000015600001650000000621112674252514025542 0ustar pbuserpbgroup00000000000000# Chinese (Traditional) translation for ubuntu-system-settings-online-accounts # Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2013. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2014-08-29 23:48+0000\n" "Last-Translator: Walter Cheuk \n" "Language-Team: Chinese (Traditional) \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "使用者名稱" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "密碼" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "載入中..." #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "取消" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "ID" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "移除帳號..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "移除帳號" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "%1 帳號只會從你的手機中移除。你往後仍可再將它加回來。" #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "移除" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "存取此帳號的有:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "加入帳號..." #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "你可以在這裡儲存帳號細節供各程式使用帳號資訊,你就不需要各自為每個程式登入。" #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "帳號" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "加入帳號" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "沒有帳號" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "加入帳號:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 想存取您的 %2 帳號" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "允許" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "加入另一個帳號…" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "不允許" #~ msgid "Add another" #~ msgstr "加入其他" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/ca@valencia.po0000644000015600001650000000633012674252514026677 0ustar pbuserpbgroup00000000000000# Catalan translation for ubuntu-system-settings-online-accounts # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2014-10-15 14:39+0000\n" "Last-Translator: Pau Iranzo \n" "Language-Team: Catalan \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Nom d'usuari" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Contrasenya" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "S'està carregant…" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Cancel·la" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "Identificador" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Suprimeix el compte..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Suprimeix el compte" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "Se suprimirà el compte %1 només en este dispositiu. Podeu tornar-lo a afegir-" "lo més avant." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Suprimeix" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Accés a este compte:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Afig un compte..." #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Si emmagatzemeu els detalls dels vostres comptes ací, les aplicacions podran " "utilitzar-los sense que hàgeu d'introduir les dades d'accés per a cadascuna " "d'elles." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Comptes" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Afig un compte" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "No hi ha cap compte" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Afig un compte:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 vol accedir al vostre compte %2" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Permet" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "No ho permetes" #~ msgid "Add another" #~ msgstr "Afig-ne una altra" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/hi.po0000644000015600001650000000521412674252514025111 0ustar pbuserpbgroup00000000000000# Hindi translation for ubuntu-system-settings-online-accounts # Copyright (c) 2015 Rosetta Contributors and Canonical Ltd 2015 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2015. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-10-06 06:32+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Hindi \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "" #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/nb.po0000644000015600001650000000620512674252514025111 0ustar pbuserpbgroup00000000000000# Norwegian Bokmal translation for ubuntu-system-settings-online-accounts # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-04-23 07:15+0000\n" "Last-Translator: Åka Sikrom \n" "Language-Team: Norwegian Bokmal \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Brukernavn" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Passord" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Laster inn …" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Avbryt" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "ID" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Fjern konto …" #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Fjern konto" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "%1-kontoen blir bare fjernet fra telefonen. Du kan legge den til igjen " "senere." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Fjern" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Kontotilgang:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Legg til konto …" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Hvis du lagrer kontoinformasjon her, kan programmer bruke kontoene uten at " "du må logge inn på hver av dem, hver gang." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Kontoer" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Legg til konto" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Ingen kontoer" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Legg til konto:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 vil ha tilgang til %2-kontoen din" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Tillat" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "Legg til en annen konto …" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Avvis" #~ msgid "Add another" #~ msgstr "Legg til en annen" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/cs.po0000644000015600001650000000621512674252514025120 0ustar pbuserpbgroup00000000000000# Czech translation for ubuntu-system-settings-online-accounts # Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2013. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-05-06 19:10+0000\n" "Last-Translator: Vojtěch Daněk \n" "Language-Team: Czech \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Uživatelské jméno" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Heslo" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Načítání…" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Zrušit" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "ID" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Odebrat účet..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Odebrat účet" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "Účet %1 bude odebrán pouze z vašeho telefonu. Můžete jej přidat později " "znovu." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Odebrat" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Přístup k tomuto účtu:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Přidat účet..." #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Uložení podrobností účtů umožňuje aplikacím používat vaše účty, aniž byste " "se museli pokaždé přihlašovat do každé aplikace zvlášť." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Účty" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Přidat účet" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Žádné účty" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Přidat účet:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 chce přístup k účtu %2" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Povolit" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "Přidat další účet..." #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Nepovolit" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/fa.po0000644000015600001650000000723612674252514025105 0ustar pbuserpbgroup00000000000000# Persian translation for ubuntu-system-settings-online-accounts # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-05-05 22:11+0000\n" "Last-Translator: Danial Behzadi \n" "Language-Team: Persian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "نام کاربری" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "گذرواژه" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "درحال بارکردن…" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "لغو" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "شناسه" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "حذف حساب کاربری…" #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "برداشتن حساب کاربری" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "حساب %1 تنها از روی تلفن شما برداشته خواهد شد. شما می‌توانید بعداً آن را " "دوباره بیفزایید." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "برداشتن" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "دست‌رسی به این حساب کاربری:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "افزودن حساب کاربری…" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "نگه داری جزئیات حساب کاربری در این‌جا به اپ‌ها اجازه می‌دهد بدون این که برای " "هر اپ وارد حسابتان شوید، از حساب‌های کاربری استفاده کنند." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "حساب‌های کاربری" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "افزودن حساب کاربری" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "حساب کاربری‌ای وجود ندارد" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "افزودن حساب کاربری:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 می‌خواهد به حساب %2 شما دست‌رسی پیدا کند" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "اجازه دادن" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "افزودن حسابی دیگر…" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "اجازه ندادن" #~ msgid "Add another" #~ msgstr "افزودن یکی دیگر" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/pt.po0000644000015600001650000000622112674252514025133 0ustar pbuserpbgroup00000000000000# Portuguese translation for ubuntu-system-settings-online-accounts # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-12-20 09:37+0000\n" "Last-Translator: Ivo Xavier \n" "Language-Team: Portuguese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Nome de utilizador" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Palavra-passe" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "A carregar…" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Cancelar" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "ID" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Eliminar conta..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Eliminar conta" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "A conta %1 será removida apenas do seu telemóvel. Poderá adiciona-la " "novamente mais tarde." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Eliminar" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Acesso a esta conta:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Adicionar conta..." #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Ao guardar os detalhes das contas aqui, não precisa de iniciar sessão em " "cada app." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Contas" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Adicionar conta" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Sem contas" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Adicionar conta:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 quer acessar à sua conta %2" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Permitir" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "Adicionar outra conta..." #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Não permitir" #~ msgid "Add another" #~ msgstr "Adicionar outro" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/en_GB.po0000644000015600001650000000620312674252514025462 0ustar pbuserpbgroup00000000000000# English (United Kingdom) translation for ubuntu-system-settings-online-accounts # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-04-22 16:06+0000\n" "Last-Translator: Alan Pope  \n" "Language-Team: English (United Kingdom) \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Username" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Password" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Loading…" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Cancel" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "ID" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Remove account…" #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Remove account" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "The %1 account will be removed only from your phone. You can add it again " "later." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Remove" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Access to this account:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Add account…" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Storing account details here saves time that would otherwise be spent " "signing in for each app." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Accounts" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Add account" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "No accounts" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Add account:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 wants to access your %2 account" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Allow" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "Add another account…" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Don't allow" #~ msgid "Add another" #~ msgstr "Add another" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/ckb.po0000644000015600001650000000524312674252514025252 0ustar pbuserpbgroup00000000000000# Kurdish (Sorani) translation for ubuntu-system-settings-online-accounts # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2014-01-19 11:35+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Kurdish (Sorani) \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "" #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/sq.po0000644000015600001650000000574612674252514025146 0ustar pbuserpbgroup00000000000000# Albanian translation for ubuntu-system-settings-online-accounts # Copyright (c) 2015 Rosetta Contributors and Canonical Ltd 2015 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2015. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-04-04 09:45+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Albanian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Emri i përdoruesit" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Fjalëkalimi" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Duke u ngarkuar..." #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Anulo" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "ID" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Hiq llogari..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Hiqe llogarinë" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "Llogaria %1 do të hiqet vetëm nga telefoni juaj. Mund ta shtoni atë përsëri " "më vonë." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Hiq" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Hyrje në këtë llogari:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Shto llogari..." #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Llogaritë" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Shto llogari" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Asnjë llogari" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Shto llogari:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Lejo" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Mos lejo" #~ msgid "Add another" #~ msgstr "Shto një tjetër" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/pt_BR.po0000644000015600001650000000635112674252514025522 0ustar pbuserpbgroup00000000000000# Brazilian Portuguese translation for ubuntu-system-settings-online-accounts # Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2013. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-04-27 13:27+0000\n" "Last-Translator: Tiago Hillebrandt \n" "Language-Team: Brazilian Portuguese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Nome de usuário" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Senha" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Carregando..." #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Cancelar" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "ID" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Remover conta…" #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Remover conta" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "A conta %1 será removida somente do seu telefone. Você pode adicioná-la " "novamente mais tarde." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Remover" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Acesso a essa conta:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Adicionar conta..." #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Armazenar detalhes da conta aqui permite que os aplicativos usem as contas " "sem que você tenha que entrar com as informações para cada aplicativo." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Contas" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Adicionar conta" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Nenhuma conta" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Adicionar conta:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 quer acessar a sua conta %2" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Permitir" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "Adicionar outra conta..." #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Não permitir" #~ msgid "Add another" #~ msgstr "Adicionar outra" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/ta.po0000644000015600001650000000775512674252514025131 0ustar pbuserpbgroup00000000000000# Tamil translation for ubuntu-system-settings-online-accounts # Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2013. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2014-08-29 20:11+0000\n" "Last-Translator: Arun Kumar - அருண் குமார் \n" "Language-Team: Tamil \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "பயனர் பெயர்" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "கடவுச்சொல்" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "ஏற்றுகிறது..." #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "ரத்துசெய்" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "அடையாளம்" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "கணக்கை நீக்கு..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "கணக்கை நீக்கு" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "உங்களுடைய தொலைபேசியிலிருந்து மட்டுமே இந்த %1 கணக்கை நீக்கலாம். நீங்க இதை " "பிறகு சேர்க்கவும்." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "நீக்கு" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "இந்த கணக்கின் அனுகல்:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "கணக்கை சேர்க்க..." #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "ஒவ்வொரு பயன்பாட்டிலும் உள்நுழையாமல் உங்களுடைய கணக்கின் விவரங்களை " "சேமிப்பதின் மூலம் பயன்பாடுகள் அதை பயன்படுத்தி உள்நுழையலாம்." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "கணக்குகள்" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "கணக்கை சேர்" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "கணக்குகள் இல்லை" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "கணக்கை சேர்:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "உங்கள் %2 கணக்கிற்கு %1 அனுமதி கோருகிறது" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "அனுமதி" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "அனுமதிக்காதே" #~ msgid "Add another" #~ msgstr "மற்றொன்றைச் சேர்" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/sk.po0000644000015600001650000000617512674252514025135 0ustar pbuserpbgroup00000000000000# Slovak translation for ubuntu-system-settings-online-accounts # Copyright (c) 2016 Rosetta Contributors and Canonical Ltd 2016 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2016. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2016-02-28 00:31+0000\n" "Last-Translator: P_E_T_O \n" "Language-Team: Slovak \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" "Language: sk_SK\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Používateľské meno" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Heslo" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Načítavam..." #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Zrušiť" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "ID" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Vymazať účet..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Vymazať účet" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "Účet %1 bude vymazaný len s vášho zariadenia.Môžete ho pridať neskôr." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Vymazať" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Prístup k tomuto účtu:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Pridať účet..." #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Ukladanie údajov o aplikáciach tuto, umožní aplikáciám využívať účty, bez " "toho, aby ste sa museli prihlasovať pre každú aplikáciu." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Účty" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Pridať účet" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Bez účtov" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Pridať účet:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 chce pristúpiť k účtu %2" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Povoliť" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "Pridať iný účet..." #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Nepovoliť" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/oc.po0000644000015600001650000000616412674252514025117 0ustar pbuserpbgroup00000000000000# Occitan (post 1500) translation for ubuntu-system-settings-online-accounts # Copyright (c) 2015 Rosetta Contributors and Canonical Ltd 2015 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2015. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-02-06 06:22+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Occitan (post 1500) \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Nom d'utilizaire" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Senhal" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Cargament…" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Abandonar" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "Identificant" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Suprimir lo compte..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Suprimir lo compte" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Suprimir" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Accedir a aqueste compte :" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Apondre un compte…" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Regropar los detalhs de vòstres comptes aicí permet a las aplicacions de los " "utilizar sens qu'ajatz besonh de vos connectar per cacuna d'elas." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Comptes" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Apondre un compte" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Pas de compte" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Apondre un compte :" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 vòl accedir a vòstre compte %2" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Autorizar" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Refusar" #~ msgid "Add another" #~ msgstr "Apondre un autre" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/sv.po0000644000015600001650000000633012674252514025141 0ustar pbuserpbgroup00000000000000# Swedish translation for ubuntu-system-settings-online-accounts # Copyright © 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # Josef Andersson , 2014. # clone , 2015. msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-07-12 22:18+0000\n" "Last-Translator: Josef Andersson \n" "Language-Team: Swedish\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" "Language: sv\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Användarnamn" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Lösenord" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Läser in…" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Avbryt" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "Id" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Ta bort konto…" #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Ta bort konto" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "%1-kontot kommer bara att tas bort från din telefon. Du kan lägga till det " "igen senare." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Ta bort" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Åtkomst till detta konto:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Lägg till konto…" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Om du lagrar dina kontodetaljer här kan program använda kontona utan att du " "behöver logga in för varje program." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Konton" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Lägg till konto" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Inga konton" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Lägg till konto:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 vill komma åt ditt %2-konto" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Tillåt" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "Lägg till ännu ett konto..." #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Tillåt inte" #~ msgid "Add another" #~ msgstr "Lägg till fler" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/lv.po0000644000015600001650000000614612674252514025137 0ustar pbuserpbgroup00000000000000# Latvian translation for ubuntu-system-settings-online-accounts # Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2013. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-11-22 08:37+0000\n" "Last-Translator: Rūdolfs Mazurs \n" "Language-Team: Latvian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Lietotājvārds" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Parole" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Ielādē…" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Atcelt" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "ID" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Noņemt kontu..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Noņemt kontu" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "%1 konts tiks izdzēsts tikai no jūsu tālruņa. Vēlāk varēsiet to atkal " "pievienot." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Noņemt" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Piekļūt šim kontam:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Pievienot kontu…" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Šeit glabājot kontu datus, lietotnes varēs izmantot kontus, neprasot " "ieraksīties." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Konti" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Pievienot kontu" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Nav kontu" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Pievienot kontu:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 vēlas piekļūt jūsu %2 kontam" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Atļaut" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "Pievienot citu kontu…" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Neatļaut" #~ msgid "Add another" #~ msgstr "Pievienot citu" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/id.po0000644000015600001650000000613112674252514025104 0ustar pbuserpbgroup00000000000000# Indonesian translation for ubuntu-system-settings-online-accounts # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2014-11-24 04:23+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Indonesian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Nama pengguna" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Sandi" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Memuat…" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Batal" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "ID" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Hapus akun..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Hapus akun" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "Akun %1 hanya akan dihapus dari telepon Anda. Anda dapat menambahkannya lagi " "nanti." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Hapus" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Akses ke akun ini:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Tambah akun..." #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Menyimpan rincian akun di sini memungkinkan app memakai akun tanpa Anda " "perlu masuk bagi setiap app." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Akun" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Tambah akun" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Tak ada akun" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Tambah akun:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 ingin mengakses akun %2 Anda" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Izinkan" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "Tambah akun lain..." #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Jangan izinkan" #~ msgid "Add another" #~ msgstr "Tambah lainnya" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/mr.po0000644000015600001650000000750512674252514025134 0ustar pbuserpbgroup00000000000000# Marathi translation for ubuntu-system-settings-online-accounts # Copyright (c) 2015 Rosetta Contributors and Canonical Ltd 2015 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2015. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-08-06 09:15+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Marathi \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "वापरकर्त्याचे नाव" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "संकेतशब्द" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "लोड करत आहे..." #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "रद्द" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "ओळख" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "खाते काढुन टाका" #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "खाते काढुन टाका" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "%1 हॆ खाते फक्त फॊन मधुन काढण्यात यॆईल. नंतर तुम्ही तॆ समाविष्ट करु शकता." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "काढून टाका" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "खात्यांमध्यॆ प्रवॆश" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "खाते समाविष्ट करा" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "खात्यांची माहिती यॆथॆ टाकल्यावर तुम्ही साईन-इन न करताही तॆ खाते ॲप्सला " "वापरता यॆईल" #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "खाते" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "खाते समाविष्ट करा" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "खाते समाविष्ट नाही" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "खाते समाविष्ट करा" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 ना तुमच्या %2 खात्यांमध्यॆ प्रवॆश करायचा आहॆ" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "परवानगी द्या" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "परवानगी दॆऊ नका" #~ msgid "Add another" #~ msgstr "दुसरॆ खाते समाविष्ट करा" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/ar.po0000644000015600001650000000624312674252514025116 0ustar pbuserpbgroup00000000000000# Arabic translation for ubuntu-system-settings-online-accounts # Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2013. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2013-10-03 19:50+0000\n" "Last-Translator: Ibrahim Saed \n" "Language-Team: Arabic \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "اسم المستخدم" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "كلمة السر" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "إلغاء" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "المعرّف" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "إزالة حساب..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "أزِل الحساب" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "سيُحذف حساب \"%1\" من هاتفك فقط. يمكنك إضافته مُجددا في وقت لاحق." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "أزِل" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "الوصول إلى هذا الحساب:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "إضافة حساب..." #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "تخزين تفاصيل الحساب هنا يتيح للتطبيقات استخدام الحسابات دون الحاجة للولوج " "لكل تطبيق." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "الحسابات" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "إضافة حساب" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "لا حسابات" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "إضافة حساب:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/th.po0000644000015600001650000000521212674252514025122 0ustar pbuserpbgroup00000000000000# Thai translation for ubuntu-system-settings-online-accounts # Copyright (c) 2015 Rosetta Contributors and Canonical Ltd 2015 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2015. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-08-12 08:43+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Thai \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "" #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/shn.po0000644000015600001650000000533312674252514025303 0ustar pbuserpbgroup00000000000000# Shan translation for ubuntu-system-settings-online-accounts # Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2013. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2013-10-07 11:46+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Shan \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "မၢႆလပ့်" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "လူတ်းပႅတ်ႈ" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "ID" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "" #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "ထွၼ်ပႅတ်ႈ" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/ko.po0000644000015600001650000000636112674252514025126 0ustar pbuserpbgroup00000000000000# Korean translation for ubuntu-system-settings-online-accounts # Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2013. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2014-07-18 15:41+0000\n" "Last-Translator: MinSik CHO \n" "Language-Team: Korean \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "사용자 이름" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "암호" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "불러오는 중..." #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "취소" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "아이디" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "계정 제거..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "계정 제거" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "계정 %1을(를) 휴대 전화에서만 제거합니다. 나중에 다시 추가할 수 있습니다." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "제거" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "이 계정에 접근:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "계정 추가…" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "계정의 자세한 내용을 이 곳에 보관하고 프로그램이 계정을 이용할 수 있게 하여 사용자가 매번 직접 로그인하지 않도록 합니다." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "계정" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "계정 추가" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "계정 없음" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "계정 추가:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1이(가) 사용자의 %2 계정에 접근하려 합니다." #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "허용" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "다른 계정 추가..." #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "허용하지 않음" #~ msgid "Add another" #~ msgstr "다른 항목 추가" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/hu.po0000644000015600001650000000643712674252514025135 0ustar pbuserpbgroup00000000000000# Hungarian translation for ubuntu-system-settings-online-accounts # Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2013. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2016-01-07 09:03+0000\n" "Last-Translator: Richard Somlói \n" "Language-Team: Hungarian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Felhasználónév" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Jelszó" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Betöltés…" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Mégse" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "Azonosító" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Fiók eltávolítása" #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Fiók eltávolítása" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "A(z) %1 fiók eltávolításra kerül a telefonjából. Később bármikor újra " "hozzáadhatja." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Eltávolítás" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Hozzáférhet ehhez a fiókhoz:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Fiók hozzáadása" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "A fiókadatok tárolása lehetővé teszi az alkalmazások számára a fiókok " "használatát anélkül, hogy be kellene jelentkeznie minden egyes alkalmazásba." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Fiókok" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Fiók hozzáadása" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Nincsenek fiókok" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Fiók hozzáadása:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 hozzáférést kér a(z) %2 fiókhoz" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Engedélyezés" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "Másik fiók hozzáadása…" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Megtagadás" #~ msgid "Add another" #~ msgstr "További hozzáadása" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/br.po0000644000015600001650000000631612674252514025120 0ustar pbuserpbgroup00000000000000# Breton translation for ubuntu-system-settings-online-accounts # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-04-22 06:45+0000\n" "Last-Translator: Fohanno Thierry \n" "Language-Team: Breton \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Anv an arveriad" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Ger-tremen" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "O kargañ..." #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Nullañ" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "ID" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Dilemel ar gont..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Dilemel ar gont" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "Ar gont %1 a vo dilamet diwar ho pellgomzer nemetken. Gallout a reoc'h " "adlakaat anezhi diwezhatoc'h." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Dilemel" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Mont d'ar gont-mañ :" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Ouzhpennañ ur gont…" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Mirout munudoù ar gont amañ a lez an arloadoù da ober gant ar c'hontoù anez " "goulenn diganeoc'h kennaskañ evit pep arload." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Kontoù" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Ouzhpennañ ur gont" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Kont ebet" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Ouzhpennañ ur gont :" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 a fell dezhañ mont d'ho kont %2" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Aotren" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "Ouzhpennañ ur gont all..." #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Nac'h" #~ msgid "Add another" #~ msgstr "Ouzhpennañ unan all" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/ne.po0000644000015600001650000000563212674252514025117 0ustar pbuserpbgroup00000000000000# Nepali translation for ubuntu-system-settings-online-accounts # Copyright (c) 2015 Rosetta Contributors and Canonical Ltd 2015 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2015. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-11-09 03:00+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Nepali \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "प्रयोगकर्ताको नाम" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "पासवर्ड" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "लोड हुँदैछ..." #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "रद्द गर्ने" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "आईडी" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "खाता हटाउने ..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "खाता हटाउने" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "हटाउने" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "यस खातामा पहुँच :" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/my.po0000644000015600001650000000623212674252514025137 0ustar pbuserpbgroup00000000000000# Burmese translation for ubuntu-system-settings-online-accounts # Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2013. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2013-10-09 11:28+0000\n" "Last-Translator: Pyae Sone \n" "Language-Team: Burmese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "သုံးစွသူအမည်" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "စကားဝှက်" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "ဖွင့်နေသည်" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "ပယ်ဖျက်မည်" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "ID" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "အကောင့်ကိုပယ်ဖျက်မည်" #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "အကောင့်ကိုဖြုတ်မည်" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "ဖယ်ရှား" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "အကောင့်ထည့်မည်" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "အကောင့်များ" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "အကောင့်ပေါင်းထည့်မည်" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "အကောင့်များမရှိပါ" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "အကောင့်ပေါင်းထည့်မည်-" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "ခွင့်ပြု" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/sl.po0000644000015600001650000000620612674252514025131 0ustar pbuserpbgroup00000000000000# Slovenian translation for ubuntu-system-settings-online-accounts # Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2013. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-04-24 08:51+0000\n" "Last-Translator: Damir Jerovšek \n" "Language-Team: Slovenian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Uporabniško ime" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Geslo" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Nalaganje ..." #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Prekliči" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "ID" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Odstrani račun ..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Odstrani račun" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "Račun %1 bo odstranjen samo iz vašega telefona. Kasneje ga lahko spet dodate." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Odstrani" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Dostop do tega računa:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Dodaj račun ..." #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Shranitev podatkov računa tukaj omogoči programom uporabo računov, zato se " "Vam ni potrebno prijaviti za vsak program." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Računi" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Dodaj račun" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Ni računov" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Dodaj račun:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 želi dostop do vašega računa %2" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Dovoli" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "Dodaj nov račun ..." #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Ne dovoli" #~ msgid "Add another" #~ msgstr "Dodaj novega" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/cy.po0000644000015600001650000000626412674252514025132 0ustar pbuserpbgroup00000000000000# Welsh translation for ubuntu-system-settings-online-accounts # Copyright (c) 2015 Rosetta Contributors and Canonical Ltd 2015 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2015. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-07-14 12:26+0000\n" "Last-Translator: Owen Llywelyn \n" "Language-Team: Welsh \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Enw defnyddiwr" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Cyfrinair" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Yn llwytho..." #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Diddymu" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "ID" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Tynnu cyfrif..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Tynnu cyfrif" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "Bydd cyfrif %1 yn cael ei dynnu o'r ffôn yn unig. Gallwch ei ychwanegu eto " "yn nes ymlaen." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Tynnu" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Mynediad at y cyfrif hwn:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Ychwanegu cyfrif..." #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Mae stori manylion cyfrif fan hyn yn golygu y bydd aps yn medru defnyddio'r " "cyfrif heb i chi orfod mewngofnodi i bob ap." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Cyfrifon" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Ychwanegu cyfrif" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Dim cyfrifon" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Ychwanegu cyfrif:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "Mae %1 eisiau mynediad i'ch cyfrif %2" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Caniatáu" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "Ychwanegu cyfrif arall..." #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Peidio caniatáu" #~ msgid "Add another" #~ msgstr "Ychwanegu un arall" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/it.po0000644000015600001650000000634312674252514025131 0ustar pbuserpbgroup00000000000000# Italian translation for ubuntu-system-settings-online-accounts # Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2013. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-04-23 12:17+0000\n" "Last-Translator: Milo Casagrande \n" "Language-Team: Italian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Nome utente" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Password" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Caricamento..." #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Annulla" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "ID" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Rimuovi account..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Rimuovi account" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "L'account %1 verrà rimosso solo dal telefono. Sarà possibile aggiungerlo " "nuovamente in un secondo momento." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Rimuovi" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Accedere a questo account:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Aggiungi account..." #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Archiviare qui i dettagli dell'account consentirà alle applicazioni di " "usarli senza la necessità di effettuare l'accesso in ogni applicazione." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Account" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Aggiungi account" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Nessun account" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Aggiungi account:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 vorrebbe accedere all'account %2" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Consenti" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "Aggiuni nuovo account..." #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Non consentire" #~ msgid "Add another" #~ msgstr "Aggiungi altro" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/gd.po0000644000015600001650000000652412674252514025110 0ustar pbuserpbgroup00000000000000# Gaelic; Scottish translation for ubuntu-system-settings-online-accounts # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2014. # GunChleoc , 2014. msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-05-02 19:22+0000\n" "Last-Translator: GunChleoc \n" "Language-Team: Fòram na Gàidhlig\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" "Language: gd\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Ainm-cleachdaiche" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Facal-faire" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "'Ga luchdadh…" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Sguir dheth" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "ID" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Thoir cunntas air falbh..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Thoir an cunntas air falbh" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "Thèid an cunntas %1 a thoirt air falbh on fhòn agad. 'S urrainn dhut a chur " "ris a-rithist às a dhèidh seo." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Thoir air falbh" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Cothrom air a' chunntas seo:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Cuir cunntas ris..." #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Ma chumas tu fiosrachadh a' chunntais agad an-seo, gheibh aplacaidean greim " "air agus cha bhi agad ri clàradh a-steach aig gach aon dhiubh." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Cunntasan" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Cuir cunntas ris" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Chan eil cunntas ann fhathast" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Cuir cunntas ris:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "Tha %1 airson an cunntas %2 agad inntrigeadh" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Ceadaich" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "Cuir cunntas eile ris…" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Na ceadaich" #~ msgid "Add another" #~ msgstr "Cuir fear eile ris" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/km.po0000644000015600001650000000767412674252514025134 0ustar pbuserpbgroup00000000000000# Khmer translation for ubuntu-system-settings-online-accounts # Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2013. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2014-09-02 07:51+0000\n" "Last-Translator: Sophea Sok \n" "Language-Team: Khmer \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "ឈ្មោះ​អ្នក​ប្រើ" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "ពាក្យសម្ងាត់" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "កំពុង​ផ្ទុក…" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "បោះ​បង់" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "លេខ​សម្គាល់" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "លុប​គណនី…" #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "យកគណនី​ចេញ" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "គណនី %1 នឹង​ត្រូវ​បាន​លុប​តែ​ពី​ទូរស័ព្ទ​របស់​អ្នក​ប៉ុណ្ណោះ។ " "អ្នក​អាច​បន្ថែម​ម្ដង​ទៀត​ពេល​ក្រោយ។" #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "លុប​ចេញ" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "ចូល​គណនី​នេះ៖" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "បន្ថែម​គណនី…" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "រក្សាទុក​ព័ត៌មាន​លម្អិត​គណនី​នៅ​ទីនេះ " "អនុញ្ញាត​ឲ្យ​កម្មវិធី​ប្រើ​គណនី​ដោយ​មិន​ចាំបាច់​ឲ្យ​អ្នក​ចូល​សម្រាប់​កម្មវិធី" "​នីមួយៗ។" #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "គណនី" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "បន្ថែម​គណនី" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "គ្មាន​គណនី" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "បន្ថែម​គណនី៖" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 ចង់​ចូល​ប្រើ​គណនី %2 របស់​អ្នក" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "អនុញ្ញាត" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "មិន​អនុញ្ញាត" #~ msgid "Add another" #~ msgstr "បន្ថែម​ផ្សេងទៀត" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/el.po0000644000015600001650000000754612674252514025123 0ustar pbuserpbgroup00000000000000# Greek translation for ubuntu-system-settings-online-accounts # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-05-11 11:47+0000\n" "Last-Translator: Constantinos Koniaris \n" "Language-Team: Greek \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Όνομα χρήστη" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Κωδικός πρόσβασης" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Φόρτωση..." #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Ακύρωση" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "Αναγνωριστικό (ID)" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Απομάκρυνση λογαριασμού..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Αφαίρεση λογαριασμού" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "Ο λογαριασμός %1 θα αφαιρεθεί μόνο από το τηλέφωνό σας. Μπορείτε να το " "προσθέσετε ξανά αργότερα." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Αφαίρεση" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Πρόσβαση σε αυτό το λογαριασμό:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Πρόσθεση λογαριασμού..." #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Η αποθήκευση εδώ των λεπτομερειών λογαριασμού επιτρέπει στις εφαρμογές να " "χρησιμοποιούν τους λογαριασμούς χωρίς να χρειάζεται να συνδέεστε εσείς σε " "κάθε εφαρμογή." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Λογαριασμοί" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Προσθήκη λογαριασμού" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Κανένας λογαριασμός" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Προσθήκη λογαριασμού:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 θέλει να έχει πρόσβαση στο λογαριασμό σας στο %2" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Να επιτρέπεται" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "Προσθήκη επιπλέον λογαριασμού..." #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Να μην επιτραπεί" #~ msgid "Add another" #~ msgstr "Προσθέστε ένα άλλο" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/sr.po0000644000015600001650000000651512674252514025142 0ustar pbuserpbgroup00000000000000# Serbian translation for ubuntu-system-settings-online-accounts # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-09-05 22:26+0000\n" "Last-Translator: Bojan Bogdanović \n" "Language-Team: Serbian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Лозинка" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Откажи" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "ИБ" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "" #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Уклони налог" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "Налог „%1“ ће бити уклоњен само са вашег телефона. Можете га касније поново " "додати." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Уклони" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Додај налог…" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Чување детаља о налогу овде омогућава програмима да користе налоге без " "потребе да се пријављујете појединачно у сваком програму." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Налози" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Без налога" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Додај налог:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 жели да приступи вашем налогу „%2“" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Допусти" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Не допуштај" #~ msgid "Add another" #~ msgstr "Додај нови" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/lo.po0000644000015600001650000000664412674252514025133 0ustar pbuserpbgroup00000000000000# Lao translation for ubuntu-system-settings-online-accounts # Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2013. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2013-07-12 09:06+0000\n" "Last-Translator: Anousak \n" "Language-Team: Lao \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "ຊື່ຜູ້ໃຊ້" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "ລະຫັດຜ່ານ" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "ຍົກເລີກ" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "ລະຫັດ" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "ລົບບັນຊີ" #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "ລຶບບັນຊີ" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "%1 ບັນຊີຈະຖຶກຍ້າຍອອກອອກຈາກພຽງແຕ່ໂທລະສັບຂອງທ່ານ" #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "ຍ້າຍອອກ" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "ເຂົ້າຫາບັນຊີນີ້:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "ເພີ່ມບັນຊີ" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "ເກັບຂໍ້ມູນລາຍລະອຽດບັນຊີໃສບ່ອນນີ້ເພື່ອໃຫ້ເເອບອື່ນນໍາໃຊ້ທີ່ວ່າເຈົ້າບໍ່ຈໍາເປັນຕ້" "ອງເຊັນເຂົ້າໃນເເຕ່ລະເເອບ." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "ບັນຊີທົວໄປ" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "ເພີ່ມບັນຊີ" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "ບໍ່ມີບັນຊີ" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "ເພີ່ມບັນຊີ" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/ms.po0000644000015600001650000000612612674252514025133 0ustar pbuserpbgroup00000000000000# Malay translation for ubuntu-system-settings-online-accounts # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2014-01-17 09:17+0000\n" "Last-Translator: abuyop \n" "Language-Team: Malay \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Nama pengguna" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Kata laluan" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Memuatkan..." #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Batal" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "ID" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Buang akaun..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Buang akaun" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "Akaun %1 akan hanya dibuang dari telefon anda. Anda boleh tambah ia kemudian " "nanti." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Buang" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Capai ke akaun ini:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Tambah akaun..." #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Menyimpan perincian akaun di sini membolehkan apl guna akaun tanpa perlu " "anda mendaftar masuk untuk setiap apl." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Akaun" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Tambah akaun" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Tiada akaun" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Tambah akaun:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 mahu mencapai akaun %2 anda" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Izin" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "Tambah akaun lain..." #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Jangan izin" #~ msgid "Add another" #~ msgstr "Tambah lain" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/da.po0000644000015600001650000000610112674252514025071 0ustar pbuserpbgroup00000000000000# Danish translation for ubuntu-system-settings-online-accounts # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # # Ask Hjorth Larsen , 2014. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2014-07-22 15:46+0000\n" "Last-Translator: Ask Hjorth Larsen \n" "Language-Team: Danish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Brugernavn" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Adgangskode" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Indlæser..." #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Annullér" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "Id" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Fjern konto…" #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Fjern konto" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "Kontoen %1 vil kun blive fjernet fra din telefon. Du kan tilføje den igen " "senere." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Fjern" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Adgang til denne konto:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Tilføj konto…" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Hvis kontodetaljer lagres her, kan apps bruge kontoerne uden at du skal " "logge ind for hver app." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Konti" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Tilføj konto" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Ingen konti" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Tilføj konto:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 ønsker at tilgå din %2-konto" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Tillad" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Tillad ikke" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/eu.po0000644000015600001650000000617612674252514025132 0ustar pbuserpbgroup00000000000000# Basque translation for ubuntu-system-settings-online-accounts # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-07-12 21:18+0000\n" "Last-Translator: Ibai Oihanguren Sala \n" "Language-Team: Basque \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Erabiltzaile-izena" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Pasahitza" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Kargatzen..." #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Utzi" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "IDa" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Kendu kontua…" #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Kendu kontua" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "%1 kontua zure telefonotik soilik kenduko da. Geroago berriro gehi dezakezu." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Kendu" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Kontu honetara sarbidea:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Gehitu kontua…" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Kontuaren xehetasunak hemen gordez, aplikazioek kontua erabil dezakete zuk " "aldiro saioa hasi beharrik gabe." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Kontuak" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Gehitu kontua" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Konturik ez" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Gehitu kontua:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1(e)k zure %2 kontura sarbidea nahi du" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Baimendu" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "Gehitu beste kontu bat…" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Ez baimendu" #~ msgid "Add another" #~ msgstr "Gehitu beste bat" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/tr.po0000644000015600001650000000623712674252514025144 0ustar pbuserpbgroup00000000000000# Turkish translation for ubuntu-system-settings-online-accounts # Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2013. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2013-07-12 15:07+0000\n" "Last-Translator: Volkan Gezer \n" "Language-Team: Turkish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Kullanıcı adı" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Parola" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Yükleniyor..." #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "İptal" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "Kimlik" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Hesap kaldır..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Hesabı kaldır" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "%1 hesabı sadece telefonunuzdan kaldırılacaktır. Daha sonra tekrar " "ekleyebilirsiniz." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Kaldır" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Bu hesaba erişim:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Hesap ekle..." #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Hesap bilgilerinizi buraya kaydettiğinizde, her uygulama için tekrar oturum " "açmanızı önlemek üzere uygulamaların hesapları kullanabilmesini " "sağlayabilirsiniz." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Hesaplar" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Hesap ekle" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Hesap yok" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Hesap ekle:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1, %2 hesabınıza erişmek istiyor" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "İzin ver" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "İzin verme" #~ msgid "Add another" #~ msgstr "Başka ekle" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/hr.po0000644000015600001650000000620312674252514025121 0ustar pbuserpbgroup00000000000000# Croatian translation for ubuntu-system-settings-online-accounts # Copyright (c) 2015 Rosetta Contributors and Canonical Ltd 2015 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2015. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-03-16 22:25+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Croatian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Korisničko ime" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Lozinka" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Učitavanje..." #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Odustani" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "ID" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Ukloni račun..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Ukloni račun" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "%1 račun će biti uklonjen samo s vašeg telefona. Ponovno ga možete dodati " "kasnije." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Ukloni" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Pristup ovom računu:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Dodaj račun…" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Spremanje pojedinosti računa ovdje dopušta aplikacijama korištenje računa " "bez prijave za svaku aplikaciju posebno." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Računi" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Dodaj račun" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Nema računa" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Dodaj račun:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 želi pristupiti vašem %2 računu" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Dopusti" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "Dodaj drugi račun..." #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Zabrani" #~ msgid "Add another" #~ msgstr "Dodaj drugi" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/is.po0000644000015600001650000000641212674252514025125 0ustar pbuserpbgroup00000000000000# Icelandic translation for ubuntu-system-settings-online-accounts # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2014-08-29 12:47+0000\n" "Last-Translator: Sveinn í Felli \n" "Language-Team: Icelandic \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Notandanafn" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Lykilorð" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Hleð..." #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Hætta við" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "Auðkenni (ID)" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Fjarlægja aðgang..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Fjarlægja aðgang" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "Aðgangsreikningurinn %1 verður fjarlægður úr símanum. Þú getur bætt honum " "við aftur síðar." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Fjarlægja" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Aðgangur að þessum aðgangsreikningi:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Bæta við aðgangi..." #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Það að geyma upplýsingar aðgangsreiknings hér gerir forritum kleift að nota " "hann án þess að þú þurfir að skrá þig inn í hverju forriti fyrir sig." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Aðgangar" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Bæta við aðgangi" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Engir aðgangsreikningar" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Bæta við aðgangi:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 vill fá aðgang að %2 reikningnum þínum" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Leyfa" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Hafna" #~ msgid "Add another" #~ msgstr "Bæta við öðru" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/en_AU.po0000644000015600001650000000620512674252514025501 0ustar pbuserpbgroup00000000000000# English (Australia) translation for ubuntu-system-settings-online-accounts # Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2013. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-06-26 22:54+0000\n" "Last-Translator: Jared Norris \n" "Language-Team: English (Australia) \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "User name" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Password" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Loading…" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Cancel" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "ID" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Remove account…" #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Remove account" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "The %1 account will be removed only from your phone. You can add it again " "later." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Remove" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Access to this account:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Add account…" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Accounts" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Add account" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "No accounts" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Add account:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 wants to access your %2 account" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Allow" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "Add another account…" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Don't allow" #~ msgid "Add another" #~ msgstr "Add another" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/eo.po0000644000015600001650000000575312674252514025124 0ustar pbuserpbgroup00000000000000# Esperanto translation for ubuntu-system-settings-online-accounts # Copyright (c) 2015 Rosetta Contributors and Canonical Ltd 2015 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2015. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2016-01-18 11:25+0000\n" "Last-Translator: Robin van der Vliet \n" "Language-Team: Esperanto \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Uzantnomo" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Pasvorto" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Ŝargado…" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Nuligi" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "Identigilo" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Forigi konton…" #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Forigi konton" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "La %1-konto estos forigita nur de via telefono. Vi povas aldoni ĝin denove " "poste." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Forigi" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Atingo al ĉi tiu konto:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Aldoni konton…" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Kontoj" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Aldoni konton" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Neniu konto" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Aldoni konton:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 volas atingi vian %2-konton" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Permesi" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "Aldoni alian konton…" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Malpermesi" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/uk.po0000644000015600001650000000757512674252514025144 0ustar pbuserpbgroup00000000000000# Ukrainian translation for ubuntu-system-settings-online-accounts # Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2013. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-04-22 17:40+0000\n" "Last-Translator: Yuri Chornoivan \n" "Language-Team: Ukrainian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Ім'я користувача" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Пароль" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Завантаження…" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Скасувати" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "Ід" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Вилучити обліковий запис…" #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Вилучення облікового запису" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "Дані облікового запису %1 буде вилучено лише з вашого телефону. Пізніше ви " "зможете знову їх додати." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Вилучити" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Доступ до цього облікового запису:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Додати обліковий запис…" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Зберігання даних облікових записів тут надасть змогу іншими програмам " "користуватися цими обліковими записами без потреби у визначенні " "реєстраційних параметрів у кожній з цих програм." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Облікові записи" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Додавання облікового запису" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Немає облікових записів" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Додати обліковий запис:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 хоче отримати доступ до вашого облікового запису %2" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Дозволити" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "Додати обліковий запис…" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Заборонити" #~ msgid "Add another" #~ msgstr "Додати" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/po.pro0000644000015600001650000000507212674252514025313 0ustar pbuserpbgroup00000000000000include(../common-project-config.pri) TEMPLATE = subdirs PROJECTNAME = "ubuntu-system-settings-online-accounts" SETTINGSFILES = ../system-settings-plugin/*.settings SOURCECODE = ../plugins/*/*.qml \ ../system-settings-plugin/*.qml \ ../online-accounts-ui/*/*.qml BUILDDIR = ../.build SETTINGSFILETEMP = $${BUILDDIR}/settings.js message("") message(" Project Name: $$PROJECTNAME ") message(" Source Code: $$SOURCECODE ") message("") message(" Run 'make pot' to generate the pot file from source code. ") message("") ## Generate pot file 'make pot' potfile.target = pot potfile.commands = xgettext \ -o $${PROJECTNAME}.pot \ --copyright=\"Canonical Ltd. \" \ --package-name $${PROJECTNAME} \ --qt --c++ --add-comments=TRANSLATORS \ --keyword=tr --keyword=tr:1,2 --keyword=dtr:2 --from-code=UTF-8 \ $${SOURCECODE} $${SETTINGSFILETEMP} potfile.depends = settingsfiles QMAKE_EXTRA_TARGETS += potfile ## Do not use this rule directly. It's a dependency rule to ## generate an intermediate file to extract translatable ## strings from the .settings files settingsfiles.target = settingsfiles settingsfiles.commands = awk \'BEGIN { FS=\": \" }; /name/ {print \"var s = i18n.tr(\" \$$2 \");\"}\' $${SETTINGSFILES} | tr -d ',' > $${SETTINGSFILETEMP} settingsfiles.depends = makebuilddir QMAKE_EXTRA_TARGETS += settingsfiles ## Dependency rule to create the temporary build dir makebuilddir.target = makebuilddir makebuilddir.commands = mkdir -p $${BUILDDIR} QMAKE_EXTRA_TARGETS += makebuilddir PO_FILES = $$system(ls *.po) ## Install the translations install.target = install install_mo_commands = for(po_file, PO_FILES) { mo_name = $$replace(po_file,.po,) mo_targetpath = $(INSTALL_ROOT)$${INSTALL_PREFIX}/share/locale/$${mo_name}/LC_MESSAGES mo_target = $${mo_targetpath}/$${PROJECTNAME}.mo !isEmpty(install_mo_commands): install_mo_commands += && install_mo_commands += test -d $$mo_targetpath || mkdir -p $$mo_targetpath install_mo_commands += && cp $${mo_name}.mo $$mo_target } install.commands = $$install_mo_commands install.depends = mofiles QMAKE_EXTRA_TARGETS += install ## Build $locale.mo from the $locale.po files (called by the installed rule) mofiles.target = mofiles mofiles_po_commands = for(po_file, PO_FILES) { po_name = $$replace(po_file,.po,) install_po_commands += msgfmt $$po_file -o $${po_name}.mo; } mofiles.commands = $$install_po_commands QMAKE_EXTRA_TARGETS += mofiles ## Rule to clean the products of the build clean.target = clean clean.commands = rm -Rf $${BUILDDIR} *.mo QMAKE_EXTRA_TARGETS += clean ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/fi.po0000644000015600001650000000624512674252514025114 0ustar pbuserpbgroup00000000000000# Finnish translation for ubuntu-system-settings-online-accounts # Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2013. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-04-26 16:54+0000\n" "Last-Translator: Jiri Grönroos \n" "Language-Team: Finnish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Käyttäjätunnus" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Salasana" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Ladataan…" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Peru" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "Tunniste (ID)" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Poista tili…" #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Poista tili" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "%1-tili poistetaan ainoastaan puhelimestasi. Voit lisätä sen myöhemmin " "uudelleen." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Poista" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Pääsy tälle tilille:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Lisää tili…" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Tilitietojen tallennus tänne mahdollistaa sovellusten käyttää tilejä ilman, " "että joudut kirjautua tileillesi jokaisessa sovelluksessa erikseen." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Tilit" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Lisää tili" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Ei tilejä" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Lisää tili:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 haluaa käyttää ”%2”-tiliäsi" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Salli" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "Lisää toinen tili…" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Älä salli" #~ msgid "Add another" #~ msgstr "Lisää toinen" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/ru.po0000644000015600001650000000734312674252514025144 0ustar pbuserpbgroup00000000000000# Russian translation for ubuntu-system-settings-online-accounts # Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2013. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2014-09-02 08:30+0000\n" "Last-Translator: ☠Jay ZDLin☠ \n" "Language-Team: Russian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Имя пользователя" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Пароль" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Загрузка..." #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Отменить" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "Идентификатор" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Удалить учётную запись…" #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Удалить учётную запись" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "Учётная запись %1 будет удалена только с вашего телефона. Вы можете добавить " "её снова." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Удалить" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Доступ к этой учётной записи:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Добавить учётную запись…" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Если вы сохраните здесь данные учётной записи, приложения смогут их " "использовать, и вам не потребуется выполнять авторизацию каждый раз при " "запуске приложений ." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Учётные записи" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Добавить учётную запись" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Нет учётных записей" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Добавить учётную запись:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 запрашивает доступ к вашей учётной записи %2" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Разрешить" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Запретить" #~ msgid "Add another" #~ msgstr "Добавить другую" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/ro.po0000644000015600001650000000626512674252514025140 0ustar pbuserpbgroup00000000000000# Romanian translation for ubuntu-system-settings-online-accounts # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-06-23 16:54+0000\n" "Last-Translator: Meriuță Cornel \n" "Language-Team: Romanian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Nume utilizator" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Parolă" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Se încarcă…" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Anulează" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "ID" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Ștergere cont..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Șterge contul" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "Contul %1 va fi șters numai de pe telefon. Îl veți putea adăuga mai târziu." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Șterge" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Access la acest cont:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Adăugare cont..." #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Păstrarea detaliilor despre cont aici permite aplicațiilor să utilizeze " "contul fără să vă autentificați pentru fiecare aplicație." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Conturi" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Adaugă cont" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Niciun cont" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Adaugă cont:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 solicită accesul la contul %2" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Permite" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "Adăugați un alt cont..." #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Nu permite" #~ msgid "Add another" #~ msgstr "Adaugați încă unul" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/fr_CA.po0000644000015600001650000000634012674252514025464 0ustar pbuserpbgroup00000000000000# French (Canada) translation for ubuntu-system-settings-online-accounts # Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2013. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2013-07-13 12:44+0000\n" "Last-Translator: Étienne Beaulé \n" "Language-Team: French (Canada) \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Nom d'utilisateur" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Mot de Passe" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Chargement…" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Annuler" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "Identification" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Enlever un compte..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Enlever le compte" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "Le compte %1 sera seulement enlever de votre téléphone. Vous pourrez " "l'ajouter de nouveau plus tard." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Enlever" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Accès à ce compte :" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Ajouter un compte…" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Stocker ici les détails des comptes permet aux applis d'utiliser les comptes " "sans que vous ayez à vous connecter pour chaque appli." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Comptes" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Ajouter un compte" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Aucun compte" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Ajouter un compte :" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 veut accéder à votre compte %2" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Permettre" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Refuser" #~ msgid "Add another" #~ msgstr "Ajouter un autre" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/te.po0000644000015600001650000000576112674252514025130 0ustar pbuserpbgroup00000000000000# Telugu translation for ubuntu-system-settings-online-accounts # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2014-07-21 13:46+0000\n" "Last-Translator: Praveen Illa \n" "Language-Team: Telugu \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "వాడుకరి పేరు" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "సంకేతపదం" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "రద్దుచేయి" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "గుచి" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "ఖాతాను తీసివేయి…" #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "తొలగించు" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "ఖాతాను చేర్చండి…" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "ఖాతాలు" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "ఖాతాను జతచేయండి" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "ఏ ఖాతాలు లేవు" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "ఖాతాను జతచేయి:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/he.po0000644000015600001650000000633612674252514025113 0ustar pbuserpbgroup00000000000000# Hebrew translation for ubuntu-system-settings-online-accounts # Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2013. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2014-12-23 13:17+0000\n" "Last-Translator: Yaron \n" "Language-Team: Hebrew \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "שם משתמש" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "ססמה" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "בטעינה…" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "ביטול" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "מזהה" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "הסרת חשבון…" #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "הסרת חשבון" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "חשבון ה־%1 יוסר רק מהטלפון שלך. ניתן להוסיף אותו שוב מאוחר יותר." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "הסרה" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "גישה לחשבון זה:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "הוספת חשבון…" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "אחסון של פרטי חשבון באזור זה מאפשרת ליישום להשתמש בחשבונות מבלי להיכנס בנפרד " "בכל יישום." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "חשבונות" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "הוספת חשבון" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "אין חשבונות" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "הוספת חשבון:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "לאפשר" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "לא לאפשר" #~ msgid "Add another" #~ msgstr "הוספת עוד" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/am.po0000644000015600001650000000677612674252514025124 0ustar pbuserpbgroup00000000000000# Amharic translation for ubuntu-system-settings-online-accounts # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-12-17 21:32+0000\n" "Last-Translator: samson \n" "Language-Team: Amharic \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "የ ተጠቃሚ ስም" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "የ መግቢያ ቃል" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "በመጫን ላይ..." #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "መሰረዣ" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "መታወቂያ" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "መግለጫ ማስወገጃ..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "መግለጫ ማስወገጃ" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "ይህ %1 መግለጫ ከ ስልኩ ውስጥ ብቻ ይወገዳል ፡ በኋላ እንደገና ሊጨምሩት ይችላሉ" #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "ማስወገጃ" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "ወደ እዚህ መግለጫ ጋር ለመድረስ" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "መግለጫ መጨመሪያ…" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "መግለጫን እዚህ ማስቀመጥ መተግበሪያውን ሁል ጊዜ መጠቀም ያስችለዋል ለ እያንዳንዱ መተግበሪያ እርስዎን እንዲፈርሙ " "ክመጠየቅ ይልቅ" #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "መግለጫ" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "መግለጫ መጨመሪያ" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "መግለጫ የለም" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "መግለጫ መጨመሪያ:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 የ እርስዎ መግለጫ ጋር መድረስ %2 ይፈልጋል" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "መፍቀጃ" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "ሌላ መገለጫ መጨመሪያ…" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "መከልከያ" #~ msgid "Add another" #~ msgstr "ሌላ መጨመሪያ" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/es.po0000644000015600001650000000623412674252514025123 0ustar pbuserpbgroup00000000000000# Spanish translation for ubuntu-system-settings-online-accounts # Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2013. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-04-24 10:40+0000\n" "Last-Translator: Víctor R. Ruiz \n" "Language-Team: Spanish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Nombre de usuario" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Contraseña" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Cargando…" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Cancelar" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "Id." #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Eliminar cuenta…" #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Eliminar cuenta" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "La cuenta %1 se eliminará solo de su teléfono. Puede volver a añadirla " "después." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Eliminar" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Acceso a esta cuenta:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Añadir cuenta…" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Al guardar detalles de cuentas aquí, permitirá que las aplicaciones las usen " "sin que tenga que iniciar sesión en cada una." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Cuentas" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Añadir cuenta" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "No hay cuentas" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Añadir cuenta:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 quiere acceder a su cuenta de %2" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Permitir" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "Añadir otra cuenta..." #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "No permitir" #~ msgid "Add another" #~ msgstr "Añadir otra" ././@LongLink0000000000000000000000000000015000000000000011211 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/ubuntu-system-settings-online-accounts.potubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/ubuntu-system-settings-online-accounts.0000644000015600001650000000472212674252514033756 0ustar pbuserpbgroup00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR Canonical Ltd. # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "" #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/ug.po0000644000015600001650000000734012674252514025126 0ustar pbuserpbgroup00000000000000# Uyghur translation for ubuntu-system-settings-online-accounts # Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2013. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-09-27 06:45+0000\n" "Last-Translator: Eltikin \n" "Language-Team: Uyghur \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "ئىشلەتكۈچى ئاتى" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "ئىم" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "ئوقۇۋاتىدۇ…" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "ئەمەلدىن قالدۇر" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "كىملىكى(ID)" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "ھېسابات چىقىرىۋېتىش…" #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "ھېساباتنى چىقىرىۋەت" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "ھېساباتنىڭ %1 تېلېفونىڭىزدىن چىقىرىۋېتىلىدۇ. ئۇنى كېيىن يەنە قوشالايسىز." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "چىقىرىۋەت" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "مەزكۇر ھېساباتنى زىيارەت قىلىش:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "ھېسابات قوشۇش…" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "ھېساباتنىڭ تەپسىلاتلىرىنى بۇ يەردە ساقلاپ قويسىڭىز، ئەپلەر بۇ ئۇچۇرلارنى " "ئىشلىتىپ ھېساباتلىرىڭىزنى زىيارەت قىلىدۇ. سىزنىڭ ھەر بىر ئەپتە ھېساباتقا " "كىرىشىڭىزنىڭ زۆرۈرىيىتى قالمايدۇ." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "ھېساباتلار" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "ھېسابات قوش" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "ھېساباتلار يوق" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "ھېسابات قوشۇش:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 سىزنىڭ %2 ھېساباتىڭىزنى زىيارەت قىلىشنى خالايدىكەن" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "ئىجازەت" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "يېڭدىن ئىشلەتكۈچى قۇشۇش" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "ياق بولمايدۇ" #~ msgid "Add another" #~ msgstr "باشقىنى قوش" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/fr.po0000644000015600001650000000635712674252514025131 0ustar pbuserpbgroup00000000000000# French translation for ubuntu-system-settings-online-accounts # Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2013. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-04-25 18:30+0000\n" "Last-Translator: Anne \n" "Language-Team: French \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Nom d'utilisateur" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Mot de passe" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Chargement…" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Annuler" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "ID" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Supprimer un compte…" #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Supprimer le compte" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "Le compte %1 sera uniquement supprimé de votre téléphone. Vous pourrez " "l'ajouter de nouveau plus tard." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Supprimer" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Accéder à ce compte :" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Ajouter un compte…" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Regrouper les détails de vos comptes ici permet aux applications de les " "utiliser sans que vous ayez besoin de vous connecter pour chacune d'entre " "elles." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Comptes" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Ajouter un compte" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Pas de compte" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Ajouter un compte :" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 veut accéder à votre compte %2" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Autoriser" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "Ajouter un autre compte..." #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Refuser" #~ msgid "Add another" #~ msgstr "Ajouter un autre" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/vi.po0000644000015600001650000000522612674252514025132 0ustar pbuserpbgroup00000000000000# Vietnamese translation for ubuntu-system-settings-online-accounts # Copyright (c) 2015 Rosetta Contributors and Canonical Ltd 2015 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2015. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-04-02 19:20+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Vietnamese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "" #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/ja.po0000644000015600001650000000656712674252514025117 0ustar pbuserpbgroup00000000000000# Japanese translation for ubuntu-system-settings-online-accounts # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2014-09-18 09:13+0000\n" "Last-Translator: Kentaro Kazuhama \n" "Language-Team: Japanese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "ユーザー名" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "パスワード" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "読み込み中…" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "キャンセル" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "ID" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "アカウントの削除..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "アカウントの削除" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "アカウント %1 はスマートフォン上からのみ削除されます。これはあとから再度追加できます。" #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "削除" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "このアカウントにアクセスするサービス:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "アカウントの追加…" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "ここにアカウント情報を追加すると、個別に認証する必要なくアプリがアカウントを利用できます。" #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "アカウント" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "アカウントの追加" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "アカウントはありません" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "アカウントの追加:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 は %2 のアカウントへのアクセスを要求します" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "許可" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "他のアカウントを追加…" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "キャンセル" #~ msgid "Add another" #~ msgstr "その他を追加" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/de.po0000644000015600001650000000635212674252514025105 0ustar pbuserpbgroup00000000000000# German translation for ubuntu-system-settings-online-accounts # Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2013. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-09-02 19:41+0000\n" "Last-Translator: Tobias Bannert \n" "Language-Team: German \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Benutzername" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Passwort" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Wird geladen …" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Abbrechen" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "Kennung" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Konto entfernen …" #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Konto entfernen" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "Das %1-Konto wird nur von Ihrem Telefon entfernt. Sie können es später " "wieder hinzufügen." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Entfernen" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Zugriff auf dieses Konto:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Konto hinzufügen …" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Das Speichern von Kontodetails an dieser Stelle erlaubt es Anwendungen, das " "Konto zu benutzen, ohne dass Sie sich für jede einzelne Anwendung anmelden " "müssen." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Konten" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Konto hinzufügen" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Keine Konten" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Konto hinzufügen:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 möchte auf Ihr %2-Konto zugreifen" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Erlauben" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "Ein anderes Konto hinzufügen …" #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Verbieten" #~ msgid "Add another" #~ msgstr "Weiteres hinzufügen" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/be.po0000644000015600001650000000727212674252514025105 0ustar pbuserpbgroup00000000000000# Belarusian translation for ubuntu-system-settings-online-accounts # Copyright (c) 2015 Rosetta Contributors and Canonical Ltd 2015 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2015. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-09-14 08:54+0000\n" "Last-Translator: FULL NAME \n" "Language-Team: Belarusian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Імя карыстальніка" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Пароль" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Загрузка..." #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Скасаваць" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "ID" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Выдаліць конт..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Выдаліць конт" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "Конт %1 будзе выняты толькі з вашага тэлефона. Пазней вы зможаце зноў яго " "дадаць." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Выдаліць" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Доступ да гэтага ўліковага запісу:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Дадаць конт…" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Захоўванне дадзеных уліковых запісаў тут дазволіць іншым праграмам " "карыстацца гэтымі ўліковымі запісамі без неабходнасці ў вызначэнні " "рэгістрацыйных параметраў у кожнай з гэтых праграм." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Рахункі" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Дадаць конт" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Не мае контаў" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Дадаць уліковы запіс:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 хоча атрымаць доступ да вашай ўліковага запісу %2" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Дазволіць" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "Дадаць іншы конт..." #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Не дазваляць" #~ msgid "Add another" #~ msgstr "Дадаць" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/zh_CN.po0000644000015600001650000000611212674252514025510 0ustar pbuserpbgroup00000000000000# Chinese (Simplified) translation for ubuntu-system-settings-online-accounts # Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2013. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-06-26 03:45+0000\n" "Last-Translator: Ian Li \n" "Language-Team: Chinese (Simplified) \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "用户名" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "密码" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "正在载入..." #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "取消" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "标识" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "删除帐户..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "移除帐户" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "帐户%1 仅在手机中移除。以后还可重新添加。" #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "移除" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "访问该帐户:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "添加帐户…" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "在这里保存帐户信息,以便不需每次登录即可让应用程序使用您的帐户。" #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "帐户" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "添加帐户" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "无帐户" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "添加账户:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 需要使用您的 %2 账户" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "允许" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "添加另一个账户..." #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "不允许" #~ msgid "Add another" #~ msgstr "另添加" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/aa.po0000644000015600001650000000604012674252514025070 0ustar pbuserpbgroup00000000000000# Afar translation for ubuntu-system-settings-online-accounts # Copyright (c) 2015 Rosetta Contributors and Canonical Ltd 2015 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2015. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-04-25 13:36+0000\n" "Last-Translator: Charif AYFARAH \n" "Language-Team: Afar \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Xoqoysimê migaaqa" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Cuumita" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Qulluumah..." #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Bayis" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "Mamaxxaga" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Loowta kal..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Loowta kal" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "%1 lowta cagal ku telefoonuk kattu waytam. Sarrak edde osissam duddah." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Kal" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "A loowta cul:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Loowta edde osis..." #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Loowtak addaffakoot akket taagissek, abnissoosa kulli abnisso cule kal edde " "xoqoysimele." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Loowtitte" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Loowta edde osis" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Loowtitte matan" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Loowta edd osis:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 culam faxam ku %2 loowta" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Oggol" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "Aki loowta edde ossis..." #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "M'oggolin" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/po/ast.po0000644000015600001650000000625612674252514025307 0ustar pbuserpbgroup00000000000000# Asturian translation for ubuntu-system-settings-online-accounts # Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 # This file is distributed under the same license as the ubuntu-system-settings-online-accounts package. # FIRST AUTHOR , 2014. # msgid "" msgstr "" "Project-Id-Version: ubuntu-system-settings-online-accounts\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2015-04-17 09:24+0300\n" "PO-Revision-Date: 2015-06-11 21:39+0000\n" "Last-Translator: enolp \n" "Language-Team: Asturian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Launchpad-Export-Date: 2016-03-11 05:53+0000\n" "X-Generator: Launchpad (build 17939)\n" #: ../plugins/example/Main.qml:33 msgid "User name" msgstr "Nome d'usuariu" #: ../plugins/example/Main.qml:39 msgid "Password" msgstr "Contraseña" #: ../plugins/module/OAuth.qml:119 msgid "Loading…" msgstr "Cargando…" #: ../plugins/module/OAuth.qml:148 #: ../plugins/module/RemovalConfirmation.qml:43 #: ../online-accounts-ui/qml/SignOnUiDialog.qml:90 #: ../online-accounts-ui/qml/SignOnUiPage.qml:30 msgid "Cancel" msgstr "Encaboxar" #: ../plugins/module/Options.qml:36 msgid "ID" msgstr "ID" #: ../plugins/module/Options.qml:48 msgid "Remove account…" msgstr "Desaniciar cuenta..." #: ../plugins/module/RemovalConfirmation.qml:32 msgid "Remove account" msgstr "Desaniciar cuenta" #: ../plugins/module/RemovalConfirmation.qml:33 #, qt-format msgid "" "The %1 account will be removed only from your phone. You can add it again " "later." msgstr "" "La cuenta %1 desaniciaráse namái del to teléfonu. Pues amestala de nueves " "sero." #: ../plugins/module/RemovalConfirmation.qml:38 msgid "Remove" msgstr "Desaniciar" #: ../plugins/module/ServiceSwitches.qml:33 msgid "Access to this account:" msgstr "Accesu d'esta cuenta a:" #: ../system-settings-plugin/AccountsPage.qml:51 msgid "Add account…" msgstr "Amestar cuenta…" #: ../system-settings-plugin/AddAccountLabel.qml:27 msgid "" "Storing account details here lets apps use the accounts without you having " "to sign in for each app." msgstr "" "Atroxar equí los detalles de les cuentes dexa a les aplicaciones usar les " "cuentes ensin tener d'aniciar sesión en cada aplicación." #: ../system-settings-plugin/MainPage.qml:32 ../.build/settings.js:1 msgid "Accounts" msgstr "Cuentes" #: ../system-settings-plugin/NewAccountPage.qml:23 msgid "Add account" msgstr "Amestar cuenta" #: ../system-settings-plugin/NoAccountsPage.qml:36 msgid "No accounts" msgstr "Nun hai cuentes" #: ../system-settings-plugin/NoAccountsPage.qml:44 msgid "Add account:" msgstr "Amestar cuenta:" #: ../online-accounts-ui/qml/AuthorizationPage.qml:46 #, qt-format msgid "%1 wants to access your %2 account" msgstr "%1 quier acceder a la to cuenta %2" #: ../online-accounts-ui/qml/AuthorizationPage.qml:87 msgid "Allow" msgstr "Permitir" #: ../online-accounts-ui/qml/AuthorizationPage.qml:96 msgid "Add another account…" msgstr "Amestar otra cuenta..." #: ../online-accounts-ui/qml/AuthorizationPage.qml:104 msgid "Don't allow" msgstr "Nun permitir" #~ msgid "Add another" #~ msgstr "Amestar otru" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/common-project-config.pri0000644000015600001650000000427612674252514030455 0ustar pbuserpbgroup00000000000000#----------------------------------------------------------------------------- # Common configuration for all projects. #----------------------------------------------------------------------------- # we don't like warnings... QMAKE_CXXFLAGS += -Werror # Disable RTTI QMAKE_CXXFLAGS += -fno-exceptions -fno-rtti !defined(TOP_SRC_DIR, var) { TOP_SRC_DIR = $$PWD TOP_BUILD_DIR = $${TOP_SRC_DIR}/$(BUILD_DIR) } include(coverage.pri) #----------------------------------------------------------------------------- # setup the installation prefix #----------------------------------------------------------------------------- INSTALL_PREFIX = /usr # default installation prefix # default prefix can be overriden by defining PREFIX when running qmake isEmpty(PREFIX) { message("====") message("==== NOTE: To override the installation path run: `qmake PREFIX=/custom/path'") message("==== (current installation path is `$${INSTALL_PREFIX}')") } else { INSTALL_PREFIX = $${PREFIX} message("====") message("==== install prefix set to `$${INSTALL_PREFIX}'") } INSTALL_LIBDIR = $${INSTALL_PREFIX}/lib isEmpty(LIBDIR) { message("====") message("==== NOTE: To override the library installation path run: `qmake LIBDIR=/custom/path'") message("==== (current installation path is `$${INSTALL_LIBDIR}')") } else { INSTALL_LIBDIR = $${LIBDIR} message("====") message("==== install prefix set to `$${INSTALL_LIBDIR}'") } ONLINE_ACCOUNTS_PLUGIN_DIR_BASE = share/accounts/qml-plugins ONLINE_ACCOUNTS_PLUGIN_DIR = $${INSTALL_PREFIX}/$${ONLINE_ACCOUNTS_PLUGIN_DIR_BASE} PLUGIN_MANIFEST_DIR = $$system("pkg-config --define-variable=prefix=$${INSTALL_PREFIX} --variable plugin_manifest_dir SystemSettings") PLUGIN_MODULE_DIR = $$system("pkg-config --define-variable=prefix=$${INSTALL_PREFIX} --variable plugin_module_dir SystemSettings") PLUGIN_QML_DIR = $$system("pkg-config --define-variable=prefix=$${INSTALL_PREFIX} --variable plugin_qml_dir SystemSettings") PLUGIN_PRIVATE_MODULE_DIR = $$system("pkg-config --define-variable=prefix=$${INSTALL_PREFIX} --variable plugin_private_module_dir SystemSettings") I18N_DOMAIN="ubuntu-system-settings-online-accounts" SIGNONUI_I18N_DOMAIN="signon-ui" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/COPYING0000644000015600001650000010451312674252514024570 0ustar pbuserpbgroup00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . ubuntu-system-settings-online-accounts-0.7+16.04.20160322/COPYING.LGPL-30000644000015600001650000001674312674252514025474 0ustar pbuserpbgroup00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/0000755000015600001650000000000012674252771030275 5ustar pbuserpbgroup00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/ui-proxy.cpp0000644000015600001650000002763212674252514032602 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "debug.h" #include "ipc.h" #include "mir-helper.h" #include "request.h" #include "ui-proxy.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace OnlineAccountsUi; static int socketCounter = 1; namespace OnlineAccountsUi { class UiProxyPrivate: public QObject { Q_OBJECT Q_DECLARE_PUBLIC(UiProxy) public: inline UiProxyPrivate(pid_t clientPid, UiProxy *pluginProxy); inline ~UiProxyPrivate(); void setStatus(UiProxy::Status status); bool setupSocket(); bool init(); void sendOperation(const QVariantMap &data); void sendRequest(int requestId, Request *request); bool setupPromptSession(); QString findAppArmorProfile(); void startProcess(); private Q_SLOTS: void onNewConnection(); void onDisconnected(); void onDataReady(QByteArray &data); void onRequestCompleted(); void onFinishedTimer(); private: QProcess m_process; UiProxy::Status m_status; QLocalServer m_server; QLocalSocket *m_socket; OnlineAccountsUi::Ipc m_ipc; QTimer m_finishedTimer; int m_nextRequestId; QMap m_requests; QStringList m_handlers; pid_t m_clientPid; QString m_providerId; PromptSessionP m_promptSession; QStringList m_arguments; mutable UiProxy *q_ptr; }; } // namespace UiProxyPrivate::UiProxyPrivate(pid_t clientPid, UiProxy *uiProxy): QObject(uiProxy), m_status(UiProxy::Null), m_socket(0), m_nextRequestId(0), m_clientPid(clientPid), q_ptr(uiProxy) { QObject::connect(&m_server, SIGNAL(newConnection()), this, SLOT(onNewConnection())); QObject::connect(&m_ipc, SIGNAL(dataReady(QByteArray &)), this, SLOT(onDataReady(QByteArray &))); m_process.setProcessChannelMode(QProcess::ForwardedChannels); m_finishedTimer.setSingleShot(true); QObject::connect(&m_finishedTimer, SIGNAL(timeout()), this, SLOT(onFinishedTimer())); } UiProxyPrivate::~UiProxyPrivate() { /* Cancel all requests */ Q_FOREACH(Request *request, m_requests) { request->cancel(); } if (m_socket) { m_socket->abort(); delete m_socket; } m_server.close(); } void UiProxyPrivate::setStatus(UiProxy::Status status) { Q_Q(UiProxy); if (m_status == status) return; m_status = status; Q_EMIT q->statusChanged(); } void UiProxyPrivate::sendOperation(const QVariantMap &data) { QByteArray ba; QDataStream stream(&ba, QIODevice::WriteOnly); stream << data; m_ipc.write(ba); } void UiProxyPrivate::onDisconnected() { Q_Q(UiProxy); if (!m_finishedTimer.isActive()) { Q_EMIT q->finished(); } } void UiProxyPrivate::onNewConnection() { Q_Q(UiProxy); QLocalSocket *socket = m_server.nextPendingConnection(); if (Q_UNLIKELY(socket == 0)) return; if (Q_UNLIKELY(m_socket != 0)) { qWarning() << "A socket is already active!"; socket->deleteLater(); return; } m_socket = socket; QObject::connect(socket, SIGNAL(disconnected()), this, SLOT(onDisconnected())); m_ipc.setChannels(socket, socket); m_server.close(); // stop listening setStatus(UiProxy::Ready); /* Execute any pending requests */ QMapIterator it(m_requests); while (it.hasNext()) { it.next(); sendRequest(it.key(), it.value()); } } void UiProxyPrivate::onDataReady(QByteArray &data) { QVariantMap map; QDataStream stream(&data, QIODevice::ReadOnly); stream >> map; DEBUG() << map; int requestId = map.value(OAU_OPERATION_ID, -1).toInt(); Request *request = m_requests.value(requestId, 0); QString code = map.value(OAU_OPERATION_CODE).toString(); if (code == OAU_OPERATION_CODE_REQUEST_FINISHED) { Q_ASSERT(request); request->setDelay(map.value(OAU_OPERATION_DELAY).toInt()); request->setResult(map.value(OAU_OPERATION_DATA).toMap()); } else if (code == OAU_OPERATION_CODE_REQUEST_FAILED) { Q_ASSERT(request); request->fail(map.value(OAU_OPERATION_ERROR_NAME).toString(), map.value(OAU_OPERATION_ERROR_MESSAGE).toString()); } else if (code == OAU_OPERATION_CODE_REGISTER_HANDLER) { m_handlers.append(map.value(OAU_OPERATION_HANDLER_ID).toString()); } else { qWarning() << "Invalid operation code: " << code; } } bool UiProxyPrivate::setupSocket() { QString runtimeDir = QStandardPaths::writableLocation(QStandardPaths::RuntimeLocation); QDir socketDir(runtimeDir + "/online-accounts-ui"); if (!socketDir.exists()) socketDir.mkpath("."); QString uniqueName = QString("ui-%1-%2").arg(socketCounter++).arg(m_providerId); /* If the file exists, it's a stale file: online-accounts-ui is a single * instance process, and the only one creating files in this directory. */ if (Q_UNLIKELY(socketDir.exists(uniqueName))) { socketDir.remove(uniqueName); } /* Create the socket and set it into listen mode */ return m_server.listen(socketDir.filePath(uniqueName)); } bool UiProxyPrivate::setupPromptSession() { Q_Q(UiProxy); if (!m_clientPid) return false; PromptSessionP session = MirHelper::instance()->createPromptSession(m_clientPid); if (!session) return false; QString mirSocket = session->requestSocket(); if (mirSocket.isEmpty()) { return false; } m_promptSession = session; QObject::connect(m_promptSession.data(), SIGNAL(finished()), q, SIGNAL(finished())); QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); env.insert("MIR_SOCKET", mirSocket); m_process.setProcessEnvironment(env); return true; } bool UiProxyPrivate::init() { QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); if (env.value("QT_QPA_PLATFORM").startsWith("ubuntu")) { if (!setupPromptSession()) { qWarning() << "Couldn't setup prompt session"; return false; } } /* We also create ~/cache/online-accounts-ui/, since the plugin might not * have permissions to do that. */ QString userCacheDir = QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation); QDir cacheDir(userCacheDir + "/online-accounts-ui"); if (!cacheDir.exists()) cacheDir.mkpath("."); return true; } QString UiProxyPrivate::findAppArmorProfile() { if (Q_UNLIKELY(m_providerId.isEmpty())) return QString(); /* Load the provider XML file */ Accounts::Manager manager; Accounts::Provider provider = manager.provider(m_providerId); if (Q_UNLIKELY(!provider.isValid())) { qWarning() << "Provider not found:" << m_providerId; return QString(); } const QDomDocument doc = provider.domDocument(); QDomElement root = doc.documentElement(); return root.firstChildElement("profile").text(); } void UiProxyPrivate::startProcess() { if (Q_UNLIKELY(!setupSocket())) { qWarning() << "Couldn't setup IPC socket"; setStatus(UiProxy::Error); return; } m_arguments.append("--socket"); m_arguments.append(m_server.fullServerName()); QString profile = findAppArmorProfile(); if (profile.isEmpty()) { profile = "unconfined"; } else { QProcessEnvironment env = m_process.processEnvironment(); env.insert("APP_ID", profile); /* Set TMPDIR to a location which the confined process can actually * use */ QString tmpdir = QStandardPaths::writableLocation(QStandardPaths::RuntimeLocation) + "/" + profile.split('_')[0]; env.insert("TMPDIR", tmpdir); m_process.setProcessEnvironment(env); } m_arguments.append("--profile"); m_arguments.append(profile); QString processName; QString wrapper = QString::fromUtf8(qgetenv("OAU_WRAPPER")); QString accountsUi = QStringLiteral(INSTALL_BIN_DIR "/online-accounts-ui"); if (wrapper.isEmpty()) { processName = accountsUi; } else { processName = wrapper; m_arguments.prepend(accountsUi); } setStatus(UiProxy::Loading); m_process.start(processName, m_arguments); if (Q_UNLIKELY(!m_process.waitForStarted())) { qWarning() << "Couldn't start account plugin process"; setStatus(UiProxy::Error); return; } } void UiProxyPrivate::sendRequest(int requestId, Request *request) { QVariantMap operation; operation.insert(OAU_OPERATION_CODE, OAU_OPERATION_CODE_PROCESS); operation.insert(OAU_OPERATION_ID, requestId); operation.insert(OAU_OPERATION_DATA, request->parameters()); operation.insert(OAU_OPERATION_INTERFACE, request->interface()); operation.insert(OAU_OPERATION_CLIENT_PROFILE, request->clientApparmorProfile()); sendOperation(operation); } void UiProxyPrivate::onFinishedTimer() { Q_Q(UiProxy); if (m_requests.isEmpty()) { Q_EMIT q->finished(); } } void UiProxyPrivate::onRequestCompleted() { Request *request = qobject_cast(sender()); Q_ASSERT(request); m_finishedTimer.setInterval(request->delay()); m_finishedTimer.start(); int id = m_requests.key(request, -1); if (id != -1) { m_requests.remove(id); } } UiProxy::UiProxy(pid_t clientPid, QObject *parent): QObject(parent), d_ptr(new UiProxyPrivate(clientPid, this)) { } UiProxy::~UiProxy() { DEBUG(); } UiProxy::Status UiProxy::status() const { Q_D(const UiProxy); return d->m_status; } bool UiProxy::init() { Q_D(UiProxy); return d->init(); } void UiProxy::handleRequest(Request *request) { Q_D(UiProxy); if (d->m_providerId.isEmpty()) { d->m_providerId = request->providerId(); } int requestId = d->m_nextRequestId++; d->m_requests.insert(requestId, request); QObject::connect(request, SIGNAL(completed()), d, SLOT(onRequestCompleted())); request->setInProgress(true); if (d->m_status == UiProxy::Ready) { d->sendRequest(requestId, request); } else if (d->m_status == UiProxy::Null) { d->startProcess(); } } bool UiProxy::hasHandlerFor(const QVariantMap ¶meters) { Q_D(UiProxy); /* Find if there's any handlers expecting to handle the SignOnUi * request having "parameters" as parameters. * This is simply done by matching on the X-RequestHandler key (aka * matchKey()), if present. We expect that account plugins add that field * to their AuthSession requests which they want to handle themselves. */ DEBUG() << parameters; if (!parameters.contains(SSOUI_KEY_CLIENT_DATA)) return false; QVariant variant = parameters[SSOUI_KEY_CLIENT_DATA]; QVariantMap clientData = variant.toMap(); QString matchId = clientData.value(OAU_REQUEST_MATCH_KEY).toString(); if (matchId.isEmpty()) return false; return d->m_handlers.contains(matchId); } #include "ui-proxy.moc" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/request.cpp0000644000015600001650000001322612674252514032470 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "debug.h" #include "globals.h" #include "request.h" #include "utils.h" #include #include #include using namespace OnlineAccountsUi; static bool mapIsSuperset(const QVariantMap &test, const QVariantMap &set) { QMapIterator it(set); while (it.hasNext()) { it.next(); if (test.value(it.key()) != it.value()) return false; } return true; } namespace OnlineAccountsUi { static QList allRequests; class RequestPrivate: public QObject { Q_OBJECT Q_DECLARE_PUBLIC(Request) public: RequestPrivate(const QDBusConnection &connection, const QDBusMessage &message, const QVariantMap ¶meters, Request *request); ~RequestPrivate(); quint64 windowId() const { return m_parameters[OAU_KEY_WINDOW_ID].toUInt(); } private: mutable Request *q_ptr; QDBusConnection m_connection; QDBusMessage m_message; QVariantMap m_parameters; QString m_clientApparmorProfile; bool m_inProgress; int m_delay; }; } // namespace RequestPrivate::RequestPrivate(const QDBusConnection &connection, const QDBusMessage &message, const QVariantMap ¶meters, Request *request): QObject(request), q_ptr(request), m_connection(connection), m_message(message), m_parameters(parameters), m_inProgress(false), m_delay(0) { m_clientApparmorProfile = apparmorProfileOfPeer(message); } RequestPrivate::~RequestPrivate() { } Request::Request(const QDBusConnection &connection, const QDBusMessage &message, const QVariantMap ¶meters, QObject *parent): QObject(parent), d_ptr(new RequestPrivate(connection, message, parameters, this)) { allRequests.append(this); } Request::~Request() { allRequests.removeOne(this); } Request *Request::find(const QVariantMap &match) { Q_FOREACH(Request *r, allRequests) { if (mapIsSuperset(r->parameters(), match)) { return r; } } return 0; } quint64 Request::windowId() const { Q_D(const Request); return d->windowId(); } pid_t Request::clientPid() const { Q_D(const Request); if (interface() == OAU_INTERFACE) { return d->m_parameters.value(OAU_KEY_PID, 0).toUInt(); } else if (interface() == SIGNONUI_INTERFACE) { if (d->m_clientApparmorProfile == "unconfined") { QVariantMap clientData = d->m_parameters.value(SSOUI_KEY_CLIENT_DATA).toMap(); if (clientData.contains("requestorPid")) { return clientData.value("requestorPid").toUInt(); } } return d->m_parameters.value(SSOUI_KEY_PID, 0).toUInt(); } return 0; } void Request::setInProgress(bool inProgress) { Q_D(Request); d->m_inProgress = inProgress; } bool Request::isInProgress() const { Q_D(const Request); return d->m_inProgress; } const QVariantMap &Request::parameters() const { Q_D(const Request); return d->m_parameters; } QString Request::clientApparmorProfile() const { Q_D(const Request); return d->m_clientApparmorProfile; } QString Request::interface() const { Q_D(const Request); return d->m_message.interface(); } QString Request::providerId() const { Q_D(const Request); if (interface() == OAU_INTERFACE) { QString providerId = d->m_parameters.value(OAU_KEY_PROVIDER).toString(); if (providerId.isEmpty() && d->m_parameters.contains(OAU_KEY_SERVICE_ID)) { Accounts::Manager manager; QString serviceId = d->m_parameters[OAU_KEY_SERVICE_ID].toString(); Accounts::Service service = manager.service(serviceId); if (service.isValid()) { providerId = service.provider(); } } return providerId; } else { return QString(); } } void Request::setDelay(int delay) { Q_D(Request); d->m_delay = delay; } int Request::delay() const { Q_D(const Request); return d->m_delay; } void Request::cancel() { setCanceled(); } void Request::fail(const QString &name, const QString &message) { Q_D(Request); QDBusMessage reply = d->m_message.createErrorReply(name, message); d->m_connection.send(reply); Q_EMIT completed(); } void Request::setCanceled() { Q_D(Request); if (d->m_inProgress) { fail(OAU_ERROR_USER_CANCELED, QStringLiteral("Canceled")); d->m_inProgress = false; } } void Request::setResult(const QVariantMap &result) { Q_D(Request); if (d->m_inProgress) { QDBusMessage reply = d->m_message.createReply(result); d->m_connection.send(reply); Q_EMIT completed(); d->m_inProgress = false; } } #include "request.moc" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/utils.cpp0000644000015600001650000000365012674252514032140 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "debug.h" #include "utils.h" #include #include namespace OnlineAccountsUi { QString apparmorProfileOfPeer(const QDBusMessage &message) { QString uniqueConnectionId = message.service(); /* This is mainly for unit tests: real messages on the session bus always * have a service name. */ if (uniqueConnectionId.isEmpty()) return QString(); QString appId; QDBusMessage msg = QDBusMessage::createMethodCall("org.freedesktop.DBus", "/org/freedesktop/DBus", "org.freedesktop.DBus", "GetConnectionAppArmorSecurityContext"); QVariantList args; args << uniqueConnectionId; msg.setArguments(args); QDBusMessage reply = QDBusConnection::sessionBus().call(msg, QDBus::Block); if (reply.type() == QDBusMessage::ReplyMessage) { appId = reply.arguments().value(0, QString()).toString(); DEBUG() << "App ID:" << appId; } else { qWarning() << "Error getting app ID:" << reply.errorName() << reply.errorMessage(); } return appId; } } // namespace ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/inactivity-timer.h0000644000015600001650000000254712674252514033752 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef OAU_INACTIVITY_TIMER_H #define OAU_INACTIVITY_TIMER_H #include #include #include namespace OnlineAccountsUi { class InactivityTimer: public QObject { Q_OBJECT public: InactivityTimer(int interval, QObject *parent = 0); ~InactivityTimer() {} void watchObject(QObject *object); Q_SIGNALS: void timeout(); private Q_SLOTS: void onIdleChanged(); void onTimeout(); private: bool allObjectsAreIdle() const; private: QList m_watchedObjects; QTimer m_timer; int m_interval; }; } // namespace #endif // OAU_INACTIVITY_TIMER_H ././@LongLink0000000000000000000000000000014600000000000011216 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/request-manager.cppubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/request-manager.cp0000644000015600001650000001150212674252514033713 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "debug.h" #include "globals.h" #include "request.h" #include "request-manager.h" #include "ui-proxy.h" #include using namespace OnlineAccountsUi; namespace OnlineAccountsUi { static RequestManager *m_instance = 0; typedef QQueue RequestQueue; class RequestManagerPrivate: public QObject { Q_OBJECT Q_DECLARE_PUBLIC(RequestManager) public: RequestManagerPrivate(RequestManager *service); ~RequestManagerPrivate(); RequestQueue &queueForWindowId(quint64 windowId); void enqueue(Request *request); void runQueue(RequestQueue &queue); private Q_SLOTS: void onRequestCompleted(); void onProxyFinished(); private: mutable RequestManager *q_ptr; /* each window Id has a different queue */ QMap m_requests; QList m_proxies; }; } // namespace RequestManagerPrivate::RequestManagerPrivate(RequestManager *service): QObject(service), q_ptr(service) { } RequestManagerPrivate::~RequestManagerPrivate() { } RequestQueue &RequestManagerPrivate::queueForWindowId(quint64 windowId) { if (!m_requests.contains(windowId)) { RequestQueue queue; m_requests.insert(windowId, queue); } return m_requests[windowId]; } void RequestManagerPrivate::enqueue(Request *request) { Q_Q(RequestManager); /* First, see if any of the existing proxies can handle this request */ Q_FOREACH(UiProxy *proxy, m_proxies) { if (proxy->hasHandlerFor(request->parameters())) { QObject::connect(request, SIGNAL(completed()), request, SLOT(deleteLater())); proxy->handleRequest(request); return; } } bool wasIdle = q->isIdle(); quint64 windowId = request->windowId(); RequestQueue &queue = queueForWindowId(windowId); queue.enqueue(request); if (wasIdle) { Q_EMIT q->isIdleChanged(); } runQueue(queue); } void RequestManagerPrivate::runQueue(RequestQueue &queue) { Request *request = queue.head(); DEBUG() << "Head:" << request; if (request->isInProgress()) { DEBUG() << "Already in progress"; return; // Nothing to do } QObject::connect(request, SIGNAL(completed()), this, SLOT(onRequestCompleted())); UiProxy *proxy = new UiProxy(request->clientPid(), this); if (Q_UNLIKELY(!proxy->init())) { qWarning() << "UiProxy initialization failed!"; request->fail(OAU_ERROR_PROMPT_SESSION, "Could not create a prompt session"); return; } QObject::connect(proxy, SIGNAL(finished()), this, SLOT(onProxyFinished())); m_proxies.append(proxy); proxy->handleRequest(request); } void RequestManagerPrivate::onRequestCompleted() { Q_Q(RequestManager); Request *request = qobject_cast(sender()); quint64 windowId = request->windowId(); RequestQueue &queue = queueForWindowId(windowId); if (request != queue.head()) { qCritical("Completed request is not first in queue!"); return; } queue.dequeue(); request->deleteLater(); if (queue.isEmpty()) { m_requests.remove(windowId); } else { /* start the next request */ runQueue(queue); } if (q->isIdle()) { Q_EMIT q->isIdleChanged(); } } void RequestManagerPrivate::onProxyFinished() { UiProxy *proxy = qobject_cast(sender()); m_proxies.removeOne(proxy); proxy->deleteLater(); } RequestManager::RequestManager(QObject *parent): QObject(parent), d_ptr(new RequestManagerPrivate(this)) { if (m_instance == 0) { m_instance = this; } else { qWarning() << "Instantiating a second RequestManager!"; } } RequestManager::~RequestManager() { } RequestManager *RequestManager::instance() { return m_instance; } void RequestManager::enqueue(Request *request) { Q_D(RequestManager); d->enqueue(request); } bool RequestManager::isIdle() const { Q_D(const RequestManager); return d->m_requests.isEmpty(); } #include "request-manager.moc" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/main.cpp0000644000015600001650000001234212674252514031722 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "debug.h" #include "globals.h" #include "inactivity-timer.h" #include "indicator-service.h" #include "libaccounts-service.h" #include "request-manager.h" #include "service.h" #include "signonui-service.h" #include #include #include #include #include using namespace OnlineAccountsUi; #define ONLINE_ACCOUNTS_MANAGER_SERVICE_NAME \ "com.ubuntu.OnlineAccounts.Manager" #define ONLINE_ACCOUNTS_MANAGER_PATH "/com/ubuntu/OnlineAccounts/Manager" int main(int argc, char **argv) { QCoreApplication app(argc, argv); /* read environment variables */ QProcessEnvironment environment = QProcessEnvironment::systemEnvironment(); if (environment.contains(QLatin1String("OAU_LOGGING_LEVEL"))) { bool isOk; int value = environment.value( QLatin1String("OAU_LOGGING_LEVEL")).toInt(&isOk); if (isOk) setLoggingLevel(value); } /* default daemonTimeout to 5 seconds */ int daemonTimeout = 5; /* override daemonTimeout if OAU_DAEMON_TIMEOUT is set */ if (environment.contains(QLatin1String("OAU_DAEMON_TIMEOUT"))) { bool isOk; int value = environment.value( QLatin1String("OAU_DAEMON_TIMEOUT")).toInt(&isOk); if (isOk) daemonTimeout = value; } RequestManager *requestManager = new RequestManager(); qDBusRegisterMetaType(); Service *service = new Service(); QDBusConnection connection = QDBusConnection::sessionBus(); connection.registerObject(OAU_OBJECT_PATH, service); connection.registerService(OAU_SERVICE_NAME); SignOnUi::Service *signonuiService = new SignOnUi::Service(); connection.registerObject(SIGNONUI_OBJECT_PATH, signonuiService, QDBusConnection::ExportAllContents); connection.registerService(SIGNONUI_SERVICE_NAME); SignOnUi::IndicatorService *indicatorService = new SignOnUi::IndicatorService(); connection.registerObject(WEBCREDENTIALS_OBJECT_PATH, indicatorService->serviceObject()); connection.registerService(WEBCREDENTIALS_BUS_NAME); LibaccountsService *libaccountsService = new LibaccountsService(); connection.registerObject(LIBACCOUNTS_OBJECT_PATH, libaccountsService, QDBusConnection::ExportAllContents); connection.registerService(LIBACCOUNTS_BUS_NAME); /* V2 API; we load it dynamically in order to resolve a build-time * circular dependency loop. */ QLibrary v2lib("OnlineAccountsDaemon"); typedef QObject *(*CreateManager)(QObject *); CreateManager createManager = (CreateManager) v2lib.resolve("oad_create_manager"); QObject *v2api = createManager ? createManager(0) : 0; if (v2api) { connection.registerObject(ONLINE_ACCOUNTS_MANAGER_PATH, v2api); connection.registerService(ONLINE_ACCOUNTS_MANAGER_SERVICE_NAME); connection.connect(QString(), QStringLiteral("/org/freedesktop/DBus/Local"), QStringLiteral("org.freedesktop.DBus.Local"), QStringLiteral("Disconnected"), v2api, SLOT(onDisconnected())); } InactivityTimer *inactivityTimer = 0; if (daemonTimeout > 0) { inactivityTimer = new InactivityTimer(daemonTimeout * 1000); inactivityTimer->watchObject(v2api); inactivityTimer->watchObject(requestManager); inactivityTimer->watchObject(indicatorService); QObject::connect(inactivityTimer, SIGNAL(timeout()), &app, SLOT(quit())); } int ret = app.exec(); if (v2api) { connection.unregisterService(ONLINE_ACCOUNTS_MANAGER_SERVICE_NAME); connection.unregisterObject(ONLINE_ACCOUNTS_MANAGER_PATH); delete v2api; } connection.unregisterService(LIBACCOUNTS_BUS_NAME); connection.unregisterObject(LIBACCOUNTS_OBJECT_PATH); delete libaccountsService; connection.unregisterService(WEBCREDENTIALS_BUS_NAME); connection.unregisterObject(WEBCREDENTIALS_OBJECT_PATH); delete indicatorService; connection.unregisterService(SIGNONUI_SERVICE_NAME); connection.unregisterObject(SIGNONUI_OBJECT_PATH); delete signonuiService; connection.unregisterService(OAU_SERVICE_NAME); connection.unregisterObject(OAU_OBJECT_PATH); delete service; delete requestManager; delete inactivityTimer; return ret; } ././@LongLink0000000000000000000000000000017100000000000011214 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/com.ubuntu.OnlineAccountsUi.service.inubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/com.ubuntu.OnlineA0000644000015600001650000000013012674252514033630 0ustar pbuserpbgroup00000000000000[D-BUS Service] Name=com.ubuntu.OnlineAccountsUi Exec=$${INSTALL_PREFIX}/bin/$${TARGET} ././@LongLink0000000000000000000000000000017700000000000011222 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/com.ubuntu.OnlineAccounts.Manager.service.inubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/com.ubuntu.OnlineA0000644000015600001650000000013612674252514033636 0ustar pbuserpbgroup00000000000000[D-BUS Service] Name=com.ubuntu.OnlineAccounts.Manager Exec=$${INSTALL_PREFIX}/bin/$${TARGET} ././@LongLink0000000000000000000000000000014600000000000011216 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/reauthenticator.cppubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/reauthenticator.cp0000644000015600001650000001033212674252514034014 0ustar pbuserpbgroup00000000000000/* * This file is part of online-accounts-ui * * Copyright (C) 2012 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "reauthenticator.h" #include "debug.h" #include #include using namespace SignOnUi; using namespace SignOn; namespace SignOnUi { class ReauthenticatorPrivate: public QObject { Q_OBJECT Q_DECLARE_PUBLIC(Reauthenticator) public: ReauthenticatorPrivate(const QList &clientData, const QVariantMap &extraParameters, Reauthenticator *reauthenticator); ~ReauthenticatorPrivate(); void start(); private: void checkFinished(); private Q_SLOTS: void onError(const SignOn::Error &error); void onResponse(const SignOn::SessionData &response); private: mutable Reauthenticator *q_ptr; QList m_clientData; QVariantMap m_extraParameters; int m_errorCount; int m_responseCount; }; } // namespace ReauthenticatorPrivate::ReauthenticatorPrivate( const QList &clientData, const QVariantMap &extraParameters, Reauthenticator *request): QObject(request), q_ptr(request), m_clientData(clientData), m_extraParameters(extraParameters), m_errorCount(0), m_responseCount(0) { } ReauthenticatorPrivate::~ReauthenticatorPrivate() { } void ReauthenticatorPrivate::start() { Q_FOREACH(const AuthData &authData, m_clientData) { Identity *identity = Identity::existingIdentity(authData.identity, this); if (identity == 0) { m_errorCount++; continue; } AuthSession *authSession = identity->createSession(authData.method); if (authSession == 0) { m_errorCount++; continue; } QObject::connect(authSession, SIGNAL(error(const SignOn::Error &)), this, SLOT(onError(const SignOn::Error &))); QObject::connect(authSession, SIGNAL(response(const SignOn::SessionData &)), this, SLOT(onResponse(const SignOn::SessionData &))); /* Prepare the session data, adding the extra parameters. */ QVariantMap sessionData = authData.sessionData; QVariantMap::const_iterator i; for (i = m_extraParameters.constBegin(); i != m_extraParameters.constEnd(); i++) { sessionData[i.key()] = i.value(); } /* Start the session right now; signon-ui is queueing them anyway. */ authSession->process(sessionData, authData.mechanism); } checkFinished(); } void ReauthenticatorPrivate::checkFinished() { Q_Q(Reauthenticator); if (m_errorCount + m_responseCount < m_clientData.count()) return; Q_EMIT q->finished(m_errorCount == 0); } void ReauthenticatorPrivate::onError(const SignOn::Error &error) { DEBUG() << "Got error:" << error.message(); m_errorCount++; checkFinished(); } void ReauthenticatorPrivate::onResponse( const SignOn::SessionData &response) { DEBUG() << "Got response:" << response.toMap(); m_responseCount++; checkFinished(); } Reauthenticator::Reauthenticator(const QList &clientData, const QVariantMap &extraParameters, QObject *parent): QObject(parent), d_ptr(new ReauthenticatorPrivate(clientData, extraParameters, this)) { } Reauthenticator::~Reauthenticator() { } void Reauthenticator::start() { Q_D(Reauthenticator); d->start(); } #include "reauthenticator.moc" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/mir-helper.h0000644000015600001650000000332712674252514032512 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef OAU_MIR_HELPER_H #define OAU_MIR_HELPER_H #include #include namespace OnlineAccountsUi { class PromptSessionPrivate; class MirHelper; class MirHelperPrivate; class PromptSession: public QObject { Q_OBJECT public: ~PromptSession(); QString requestSocket(); Q_SIGNALS: void finished(); private: explicit PromptSession(PromptSessionPrivate *priv); private: friend class MirHelper; friend class MirHelperPrivate; PromptSessionPrivate *d_ptr; Q_DECLARE_PRIVATE(PromptSession) }; typedef QSharedPointer PromptSessionP; class MirHelper: public QObject { Q_OBJECT public: static MirHelper *instance(); PromptSessionP createPromptSession(pid_t initiatorPid); private: explicit MirHelper(QObject *parent = 0); ~MirHelper(); private: friend class PromptSession; MirHelperPrivate *d_ptr; Q_DECLARE_PRIVATE(MirHelper) }; } // namespace #endif // OAU_MIR_HELPER_H ././@LongLink0000000000000000000000000000015600000000000011217 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/online-accounts-service.proubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/online-accounts-se0000644000015600001650000000361612674252514033727 0ustar pbuserpbgroup00000000000000include(../common-project-config.pri) include($${TOP_SRC_DIR}/common-vars.pri) TEMPLATE = app TARGET = online-accounts-service CONFIG += \ link_pkgconfig \ no_keywords \ qt QT += \ dbus \ network PKGCONFIG += \ accounts-qt5 \ libnotify \ libsignon-qt5 \ signon-plugins-common CONFIG(enable-mir) : system(pkg-config --exists mirclient) { PKGCONFIG += mirclient SOURCES += mir-helper.cpp } else { SOURCES += mir-helper-stub.cpp } DBUS_ADAPTORS += \ com.ubuntu.OnlineAccountsUi.xml DEFINES += \ DEBUG_ENABLED \ INSTALL_BIN_DIR=\\\"$${INSTALL_PREFIX}/bin\\\" \ SIGNONUI_I18N_DOMAIN=\\\"$${SIGNONUI_I18N_DOMAIN}\\\" COMMON_SRC = ../online-accounts-ui INCLUDEPATH += \ $${COMMON_SRC} SOURCES += \ $${COMMON_SRC}/debug.cpp \ $${COMMON_SRC}/i18n.cpp \ $${COMMON_SRC}/ipc.cpp \ $${COMMON_SRC}/notification.cpp \ inactivity-timer.cpp \ indicator-service.cpp \ libaccounts-service.cpp \ main.cpp \ reauthenticator.cpp \ request.cpp \ request-manager.cpp \ service.cpp \ signonui-service.cpp \ ui-proxy.cpp \ utils.cpp HEADERS += \ $${COMMON_SRC}/debug.h \ $${COMMON_SRC}/i18n.h \ $${COMMON_SRC}/ipc.h \ $${COMMON_SRC}/notification.h \ inactivity-timer.h \ indicator-service.h \ libaccounts-service.h \ mir-helper.h \ reauthenticator.h \ request.h \ request-manager.h \ service.h \ signonui-service.h \ ui-proxy.h \ utils.h QMAKE_SUBSTITUTES += \ com.ubuntu.OnlineAccounts.Manager.service.in \ com.ubuntu.OnlineAccountsUi.service.in DBUS_ADAPTORS += \ com.canonical.indicators.webcredentials.xml service.path = $${INSTALL_PREFIX}/share/dbus-1/services service.files = \ com.ubuntu.OnlineAccounts.Manager.service \ com.ubuntu.OnlineAccountsUi.service INSTALLS += service include($${TOP_SRC_DIR}/common-installs-config.pri) ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/mir-helper.cpp0000644000015600001650000001344212674252514033044 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "debug.h" #include "mir-helper.h" #include #include #include #include #include using namespace OnlineAccountsUi; namespace OnlineAccountsUi { static MirHelper *m_instance = 0; class PromptSessionPrivate { public: inline PromptSessionPrivate(MirPromptSession *session, pid_t initiatorPid); inline ~PromptSessionPrivate(); void emitFinished() { Q_EMIT q_ptr->finished(); } MirPromptSession *m_mirSession; pid_t m_initiatorPid; QList m_fds; mutable PromptSession *q_ptr; }; class MirHelperPrivate: public QObject { Q_OBJECT Q_DECLARE_PUBLIC(MirHelper) public: inline MirHelperPrivate(MirHelper *helper); inline ~MirHelperPrivate(); PromptSession *createPromptSession(pid_t initiatorPid); void onSessionStopped(MirPromptSession *mirSession); private: friend class PromptSession; MirConnection *m_connection; QHash > m_sessions; mutable MirHelper *q_ptr; }; } // namespace PromptSessionPrivate::PromptSessionPrivate(MirPromptSession *session, pid_t initiatorPid): m_mirSession(session), m_initiatorPid(initiatorPid) { } PromptSessionPrivate::~PromptSessionPrivate() { mir_prompt_session_release_sync(m_mirSession); m_mirSession = 0; } PromptSession::PromptSession(PromptSessionPrivate *priv): d_ptr(priv) { priv->q_ptr = this; } PromptSession::~PromptSession() { Q_D(PromptSession); MirHelperPrivate *helperPrivate = MirHelper::instance()->d_ptr; helperPrivate->m_sessions.remove(d->m_initiatorPid); delete d_ptr; } static void client_fd_callback(MirPromptSession *, size_t count, int const *fds, void *context) { PromptSessionPrivate *priv = (PromptSessionPrivate *)context; for (size_t i = 0; i < count; i++) { priv->m_fds.append(fds[i]); } } QString PromptSession::requestSocket() { Q_D(PromptSession); d->m_fds.clear(); mir_wait_for(mir_prompt_session_new_fds_for_prompt_providers( d->m_mirSession, 1, client_fd_callback, d)); if (!d->m_fds.isEmpty()) { return QString("fd://%1").arg(d->m_fds[0]); } else { return QString(); } } MirHelperPrivate::MirHelperPrivate(MirHelper *helper): QObject(helper), q_ptr(helper) { QString mirSocket = QStandardPaths::writableLocation(QStandardPaths::RuntimeLocation) + "/mir_socket_trusted"; m_connection = mir_connect_sync(mirSocket.toUtf8().constData(), "online-accounts-service"); if (Q_UNLIKELY(!mir_connection_is_valid(m_connection))) { qWarning() << "Invalid Mir connection:" << mir_connection_get_error_message(m_connection); return; } } MirHelperPrivate::~MirHelperPrivate() { if (m_connection) { mir_connection_release(m_connection); m_connection = 0; } } static void session_event_callback(MirPromptSession *mirSession, MirPromptSessionState state, void *self) { MirHelperPrivate *helper = reinterpret_cast(self); DEBUG() << "Prompt Session state updated to" << state; if (state == mir_prompt_session_state_stopped) { helper->onSessionStopped(mirSession); } } void MirHelperPrivate::onSessionStopped(MirPromptSession *mirSession) { Q_FOREACH(PromptSessionP session, m_sessions) { if (mirSession == session->d_ptr->m_mirSession) { session->d_ptr->emitFinished(); } } } PromptSession *MirHelperPrivate::createPromptSession(pid_t initiatorPid) { if (Q_UNLIKELY(!m_connection)) return 0; MirPromptSession *mirSession = mir_connection_create_prompt_session_sync(m_connection, initiatorPid, session_event_callback, this); if (!mirSession) return 0; if (Q_UNLIKELY(!mir_prompt_session_is_valid(mirSession))) { qWarning() << "Invalid prompt session:" << mir_prompt_session_error_message(mirSession); return 0; } return new PromptSession(new PromptSessionPrivate(mirSession, initiatorPid)); } MirHelper::MirHelper(QObject *parent): QObject(parent), d_ptr(new MirHelperPrivate(this)) { } MirHelper::~MirHelper() { m_instance = 0; } MirHelper *MirHelper::instance() { if (!m_instance) { m_instance = new MirHelper; } return m_instance; } PromptSessionP MirHelper::createPromptSession(pid_t initiatorPid) { Q_D(MirHelper); PromptSessionP session = d->m_sessions.value(initiatorPid); if (session.isNull()) { PromptSession *s = d->createPromptSession(initiatorPid); if (s) { session = PromptSessionP(s); d->m_sessions.insert(initiatorPid, session); } } return session; } #include "mir-helper.moc" ././@LongLink0000000000000000000000000000015000000000000011211 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/indicator-service.cppubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/indicator-service.0000644000015600001650000002375512674252514033717 0ustar pbuserpbgroup00000000000000/* * This file is part of online-accounts-ui * * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "indicator-service.h" #include "debug.h" #include "i18n.h" #include "notification.h" #include "reauthenticator.h" #include "webcredentials_adaptor.h" #include #include using namespace OnlineAccountsUi; using namespace SignOnUi; QDBusArgument &operator<<(QDBusArgument &argument, const QSet &set) { argument.beginArray(qMetaTypeId()); Q_FOREACH(uint id, set) { argument << id; } argument.endArray(); return argument; } const QDBusArgument &operator>>(const QDBusArgument &argument, QSet &set) { argument.beginArray(); while (!argument.atEnd()) { uint id; argument >> id; set.insert(id); } argument.endArray(); return argument; } namespace SignOnUi { static IndicatorService *m_instance = 0; class IndicatorServicePrivate: public QObject, QDBusContext { Q_OBJECT Q_DECLARE_PUBLIC(IndicatorService) public: Q_PROPERTY(QSet Failures READ failures) Q_PROPERTY(bool ErrorStatus READ errorStatus) IndicatorServicePrivate(IndicatorService *service); ~IndicatorServicePrivate() {}; QSet failures() const { return m_failures; } bool errorStatus() const { return m_errorStatus; } public Q_SLOTS: void ClearErrorStatus(); void RemoveFailures(const QSet &accountIds); void ReportFailure(uint accountId, const QVariantMap ¬ification); bool ReauthenticateAccount(uint accountId, const QVariantMap &extraParameters); private: void showNotification(const QVariantMap ¶meters); void notifyPropertyChanged(const char *propertyName); private Q_SLOTS: void onReauthenticatorFinished(bool success); private: mutable IndicatorService *q_ptr; WebcredentialsAdaptor *m_adaptor; QSet m_failures; QMap > m_failureClientData; QMap m_reauthenticators; QDBusMessage m_clientMessage; bool m_errorStatus; }; } // namespace IndicatorServicePrivate::IndicatorServicePrivate(IndicatorService *service): QObject(service), q_ptr(service), m_adaptor(new WebcredentialsAdaptor(this)), m_errorStatus(false) { qDBusRegisterMetaType< QSet >(); } void IndicatorServicePrivate::ClearErrorStatus() { if (m_errorStatus) { m_errorStatus = false; notifyPropertyChanged("ErrorStatus"); } } void IndicatorServicePrivate::RemoveFailures(const QSet &accountIds) { Q_Q(IndicatorService); m_failures.subtract(accountIds); notifyPropertyChanged("Failures"); if (q->isIdle()) { Q_EMIT q->isIdleChanged(); } } void IndicatorServicePrivate::ReportFailure(uint accountId, const QVariantMap ¬ification) { Q_Q(IndicatorService); bool wasIdle = q->isIdle(); m_failures.insert(accountId); if (wasIdle) { Q_EMIT q->isIdleChanged(); } /* If the original client data is provided, we remember it: it can * be used to replay the authentication later. */ if (notification.contains("ClientData")) { /* If the key is not found, the QMap's [] operator inserts an empty * element in the map and return a reference to it. So the following * line of code returns a valid QList even if the account never failed * before. */ QList &failedAuthentications = m_failureClientData[accountId]; AuthData authData; authData.sessionData = notification["ClientData"].toMap(); authData.identity = quint32(notification["Identity"].toUInt()); authData.method = notification["Method"].toString(); authData.mechanism = notification["Mechanism"].toString(); failedAuthentications.append(authData); } notifyPropertyChanged("Failures"); showNotification(notification); } bool IndicatorServicePrivate::ReauthenticateAccount(uint accountId, const QVariantMap &extraParameters) { if (!m_failureClientData.contains(accountId)) { /* Nothing we can do about this account */ DEBUG() << "No reauthentication data for account" << accountId; return false; } if (m_reauthenticators.contains(accountId)) { /* A reauthenticator for this account is already at work. This * shouldn't happen in a real world scenario. */ qWarning() << "Reauthenticator already active on" << accountId; return false; } DEBUG() << "Reauthenticating account" << accountId; /* If we need to reauthenticate, we are delivering the result * after iterating the event loop, so we must inform QtDBus that * it shouldn't use this method's return value as a result. */ setDelayedReply(true); m_clientMessage = message(); QList &failedAuthentications = m_failureClientData[accountId]; Reauthenticator *reauthenticator = new Reauthenticator(failedAuthentications, extraParameters, this); m_reauthenticators[accountId] = reauthenticator; QObject::connect(reauthenticator, SIGNAL(finished(bool)), this, SLOT(onReauthenticatorFinished(bool)), Qt::QueuedConnection); reauthenticator->start(); return true; // ignored, see setDelayedReply() above. } void IndicatorServicePrivate::showNotification(const QVariantMap ¶meters) { /* Don't show more than one notification, until the error status is * cleared */ if (m_errorStatus) return; m_errorStatus = true; notifyPropertyChanged("ErrorStatus"); QString applicationName = parameters.value("DisplayName").toString(); QString summary; if (applicationName.isEmpty()) { summary = _("Applications can no longer access " "some of your Online Accounts", SIGNONUI_I18N_DOMAIN); } else { summary = _("Applications can no longer access " "your %1 Online Account", SIGNONUI_I18N_DOMAIN).arg(applicationName); } QString message = _("Choose Online Accounts from the user " "menu to reinstate access to this account.", SIGNONUI_I18N_DOMAIN); Notification notification(summary, message); notification.show(); } void IndicatorServicePrivate::notifyPropertyChanged(const char *propertyName) { QDBusMessage signal = QDBusMessage::createSignal(WEBCREDENTIALS_OBJECT_PATH, "org.freedesktop.DBus.Properties", "PropertiesChanged"); signal << WEBCREDENTIALS_INTERFACE; QVariantMap changedProps; changedProps.insert(QString::fromLatin1(propertyName), property(propertyName)); signal << changedProps; signal << QStringList(); QDBusConnection::sessionBus().send(signal); } void IndicatorServicePrivate::onReauthenticatorFinished(bool success) { Q_Q(IndicatorService); Reauthenticator *reauthenticator = qobject_cast(sender()); /* Find the account; searching a map by value is inefficient, but * in this case it's extremely likely that the map contains just * one element. :-) */ uint accountId = 0; QMap::const_iterator i; for (i = m_reauthenticators.constBegin(); i != m_reauthenticators.constEnd(); i++) { if (i.value() == reauthenticator) { accountId = i.key(); break; } } Q_ASSERT (accountId != 0); QDBusMessage reply = m_clientMessage.createReply(success); QDBusConnection::sessionBus().send(reply); if (success) { m_failureClientData.remove(accountId); m_failures.remove(accountId); notifyPropertyChanged("Failures"); if (m_failures.isEmpty()) { ClearErrorStatus(); Q_EMIT q->isIdleChanged(); } } m_reauthenticators.remove(accountId); reauthenticator->deleteLater(); } IndicatorService::IndicatorService(QObject *parent): QObject(parent), d_ptr(new IndicatorServicePrivate(this)) { if (m_instance == 0) { m_instance = this; } else { qWarning() << "Instantiating a second IndicatorService!"; } } IndicatorService::~IndicatorService() { m_instance = 0; delete d_ptr; } IndicatorService *IndicatorService::instance() { return m_instance; } QObject *IndicatorService::serviceObject() const { return d_ptr; } void IndicatorService::clearErrorStatus() { Q_D(IndicatorService); d->ClearErrorStatus(); } void IndicatorService::removeFailures(const QSet &accountIds) { Q_D(IndicatorService); d->RemoveFailures(accountIds); } void IndicatorService::reportFailure(uint accountId, const QVariantMap ¬ification) { Q_D(IndicatorService); d->ReportFailure(accountId, notification); } QSet IndicatorService::failures() const { Q_D(const IndicatorService); return d->m_failures; } bool IndicatorService::errorStatus() const { Q_D(const IndicatorService); return d->m_errorStatus; } bool IndicatorService::isIdle() const { Q_D(const IndicatorService); return d->m_failures.isEmpty(); } #include "indicator-service.moc" ././@LongLink0000000000000000000000000000015000000000000011211 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/libaccounts-service.hubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/libaccounts-servic0000644000015600001650000000415712674252514034021 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef OAU_LIBACCOUNTS_SERVICE_H #define OAU_LIBACCOUNTS_SERVICE_H #include #include #include namespace OnlineAccountsUi { #define LIBACCOUNTS_OBJECT_PATH \ QStringLiteral("/com/google/code/AccountsSSO/Accounts/Manager") #define LIBACCOUNTS_BUS_NAME \ QStringLiteral("com.google.code.AccountsSSO.Accounts.Manager") class LibaccountsServicePrivate; class LibaccountsService: public QObject, protected QDBusContext { Q_OBJECT Q_CLASSINFO("D-Bus Interface", "com.google.code.AccountsSSO.Accounts.Manager") Q_CLASSINFO("D-Bus Introspection", "" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "") public: explicit LibaccountsService(QObject *parent = 0); ~LibaccountsService(); public Q_SLOTS: void store(const QDBusMessage &msg); private: LibaccountsServicePrivate *d_ptr; Q_DECLARE_PRIVATE(LibaccountsService) }; } // namespace #endif // OAU_LIBACCOUNTS_SERVICE_H ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/ui-proxy.h0000644000015600001650000000261212674252514032236 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef OAU_UI_PROXY_H #define OAU_UI_PROXY_H #include #include namespace OnlineAccountsUi { class Request; class UiProxyPrivate; class UiProxy: public QObject { Q_OBJECT public: explicit UiProxy(pid_t clientPid, QObject *parent = 0); ~UiProxy(); enum Status { Null, Ready, Loading, Error }; Status status() const; bool init(); void handleRequest(Request *request); bool hasHandlerFor(const QVariantMap ¶meters); Q_SIGNALS: void statusChanged(); void finished(); private: UiProxyPrivate *d_ptr; Q_DECLARE_PRIVATE(UiProxy) }; } // namespace #endif // OAU_UI_PROXY_H ././@LongLink0000000000000000000000000000014700000000000011217 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/signonui-service.cppubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/signonui-service.c0000644000015600001650000001766212674252514033741 0ustar pbuserpbgroup00000000000000/* * This file is part of online-accounts-ui * * Copyright (C) 2011-2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "debug.h" #include "request.h" #include "request-manager.h" #include "signonui-service.h" #include #include #include #include #include #include #include #include #include #include #include #include using namespace SignOnUi; namespace SignOnUi { static QList cookiesFromVariant(const QVariantList &cl) { QList cookies; Q_FOREACH(QVariant cookie, cl) { if (!cookie.canConvert(QVariant::Map)) { continue; } QNetworkCookie nc; QVariantMap vm = cookie.toMap(); if (!vm.contains("name") || !vm.contains("value")) { continue; } nc.setName(vm.value("name").toByteArray()); nc.setValue(vm.value("value").toByteArray()); nc.setDomain(vm.value("domain").toString()); nc.setPath(vm.value("path").toString()); if (vm.contains("httponly") && vm.value("httponly").canConvert(QVariant::Bool)) { nc.setHttpOnly(vm.value("httponly").toBool()); } if (vm.contains("issecure") && vm.value("issecure").canConvert(QVariant::Bool)) { nc.setSecure(vm.value("issecure").toBool()); } if (vm.contains("expirationdate") && vm.value("expirationdate").canConvert(QMetaType::QDateTime)) { nc.setExpirationDate(vm.value("expirationdate").toDateTime()); } cookies.append(nc.toRawForm()); } return cookies; } static QVariant dbusValueToVariant(const QDBusArgument &argument) { QVariant ret; /* Note: this function should operate recursively, but it doesn't. */ if (argument.currentType() == QDBusArgument::MapType) { /* Assume that all maps are a{sv} */ ret = qdbus_cast(argument); } else { /* We don't know how to handle other types */ ret = argument.asVariant(); } return ret; } static QVariantMap expandDBusArguments(const QVariantMap &dbusMap) { QVariantMap map; QMapIterator it(dbusMap); while (it.hasNext()) { it.next(); if (qstrcmp(it.value().typeName(), "QDBusArgument") == 0) { QDBusArgument dbusValue = it.value().value(); map.insert(it.key(), dbusValueToVariant(dbusValue)); } else { map.insert(it.key(), it.value()); } } return map; } class ServicePrivate: public QObject { Q_OBJECT Q_DECLARE_PUBLIC(Service) public: ServicePrivate(Service *service); ~ServicePrivate(); void cancelUiRequest(const QString &requestId); void removeIdentityData(quint32 id); RawCookies cookiesForIdentity(quint32 id, qint64 ×tamp) const; static QString rootDirForIdentity(quint32 id); private: mutable Service *q_ptr; }; } // namespace ServicePrivate::ServicePrivate(Service *service): QObject(service), q_ptr(service) { qRegisterMetaType("RawCookies"); } ServicePrivate::~ServicePrivate() { } void ServicePrivate::cancelUiRequest(const QString &requestId) { QVariantMap match; match.insert(SSOUI_KEY_REQUESTID, requestId); OnlineAccountsUi::Request *request = OnlineAccountsUi::Request::find(match); DEBUG() << "Cancelling request" << request; if (request != 0) { request->cancel(); } } QString ServicePrivate::rootDirForIdentity(quint32 id) { /* the BrowserRequest class instructs the webview to store its cookies and * local data into * ~/.cache/online-accounts-ui/id--/; while we * don't normally expect to find more than one entry for a given signon-id, * it's a possibility we cannot completely discard, since in older versions * we were not appending the "-" suffix. Besides, unless we * look up into the accounts DB, we don't know the value for the provider * ID. * Because of both of these reasons, we list all the directories whose name * starts with "id-" and pick the most recent one. */ QString cachePath = QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation); QDir cacheDir(cachePath + QStringLiteral("/online-accounts-ui")); QString nameFilter = QString("id-%1*").arg(id); QStringList rootDirs = cacheDir.entryList(QStringList() << nameFilter, QDir::Dirs, QDir::Time); return rootDirs.count() > 0 ? cacheDir.filePath(rootDirs.at(0)) : QString(); } void ServicePrivate::removeIdentityData(quint32 id) { /* Remove any data associated with the given identity. */ QString rootDirName = rootDirForIdentity(id); if (rootDirName.isEmpty()) return; QDir rootDir(rootDirName); rootDir.removeRecursively(); } RawCookies ServicePrivate::cookiesForIdentity(quint32 id, qint64 ×tamp) const { RawCookies cookies; QFileInfo fileInfo(rootDirForIdentity(id) + "/cookies.json"); if (!fileInfo.exists()) { DEBUG() << "File does not exist:" << fileInfo.filePath(); return cookies; } timestamp = fileInfo.lastModified().toMSecsSinceEpoch() / 1000; QFile file(fileInfo.filePath()); if (Q_UNLIKELY(!file.open(QIODevice::ReadOnly | QIODevice::Text))) { qWarning() << "Cannot open file" << fileInfo.filePath(); return cookies; } QByteArray contents = file.readAll(); QJsonDocument doc = QJsonDocument::fromJson(contents); if (doc.isEmpty() || !doc.isArray()) return cookies; QVariantList cookieVariants = doc.array().toVariantList(); return cookiesFromVariant(cookieVariants); } Service::Service(QObject *parent): QObject(parent), d_ptr(new ServicePrivate(this)) { } Service::~Service() { } QVariantMap Service::queryDialog(const QVariantMap ¶meters) { QVariantMap cleanParameters = expandDBusArguments(parameters); DEBUG() << "Got request:" << cleanParameters; /* The following line tells QtDBus not to generate a reply now */ setDelayedReply(true); OnlineAccountsUi::Request *request = new OnlineAccountsUi::Request(connection(), message(), cleanParameters, this); OnlineAccountsUi::RequestManager::instance()->enqueue(request); return QVariantMap(); } QVariantMap Service::refreshDialog(const QVariantMap &newParameters) { QVariantMap cleanParameters = expandDBusArguments(newParameters); // TODO find the request and update it /* The following line tells QtDBus not to generate a reply now */ setDelayedReply(true); return QVariantMap(); } void Service::cancelUiRequest(const QString &requestId) { Q_D(Service); d->cancelUiRequest(requestId); } void Service::removeIdentityData(quint32 id) { Q_D(Service); d->removeIdentityData(id); } void Service::cookiesForIdentity(quint32 id, RawCookies &cookies, qint64 ×tamp) { Q_D(Service); cookies = d->cookiesForIdentity(id, timestamp); } #include "signonui-service.moc" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/utils.h0000644000015600001650000000172112674252514031602 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef OAU_UTILS_H #define OAU_UTILS_H #include class QDBusMessage; namespace OnlineAccountsUi { QString apparmorProfileOfPeer(const QDBusMessage &message); } // namespace #endif // OAU_UTILS_H ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/reauthenticator.h0000644000015600001650000000277112674252514033651 0ustar pbuserpbgroup00000000000000/* * This file is part of online-accounts-ui * * Copyright (C) 2012 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef SIGNON_UI_REAUTHENTICATOR_H #define SIGNON_UI_REAUTHENTICATOR_H #include #include #include namespace SignOnUi { struct AuthData { quint32 identity; QString method; QString mechanism; QVariantMap sessionData; }; class ReauthenticatorPrivate; class Reauthenticator: public QObject { Q_OBJECT public: Reauthenticator(const QList &clientData, const QVariantMap &extraParameters, QObject *parent = 0); ~Reauthenticator(); public Q_SLOTS: void start(); Q_SIGNALS: void finished(bool success); private: ReauthenticatorPrivate *d_ptr; Q_DECLARE_PRIVATE(Reauthenticator) }; } // namespace #endif // SIGNON_UI_REAUTHENTICATOR_H ././@LongLink0000000000000000000000000000016200000000000011214 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/com.ubuntu.OnlineAccountsUi.xmlubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/com.ubuntu.OnlineA0000644000015600001650000000256112674252514033642 0ustar pbuserpbgroup00000000000000 ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/request.h0000644000015600001650000000363212674252514032135 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef OAU_REQUEST_H #define OAU_REQUEST_H #include #include #include #include namespace OnlineAccountsUi { class RequestPrivate; class Request: public QObject { Q_OBJECT public: explicit Request(const QDBusConnection &connection, const QDBusMessage &message, const QVariantMap ¶meters, QObject *parent = 0); ~Request(); static Request *find(const QVariantMap &match); quint64 windowId() const; pid_t clientPid() const; void setInProgress(bool inProgress); bool isInProgress() const; const QVariantMap ¶meters() const; QString clientApparmorProfile() const; QString interface() const; QString providerId() const; void setDelay(int delay); int delay() const; public Q_SLOTS: void cancel(); Q_SIGNALS: void completed(); public Q_SLOTS: void fail(const QString &name, const QString &message); void setCanceled(); void setResult(const QVariantMap &result); private: RequestPrivate *d_ptr; Q_DECLARE_PRIVATE(Request) }; } // namespace #endif // OAU_REQUEST_H ././@LongLink0000000000000000000000000000014700000000000011217 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/inactivity-timer.cppubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/inactivity-timer.c0000644000015600001650000000341712674252514033742 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013-2015 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "inactivity-timer.h" #include "debug.h" using namespace OnlineAccountsUi; InactivityTimer::InactivityTimer(int interval, QObject *parent): QObject(parent), m_interval(interval) { m_timer.setSingleShot(true); QObject::connect(&m_timer, SIGNAL(timeout()), this, SLOT(onTimeout())); } void InactivityTimer::watchObject(QObject *object) { connect(object, SIGNAL(isIdleChanged()), SLOT(onIdleChanged())); m_watchedObjects.append(object); /* Force an initial check */ onIdleChanged(); } void InactivityTimer::onIdleChanged() { if (allObjectsAreIdle()) { m_timer.start(m_interval); } else { m_timer.stop(); } } void InactivityTimer::onTimeout() { DEBUG(); if (allObjectsAreIdle()) { Q_EMIT timeout(); } } bool InactivityTimer::allObjectsAreIdle() const { Q_FOREACH(const QObject *object, m_watchedObjects) { if (!object->property("isIdle").toBool()) { return false; } } return true; } ././@LongLink0000000000000000000000000000014600000000000011216 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/mir-helper-stub.cppubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/mir-helper-stub.cp0000644000015600001650000000332612674252514033637 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "debug.h" #include "mir-helper.h" using namespace OnlineAccountsUi; namespace OnlineAccountsUi { static MirHelper *m_instance = 0; } // namespace PromptSession::PromptSession(PromptSessionPrivate *priv): d_ptr(priv) { } PromptSession::~PromptSession() { } QString PromptSession::requestSocket() { #ifdef BUILDING_TESTS return QString::fromUtf8(qgetenv("TEST_MIR_HELPER_SOCKET")); #else return QString(); #endif } MirHelper::MirHelper(QObject *parent): QObject(parent), d_ptr(0) { } MirHelper::~MirHelper() { m_instance = 0; } MirHelper *MirHelper::instance() { if (!m_instance) { m_instance = new MirHelper; } return m_instance; } PromptSessionP MirHelper::createPromptSession(pid_t initiatorPid) { Q_UNUSED(initiatorPid); #ifdef BUILDING_TESTS return qgetenv("TEST_MIR_HELPER_FAIL_CREATE").isEmpty() ? PromptSessionP(new PromptSession(0)) : PromptSessionP(); #else return PromptSessionP(); #endif } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/service.h0000644000015600001650000000235012674252514032101 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef OAU_SERVICE_H #define OAU_SERVICE_H #include #include #include namespace OnlineAccountsUi { class ServicePrivate; class Service: public QObject, protected QDBusContext { Q_OBJECT public: explicit Service(QObject *parent = 0); ~Service(); public Q_SLOTS: QVariantMap requestAccess(const QVariantMap &options); private: ServicePrivate *d_ptr; Q_DECLARE_PRIVATE(Service) }; } // namespace #endif // OAU_SERVICE_H ././@LongLink0000000000000000000000000000014600000000000011216 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/indicator-service.hubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/indicator-service.0000644000015600001650000000364312674252514033711 0ustar pbuserpbgroup00000000000000/* * This file is part of online-accounts-ui * * Copyright (C) 2012 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef SIGNON_UI_INDICATOR_SERVICE_H #define SIGNON_UI_INDICATOR_SERVICE_H #include #include #include namespace SignOnUi { #define WEBCREDENTIALS_OBJECT_PATH \ QStringLiteral("/com/canonical/indicators/webcredentials") #define WEBCREDENTIALS_INTERFACE \ QStringLiteral("com.canonical.indicators.webcredentials") #define WEBCREDENTIALS_BUS_NAME WEBCREDENTIALS_INTERFACE class IndicatorServicePrivate; class IndicatorService: public QObject { Q_OBJECT Q_PROPERTY(bool isIdle READ isIdle NOTIFY isIdleChanged) public: explicit IndicatorService(QObject *parent = 0); ~IndicatorService(); static IndicatorService *instance(); QObject *serviceObject() const; void clearErrorStatus(); void removeFailures(const QSet &accountIds); void reportFailure(uint accountId, const QVariantMap ¬ification); QSet failures() const; bool errorStatus() const; bool isIdle() const; Q_SIGNALS: void isIdleChanged(); private: IndicatorServicePrivate *d_ptr; Q_DECLARE_PRIVATE(IndicatorService) }; } // namespace Q_DECLARE_METATYPE(QSet) #endif // SIGNON_UI_INDICATOR_SERVICE_H ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/signonui-service.h0000644000015600001650000000364112674252514033736 0ustar pbuserpbgroup00000000000000/* * This file is part of online-accounts-ui * * Copyright (C) 2011 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef SIGNON_UI_SERVICE_H #define SIGNON_UI_SERVICE_H #include #include #include class QByteArray; namespace SignOnUi { typedef QList RawCookies; class ServicePrivate; class Service: public QObject, protected QDBusContext { Q_OBJECT Q_CLASSINFO("D-Bus Interface", "com.nokia.singlesignonui") public: explicit Service(QObject *parent = 0); ~Service(); public Q_SLOTS: QVariantMap queryDialog(const QVariantMap ¶meters); QVariantMap refreshDialog(const QVariantMap &newParameters); Q_NOREPLY void cancelUiRequest(const QString &requestId); void removeIdentityData(quint32 id); /* * This is not officially part of the interface; it's an Ubuntu-specific * experimental method, and we reserve the right to remove or change it in * future releases. */ void cookiesForIdentity(quint32 id, // Output parameters RawCookies &cookies, qint64 ×tamp); private: ServicePrivate *d_ptr; Q_DECLARE_PRIVATE(Service) }; } // namespace Q_DECLARE_METATYPE(SignOnUi::RawCookies) #endif // SIGNON_UI_SERVICE_H ././@LongLink0000000000000000000000000000015200000000000011213 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/libaccounts-service.cppubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/libaccounts-servic0000644000015600001650000001650712674252514034023 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "debug.h" #include "libaccounts-service.h" #include "utils.h" #include #include #include #include #include #include using namespace OnlineAccountsUi; static QString stripVersion(const QString &appId) { QStringList components = appId.split('_'); if (components.count() != 3) return appId; /* Click packages have a profile of the form * $name_$application_$version * (see https://wiki.ubuntu.com/SecurityTeam/Specifications/ApplicationConfinement/Manifest#Click) * * We assume that this is a click package, and strip out the last part. */ components.removeLast(); return components.join('_'); } namespace OnlineAccountsUi { struct ServiceChanges { QString service; QString serviceType; quint32 serviceId; QVariantMap settings; QStringList removedKeys; }; struct AccountChanges { quint32 accountId; bool created; bool deleted; QString provider; QList serviceChanges; }; struct PendingWrite { PendingWrite(const QDBusConnection &c, const QDBusMessage &m): message(m), connection(c) {} QDBusMessage message; QDBusConnection connection; }; class LibaccountsServicePrivate: public QObject { Q_OBJECT Q_DECLARE_PUBLIC(LibaccountsService) public: LibaccountsServicePrivate(LibaccountsService *q); ~LibaccountsServicePrivate() {}; void writeChanges(const AccountChanges &changes); private Q_SLOTS: void onAccountSynced(); void onAccountError(Accounts::Error error); private: Accounts::Manager m_manager; QHash m_pendingWrites; mutable LibaccountsService *q_ptr; }; } // namespace LibaccountsServicePrivate::LibaccountsServicePrivate(LibaccountsService *q): QObject(q), m_manager(new Accounts::Manager(this)), q_ptr(q) { } void LibaccountsServicePrivate::writeChanges(const AccountChanges &changes) { Q_Q(LibaccountsService); Accounts::Account *account; if (changes.created) { account = m_manager.createAccount(changes.provider); } else { account = m_manager.account(changes.accountId); if (Q_UNLIKELY(!account)) { qWarning() << "Couldn't load account" << changes.accountId; return; } } Q_ASSERT(account); if (changes.deleted) { account->remove(); } else { Q_FOREACH(const ServiceChanges &sc, changes.serviceChanges) { if (sc.service == "global") { account->selectService(); } else { Accounts::Service service = m_manager.service(sc.service); if (Q_UNLIKELY(!service.isValid())) { qWarning() << "Invalid service" << sc.service; continue; } account->selectService(service); } QMapIterator it(sc.settings); while (it.hasNext()) { it.next(); account->setValue(it.key(), it.value()); } Q_FOREACH(const QString &key, sc.removedKeys) { account->remove(key); } } } m_pendingWrites.insert(account, PendingWrite(q->connection(), q->message())); QObject::connect(account, SIGNAL(synced()), this, SLOT(onAccountSynced())); QObject::connect(account, SIGNAL(error(Accounts::Error)), this, SLOT(onAccountError(Accounts::Error))); account->sync(); } void LibaccountsServicePrivate::onAccountSynced() { Q_Q(LibaccountsService); Accounts::Account *account = qobject_cast(sender()); uint accountId = account->id(); account->deleteLater(); QHash::iterator i = m_pendingWrites.find(account); if (Q_LIKELY(i != m_pendingWrites.end())) { PendingWrite &w = i.value(); w.connection.send(w.message.createReply(accountId)); m_pendingWrites.erase(i); } } void LibaccountsServicePrivate::onAccountError(Accounts::Error error) { Q_Q(LibaccountsService); Accounts::Account *account = qobject_cast(sender()); account->deleteLater(); QHash::iterator i = m_pendingWrites.find(account); if (Q_LIKELY(i != m_pendingWrites.end())) { PendingWrite &w = i.value(); QDBusMessage reply = w.message.createErrorReply(QDBusError::InternalError, error.message()); w.connection.send(reply); m_pendingWrites.erase(i); } } LibaccountsService::LibaccountsService(QObject *parent): QObject(parent), d_ptr(new LibaccountsServicePrivate(this)) { } LibaccountsService::~LibaccountsService() { delete d_ptr; } void LibaccountsService::store(const QDBusMessage &msg) { Q_D(LibaccountsService); DEBUG() << "Got request:" << msg; /* The following line tells QtDBus not to generate a reply now */ setDelayedReply(true); AccountChanges changes; // signature: "ubbsa(ssua{sv}as)" QList args = msg.arguments(); int n = 0; changes.accountId = args.value(n++).toUInt(); changes.created = args.value(n++).toBool(); changes.deleted = args.value(n++).toBool(); changes.provider = args.value(n++).toString(); /* before continuing demarshalling the arguments, check if the provider ID * matches the apparmor label of the peer; if it doesn't, we shouldn't * honour this request. */ QString profile = apparmorProfileOfPeer(msg); if (stripVersion(profile) != changes.provider) { DEBUG() << "Declining AccountManager store request to" << profile << "for provider" << changes.provider; QDBusMessage reply = msg.createErrorReply(QDBusError::AccessDenied, "Profile/provider mismatch"); connection().send(reply); return; } const QDBusArgument dbusChanges = args.value(n++).value(); dbusChanges.beginArray(); while (!dbusChanges.atEnd()) { ServiceChanges sc; dbusChanges.beginStructure(); dbusChanges >> sc.service; dbusChanges >> sc.serviceType; dbusChanges >> sc.serviceId; dbusChanges >> sc.settings; dbusChanges >> sc.removedKeys; dbusChanges.endStructure(); changes.serviceChanges.append(sc); } dbusChanges.endArray(); d->writeChanges(changes); } #include "libaccounts-service.moc" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/request-manager.h0000644000015600001650000000262612674252514033547 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef OAU_REQUEST_MANAGER_H #define OAU_REQUEST_MANAGER_H #include #include namespace OnlineAccountsUi { class Request; class UiProxy; class RequestManagerPrivate; class RequestManager: public QObject { Q_OBJECT Q_PROPERTY(bool isIdle READ isIdle NOTIFY isIdleChanged) public: explicit RequestManager(QObject *parent = 0); ~RequestManager(); static RequestManager *instance(); void enqueue(Request *request); bool isIdle() const; Q_SIGNALS: void isIdleChanged(); private: RequestManagerPrivate *d_ptr; Q_DECLARE_PRIVATE(RequestManager) }; } // namespace #endif // OAU_REQUEST_MANAGER_H ././@LongLink0000000000000000000000000000017600000000000011221 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/com.canonical.indicators.webcredentials.xmlubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/com.canonical.indi0000644000015600001650000000554712674252514033654 0ustar pbuserpbgroup00000000000000 ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-service/service.cpp0000644000015600001650000000270312674252514032436 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "debug.h" #include "globals.h" #include "onlineaccountsui_adaptor.h" #include "request.h" #include "request-manager.h" #include "service.h" using namespace OnlineAccountsUi; Service::Service(QObject *parent): QObject(parent) { new OnlineAccountsUiAdaptor(this); } Service::~Service() { } QVariantMap Service::requestAccess(const QVariantMap &options) { DEBUG() << "Got request:" << options; /* The following line tells QtDBus not to generate a reply now */ setDelayedReply(true); Request *request = new Request(connection(), message(), options, this); RequestManager *manager = RequestManager::instance(); manager->enqueue(request); return QVariantMap(); } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/0000755000015600001650000000000012674252771027252 5ustar pbuserpbgroup00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/dialog.h0000644000015600001650000000260112674252514030654 0ustar pbuserpbgroup00000000000000/* * This file is part of online-accounts-ui * * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef SIGNON_UI_DIALOG_H #define SIGNON_UI_DIALOG_H #include #include namespace SignOnUi { class Dialog: public QQuickView { Q_OBJECT public: enum DialogCode { Rejected = 0, Accepted, }; enum ShowMode { TopLevel = 0, Transient, Embedded, }; explicit Dialog(QWindow *parent = 0); ~Dialog(); void show(WId parent, ShowMode mode); public Q_SLOTS: void accept(); void reject(); void done(int result); Q_SIGNALS: void finished(int result); protected: bool event(QEvent *e); }; } // namespace #endif // SIGNON_UI_DIALOG_H ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/ipc.cpp0000644000015600001650000001157012674252514030530 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "ipc.h" #include #include #include #include using namespace OnlineAccountsUi; static const QByteArray welcomeMessage = "OAUinitIPC"; namespace OnlineAccountsUi { class IpcPrivate: public QObject { Q_OBJECT Q_DECLARE_PUBLIC(Ipc) public: inline IpcPrivate(Ipc *ipc); ~IpcPrivate() {}; void setChannels(QIODevice *readChannel, QIODevice *writeChannel); private Q_SLOTS: void onReadyRead(); private: bool waitWelcomeMessage(); private: QIODevice *m_readChannel; QIODevice *m_writeChannel; int m_expectedLength; bool m_gotWelcomeMessage; QByteArray m_readBuffer; mutable Ipc *q_ptr; }; }; // namespace IpcPrivate::IpcPrivate(Ipc *ipc): QObject(ipc), m_readChannel(0), m_writeChannel(0), m_expectedLength(0), m_gotWelcomeMessage(false), q_ptr(ipc) { } void IpcPrivate::setChannels(QIODevice *readChannel, QIODevice *writeChannel) { m_readChannel = readChannel; m_writeChannel = writeChannel; QObject::connect(m_readChannel, SIGNAL(readyRead()), this, SLOT(onReadyRead())); /* QFile need special handling */ QFile *file = qobject_cast(m_readChannel); if (file != 0) { QSocketNotifier *notifier = new QSocketNotifier(file->handle(), QSocketNotifier::Read, this); QObject::connect(notifier, SIGNAL(activated(int)), this, SLOT(onReadyRead())); } else { /* If the read channel is not a QFile, it means it's not the standard * input, therefore we won't have the need to wait for the welcome * message. */ m_gotWelcomeMessage = true; } onReadyRead(); file = qobject_cast(m_writeChannel); if (file != 0) { m_writeChannel->write(welcomeMessage); } } void IpcPrivate::onReadyRead() { Q_Q(Ipc); while (true) { if (m_expectedLength == 0) { /* We are beginning a new read */ /* skip all noise */ if (!waitWelcomeMessage()) break; int length; int bytesRead = m_readChannel->read((char *)&length, sizeof(length)); if (bytesRead < int(sizeof(length))) break; m_expectedLength = length; m_readBuffer.clear(); } int neededBytes = m_expectedLength - m_readBuffer.length(); QByteArray buffer = m_readChannel->read(neededBytes); m_readBuffer += buffer; if (buffer.length() < neededBytes) break; if (m_readBuffer.length() == m_expectedLength) { Q_EMIT q->dataReady(m_readBuffer); m_expectedLength = 0; } } } bool IpcPrivate::waitWelcomeMessage() { if (m_gotWelcomeMessage) return true; /* All Qt applications on the Nexus 4 write some dust to stdout when * starting. So, skip all input until a well-defined welcome message is * found */ QByteArray buffer; int startCheckIndex = 0; do { buffer = m_readChannel->peek(40); int found = buffer.indexOf(welcomeMessage, startCheckIndex); int skip = (found >= 0) ? found : buffer.length() - welcomeMessage.length(); if (found >= 0) { buffer = m_readChannel->read(skip + welcomeMessage.length()); m_gotWelcomeMessage = true; return true; } if (skip > 0) { buffer = m_readChannel->read(skip); } else { buffer.clear(); } } while (!buffer.isEmpty()); return false; } Ipc::Ipc(QObject *parent): QObject(parent), d_ptr(new IpcPrivate(this)) { } Ipc::~Ipc() { } void Ipc::setChannels(QIODevice *readChannel, QIODevice *writeChannel) { Q_D(Ipc); d->setChannels(readChannel, writeChannel); } void Ipc::write(const QByteArray &data) { Q_D(Ipc); int length = data.count(); d->m_writeChannel->write((char *)&length, sizeof(length)); d->m_writeChannel->write(data); d->m_writeChannel->waitForBytesWritten(-1); } #include "ipc.moc" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/request.cpp0000644000015600001650000001512612674252514031446 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "debug.h" // TODO #include "dialog-request.h" #include "globals.h" #include "panel-request.h" #include "provider-request.h" #include "request.h" #include "signonui-request.h" #include using namespace OnlineAccountsUi; static bool mapIsSuperset(const QVariantMap &test, const QVariantMap &set) { QMapIterator it(set); while (it.hasNext()) { it.next(); if (test.value(it.key()) != it.value()) return false; } return true; } namespace OnlineAccountsUi { static QList allRequests; class RequestPrivate: public QObject { Q_OBJECT Q_DECLARE_PUBLIC(Request) public: RequestPrivate(const QString &interface, int id, const QString &clientProfile, const QVariantMap ¶meters, Request *request); ~RequestPrivate(); WId windowId() const { return m_parameters[OAU_KEY_WINDOW_ID].toUInt(); } private: void setWindow(QWindow *window); private: mutable Request *q_ptr; QString m_interface; int m_id; QVariantMap m_parameters; QString m_clientApparmorProfile; bool m_inProgress; QPointer m_window; QString m_errorName; QString m_errorMessage; QVariantMap m_result; int m_delay; }; } // namespace RequestPrivate::RequestPrivate(const QString &interface, int id, const QString &clientProfile, const QVariantMap ¶meters, Request *request): QObject(request), q_ptr(request), m_interface(interface), m_id(id), m_parameters(parameters), m_clientApparmorProfile(clientProfile), m_inProgress(false), m_window(0), m_delay(0) { } RequestPrivate::~RequestPrivate() { } void RequestPrivate::setWindow(QWindow *window) { if (m_window != 0) { qWarning() << "Widget already set"; return; } m_window = window; if (windowId() != 0) { DEBUG() << "Requesting window reparenting"; QWindow *parent = QWindow::fromWinId(windowId()); window->setTransientParent(parent); } window->show(); } /* Some unit tests might need to provide a different implementation for the * Request::newRequest() factory method; for this reason, we allow the method * to be excluded from compilation. */ #ifndef NO_REQUEST_FACTORY Request *Request::newRequest(const QString &interface, int id, const QString &clientProfile, const QVariantMap ¶meters, QObject *parent) { /* If the supported requests types vary considerably, we can create * different subclasses for handling them, and in this method we examine * the @parameters argument to figure out which subclass is the most apt to * handle the request. */ if (interface == OAU_INTERFACE) { return new ProviderRequest(interface, id, clientProfile, parameters, parent); } else { Q_ASSERT(interface == SIGNONUI_INTERFACE); return SignOnUi::Request::newRequest(id, clientProfile, parameters, parent); } } #endif Request::Request(const QString &interface, int id, const QString &clientProfile, const QVariantMap ¶meters, QObject *parent): QObject(parent), d_ptr(new RequestPrivate(interface, id, clientProfile, parameters, this)) { allRequests.append(this); } Request::~Request() { allRequests.removeOne(this); } Request *Request::find(const QVariantMap &match) { Q_FOREACH(Request *r, allRequests) { if (mapIsSuperset(r->parameters(), match)) { return r; } } return 0; } QString Request::interface() const { Q_D(const Request); return d->m_interface; } int Request::id() const { Q_D(const Request); return d->m_id; } void Request::setWindow(QWindow *window) { Q_D(Request); d->setWindow(window); } WId Request::windowId() const { Q_D(const Request); return d->windowId(); } bool Request::isInProgress() const { Q_D(const Request); return d->m_inProgress; } const QVariantMap &Request::parameters() const { Q_D(const Request); return d->m_parameters; } QString Request::clientApparmorProfile() const { Q_D(const Request); return d->m_clientApparmorProfile; } QWindow *Request::window() const { Q_D(const Request); return d->m_window; } QVariantMap Request::result() const { Q_D(const Request); return d->m_result; } QString Request::errorName() const { Q_D(const Request); return d->m_errorName; } QString Request::errorMessage() const { Q_D(const Request); return d->m_errorMessage; } void Request::setDelay(int delay) { Q_D(Request); d->m_delay = delay; } int Request::delay() const { Q_D(const Request); return d->m_delay; } void Request::start() { Q_D(Request); if (d->m_inProgress) { qWarning() << "Request already started!"; return; } d->m_inProgress = true; } void Request::cancel() { setCanceled(); } void Request::fail(const QString &name, const QString &message) { Q_D(Request); DEBUG() << name << message; d->m_errorName = name; d->m_errorMessage = message; Q_EMIT completed(); } void Request::setCanceled() { Q_D(Request); if (d->m_inProgress) { fail(OAU_ERROR_USER_CANCELED, QStringLiteral("Canceled")); d->m_inProgress = false; } } void Request::setResult(const QVariantMap &result) { Q_D(Request); if (d->m_inProgress) { DEBUG() << result; d->m_result = result; Q_EMIT completed(); d->m_inProgress = false; } } #include "request.moc" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/dialog.cpp0000644000015600001650000000323212674252514031210 0ustar pbuserpbgroup00000000000000/* * This file is part of online-accounts-ui * * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "debug.h" #include "dialog.h" #include using namespace SignOnUi; Dialog::Dialog(QWindow *parent): QQuickView(parent) { setResizeMode(QQuickView::SizeRootObjectToView); setWindowState(Qt::WindowFullScreen); } Dialog::~Dialog() { } void Dialog::show(WId parent, ShowMode mode) { if (mode != TopLevel) { QWindow *parentWindow = QWindow::fromWinId(parent); if (mode == Transient) { setTransientParent(parentWindow); } else if (mode == Embedded) { setParent(parentWindow); } } QQuickView::show(); } void Dialog::accept() { done(Dialog::Accepted); } void Dialog::reject() { done(Dialog::Rejected); } void Dialog::done(int result) { setVisible(false); Q_EMIT finished(result); } bool Dialog::event(QEvent *e) { if (e->type() == QEvent::Close) { reject(); } return QQuickView::event(e); } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/ipc.h0000644000015600001650000000352612674252514030177 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef OAU_IPC_H #define OAU_IPC_H #include class QByteArray; class QIODevice; #define OAU_OPERATION_CODE "code" #define OAU_OPERATION_CODE_PROCESS "process" #define OAU_OPERATION_CODE_REGISTER_HANDLER "newHandler" #define OAU_OPERATION_CODE_REQUEST_FINISHED "finished" #define OAU_OPERATION_CODE_REQUEST_FAILED "failed" #define OAU_OPERATION_ID "id" #define OAU_OPERATION_DATA "data" #define OAU_OPERATION_DELAY "delay" #define OAU_OPERATION_INTERFACE "interface" #define OAU_OPERATION_CLIENT_PROFILE "profile" #define OAU_OPERATION_ERROR_NAME "errname" #define OAU_OPERATION_ERROR_MESSAGE "errmsg" #define OAU_OPERATION_HANDLER_ID "handlerId" #define OAU_REQUEST_MATCH_KEY "X-RequestHandler" namespace OnlineAccountsUi { class IpcPrivate; class Ipc: public QObject { Q_OBJECT public: Ipc(QObject *parent = 0); ~Ipc(); void setChannels(QIODevice *readChannel, QIODevice *writeChannel); void write(const QByteArray &data); Q_SIGNALS: void dataReady(QByteArray &data); private: IpcPrivate *d_ptr; Q_DECLARE_PRIVATE(Ipc) }; }; // namespace #endif // OAU_IPC_H ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/signonui-request.cpp0000644000015600001650000001516212674252514033277 0ustar pbuserpbgroup00000000000000/* * This file is part of online-accounts-ui * * Copyright (C) 2011-2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "signonui-request.h" #include "browser-request.h" #include "debug.h" #include "dialog-request.h" #include "globals.h" #include #include #include #include #include #include #include #include #include #include using namespace SignOnUi; namespace SignOnUi { class RequestPrivate: public QObject { Q_OBJECT Q_DECLARE_PUBLIC(Request) public: RequestPrivate(Request *request); ~RequestPrivate(); private: Accounts::Account *findAccount(); private: mutable Request *q_ptr; QVariantMap m_clientData; QPointer m_handler; Accounts::Account *m_account; }; } // namespace RequestPrivate::RequestPrivate(Request *request): QObject(request), q_ptr(request), m_handler(0) { const QVariantMap ¶meters = request->parameters(); if (parameters.contains(SSOUI_KEY_CLIENT_DATA)) { QVariant variant = parameters[SSOUI_KEY_CLIENT_DATA]; m_clientData = (variant.type() == QVariant::Map) ? variant.toMap() : qdbus_cast(variant.value()); } m_account = findAccount(); } RequestPrivate::~RequestPrivate() { } Accounts::Account *RequestPrivate::findAccount() { Q_Q(Request); uint identity = q->identity(); if (identity == 0) return 0; /* Find the account using this identity. * FIXME: there might be more than one! */ OnlineAccountsUi::AccountManager *manager = OnlineAccountsUi::AccountManager::instance(); Q_FOREACH(Accounts::AccountId accountId, manager->accountList()) { Accounts::Account *account = manager->account(accountId); if (account == 0) continue; QVariant value(QVariant::UInt); if (account->value("CredentialsId", value) != Accounts::NONE && value.toUInt() == identity) { return account; } } // Not found return 0; } #ifndef NO_REQUEST_FACTORY Request *Request::newRequest(int id, const QString &clientProfile, const QVariantMap ¶meters, QObject *parent) { if (parameters.contains(SSOUI_KEY_OPENURL)) { return new SignOnUi::BrowserRequest(id, clientProfile, parameters, parent); } else { return new SignOnUi::DialogRequest(id, clientProfile, parameters, parent); } } #endif static QString findClientProfile(const QString &clientProfile, const QVariantMap ¶meters) { QString profile = clientProfile; /* If the request is coming on the SignOnUi interface from an * unconfined process and it carries the SSOUI_KEY_PID key, it means that * it's coming from signond. In that case, we want to know what was the * client which originated the call. */ if (profile == "unconfined" && parameters.contains(SSOUI_KEY_PID)) { pid_t pid = parameters.value(SSOUI_KEY_PID).toUInt(); if (pid == getpid()) { /* If the request was initiated by our own process, we might not * have the rights to call the aa_* functions (we might be * confined). */ return QString(); } char *con = NULL, *mode = NULL; int ret = aa_gettaskcon(pid, &con, &mode); if (Q_LIKELY(ret >= 0)) { profile = QString::fromUtf8(con); /* libapparmor allocates "con" and "mode" in a single allocation, * so freeing "con" is actually freeing both. */ free(con); } else { qWarning() << "Couldn't get apparmor profile of PID" << pid; } } return profile; } Request::Request(int id, const QString &clientProfile, const QVariantMap ¶meters, QObject *parent): OnlineAccountsUi::Request(SIGNONUI_INTERFACE, id, findClientProfile(clientProfile, parameters), parameters, parent), d_ptr(new RequestPrivate(this)) { } Request::~Request() { } QString Request::ssoId(const QVariantMap ¶meters) { return parameters[SSOUI_KEY_REQUESTID].toString(); } QString Request::ssoId() const { return Request::ssoId(parameters()); } void Request::setWindow(QWindow *window) { Q_D(Request); /* Show the window only if we are in a prompt session */ if (qgetenv("MIR_SOCKET").isEmpty()) { QVariantMap result; result[SSOUI_KEY_ERROR] = SignOn::QUERY_ERROR_FORBIDDEN; setResult(result); } else { OnlineAccountsUi::Request::setWindow(window); } } uint Request::identity() const { return parameters().value(SSOUI_KEY_IDENTITY).toUInt(); } QString Request::method() const { return parameters().value(SSOUI_KEY_METHOD).toString(); } QString Request::mechanism() const { return parameters().value(SSOUI_KEY_MECHANISM).toString(); } QString Request::providerId() const { Q_D(const Request); return d->m_account ? d->m_account->providerName() : d->m_clientData.value("providerId").toString(); } const QVariantMap &Request::clientData() const { Q_D(const Request); return d->m_clientData; } void Request::setHandler(RequestHandler *handler) { Q_D(Request); if (handler && d->m_handler) { qWarning() << "Request handler already set!"; return; } d->m_handler = handler; } RequestHandler *Request::handler() const { Q_D(const Request); return d->m_handler; } void Request::setCanceled() { QVariantMap result; result[SSOUI_KEY_ERROR] = SignOn::QUERY_ERROR_CANCELED; setResult(result); } #include "signonui-request.moc" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/ui-server.h0000644000015600001650000000242212674252514031337 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef OAU_UI_SERVER_H #define OAU_UI_SERVER_H #include #include namespace SignOnUi { class RequestHandler; } namespace OnlineAccountsUi { class UiServerPrivate; class UiServer: public QObject { Q_OBJECT public: explicit UiServer(const QString &address, QObject *parent = 0); ~UiServer(); static UiServer *instance(); bool init(); Q_SIGNALS: void finished(); private: UiServerPrivate *d_ptr; Q_DECLARE_PRIVATE(UiServer) }; } // namespace #endif // OAU_UI_SERVER_H ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/main.cpp0000644000015600001650000000615212674252514030701 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013-2015 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "debug.h" #include "globals.h" #include "i18n.h" #include "ui-server.h" #include #include #include #include using namespace OnlineAccountsUi; int main(int argc, char **argv) { QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts); QGuiApplication app(argc, argv); /* The testability driver is only loaded by QApplication but not by * QGuiApplication. However, QApplication depends on QWidget which would * add some unneeded overhead => Let's load the testability driver on our * own. */ if (getenv("QT_LOAD_TESTABILITY")) { QLibrary testLib(QStringLiteral("qttestability")); if (testLib.load()) { typedef void (*TasInitialize)(void); TasInitialize initFunction = (TasInitialize)testLib.resolve("qt_testability_init"); if (initFunction) { initFunction(); } else { qCritical("Library qttestability resolve failed!"); } } else { qCritical("Library qttestability load failed!"); } } /* read environment variables */ QProcessEnvironment environment = QProcessEnvironment::systemEnvironment(); if (environment.contains(QLatin1String("OAU_LOGGING_LEVEL"))) { bool isOk; int value = environment.value( QLatin1String("OAU_LOGGING_LEVEL")).toInt(&isOk); if (isOk) setLoggingLevel(value); } initTr(I18N_DOMAIN, NULL); QString socket; QString profile; QStringList arguments = app.arguments(); for (int i = 0; i < arguments.count(); i++) { const QString &arg = arguments[i]; if (arg == "--socket") { socket = arguments.value(++i); } else if (arg == "--profile") { profile = arguments.value(++i); } } if (Q_UNLIKELY(socket.isEmpty())) { qWarning() << "Missing --socket argument"; return EXIT_FAILURE; } if (!profile.isEmpty()) { aa_change_profile(profile.toUtf8().constData()); } UiServer server(socket); QObject::connect(&server, SIGNAL(finished()), &app, SLOT(quit())); if (Q_UNLIKELY(!server.init())) { qWarning() << "Could not connect to socket"; return EXIT_FAILURE; } return app.exec(); } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/qml/0000755000015600001650000000000012674252771030043 5ustar pbuserpbgroup00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/qml/SignOnUiPage.qml0000644000015600001650000000165612674252514033051 0ustar pbuserpbgroup00000000000000import QtQuick 2.0 import Ubuntu.Components 1.3 import Ubuntu.Components.ListItems 1.3 as ListItem import Ubuntu.OnlineAccounts.Plugin 1.0 MainView { id: root property var signonRequest: request width: units.gu(60) height: units.gu(90) Page { WebView { id: loader signonRequest: root.signonRequest anchors { fill: parent bottomMargin: Math.max(osk.height, cancelButton.height) } } ListItem.SingleControl { id: cancelButton anchors.bottom: parent.bottom showDivider: false control: Button { text: i18n.dtr("ubuntu-system-settings-online-accounts", "Cancel") width: parent.width - units.gu(4) onClicked: signonRequest.cancel() } } KeyboardRectangle { id: osk } } } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/qml/constants.js.in0000644000015600001650000000007012674252514033012 0ustar pbuserpbgroup00000000000000var qmlPluginPath = \"$${ONLINE_ACCOUNTS_PLUGIN_DIR}/\" ././@LongLink0000000000000000000000000000014700000000000011217 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/qml/AuthorizationPage.qmlubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/qml/AuthorizationPage.q0000644000015600001650000001120312674252514033652 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013-2015 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ import QtQuick 2.0 import Ubuntu.Components 1.3 import Ubuntu.Components.ListItems 1.3 as ListItem Flickable { id: root property variant model property variant application property variant provider property bool canAddAnotherAccount: true signal allowed(int accountId) signal denied signal createAccount Column { id: topColumn anchors.left: parent.left anchors.right: parent.right anchors.top: parent.top anchors.margins: units.gu(1) spacing: units.gu(1) ProportionalShape { id: iconShape anchors.horizontalCenter: parent.horizontalCenter aspect: UbuntuShape.DropShadow width: units.gu(8) source: Image { sourceSize.width: iconShape.width sourceSize.height: iconShape.height source: application.icon.indexOf("/") === 0 ? "file://" + application.icon : "image://theme/" + application.icon } } Column { anchors { left: parent.left; right: parent.right; margins: units.gu(1) } Label { objectName: "appLabel" anchors.left: parent.left anchors.right: parent.right horizontalAlignment: Text.AlignHCenter elide: Text.ElideRight text: application.displayName wrapMode: Text.Wrap maximumLineCount: 2 } Label { objectName: "pkgLabel" anchors.left: parent.left anchors.right: parent.right horizontalAlignment: Text.AlignHCenter color: theme.palette.normal.backgroundText elide: Text.ElideMiddle text: application.displayId } } Label { objectName: "msgLabel" anchors.left: parent.left anchors.right: parent.right text: i18n.tr("wants to access your %2 account"). arg(provider.displayName); wrapMode: Text.WordWrap horizontalAlignment: Text.AlignHCenter } Label { id: accountLabel objectName: "accountLabel" anchors.left: parent.left anchors.right: parent.right visible: model.count == 1 horizontalAlignment: Text.AlignHCenter text: model.get(0, "displayName") } OptionSelector { id: accountSelector objectName: "accountSelector" anchors.left: parent.left anchors.right: parent.right anchors.leftMargin: units.gu(1) anchors.rightMargin: units.gu(1) visible: !accountLabel.visible model: root.model delegate: OptionSelectorDelegate { property string modelData: model.displayName } } } Column { anchors.top: topColumn.bottom anchors.margins: units.gu(2) anchors.left: parent.left anchors.right: parent.right spacing: units.gu(1) Button { objectName: "allowButton" anchors.left: parent.left anchors.right: parent.right color: UbuntuColors.green text: i18n.tr("Allow") onClicked: root.allowed(root.model.get(accountSelector.selectedIndex, "accountId")) } Button { objectName: "addAnotherButton" anchors.left: parent.left anchors.right: parent.right visible: canAddAnotherAccount text: i18n.tr("Add another account…") onClicked: root.createAccount() } Button { objectName: "denyButton" anchors.left: parent.left anchors.right: parent.right text: i18n.tr("Don't allow") onClicked: root.denied() } } } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/qml/ProviderRequest.qml0000644000015600001650000001673512674252514033730 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013-2015 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ import QtQuick 2.0 import Ubuntu.Components 1.3 import Ubuntu.OnlineAccounts 0.1 import Ubuntu.OnlineAccounts.Internal 1.0 MainView { id: root property variant applicationInfo: application property variant providerInfo: provider property bool wasDenied: false property int __createdAccountId: 0 signal denied signal allowed(int accountId) width: units.gu(48) height: units.gu(60) automaticOrientation: true Component.onCompleted: { i18n.domain = "ubuntu-system-settings-online-accounts" if (accessModel.count === 0 && !accessModel.canCreateAccounts) { /* No accounts to authorize */ denied() return } loader.active = true pageStack.push(mainPage) } on__CreatedAccountIdChanged: grantAccessIfReady() onDenied: wasDenied = true onAllowed: loader.sourceComponent = spinnerComponent PageStack { id: pageStack Page { id: mainPage title: providerInfo.displayName Loader { id: loader anchors.fill: parent active: false sourceComponent: ((accessModel.count == 0 && accessModel.canCreateAccounts) || applicationInfo.id === "system-settings") ? accountCreationPage : authorizationPage onLoaded: { // use this trick to break the sourceComponent binding var tmp = sourceComponent sourceComponent = tmp } } } } AccountServiceModel { id: accountsModel service: "global" provider: providerInfo.id includeDisabled: true onCountChanged: root.grantAccessIfReady() function indexOfAccount(accountId) { for (var i = 0; i < accountsModel.count; i++) { if (accountsModel.get(i, "accountId") == accountId) return i } return -1 } } AccessModel { id: accessModel accountModel: accountsModel applicationId: applicationInfo.id property bool canCreateAccounts: !providerInfo.isSingleAccount || accountsModel.count === 0 } Component { id: accountCreationPage AccountCreationPage { providerId: providerInfo.id onFinished: { if (accountId == 0) root.denied() /* if an account was created, just remember its ID. when the * accountsModel will notice it we'll proceed with the access * grant */ else root.__createdAccountId = accountId } } } Component { id: authorizationPage AuthorizationPage { model: accessModel application: applicationInfo provider: providerInfo canAddAnotherAccount: accessModel.canCreateAccounts onDenied: root.denied() onAllowed: root.grantAccess(accountId) onCreateAccount: pageStack.push(createAccountPageComponent) } } Component { id: createAccountPageComponent Page { title: providerInfo.displayName Loader { anchors.fill: parent sourceComponent: accountCreationPage } } } Component { id: spinnerComponent Item { ActivityIndicator { anchors.centerIn: parent running: true } } } Component { id: accountServiceComponent AccountService { autoSync: false } } Account { id: account onSynced: accountEnablingDone() } AccountService { id: globalAccountService objectHandle: account.accountServiceHandle credentials: accountCredentials autoSync: false } AccountServiceModel { id: accountServiceModel includeDisabled: true account: account.objectHandle } Credentials { id: accountCredentials credentialsId: globalAccountService.objectHandle != null ? globalAccountService.authData.credentialsId : 0 onSynced: { console.log("Credentials ready (store secret = " + storeSecret + ")") if (acl.indexOf(applicationInfo.profile) >= 0) { console.log("Application is in ACL: " + acl) root.aclDone() return } acl.push(applicationInfo.profile) sync() } } function grantAccessIfReady() { if (root.__createdAccountId != 0) { // If the request comes from system settings, stop here if (applicationInfo.id === "system-settings") { root.allowed(root.__createdAccountId) return } if (accountsModel.indexOfAccount(root.__createdAccountId) >= 0) { root.grantAccess(root.__createdAccountId) root.__createdAccountId = 0 } } } function grantAccess(accountId) { console.log("granting access to account " + accountId) // find the index in the model for this account var i = accountsModel.indexOfAccount(accountId) if (i < 0) { // very unlikely; maybe the account has been deleted in the meantime console.log("Account not found:" + accountId) root.denied() return } // setting this will trigger the update of the ACL account.objectHandle = accountsModel.get(i, "accountHandle") } function aclDone() { console.log("acl done") /* now we can enable the application services in the account. */ for (var i = 0; i < accountServiceModel.count; i++) { var accountService = accountServiceComponent.createObject(null, { "objectHandle": accountServiceModel.get(i, "accountServiceHandle") }) console.log("Account service account id: " + accountService.accountId) var serviceId = accountService.service.id if (applicationInfo.services.indexOf(serviceId) >= 0 && !accountService.serviceEnabled) { console.log("Enabling service " + serviceId) accountService.updateServiceEnabled(true) } /* The accountService is just a convenience object: all the changes * are stored in the account object. So we can destroy this one. */ accountService.destroy() } // Store the changes account.sync() } function accountEnablingDone() { console.log("account enabling done") allowed(account.accountId) } } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/qml/SignOnUiDialog.qml0000644000015600001650000000612612674252514033371 0ustar pbuserpbgroup00000000000000import QtQuick 2.0 import Ubuntu.Components 1.3 import Ubuntu.Components.Popups 1.3 import Ubuntu.Components.ListItems 1.3 as ListItem Item { id: root property var signonRequest: request width: units.gu(60) height: units.gu(90) Component.onCompleted: dialog.show() Dialog { id: dialog objectName: "signOnUiDialog" title: signonRequest.title text: signonRequest.message Label { id: userNameLabel objectName: "userNameLabel" visible: signonRequest.queryUserName text: signonRequest.userNameText } TextField { id: userNameField objectName: "userNameField" visible: signonRequest.queryUserName text: signonRequest.userName onTextChanged: signonRequest.userName = text } Column { anchors.left: parent.left anchors.right: parent.right visible: signonRequest.queryPassword Label { id: passwordLabel objectName: "passwordLabel" text: signonRequest.passwordText } TextField { id: passwordField objectName: "passwordField" text: signonRequest.password echoMode: TextInput.Password onTextChanged: signonRequest.password = text Keys.onReturnPressed: signonRequest.accept() } Label { objectName: "forgotPasswordLabel" visible: signonRequest.forgotPasswordUrl.toString() !== "" text: "" + signonRequest.forgotPasswordText + "" } } Item { id: pageFooter anchors.left: parent.left anchors.right: parent.right visible: signonRequest.registerUrl.toString() !== "" ListItem.ThinDivider { anchors.bottom: registerUrlLabel.top } Label { id: registerUrlLabel objectName: "registerUrlLabel" anchors.bottom: parent.bottom text: "" + signonRequest.registerText + "" } } Item { anchors.left: parent.left anchors.right: parent.right height: childrenRect.height Button { objectName: "cancelButton" anchors.left: parent.left text: i18n.dtr("ubuntu-system-settings-online-accounts", "Cancel") width: (parent.width / 2) - 0.5 * units.gu(1) onClicked: signonRequest.cancel() } Button { objectName: "acceptButton" anchors.right: parent.right text: signonRequest.loginText width: (parent.width / 2) - 0.5 * units.gu(1) onClicked: signonRequest.accept() } } } } ././@LongLink0000000000000000000000000000015100000000000011212 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/qml/AccountCreationPage.qmlubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/qml/AccountCreationPage0000644000015600001650000000336612674252514033647 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013-2015 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ import QtQuick 2.0 import Ubuntu.Components 1.3 import Ubuntu.OnlineAccounts 0.1 Item { id: root property string providerId property var flickable: null signal finished(int accountId) Account { id: account objectHandle: Manager.createAccount(providerId) } Loader { id: loader property var account: account anchors.fill: parent source: localQmlPluginPath + providerId + "/Main.qml" onLoaded: checkFlickable() onStatusChanged: { if (loader.status == Loader.Error) { loader.source = systemQmlPluginPath + providerId + "/Main.qml" } } Connections { target: loader.item onFinished: { console.log("====== PLUGIN FINISHED ======") finished(account.accountId) } } function checkFlickable() { if (item.hasOwnProperty("flickable")) { root.flickable = item.flickable } } } } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/debug.h0000644000015600001650000000237012674252514030506 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef OAU_DEBUG_H #define OAU_DEBUG_H #include /* 0 - fatal, 1 - critical(default), 2 - info/debug */ extern int appLoggingLevel; static inline bool debugEnabled() { return appLoggingLevel >= 2; } static inline int loggingLevel() { return appLoggingLevel; } void setLoggingLevel(int level); #ifdef DEBUG_ENABLED #define DEBUG() \ if (debugEnabled()) qDebug() << __FILE__ << __LINE__ << __func__ #else #define DEBUG() while (0) qDebug() #endif #endif // OAU_DEBUG_H ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/signonui-request.h0000644000015600001650000000374612674252514032751 0ustar pbuserpbgroup00000000000000/* * This file is part of online-accounts-ui * * Copyright (C) 2011-2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef SIGNON_UI_REQUEST_H #define SIGNON_UI_REQUEST_H #include "request.h" namespace SignOnUi { class RequestHandler; class RequestPrivate; class Request: public OnlineAccountsUi::Request { Q_OBJECT public: static Request *newRequest(int id, const QString &clientProfile, const QVariantMap ¶meters, QObject *parent = 0); ~Request(); static QString ssoId(const QVariantMap ¶meters); QString ssoId() const; uint identity() const; QString method() const; QString mechanism() const; QString providerId() const; const QVariantMap &clientData() const; void setHandler(RequestHandler *handler); RequestHandler *handler() const; bool hasHandler() const { return handler() != 0; } protected: explicit Request(int id, const QString &clientProfile, const QVariantMap ¶meters, QObject *parent = 0); virtual void setWindow(QWindow *window) Q_DECL_OVERRIDE; virtual void setCanceled() Q_DECL_OVERRIDE; private: RequestPrivate *d_ptr; Q_DECLARE_PRIVATE(Request) }; } // namespace #endif // SIGNON_UI_REQUEST_H ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/notification.cpp0000644000015600001650000000752012674252514032443 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "debug.h" #include "notification.h" #include #include #include #include #include using namespace OnlineAccountsUi; namespace OnlineAccountsUi { class NotificationPrivate: public QObject { Q_OBJECT Q_DECLARE_PUBLIC(Notification) public: NotificationPrivate(const QString &summary, const QString &body, Notification *notification); ~NotificationPrivate(); static void actionCallback(NotifyNotification *, char *action, Notification *q); private: NotifyNotification *m_notification; mutable Notification *q_ptr; }; } // namespace NotificationPrivate::NotificationPrivate(const QString &summary, const QString &body, Notification *notification): QObject(notification), m_notification(0), q_ptr(notification) { if (!notify_is_initted()) { QByteArray name = QCoreApplication::applicationName().toUtf8(); notify_init(name.constData()); } QByteArray summaryUtf8 = summary.toUtf8(); QByteArray bodyUtf8 = body.toUtf8(); m_notification = notify_notification_new(summaryUtf8.constData(), bodyUtf8.constData(), NULL); g_signal_connect_swapped(m_notification, "closed", G_CALLBACK(&Notification::closed), notification); } NotificationPrivate::~NotificationPrivate() { g_object_unref(m_notification); } void NotificationPrivate::actionCallback(NotifyNotification *, char *action, Notification *q) { Q_EMIT q->actionInvoked(QString::fromUtf8(action)); } Notification::Notification(const QString &summary, const QString &body, QObject *parent): QObject(parent), d_ptr(new NotificationPrivate(summary, body, this)) { } Notification::~Notification() { } void Notification::addAction(const QString &action, const QString &label) { Q_D(Notification); QByteArray actionUtf8 = action.toUtf8(); QByteArray labelUtf8 = label.toUtf8(); notify_notification_add_action(d->m_notification, actionUtf8, labelUtf8, NotifyActionCallback( &NotificationPrivate::actionCallback), this, NULL); } void Notification::setSnapDecision(bool snapDecision) { Q_D(Notification); notify_notification_set_hint(d->m_notification, "x-canonical-snap-decisions", g_variant_new_boolean(snapDecision)); } void Notification::show() { Q_D(Notification); GError *error = NULL; if (!notify_notification_show(d->m_notification, &error)) { qWarning() << "Couldn't show notification:" << error->message; g_clear_error(&error); } } #include "notification.moc" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/panel-request.h0000644000015600001650000000256512674252514032213 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013-2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef OAU_PANEL_REQUEST_H #define OAU_PANEL_REQUEST_H #include "request.h" namespace OnlineAccountsUi { class PanelRequestPrivate; class PanelRequest: public Request { Q_OBJECT public: explicit PanelRequest(const QString &interface, int id, const QString &clientProfile, const QVariantMap ¶meters, QObject *parent = 0); ~PanelRequest(); void start() Q_DECL_OVERRIDE; private: PanelRequestPrivate *d_ptr; Q_DECLARE_PRIVATE(PanelRequest) }; } // namespace #endif // OAU_PANEL_REQUEST_H ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/ui-server.cpp0000644000015600001650000001354412674252514031701 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "debug.h" #include "ipc.h" #include "request.h" #include "signonui-request.h" #include "ui-server.h" #include #include #include #include #include #include using namespace OnlineAccountsUi; static UiServer *m_instance = 0; namespace OnlineAccountsUi { class UiServerPrivate: public QObject { Q_OBJECT Q_DECLARE_PUBLIC(UiServer) public: inline UiServerPrivate(const QString &address, UiServer *pluginServer); inline ~UiServerPrivate(); bool setupSocket(); bool init(); void sendOperation(const QVariantMap &data); private Q_SLOTS: void onDataReady(QByteArray &data); void onRequestCompleted(); void registerHandler(SignOnUi::RequestHandler *handler); private: QLocalSocket m_socket; OnlineAccountsUi::Ipc m_ipc; SignOnUi::RequestHandlerWatcher m_handlerWatcher; mutable UiServer *q_ptr; }; } // namespace UiServerPrivate::UiServerPrivate(const QString &address, UiServer *pluginServer): QObject(pluginServer), q_ptr(pluginServer) { QObject::connect(&m_ipc, SIGNAL(dataReady(QByteArray &)), this, SLOT(onDataReady(QByteArray &))); QObject::connect(&m_socket, SIGNAL(disconnected()), q_ptr, SIGNAL(finished())); m_socket.connectToServer(address); QObject::connect(&m_handlerWatcher, SIGNAL(newHandler(SignOnUi::RequestHandler *)), this, SLOT(registerHandler(SignOnUi::RequestHandler *))); } UiServerPrivate::~UiServerPrivate() { DEBUG(); } void UiServerPrivate::sendOperation(const QVariantMap &data) { QByteArray ba; QDataStream stream(&ba, QIODevice::WriteOnly); stream << data; m_ipc.write(ba); } void UiServerPrivate::onDataReady(QByteArray &data) { QVariantMap map; QDataStream stream(&data, QIODevice::ReadOnly); stream >> map; DEBUG() << map; QString code = map.value(OAU_OPERATION_CODE).toString(); if (code == OAU_OPERATION_CODE_PROCESS) { QVariantMap parameters = map[OAU_OPERATION_DATA].toMap(); Request *request = Request::newRequest(map[OAU_OPERATION_INTERFACE].toString(), map[OAU_OPERATION_ID].toInt(), map[OAU_OPERATION_CLIENT_PROFILE].toString(), parameters, this); QObject::connect(request, SIGNAL(completed()), this, SLOT(onRequestCompleted())); /* Check if a RequestHandler has been setup to handle this request. If * so, bing the request object to the handler and start the request * immediately. */ SignOnUi::Request *signonRequest = qobject_cast(request); if (signonRequest) { SignOnUi::RequestHandler *handler = m_handlerWatcher.findMatching(parameters); if (handler) { signonRequest->setHandler(handler); } } request->start(); } else { qWarning() << "Invalid operation code: " << code; } } void UiServerPrivate::onRequestCompleted() { Request *request = qobject_cast(sender()); request->disconnect(this); request->deleteLater(); if (request->errorName().isEmpty()) { QVariantMap operation; operation.insert(OAU_OPERATION_CODE, OAU_OPERATION_CODE_REQUEST_FINISHED); operation.insert(OAU_OPERATION_ID, request->id()); operation.insert(OAU_OPERATION_DATA, request->result()); operation.insert(OAU_OPERATION_DELAY, request->delay()); operation.insert(OAU_OPERATION_INTERFACE, request->interface()); sendOperation(operation); } else { QVariantMap operation; operation.insert(OAU_OPERATION_CODE, OAU_OPERATION_CODE_REQUEST_FAILED); operation.insert(OAU_OPERATION_ID, request->id()); operation.insert(OAU_OPERATION_INTERFACE, request->interface()); operation.insert(OAU_OPERATION_ERROR_NAME, request->errorName()); operation.insert(OAU_OPERATION_ERROR_MESSAGE, request->errorMessage()); sendOperation(operation); } } bool UiServerPrivate::init() { if (Q_UNLIKELY(!m_socket.waitForConnected())) return false; m_ipc.setChannels(&m_socket, &m_socket); return true; } void UiServerPrivate::registerHandler(SignOnUi::RequestHandler *handler) { QVariantMap operation; operation.insert(OAU_OPERATION_CODE, OAU_OPERATION_CODE_REGISTER_HANDLER); operation.insert(OAU_OPERATION_HANDLER_ID, handler->matchId()); sendOperation(operation); } UiServer::UiServer(const QString &address, QObject *parent): QObject(parent), d_ptr(new UiServerPrivate(address, this)) { m_instance = this; } UiServer::~UiServer() { m_instance = 0; } UiServer *UiServer::instance() { return m_instance; } bool UiServer::init() { Q_D(UiServer); return d->init(); } #include "ui-server.moc" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/provider-request.cpp0000644000015600001650000001516412674252514033300 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "access-model.h" #include "debug.h" #include "globals.h" #include "provider-request.h" #include #include #include #include #include #include #include using namespace OnlineAccountsUi; static bool firstTime = true; namespace OnlineAccountsUi { class ProviderRequestPrivate: public QObject { Q_OBJECT Q_DECLARE_PUBLIC(ProviderRequest) public: ProviderRequestPrivate(ProviderRequest *request); ~ProviderRequestPrivate(); void start(); private Q_SLOTS: void onWindowVisibleChanged(bool visible); void onDenied(); void onAllowed(int accountId); private: QVariantMap providerInfo(const QString &providerId) const; private: mutable ProviderRequest *q_ptr; QQuickView *m_view; QVariantMap m_applicationInfo; }; } // namespace ProviderRequestPrivate::ProviderRequestPrivate(ProviderRequest *request): QObject(request), q_ptr(request), m_view(0) { if (firstTime) { qmlRegisterType(); qmlRegisterType("Ubuntu.OnlineAccounts.Internal", 1, 0, "AccessModel"); firstTime = false; } } ProviderRequestPrivate::~ProviderRequestPrivate() { delete m_view; } void ProviderRequestPrivate::start() { Q_Q(ProviderRequest); QString applicationId = q->parameters().value(OAU_KEY_APPLICATION).toString(); ApplicationManager *appManager = ApplicationManager::instance(); m_applicationInfo = appManager->applicationInfo(applicationId, q->clientApparmorProfile()); if (Q_UNLIKELY(m_applicationInfo.isEmpty())) { q->fail(OAU_ERROR_INVALID_APPLICATION, QStringLiteral("Invalid client application")); return; } QString providerId; QString serviceId = q->parameters().value(OAU_KEY_SERVICE_ID).toString(); if (!serviceId.isEmpty()) { Accounts::Service service = AccountManager::instance()->service(serviceId); if (Q_UNLIKELY(!service.isValid())) { q->fail(OAU_ERROR_INVALID_SERVICE, QString("Service %1 not found").arg(serviceId)); return; } providerId = service.provider(); } else { providerId = q->parameters().value(OAU_KEY_PROVIDER).toString(); } QVariantMap providerInfo = appManager->providerInfo(providerId); m_view = new QQuickView; QObject::connect(m_view, SIGNAL(visibleChanged(bool)), this, SLOT(onWindowVisibleChanged(bool))); m_view->setResizeMode(QQuickView::SizeRootObjectToView); QQmlEngine *engine = m_view->engine(); engine->addImportPath(PLUGIN_PRIVATE_MODULE_DIR); /* If the plugin comes from a click package, also add * /lib * /lib/ * to the QML import path. */ QString packageDir = providerInfo.value("package-dir").toString(); if (!packageDir.isEmpty()) { engine->addImportPath(packageDir + "/lib"); #ifdef DEB_HOST_MULTIARCH engine->addImportPath(packageDir + "/lib/" DEB_HOST_MULTIARCH); #endif } QQmlContext *context = m_view->rootContext(); context->setContextProperty("systemQmlPluginPath", QUrl::fromLocalFile(OAU_PLUGIN_DIR)); context->setContextProperty("localQmlPluginPath", QUrl::fromLocalFile(QStandardPaths::writableLocation( QStandardPaths::GenericDataLocation) + "/accounts/qml-plugins/")); context->setContextProperty("provider", providerInfo); context->setContextProperty("application", m_applicationInfo); context->setContextProperty("mainWindow", m_view); m_view->setSource(QUrl(QStringLiteral("qrc:/qml/ProviderRequest.qml"))); QQuickItem *root = m_view->rootObject(); QObject::connect(root, SIGNAL(denied()), this, SLOT(onDenied())); QObject::connect(root, SIGNAL(allowed(int)), this, SLOT(onAllowed(int))); if (root->property("wasDenied").toBool()) { DEBUG() << "Was denied"; q->setResult(QVariantMap()); return; } q->setWindow(m_view); } void ProviderRequestPrivate::onWindowVisibleChanged(bool visible) { Q_Q(ProviderRequest); QObject::disconnect(m_view, SIGNAL(visibleChanged(bool)), this, SLOT(onWindowVisibleChanged(bool))); if (!visible) { q->setResult(QVariantMap()); } } void ProviderRequestPrivate::onDenied() { DEBUG(); /* Just close the window; this will deliver the empty result to the * client */ m_view->close(); } void ProviderRequestPrivate::onAllowed(int accountId) { Q_Q(ProviderRequest); DEBUG() << "Access allowed for account:" << accountId; /* If the request came from an app, add a small delay so that we could * serve an authentication request coming right after this one. */ if (m_applicationInfo.value("id").toString() != QStringLiteral("system-settings")) { q->setDelay(3000); } QVariantMap result; result.insert(OAU_KEY_ACCOUNT_ID, quint32(accountId)); q->setResult(result); /* We keep the view opened */ } ProviderRequest::ProviderRequest(const QString &interface, int id, const QString &clientProfile, const QVariantMap ¶meters, QObject *parent): Request(interface, id, clientProfile, parameters, parent), d_ptr(new ProviderRequestPrivate(this)) { } ProviderRequest::~ProviderRequest() { } void ProviderRequest::start() { Q_D(ProviderRequest); Request::start(); d->start(); } #include "provider-request.moc" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/dialog-request.cpp0000644000015600001650000002051012674252514032674 0ustar pbuserpbgroup00000000000000/* * This file is part of online-accounts-ui * * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "dialog-request.h" #include "debug.h" #include "dialog.h" #include "globals.h" #include "i18n.h" #include #include #include #include #include using namespace SignOnUi; /* These fields are temporarily defined here; they'll be eventually moved to * signond's include files. */ #define SSOUI_KEY_USERNAME_TEXT QLatin1String("UserNameText") #define SSOUI_KEY_PASSWORD_TEXT QLatin1String("PasswordText") #define SSOUI_KEY_REGISTER_URL QLatin1String("RegisterUrl") #define SSOUI_KEY_REGISTER_TEXT QLatin1String("RegisterText") #define SSOUI_KEY_LOGIN_TEXT QLatin1String("LoginText") namespace SignOnUi { class DialogRequestPrivate: public QObject { Q_OBJECT Q_DECLARE_PUBLIC(DialogRequest) Q_PROPERTY(QString title READ title CONSTANT) Q_PROPERTY(QString userName READ userName WRITE setUserName \ NOTIFY userNameChanged) Q_PROPERTY(QString password READ password WRITE setPassword \ NOTIFY passwordChanged) Q_PROPERTY(QString userNameText READ userNameText CONSTANT) Q_PROPERTY(QString passwordText READ passwordText CONSTANT) Q_PROPERTY(QString message READ message CONSTANT) Q_PROPERTY(bool queryUserName READ queryUserName CONSTANT) Q_PROPERTY(bool queryPassword READ queryPassword CONSTANT) Q_PROPERTY(QUrl forgotPasswordUrl READ forgotPasswordUrl CONSTANT) Q_PROPERTY(QString forgotPasswordText READ forgotPasswordText CONSTANT) Q_PROPERTY(QUrl registerUrl READ registerUrl CONSTANT) Q_PROPERTY(QString registerText READ registerText CONSTANT) Q_PROPERTY(QString loginText READ loginText CONSTANT) public: DialogRequestPrivate(DialogRequest *request); ~DialogRequestPrivate(); void start(); QString title() const { return m_title; } void setUserName(const QString &userName); QString userName() const { return m_userName; } void setPassword(const QString &password); QString password() const { return m_password; } QString userNameText() const { return m_userNameText; } QString passwordText() const { return m_passwordText; } QString message() const { return m_message; } bool queryUserName() const { return m_queryUsername; } bool queryPassword() const { return m_queryPassword; } QUrl forgotPasswordUrl() const { return m_forgotPasswordUrl; } QString forgotPasswordText() const { return m_forgotPasswordText; } QUrl registerUrl() const { return m_registerUrl; } QString registerText() const { return m_registerText; } QString loginText() const { return m_loginText; } public Q_SLOTS: void cancel(); void accept(); Q_SIGNALS: void userNameChanged(); void passwordChanged(); private Q_SLOTS: void onFinished(); private: void closeView(); private: Dialog *m_dialog; QString m_title; QString m_userName; QString m_password; QString m_userNameText; QString m_passwordText; QString m_message; bool m_queryUsername; bool m_queryPassword; QUrl m_forgotPasswordUrl; QString m_forgotPasswordText; QUrl m_registerUrl; QString m_registerText; QString m_loginText; mutable DialogRequest *q_ptr; }; } // namespace DialogRequestPrivate::DialogRequestPrivate(DialogRequest *request): QObject(request), m_dialog(0), m_queryUsername(false), m_queryPassword(false), q_ptr(request) { const QVariantMap ¶ms = q_ptr->parameters(); if (params.contains(SSOUI_KEY_TITLE)) { m_title = params[SSOUI_KEY_TITLE].toString(); } else if (params.contains(SSOUI_KEY_CAPTION)) { m_title = OnlineAccountsUi::_("Web authentication for %1", SIGNONUI_I18N_DOMAIN). arg(params[SSOUI_KEY_CAPTION].toString()); } else { m_title = OnlineAccountsUi::_("Web authentication", SIGNONUI_I18N_DOMAIN); } m_queryUsername = params.value(SSOUI_KEY_QUERYUSERNAME, false).toBool(); m_userName = params.value(SSOUI_KEY_USERNAME).toString(); m_userNameText = params.value(SSOUI_KEY_USERNAME_TEXT).toString(); if (m_userNameText.isEmpty()) { m_userNameText = OnlineAccountsUi::_("Username:", SIGNONUI_I18N_DOMAIN); } m_queryPassword = params.value(SSOUI_KEY_QUERYPASSWORD, false).toBool(); m_password = params.value(SSOUI_KEY_PASSWORD).toString(); m_passwordText = params.value(SSOUI_KEY_PASSWORD_TEXT).toString(); if (m_passwordText.isEmpty()) { m_passwordText = OnlineAccountsUi::_("Password:", SIGNONUI_I18N_DOMAIN); } m_message = params.value(SSOUI_KEY_MESSAGE).toString(); m_forgotPasswordUrl = QUrl(params.value(SSOUI_KEY_FORGOTPASSWORDURL).toString()); m_forgotPasswordText = params.value(SSOUI_KEY_FORGOTPASSWORD).toString(); m_registerUrl = QUrl(params.value(SSOUI_KEY_REGISTER_URL).toString()); m_registerText = params.value(SSOUI_KEY_REGISTER_TEXT).toString(); m_loginText = params.value(SSOUI_KEY_LOGIN_TEXT).toString(); if (m_loginText.isEmpty()) { m_loginText = OnlineAccountsUi::_("Sign in"); } } DialogRequestPrivate::~DialogRequestPrivate() { closeView(); delete m_dialog; } void DialogRequestPrivate::start() { Q_Q(DialogRequest); const QVariantMap ¶ms = q->parameters(); DEBUG() << params; if (!q->hasHandler()) { m_dialog = new Dialog; m_dialog->setTitle(m_title); QObject::connect(m_dialog, SIGNAL(finished(int)), this, SLOT(onFinished())); m_dialog->engine()->addImportPath(PLUGIN_PRIVATE_MODULE_DIR); m_dialog->rootContext()->setContextProperty("request", this); m_dialog->setSource(QUrl("qrc:/qml/SignOnUiDialog.qml")); q->setWindow(m_dialog); } else { DEBUG() << "Setting request on handler"; q->handler()->setRequest(this); } } void DialogRequestPrivate::accept() { DEBUG() << "User accepted"; onFinished(); } void DialogRequestPrivate::cancel() { Q_Q(DialogRequest); DEBUG() << "User requested to cancel"; q->setCanceled(); closeView(); } void DialogRequestPrivate::setUserName(const QString &userName) { if (userName == m_userName) return; m_userName = userName; Q_EMIT userNameChanged(); } void DialogRequestPrivate::setPassword(const QString &password) { if (password == m_password) return; m_password = password; Q_EMIT passwordChanged(); } void DialogRequestPrivate::onFinished() { Q_Q(DialogRequest); DEBUG() << "Dialog closed"; QObject::disconnect(m_dialog, SIGNAL(finished(int)), this, SLOT(onFinished())); QVariantMap reply; if (m_queryUsername) { reply[SSOUI_KEY_USERNAME] = m_userName; } if (m_queryPassword) { reply[SSOUI_KEY_PASSWORD] = m_password; } closeView(); q->setResult(reply); } void DialogRequestPrivate::closeView() { Q_Q(DialogRequest); if (q->hasHandler()) { q->handler()->setRequest(0); } else if (m_dialog) { m_dialog->close(); } } DialogRequest::DialogRequest(int id, const QString &clientProfile, const QVariantMap ¶meters, QObject *parent): Request(id, clientProfile, parameters, parent), d_ptr(new DialogRequestPrivate(this)) { } DialogRequest::~DialogRequest() { } void DialogRequest::start() { Q_D(DialogRequest); Request::start(); d->start(); } #include "dialog-request.moc" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/access-model.cpp0000644000015600001650000001216512674252514032315 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "access-model.h" #include "debug.h" #include #include #include #include using namespace OnlineAccountsUi; namespace OnlineAccountsUi { class AccessModelPrivate { Q_DECLARE_PUBLIC(AccessModel) public: inline AccessModelPrivate(AccessModel *accessModel); inline ~AccessModelPrivate(); void ensureSupportedServices() const; private: mutable AccessModel *q_ptr; mutable Accounts::ServiceList m_supportedServices; QString m_lastItemText; QString m_applicationId; }; } // namespace AccessModelPrivate::AccessModelPrivate(AccessModel *accessModel): q_ptr(accessModel) { } AccessModelPrivate::~AccessModelPrivate() { } void AccessModelPrivate::ensureSupportedServices() const { Q_Q(const AccessModel); if (!m_supportedServices.isEmpty()) return; // Nothing to do /* List all services supported by the accounts's provider. We know that the * account model is an instance of the accounts-qml-module's * AccountServiceModel, and that its "provider" property must be set. */ QAbstractItemModel *accountModel = q->sourceModel(); if (!accountModel) return; QString providerId = accountModel->property("provider").toString(); if (providerId.isEmpty()) return; AccountManager *manager = AccountManager::instance(); Accounts::Application application = manager->application(m_applicationId); Accounts::ServiceList allServices = manager->serviceList(); Q_FOREACH(const Accounts::Service &service, allServices) { if (service.provider() == providerId && !application.serviceUsage(service).isEmpty()) { m_supportedServices.append(service); } } } AccessModel::AccessModel(QObject *parent): QSortFilterProxyModel(parent), d_ptr(new AccessModelPrivate(this)) { Q_D(AccessModel); QObject::connect(this, SIGNAL(rowsInserted(const QModelIndex&,int,int)), this, SIGNAL(countChanged())); QObject::connect(this, SIGNAL(rowsRemoved(const QModelIndex&,int,int)), this, SIGNAL(countChanged())); setDynamicSortFilter(true); } AccessModel::~AccessModel() { } void AccessModel::setAccountModel(QAbstractItemModel *accountModel) { Q_D(AccessModel); setSourceModel(accountModel); Q_EMIT accountModelChanged(); } QAbstractItemModel *AccessModel::accountModel() const { Q_D(const AccessModel); return sourceModel(); } void AccessModel::setApplicationId(const QString &applicationId) { Q_D(AccessModel); if (applicationId == d->m_applicationId) return; d->m_applicationId = applicationId; Q_EMIT applicationIdChanged(); d->m_supportedServices.clear(); /* Trigger a refresh of the filtered model */ invalidateFilter(); } QString AccessModel::applicationId() const { Q_D(const AccessModel); return d->m_applicationId; } QVariant AccessModel::get(int row, const QString &roleName) const { int role = roleNames().key(roleName.toLatin1(), -1); return data(index(row, 0), role); } bool AccessModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const { Q_D(const AccessModel); Q_UNUSED(sourceParent); if (d->m_applicationId.isEmpty()) return true; /* We must avoid showing those accounts which have already been enabled for * this application. */ d->ensureSupportedServices(); QVariant result; bool ok = QMetaObject::invokeMethod(sourceModel(), "get", Qt::DirectConnection, Q_RETURN_ARG(QVariant, result), Q_ARG(int, sourceRow), Q_ARG(QString, "accountHandle")); if (Q_UNLIKELY(!ok)) return false; QObject *accountHandle = result.value(); Accounts::Account *account = qobject_cast(accountHandle); if (Q_UNLIKELY(!account)) return false; bool allServicesEnabled = true; Q_FOREACH(const Accounts::Service &service, d->m_supportedServices) { account->selectService(service); if (!account->isEnabled()) { allServicesEnabled = false; break; } } DEBUG() << account->id() << "allServicesEnabled" << allServicesEnabled; return !allServicesEnabled; } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/globals.h0000644000015600001650000000445512674252514031051 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef OAU_GLOBALS_H #define OAU_GLOBALS_H #define OAU_SERVICE_NAME QStringLiteral("com.ubuntu.OnlineAccountsUi") #define OAU_OBJECT_PATH QStringLiteral("/") #define OAU_INTERFACE OAU_SERVICE_NAME #define OAU_KEY_APPLICATION QStringLiteral("application") #define OAU_KEY_PROVIDER QStringLiteral("provider") #define OAU_KEY_SERVICE_ID QStringLiteral("serviceId") #define OAU_KEY_SERVICE_TYPE QStringLiteral("serviceType") #define OAU_KEY_WINDOW_ID QStringLiteral("windowId") #define OAU_KEY_PID QStringLiteral("pid") #define OAU_KEY_ACCOUNT_ID QStringLiteral("accountId") // D-Bus error names #define OAU_ERROR_PREFIX "com.ubuntu.OnlineAccountsUi." #define OAU_ERROR_USER_CANCELED \ QStringLiteral(OAU_ERROR_PREFIX "UserCanceled") #define OAU_ERROR_INVALID_PARAMETERS \ QStringLiteral(OAU_ERROR_PREFIX "InvalidParameters") #define OAU_ERROR_INVALID_APPLICATION \ QStringLiteral(OAU_ERROR_PREFIX "InvalidApplication") #define OAU_ERROR_INVALID_SERVICE \ QStringLiteral(OAU_ERROR_PREFIX "InvalidService") #define OAU_ERROR_PROMPT_SESSION \ QStringLiteral(OAU_ERROR_PREFIX "NoPromptSession") /* SignOnUi service */ #define SIGNONUI_SERVICE_NAME QStringLiteral("com.nokia.singlesignonui") #define SIGNONUI_OBJECT_PATH QStringLiteral("/SignonUi") #define SIGNONUI_INTERFACE SIGNONUI_SERVICE_NAME #define SIGNON_UI_ERROR_PREFIX "com.ubuntu.SignonUi." #define SIGNON_UI_ERROR_INTERNAL \ QStringLiteral(SIGNON_UI_ERROR_PREFIX "InternalError") #endif // OAU_GLOBALS_H ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/debug.cpp0000644000015600001650000000157312674252514031045 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "debug.h" int appLoggingLevel = 1; // criticals void setLoggingLevel(int level) { appLoggingLevel = level; } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/dialog-request.h0000644000015600001650000000260612674252514032347 0ustar pbuserpbgroup00000000000000/* * This file is part of online-accounts-ui * * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef SIGNON_UI_DIALOG_REQUEST_H #define SIGNON_UI_DIALOG_REQUEST_H #include "signonui-request.h" #include namespace SignOnUi { class DialogRequestPrivate; class DialogRequest: public Request { Q_OBJECT public: explicit DialogRequest(int id, const QString &clientProfile, const QVariantMap ¶meters, QObject *parent = 0); ~DialogRequest(); // reimplemented virtual methods void start(); private: DialogRequestPrivate *d_ptr; Q_DECLARE_PRIVATE(DialogRequest) }; } // namespace #endif // SIGNON_UI_DIALOG_REQUEST_H ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/i18n.h0000644000015600001650000000175212674252514030202 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef OAU_I18N_H #define OAU_I18N_H #include namespace OnlineAccountsUi { void initTr(const char *domain, const char *localeDir); QString _(const char *text, const char *domain = 0); } // namespace #endif // OAU_I18N_H ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/browser-request.cpp0000644000015600001650000002206112674252514033123 0ustar pbuserpbgroup00000000000000/* * This file is part of online-accounts-ui * * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "browser-request.h" #include "debug.h" #include "dialog.h" #include "globals.h" #include "i18n.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace SignOnUi; #ifndef SIGNONUI_FAIL_TIMEOUT #define SIGNONUI_FAIL_TIMEOUT 3000 #endif namespace SignOnUi { class BrowserRequestPrivate: public QObject { Q_OBJECT Q_DECLARE_PUBLIC(BrowserRequest) Q_PROPERTY(QUrl pageComponentUrl READ pageComponentUrl CONSTANT) Q_PROPERTY(QUrl currentUrl READ currentUrl WRITE setCurrentUrl) Q_PROPERTY(QUrl startUrl READ startUrl CONSTANT) Q_PROPERTY(QUrl finalUrl READ finalUrl CONSTANT) Q_PROPERTY(QUrl rootDir READ rootDir CONSTANT) public: BrowserRequestPrivate(BrowserRequest *request); ~BrowserRequestPrivate(); void start(); void setCurrentUrl(const QUrl &url); QUrl pageComponentUrl() const; QUrl currentUrl() const { return m_currentUrl; } QUrl startUrl() const { return m_startUrl; } QUrl finalUrl() const { return m_finalUrl; } QUrl responseUrl() const { return m_responseUrl; } QUrl rootDir() const { return QUrl::fromLocalFile(m_rootDir); } QString rootDirForIdentity() const; public Q_SLOTS: void setCookies(const QVariant &cookies); void cancel(); void onLoadStarted(); void onLoadFinished(bool ok); private Q_SLOTS: void onFailTimer(); void onFinished(); Q_SIGNALS: void authenticated(); private: void buildDialog(const QVariantMap ¶ms); void closeView(); bool pathsAreEqual(const QString &p1, const QString &p2); private: Dialog *m_dialog; QRegularExpression m_pathRegExp; QUrl m_currentUrl; QUrl m_startUrl; QUrl m_finalUrl; QUrl m_responseUrl; QString m_rootDir; QTimer m_failTimer; mutable BrowserRequest *q_ptr; }; } // namespace BrowserRequestPrivate::BrowserRequestPrivate(BrowserRequest *request): QObject(request), m_dialog(0), m_pathRegExp("/*^"), q_ptr(request) { m_failTimer.setSingleShot(true); m_failTimer.setInterval(SIGNONUI_FAIL_TIMEOUT); QObject::connect(&m_failTimer, SIGNAL(timeout()), this, SLOT(onFailTimer())); } BrowserRequestPrivate::~BrowserRequestPrivate() { DEBUG(); closeView(); delete m_dialog; } bool BrowserRequestPrivate::pathsAreEqual(const QString &p1, const QString &p2) { QString p1copy(p1); QString p2copy(p2); return p1copy.remove(m_pathRegExp) == p2copy.remove(m_pathRegExp); } QString BrowserRequestPrivate::rootDirForIdentity() const { Q_Q(const BrowserRequest); QString cachePath = QStandardPaths::writableLocation(QStandardPaths::CacheLocation); return cachePath + QString("/id-%1-%2").arg(q->identity()).arg(q->providerId()); } void BrowserRequestPrivate::start() { Q_Q(BrowserRequest); const QVariantMap ¶ms = q->parameters(); DEBUG() << params; QDir rootDir(rootDirForIdentity()); if (!rootDir.exists()) { rootDir.mkpath("."); } m_finalUrl = params.value(SSOUI_KEY_FINALURL).toString(); m_startUrl = params.value(SSOUI_KEY_OPENURL).toString(); m_rootDir = rootDir.absolutePath(); if (!q->hasHandler()) { buildDialog(params); QObject::connect(m_dialog, SIGNAL(finished(int)), this, SLOT(onFinished())); m_dialog->engine()->addImportPath(PLUGIN_PRIVATE_MODULE_DIR); m_dialog->rootContext()->setContextProperty("request", this); m_dialog->setSource(QUrl("qrc:/qml/SignOnUiPage.qml")); } else { DEBUG() << "Setting request on handler"; q->handler()->setRequest(this); } } QUrl BrowserRequestPrivate::pageComponentUrl() const { Q_Q(const BrowserRequest); /* We define the X-PageComponent key to let the clients override the QML * component to be used to build the authentication page. * To prevent a malicious client to show it's own UI, we require that the * file path begins with "/usr/share/signon-ui/" (where Ubuntu click * packages cannot install files). */ QUrl providedUrl = q->clientData().value("X-PageComponent").toString(); if (providedUrl.isValid() && providedUrl.isLocalFile() && providedUrl.path().startsWith("/usr/share/signon-ui/")) { return providedUrl; } else { return QStringLiteral("DefaultPage.qml"); } } void BrowserRequestPrivate::setCurrentUrl(const QUrl &url) { DEBUG() << "Url changed:" << url; if (m_failTimer.isActive()) { m_failTimer.start(); } m_currentUrl = url; if (url.host() == m_finalUrl.host() && pathsAreEqual(url.path(), m_finalUrl.path())) { m_responseUrl = url; if (m_dialog != 0) { if (!m_dialog->isVisible()) { /* Do not show the notification page. */ m_dialog->accept(); } else { /* Replace the web page with an information screen */ /* TODO */ Q_EMIT authenticated(); } } else { DEBUG(); Q_EMIT authenticated(); } } } void BrowserRequestPrivate::setCookies(const QVariant &cookies) { DEBUG() << cookies; QJsonArray jsonCookies = QJsonArray::fromVariantList(cookies.toList()); /* Save the cookies into a text file */ QFile file(m_rootDir + "/cookies.json"); if (Q_LIKELY(file.open(QIODevice::WriteOnly | QIODevice::Text))) { QJsonDocument doc(jsonCookies); file.write(doc.toJson()); file.close(); } onFinished(); } void BrowserRequestPrivate::cancel() { Q_Q(BrowserRequest); DEBUG() << "Client requested to cancel"; q->setCanceled(); closeView(); } void BrowserRequestPrivate::onLoadStarted() { m_failTimer.stop(); } void BrowserRequestPrivate::onLoadFinished(bool ok) { Q_Q(BrowserRequest); DEBUG() << "Load finished" << ok; if (!ok) { m_failTimer.start(); return; } if (m_dialog && !m_dialog->isVisible()) { if (m_responseUrl.isEmpty()) { q->setWindow(m_dialog); } else { Q_EMIT authenticated(); } } } void BrowserRequestPrivate::onFailTimer() { Q_Q(BrowserRequest); DEBUG() << "Page loading failed"; closeView(); QVariantMap result; result[SSOUI_KEY_ERROR] = SignOn::QUERY_ERROR_NETWORK; q->setResult(result); } void BrowserRequestPrivate::onFinished() { Q_Q(BrowserRequest); DEBUG() << "Browser dialog closed"; QObject::disconnect(m_dialog, SIGNAL(finished(int)), this, SLOT(onFinished())); QVariantMap reply; QUrl url = m_responseUrl.isEmpty() ? m_currentUrl : m_responseUrl; reply[SSOUI_KEY_URLRESPONSE] = url.toString(); closeView(); q->setResult(reply); } void BrowserRequestPrivate::buildDialog(const QVariantMap ¶ms) { m_dialog = new Dialog; QString title; if (params.contains(SSOUI_KEY_TITLE)) { title = params[SSOUI_KEY_TITLE].toString(); } else if (params.contains(SSOUI_KEY_CAPTION)) { title = OnlineAccountsUi::_("Web authentication for %1", SIGNONUI_I18N_DOMAIN). arg(params[SSOUI_KEY_CAPTION].toString()); } else { title = OnlineAccountsUi::_("Web authentication", SIGNONUI_I18N_DOMAIN); } m_dialog->setTitle(title); DEBUG() << "Dialog was built"; } void BrowserRequestPrivate::closeView() { Q_Q(BrowserRequest); DEBUG(); if (q->hasHandler()) { q->handler()->setRequest(0); } else if (m_dialog) { m_dialog->close(); } } BrowserRequest::BrowserRequest(int id, const QString &clientProfile, const QVariantMap ¶meters, QObject *parent): Request(id, clientProfile, parameters, parent), d_ptr(new BrowserRequestPrivate(this)) { } BrowserRequest::~BrowserRequest() { delete d_ptr; } void BrowserRequest::start() { Q_D(BrowserRequest); Request::start(); d->start(); } #include "browser-request.moc" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/provider-request.h0000644000015600001650000000262712674252514032745 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef OAU_PROVIDER_REQUEST_H #define OAU_PROVIDER_REQUEST_H #include "request.h" namespace OnlineAccountsUi { class ProviderRequestPrivate; class ProviderRequest: public Request { Q_OBJECT public: explicit ProviderRequest(const QString &interface, int id, const QString &clientProfile, const QVariantMap ¶meters, QObject *parent = 0); ~ProviderRequest(); void start() Q_DECL_OVERRIDE; private: ProviderRequestPrivate *d_ptr; Q_DECLARE_PRIVATE(ProviderRequest) }; } // namespace #endif // OAU_PROVIDER_REQUEST_H ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/notification.h0000644000015600001650000000270112674252514032104 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef OAU_NOTIFICATION_H #define OAU_NOTIFICATION_H #include namespace OnlineAccountsUi { class NotificationPrivate; class Notification: public QObject { Q_OBJECT public: explicit Notification(const QString &summary, const QString &body, QObject *parent = 0); ~Notification(); void addAction(const QString &action, const QString &label); void setSnapDecision(bool snapDecision); public Q_SLOTS: void show(); Q_SIGNALS: void actionInvoked(const QString &action); void closed(); private: NotificationPrivate *d_ptr; Q_DECLARE_PRIVATE(Notification) }; } // namespace #endif // OAU_NOTIFICATION_H ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/request.h0000644000015600001650000000444512674252514031115 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef OAU_REQUEST_H #define OAU_REQUEST_H #include #include #include namespace OnlineAccountsUi { class RequestPrivate; class Request: public QObject { Q_OBJECT public: static Request *newRequest(const QString &interface, int id, const QString &clientProfile, const QVariantMap ¶meters, QObject *parent = 0); ~Request(); static Request *find(const QVariantMap &match); QString interface() const; int id() const; WId windowId() const; bool isInProgress() const; const QVariantMap ¶meters() const; QString clientApparmorProfile() const; QWindow *window() const; QVariantMap result() const; QString errorName() const; QString errorMessage() const; int delay() const; public Q_SLOTS: virtual void start(); void cancel(); Q_SIGNALS: void completed(); protected: explicit Request(const QString &interface, int id, const QString &clientProfile, const QVariantMap ¶meters, QObject *parent = 0); virtual void setWindow(QWindow *window); void setDelay(int delay); protected Q_SLOTS: void fail(const QString &name, const QString &message); virtual void setCanceled(); void setResult(const QVariantMap &result); private: RequestPrivate *d_ptr; Q_DECLARE_PRIVATE(Request) }; } // namespace #endif // OAU_REQUEST_H ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/online-accounts-ui.pro0000644000015600001650000000345312674252514033510 0ustar pbuserpbgroup00000000000000include(../common-project-config.pri) include($${TOP_SRC_DIR}/common-vars.pri) TEMPLATE = app TARGET = online-accounts-ui CONFIG += \ link_pkgconfig \ no_keywords \ qt QT += \ dbus \ gui \ qml \ quick PKGCONFIG += \ accounts-qt5 \ libapparmor \ libnotify \ libsignon-qt5 \ signon-plugins-common INCLUDEPATH += \ $${TOP_SRC_DIR}/plugins QMAKE_LIBDIR = $${TOP_BUILD_DIR}/plugins/OnlineAccountsPlugin LIBS += -lonline-accounts-plugin DEFINES += \ I18N_DOMAIN=\\\"$${I18N_DOMAIN}\\\" \ SIGNONUI_I18N_DOMAIN=\\\"$${SIGNONUI_I18N_DOMAIN}\\\" DEFINES += \ DEBUG_ENABLED \ OAU_PLUGIN_DIR=\\\"$${ONLINE_ACCOUNTS_PLUGIN_DIR}/\\\" \ PLUGIN_PRIVATE_MODULE_DIR=\\\"$${PLUGIN_PRIVATE_MODULE_DIR}\\\" !isEmpty(DEB_HOST_MULTIARCH) { DEFINES += DEB_HOST_MULTIARCH=\\\"$${DEB_HOST_MULTIARCH}\\\" } SOURCES += \ access-model.cpp \ browser-request.cpp \ debug.cpp \ dialog.cpp \ dialog-request.cpp \ i18n.cpp \ ipc.cpp \ main.cpp \ panel-request.cpp \ provider-request.cpp \ request.cpp \ signonui-request.cpp \ ui-server.cpp HEADERS += \ access-model.h \ browser-request.h \ debug.h \ dialog.h \ dialog-request.h \ i18n.h \ ipc.h \ panel-request.h \ provider-request.h \ request.h \ signonui-request.h \ ui-server.h QML_SOURCES = \ qml/AccountCreationPage.qml \ qml/AuthorizationPage.qml \ qml/ProviderRequest.qml \ qml/SignOnUiPage.qml RESOURCES += \ ui.qrc OTHER_FILES += \ $${QML_SOURCES} \ $${RESOURCES} QMAKE_SUBSTITUTES += \ online-accounts-ui.desktop.in desktop.path = $${INSTALL_PREFIX}/share/applications desktop.files += online-accounts-ui.desktop INSTALLS += desktop include($${TOP_SRC_DIR}/common-installs-config.pri) ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/ui.qrc0000644000015600001650000000042112674252514030366 0ustar pbuserpbgroup00000000000000 qml/AccountCreationPage.qml qml/AuthorizationPage.qml qml/ProviderRequest.qml qml/SignOnUiDialog.qml qml/SignOnUiPage.qml ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/panel-request.cpp0000644000015600001650000000647712674252514032554 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "debug.h" #include "globals.h" #include "panel-request.h" #include #include #include #include #include #include using namespace OnlineAccountsUi; namespace OnlineAccountsUi { class PanelRequestPrivate: public QObject { Q_OBJECT Q_DECLARE_PUBLIC(PanelRequest) public: PanelRequestPrivate(PanelRequest *request); ~PanelRequestPrivate(); void start(); private Q_SLOTS: void onWindowVisibleChanged(bool visible); private: mutable PanelRequest *q_ptr; QQuickView *m_view; }; } // namespace PanelRequestPrivate::PanelRequestPrivate(PanelRequest *request): QObject(request), q_ptr(request), m_view(0) { } PanelRequestPrivate::~PanelRequestPrivate() { DEBUG() << "view:" << m_view; /* TODO Uncomment this once QTBUG-40766 is resolved: delete m_view; */ } void PanelRequestPrivate::start() { Q_Q(PanelRequest); m_view = new QQuickView; QObject::connect(m_view, SIGNAL(visibleChanged(bool)), this, SLOT(onWindowVisibleChanged(bool))); m_view->setResizeMode(QQuickView::SizeRootObjectToView); m_view->engine()->addImportPath(PLUGIN_PRIVATE_MODULE_DIR); QQmlContext *context = m_view->rootContext(); context->setContextProperty("systemQmlPluginPath", QUrl::fromLocalFile(OAU_PLUGIN_DIR)); context->setContextProperty("localQmlPluginPath", QUrl::fromLocalFile(QStandardPaths::writableLocation( QStandardPaths::GenericDataLocation) + "/accounts/qml-plugins/")); context->setContextProperty("pluginOptions", QVariantMap()); context->setContextProperty("mainWindow", m_view); m_view->setSource(QUrl(QStringLiteral("qrc:/qml/MainPage.qml"))); q->setWindow(m_view); } void PanelRequestPrivate::onWindowVisibleChanged(bool visible) { Q_Q(PanelRequest); DEBUG() << visible; if (!visible) { q->setResult(QVariantMap()); } } PanelRequest::PanelRequest(const QString &interface, int id, const QString &clientProfile, const QVariantMap ¶meters, QObject *parent): Request(interface, id, clientProfile, parameters, parent), d_ptr(new PanelRequestPrivate(this)) { } PanelRequest::~PanelRequest() { } void PanelRequest::start() { Q_D(PanelRequest); Request::start(); d->start(); } #include "panel-request.moc" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/access-model.h0000644000015600001650000000372312674252514031762 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef OAU_ACCESS_MODEL_H #define OAU_ACCESS_MODEL_H #include namespace OnlineAccountsUi { class AccessModelPrivate; class AccessModel: public QSortFilterProxyModel { Q_OBJECT Q_PROPERTY(QAbstractItemModel *accountModel READ accountModel \ WRITE setAccountModel NOTIFY accountModelChanged) Q_PROPERTY(int count READ rowCount NOTIFY countChanged) Q_PROPERTY(QString applicationId READ applicationId \ WRITE setApplicationId NOTIFY applicationIdChanged) public: explicit AccessModel(QObject *parent = 0); ~AccessModel(); void setAccountModel(QAbstractItemModel *accountModel); QAbstractItemModel *accountModel() const; void setApplicationId(const QString &applicationId); QString applicationId() const; Q_INVOKABLE QVariant get(int row, const QString &roleName) const; protected: bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const Q_DECL_OVERRIDE; Q_SIGNALS: void accountModelChanged(); void countChanged(); void applicationIdChanged(); private: AccessModelPrivate *d_ptr; Q_DECLARE_PRIVATE(AccessModel) }; } // namespace #endif // OAU_ACCESS_MODEL_H ././@LongLink0000000000000000000000000000015300000000000011214 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/online-accounts-ui.desktop.inubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/online-accounts-ui.desk0000644000015600001650000000034312674252514033631 0ustar pbuserpbgroup00000000000000[Desktop Entry] Encoding=UTF-8 Version=1.0 Name=Online Accounts Comment=Create and edit Online Accounts Exec=$${target.path}/$$TARGET Icon= Type=Application Terminal=false NoDisplay=true X-Ubuntu-Gettext-Domain=$${I18N_DOMAIN} ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/i18n.cpp0000644000015600001650000000212212674252514030525 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #define NO_TR_OVERRIDE #include "i18n.h" #include namespace OnlineAccountsUi { void initTr(const char *domain, const char *localeDir) { bindtextdomain(domain, localeDir); textdomain(domain); } QString _(const char *text, const char *domain) { return QString::fromUtf8(dgettext(domain, text)); } }; // namespace ubuntu-system-settings-online-accounts-0.7+16.04.20160322/online-accounts-ui/browser-request.h0000644000015600001650000000262212674252514032571 0ustar pbuserpbgroup00000000000000/* * This file is part of online-accounts-ui * * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef SIGNON_UI_BROWSER_REQUEST_H #define SIGNON_UI_BROWSER_REQUEST_H #include "signonui-request.h" #include namespace SignOnUi { class BrowserRequestPrivate; class BrowserRequest: public Request { Q_OBJECT public: explicit BrowserRequest(int id, const QString &clientProfile, const QVariantMap ¶meters, QObject *parent = 0); ~BrowserRequest(); // reimplemented virtual methods void start(); private: BrowserRequestPrivate *d_ptr; Q_DECLARE_PRIVATE(BrowserRequest) }; } // namespace #endif // SIGNON_UI_BROWSER_REQUEST_H ubuntu-system-settings-online-accounts-0.7+16.04.20160322/click-hooks/0000755000015600001650000000000012674252771025744 5ustar pbuserpbgroup00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/click-hooks/online-accounts-hooks2.pro0000644000015600001650000000112112674252514032760 0ustar pbuserpbgroup00000000000000include(../common-project-config.pri) TEMPLATE = app TARGET = online-accounts-hooks2 CONFIG += \ link_pkgconfig \ qt QT += \ xml PKGCONFIG += \ accounts-qt5 \ click-0.4 \ gobject-2.0 \ libsignon-qt5 SOURCES += \ accounts.cpp \ acl-updater.cpp HEADERS += \ acl-updater.h DEFINES += \ HOOK_FILES_SUBDIR=\\\"$${TARGET}\\\" \ QT_NO_KEYWORDS QMAKE_SUBSTITUTES += \ accounts.hook.in hooks.files = \ accounts.hook hooks.path = $${INSTALL_PREFIX}/share/click/hooks INSTALLS += hooks include($${TOP_SRC_DIR}/common-installs-config.pri) ubuntu-system-settings-online-accounts-0.7+16.04.20160322/click-hooks/online-accounts-hooks.pro0000644000015600001650000000125212674252514032703 0ustar pbuserpbgroup00000000000000include(../common-project-config.pri) TEMPLATE = app TARGET = online-accounts-hooks CONFIG += \ link_pkgconfig \ qt QT += \ xml PKGCONFIG += \ accounts-qt5 \ click-0.4 \ gobject-2.0 SOURCES += \ main.cpp DEFINES += \ HOOK_FILES_SUBDIR=\\\"$${TARGET}\\\" \ QT_NO_KEYWORDS QMAKE_SUBSTITUTES += \ account-application.hook.in \ account-provider.hook.in \ account-service.hook.in hooks.files = \ account-application.hook \ account-provider.hook \ account-qml-plugin.hook \ account-service.hook hooks.path = $${INSTALL_PREFIX}/share/click/hooks INSTALLS += hooks include($${TOP_SRC_DIR}/common-installs-config.pri) ubuntu-system-settings-online-accounts-0.7+16.04.20160322/click-hooks/main.cpp0000644000015600001650000003042312674252514027371 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2014 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include static QString findPackageDir(const QString &appId) { /* For testing */ QByteArray packageDirEnv = qgetenv("OAH_CLICK_DIR"); if (!packageDirEnv.isEmpty()) { return QString::fromUtf8(packageDirEnv); } QStringList components = appId.split('_'); QByteArray package = components.first().toUtf8(); GError *error = NULL; ClickUser *user = click_user_new_for_user(NULL, NULL, &error); if (Q_UNLIKELY(!user)) { qWarning() << "Unable to read Click database:" << error->message; g_error_free(error); return QString(); } gchar *pkgDir = click_user_get_path(user, package.constData(), &error); if (Q_UNLIKELY(!pkgDir)) { qWarning() << "Unable to get the Click package directory for" << package << ":" << error->message; g_error_free(error); g_object_unref(user); return QString(); } QString ret = QString::fromUtf8(pkgDir); g_object_unref(user); g_free(pkgDir); return ret; } static QString stripVersion(const QString &appId) { QStringList components = appId.split('_'); if (components.count() != 3) return appId; /* Click packages have a profile of the form * $name_$application_$version * (see https://wiki.ubuntu.com/SecurityTeam/Specifications/ApplicationConfinement/Manifest#Click) * * So we just need to strip out the last part. */ components.removeLast(); return components.join('_'); } class LibAccountsFile: public QDomDocument { public: LibAccountsFile(const QFileInfo &hookFileInfo); void checkId(const QString &shortAppId); void addProfile(const QString &appId); void addPackageDir(const QString &appId); QString profile() const; void addDesktopFile(const QString &appId); void addServiceType(const QString &shortAppId); void checkIconPath(const QString &appId); bool writeTo(const QString &fileName) const; void addCreatorMark(); bool createdByUs() const; bool isValid() const { return m_isValid; } private: QFileInfo m_hookFileInfo; bool m_isValid; }; LibAccountsFile::LibAccountsFile(const QFileInfo &hookFileInfo): QDomDocument(), m_hookFileInfo(hookFileInfo), m_isValid(false) { QFile file(hookFileInfo.filePath()); if (file.open(QIODevice::ReadOnly)) { if (setContent(&file)) { m_isValid = true; } file.close(); } } void LibAccountsFile::checkId(const QString &shortAppId) { /* checks that the root element's "id" attributes is consistent with the * file name */ QDomElement root = documentElement(); root.setAttribute(QStringLiteral("id"), shortAppId); } void LibAccountsFile::addProfile(const QString &appId) { QDomElement root = documentElement(); QDomElement elem = createElement(QStringLiteral("profile")); elem.appendChild(createTextNode(appId)); root.appendChild(elem); } void LibAccountsFile::addPackageDir(const QString &appId) { QString packageDir = findPackageDir(appId); if (Q_UNLIKELY(packageDir.isEmpty())) return; QDomElement root = documentElement(); QDomElement elem = createElement(QStringLiteral("package-dir")); elem.appendChild(createTextNode(packageDir)); root.appendChild(elem); } QString LibAccountsFile::profile() const { QDomElement root = documentElement(); return root.firstChildElement("profile").text(); } void LibAccountsFile::addDesktopFile(const QString &appId) { QString desktopEntryTag = QStringLiteral("desktop-entry"); QDomElement root = documentElement(); /* if a element already exists, don't touch it */ QDomElement elem = root.firstChildElement(desktopEntryTag); if (!elem.isNull()) return; elem = createElement(desktopEntryTag); elem.appendChild(createTextNode(appId)); root.appendChild(elem); } void LibAccountsFile::addServiceType(const QString &shortAppId) { QString serviceTypeTag = QStringLiteral("type"); QDomElement root = documentElement(); /* if a element already exists, don't touch it */ QDomElement elem = root.firstChildElement(serviceTypeTag); if (!elem.isNull()) return; elem = createElement(serviceTypeTag); elem.appendChild(createTextNode(shortAppId)); root.appendChild(elem); } void LibAccountsFile::checkIconPath(const QString &appId) { QString iconTag = QStringLiteral("icon"); QDomElement root = documentElement(); /* if the element does not exist, do nothing*/ QDomElement elem = root.firstChildElement(iconTag); if (elem.isNull()) return; /* If the icon path is absolute, do nothing */ QString icon = elem.text(); if (QDir::isAbsolutePath(icon)) return; /* Otherwise, try appending it to the click package install dir */ QString packageDir = findPackageDir(appId); if (Q_UNLIKELY(packageDir.isEmpty())) return; QFileInfo iconFile(packageDir + "/" + icon); if (iconFile.exists()) { while (elem.hasChildNodes()) { elem.removeChild(elem.firstChild()); } elem.appendChild(createTextNode(iconFile.canonicalFilePath())); } } bool LibAccountsFile::writeTo(const QString &fileName) const { /* Make sure that the target directory exists */ QDir fileAsDirectory(fileName); fileAsDirectory.mkpath(".."); QFile file(fileName); if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) return false; bool ok = (file.write(toByteArray(2)) > 0); file.close(); if (ok) { struct utimbuf sourceTime; sourceTime.actime = sourceTime.modtime = m_hookFileInfo.lastModified().toTime_t(); utime(fileName.toUtf8().constData(), &sourceTime); return true; } else { QFile::remove(fileName); return false; } } void LibAccountsFile::addCreatorMark() { QString comment = QString("this file is auto-generated by %1; do not modify"). arg(QCoreApplication::applicationName()); appendChild(createComment(comment)); } bool LibAccountsFile::createdByUs() const { QString creatorMark = QCoreApplication::applicationName() + ";"; for (QDomNode n = firstChild(); !n.isNull(); n = n.nextSibling()) { if (n.isComment() && n.nodeValue().contains(creatorMark)) { return true; } } return false; } static void removeStaleAccounts(Accounts::Manager *manager, const QString &providerName) { Q_FOREACH(Accounts::AccountId id, manager->accountList()) { Accounts::Account *account = manager->account(id); if (account->providerName() == providerName) { account->remove(); account->syncAndBlock(); } } } static void removeStaleFiles(Accounts::Manager *manager, const QStringList &fileTypes, const QString &localShare, const QDir &hooksDirIn) { /* Walk through all of * ~/.local/share/accounts/{providers,services,service-types,applications}/ * and remove files which are no longer present in hooksDirIn. */ Q_FOREACH(const QString &fileType, fileTypes) { QDir dir(QString("%1/accounts/%2s").arg(localShare).arg(fileType)); dir.setFilter(QDir::Files | QDir::Readable); QStringList fileTypeFilter; fileTypeFilter << "*." + fileType; dir.setNameFilters(fileTypeFilter); Q_FOREACH(const QFileInfo &fileInfo, dir.entryInfoList()) { LibAccountsFile file(fileInfo.filePath()); /* If this file was not created by our hook let's ignore it. */ if (!file.createdByUs()) continue; QString profile = file.profile(); /* Check that the hook file is still there; if it isn't, then it * means that the click package was removed, and we must remove our * copy as well. */ QString hookFileName = stripVersion(profile) + "_*." + fileType; QStringList nameFilters = QStringList() << hookFileName; if (!hooksDirIn.entryList(nameFilters).isEmpty()) continue; QFile::remove(fileInfo.filePath()); /* If this is a provider, we must also remove any accounts * associated with it */ if (fileType == QStringLiteral("provider")) { removeStaleAccounts(manager, fileInfo.completeBaseName()); } } } } int main(int argc, char **argv) { QCoreApplication app(argc, argv); Accounts::Manager::Options managerOptions; if (qgetenv("DBUS_SESSION_BUS_ADDRESS").isEmpty()) { managerOptions |= Accounts::Manager::DisableNotifications; } Accounts::Manager *manager = new Accounts::Manager(managerOptions); /* Go through the hook files in ~/.local/share/online-accounts-hooks/ and * check if they have already been processed into a file under * ~/.local/share/accounts/{providers,services,service-types,applications}/; * if not, open the hook file, write the APP_ID somewhere in it, and * save the result in the location where libaccounts expects to find it. */ QStringList fileTypes; fileTypes << QStringLiteral("provider") << QStringLiteral("service") << QStringLiteral("service-type") << QStringLiteral("application"); // This is ~/.local/share/ const QString localShare = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation); QDir hooksDirIn(localShare + "/" HOOK_FILES_SUBDIR); removeStaleFiles(manager, fileTypes, localShare, hooksDirIn); Q_FOREACH(const QFileInfo &fileInfo, hooksDirIn.entryInfoList()) { const QString fileType = fileInfo.suffix(); // Filter out the files which we don't support if (!fileTypes.contains(fileType)) continue; // Our click hook sets the base name to the APP_ID QString appId = fileInfo.completeBaseName(); /* When publishing this file for libaccounts, we want to strip * the version number out. */ QString shortAppId = stripVersion(appId); /* When building the destination file name, use the file suffix with an * "s" appended: remember that libaccounts uses * ~/.local/share/accounts/{providers,services,service-types,applications}. * */ QString destination = QString("%1/accounts/%2s/%3.%2"). arg(localShare).arg(fileInfo.suffix()).arg(shortAppId); QFileInfo destinationInfo(destination); /* If the destination is there and up to date, we have nothing to do */ if (destinationInfo.exists() && destinationInfo.lastModified() == fileInfo.lastModified()) { continue; } LibAccountsFile xml = LibAccountsFile(fileInfo); if (!xml.isValid()) continue; xml.addCreatorMark(); xml.checkId(shortAppId); xml.addProfile(appId); xml.addPackageDir(appId); xml.checkIconPath(appId); if (fileType == "application") { xml.addDesktopFile(appId); } else if (fileType == "service") { xml.addServiceType(shortAppId); } xml.writeTo(destination); } /* To ensure that all the installed services are parsed into * libaccounts' DB, we enumerate them now. */ manager->serviceList(); delete manager; return EXIT_SUCCESS; } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/click-hooks/acl-updater.h0000644000015600001650000000215712674252514030316 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2015 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef ACCOUNTS_HOOK_ACL_UPDATER #define ACCOUNTS_HOOK_ACL_UPDATER #include class AclUpdaterPrivate; class AclUpdater { public: AclUpdater(); virtual ~AclUpdater(); bool removeApp(const QString &shortAppId, uint credentialsId); private: Q_DECLARE_PRIVATE(AclUpdater); AclUpdaterPrivate *d_ptr; }; #endif // ACCOUNTS_HOOK_ACL_UPDATER ubuntu-system-settings-online-accounts-0.7+16.04.20160322/click-hooks/accounts.hook.in0000644000015600001650000000014712674252514031047 0ustar pbuserpbgroup00000000000000Pattern: ${home}/.local/share/$${TARGET}/${id}.accounts Exec: $${target.path}/$$TARGET User-Level: yes ubuntu-system-settings-online-accounts-0.7+16.04.20160322/click-hooks/account-application.hook.in0000644000015600001650000000015212674252514033161 0ustar pbuserpbgroup00000000000000Pattern: ${home}/.local/share/$${TARGET}/${id}.application Exec: $${target.path}/$$TARGET User-Level: yes ubuntu-system-settings-online-accounts-0.7+16.04.20160322/click-hooks/click-hooks.pro0000644000015600001650000000013612674252514030667 0ustar pbuserpbgroup00000000000000TEMPLATE = subdirs SUBDIRS = \ online-accounts-hooks.pro \ online-accounts-hooks2.pro ubuntu-system-settings-online-accounts-0.7+16.04.20160322/click-hooks/accounts.cpp0000644000015600001650000005715612674252514030300 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2015 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "acl-updater.h" static QString findPackageDir(const QString &appId) { /* For testing */ QByteArray packageDirEnv = qgetenv("OAH_CLICK_DIR"); if (!packageDirEnv.isEmpty()) { return QString::fromUtf8(packageDirEnv); } QStringList components = appId.split('_'); QByteArray package = components.first().toUtf8(); GError *error = NULL; ClickUser *user = click_user_new_for_user(NULL, NULL, &error); if (Q_UNLIKELY(!user)) { qWarning() << "Unable to read Click database:" << error->message; g_error_free(error); return QString(); } gchar *pkgDir = click_user_get_path(user, package.constData(), &error); if (Q_UNLIKELY(!pkgDir)) { qWarning() << "Unable to get the Click package directory for" << package << ":" << error->message; g_error_free(error); g_object_unref(user); return QString(); } QString ret = QString::fromUtf8(pkgDir); g_object_unref(user); g_free(pkgDir); return ret; } static QString stripVersion(const QString &appId) { QStringList components = appId.split('_'); if (components.count() != 3) return appId; /* Click packages have a profile of the form * $name_$application_$version * (see https://wiki.ubuntu.com/SecurityTeam/Specifications/ApplicationConfinement/Manifest#Click) * * So we just need to strip out the last part. */ components.removeLast(); return components.join('_'); } class ManifestFile { public: ManifestFile(const QFileInfo &hookFileInfo, const QString &appId, const QString &shortAppId); bool writeFiles(const QDir &accountsDir); bool writeServiceFile(const QDir &accountsDir, const QString &id, const QString &provider, const QJsonObject &json); bool writePlugins(const QDir &accountsDir); bool writeProviderFile(const QDir &accountsDir, const QString &id, const QJsonObject &json); QDomDocument createDocument() const; QDomElement createGroup(QDomDocument &doc, const QString &name); void addTemplate(QDomDocument &doc, const QJsonObject &json); void addSetting(QDomElement &parent, const QString &name, const QString &value, const QString &type = QString()); void addSettings(QDomElement &parent, const QJsonObject &json); void parseManifest(const QJsonObject &mainObject); void checkId(const QString &shortAppId); void addProfile(QDomDocument &doc); void addPackageDir(QDomDocument &doc); void addTranslations(QDomDocument &doc); QString profile() const; void addDesktopFile(QDomDocument &doc); bool writeXmlFile(const QDomDocument &doc, const QString &fileName) const; bool isValid() const { return m_isValid; } private: QFileInfo m_hookFileInfo; QString m_packageDir; QJsonArray m_services; QJsonObject m_plugin; QString m_appId; QString m_shortAppId; QString m_trDomain; bool m_isValid; }; ManifestFile::ManifestFile(const QFileInfo &hookFileInfo, const QString &appId, const QString &shortAppId): m_hookFileInfo(hookFileInfo), m_appId(appId), m_shortAppId(shortAppId), m_isValid(false) { QFile file(hookFileInfo.filePath()); if (file.open(QIODevice::ReadOnly)) { QJsonDocument doc = QJsonDocument::fromJson(file.readAll()); QJsonObject mainObject = doc.object(); file.close(); m_services = mainObject.value("services").toArray(); m_trDomain = mainObject.value("translations").toString(); m_plugin = mainObject.value("plugin").toObject(); m_isValid = !m_services.isEmpty() || !m_plugin.isEmpty(); m_packageDir = findPackageDir(appId); } } bool ManifestFile::writeFiles(const QDir &accountsDir) { bool ok = true; QDomDocument doc = createDocument(); QDomElement root = doc.createElement(QStringLiteral("application")); root.setAttribute(QStringLiteral("id"), m_shortAppId); doc.appendChild(root); addProfile(doc); addPackageDir(doc); addDesktopFile(doc); addTranslations(doc); QDomElement servicesElem = doc.createElement(QStringLiteral("services")); Q_FOREACH(const QJsonValue &v, m_services) { QJsonObject o = v.toObject(); QString provider = o.value("provider").toString(); QString id = QString("%1_%2").arg(m_shortAppId).arg(provider); QString description = o.value("description").toString(); if (description.isEmpty()) description = "."; QDomElement serviceElem = doc.createElement(QStringLiteral("service")); serviceElem.setAttribute(QStringLiteral("id"), id); QDomElement elem = doc.createElement(QStringLiteral("description")); elem.appendChild(doc.createTextNode(description)); serviceElem.appendChild(elem); servicesElem.appendChild(serviceElem); if (!writeServiceFile(accountsDir, id, provider, o)) { qWarning() << "Writing service file failed" << id; ok = false; break; } } root.appendChild(servicesElem); if (!writePlugins(accountsDir)) { ok = false; } if (ok && !m_services.isEmpty()) { QString applicationFile = QString("applications/%1.application").arg(m_shortAppId); if (!writeXmlFile(doc, accountsDir.filePath(applicationFile))) { qWarning() << "Writing application file failed" << applicationFile; ok = false; } } return ok; } bool ManifestFile::writeServiceFile(const QDir &accountsDir, const QString &id, const QString &provider, const QJsonObject &json) { QDomDocument doc = createDocument(); QDomElement root = doc.createElement(QStringLiteral("service")); root.setAttribute(QStringLiteral("id"), id); doc.appendChild(root); // type QDomElement elem = doc.createElement(QStringLiteral("type")); elem.appendChild(doc.createTextNode(m_shortAppId)); root.appendChild(elem); // provider elem = doc.createElement(QStringLiteral("provider")); elem.appendChild(doc.createTextNode(provider)); root.appendChild(elem); // name QString name = json.value(QStringLiteral("name")).toString(); if (name.isEmpty()) { name = "."; } elem = doc.createElement(QStringLiteral("name")); elem.appendChild(doc.createTextNode(name)); root.appendChild(elem); addProfile(doc); addTranslations(doc); addTemplate(doc, json); return writeXmlFile(doc, accountsDir.filePath(QString("services/%1.service").arg(id))); } bool ManifestFile::writePlugins(const QDir &accountsDir) { if (m_plugin.isEmpty()) return true; QString qmlPlugin = m_plugin.value("qml").toString(); if (Q_UNLIKELY(qmlPlugin.isEmpty())) { qWarning() << "Plugin is missing 'qml' key"; return false; } if (!QDir::isAbsolutePath(qmlPlugin)) { qmlPlugin = m_packageDir + "/" + qmlPlugin; } if (!QFile::exists(qmlPlugin)) { qWarning() << "Can't find QML files in" << qmlPlugin; return false; } QString qmlDestination = QString("qml-plugins/%1").arg(m_shortAppId); QFile::remove(accountsDir.filePath(qmlDestination)); if (!QFile::link(qmlPlugin, accountsDir.filePath(qmlDestination))) { qWarning() << "Cannot symlink QML files" << qmlPlugin; return false; } if (!writeProviderFile(accountsDir, m_shortAppId, m_plugin)) { qWarning() << "Writing provider file failed" << m_shortAppId; return false; } return true; } bool ManifestFile::writeProviderFile(const QDir &accountsDir, const QString &id, const QJsonObject &json) { QDomDocument doc = createDocument(); QDomElement root = doc.createElement(QStringLiteral("provider")); root.setAttribute(QStringLiteral("id"), id); doc.appendChild(root); // name QString name = json.value(QStringLiteral("name")).toString(); if (Q_UNLIKELY(name.isEmpty())) { qWarning() << "Provider name is required"; return false; } QDomElement elem = doc.createElement(QStringLiteral("name")); elem.appendChild(doc.createTextNode(name)); root.appendChild(elem); // icon QString icon = json.value(QStringLiteral("icon")).toString(); if (Q_UNLIKELY(icon.isEmpty())) { qWarning() << "Provider icon is required"; return false; } if (!QDir::isAbsolutePath(icon)) { QString test = m_packageDir + "/" + icon; if (QFile::exists(test)) { icon = test; } } elem = doc.createElement(QStringLiteral("icon")); elem.appendChild(doc.createTextNode(icon)); root.appendChild(elem); addProfile(doc); addTranslations(doc); addTemplate(doc, json); addPackageDir(doc); return writeXmlFile(doc, accountsDir.filePath(QString("providers/%1.provider").arg(id))); } QDomDocument ManifestFile::createDocument() const { QDomDocument doc; doc.appendChild(doc.createProcessingInstruction("xml", "version=\"1.0\" encoding=\"UTF-8\"")); QString comment = QString("this file is auto-generated by %1; do not modify"). arg(QCoreApplication::applicationName()); doc.appendChild(doc.createComment(comment)); return doc; } QDomElement ManifestFile::createGroup(QDomDocument &doc, const QString &name) { QDomElement group = doc.createElement(QStringLiteral("group")); group.setAttribute(QStringLiteral("name"), name); return group; } void ManifestFile::addTemplate(QDomDocument &doc, const QJsonObject &json) { QDomElement root = doc.documentElement(); QDomElement templateElem = doc.createElement(QStringLiteral("template")); // auth QDomElement authElem = createGroup(doc, QStringLiteral("auth")); QJsonObject auth = json.value(QStringLiteral("auth")).toObject(); for (QJsonObject::const_iterator i = auth.begin(); i != auth.end(); i++) { QStringList authParts = i.key().split("/"); if (authParts.count() != 2) { qWarning() << "auth key must contain exactly one '/'!"; continue; } QString method = authParts[0]; QString mechanism = authParts[1]; addSetting(authElem, QStringLiteral("method"), method); addSetting(authElem, QStringLiteral("mechanism"), mechanism); QDomElement methodGroup = createGroup(doc, method); authElem.appendChild(methodGroup); QDomElement mechanismGroup = createGroup(doc, mechanism); addSettings(mechanismGroup, i.value().toObject()); methodGroup.appendChild(mechanismGroup); } if (!auth.isEmpty()) templateElem.appendChild(authElem); // settings QJsonObject settings = json.value(QStringLiteral("settings")).toObject(); addSettings(templateElem, settings); if (templateElem.hasChildNodes()) { root.appendChild(templateElem); } } void ManifestFile::addSetting(QDomElement &parent, const QString &name, const QString &value, const QString &type) { QDomDocument doc = parent.ownerDocument(); QDomElement setting = doc.createElement(QStringLiteral("setting")); setting.setAttribute(QStringLiteral("name"), name); if (!type.isEmpty()) { setting.setAttribute(QStringLiteral("type"), type); } setting.appendChild(doc.createTextNode(value)); parent.appendChild(setting); } void ManifestFile::addSettings(QDomElement &parent, const QJsonObject &json) { QDomDocument doc = parent.ownerDocument(); for (QJsonObject::const_iterator i = json.begin(); i != json.end(); i++) { QDomElement elem = parent; QStringList parts = i.key().split('/'); QString key = parts.takeLast(); Q_FOREACH(const QString &groupName, parts) { QDomElement subGroup = createGroup(doc, groupName); elem.appendChild(subGroup); elem = subGroup; } QString value; QString type; switch (i.value().type()) { case QJsonValue::Bool: type = "b"; value = i.value().toBool() ? "true" : "false"; break; case QJsonValue::String: value = i.value().toString(); break; case QJsonValue::Array: { QJsonArray array = i.value().toArray(); QStringList values; Q_FOREACH(const QJsonValue &v, array) { if (Q_UNLIKELY(v.type() != QJsonValue::String)) { qWarning() << "Only arrays of strings are supported!"; continue; } values.append(QString("'%1'").arg(v.toString())); } type = "as"; value = QString("[%1]").arg(values.join(',')); } break; case QJsonValue::Object: { QDomElement subGroup = createGroup(doc, key); QJsonObject object = i.value().toObject(); addSettings(subGroup, object); elem.appendChild(subGroup); } break; default: qWarning() << "Unsupported setting type:" << i.value(); } if (value.isEmpty()) continue; addSetting(elem, key, value, type); } } void ManifestFile::addProfile(QDomDocument &doc) { QDomElement root = doc.documentElement(); QDomElement elem = doc.createElement(QStringLiteral("profile")); elem.appendChild(doc.createTextNode(m_appId)); root.appendChild(elem); } void ManifestFile::addTranslations(QDomDocument &doc) { if (m_trDomain.isEmpty()) return; QDomElement root = doc.documentElement(); QDomElement elem = doc.createElement(QStringLiteral("translations")); elem.appendChild(doc.createTextNode(m_trDomain)); root.appendChild(elem); } void ManifestFile::addPackageDir(QDomDocument &doc) { if (Q_UNLIKELY(m_packageDir.isEmpty())) return; QDomElement root = doc.documentElement(); QDomElement elem = doc.createElement(QStringLiteral("package-dir")); elem.appendChild(doc.createTextNode(m_packageDir)); root.appendChild(elem); } void ManifestFile::addDesktopFile(QDomDocument &doc) { QDomElement root = doc.documentElement(); QDomElement elem = doc.createElement(QStringLiteral("desktop-entry")); elem.appendChild(doc.createTextNode(m_appId)); root.appendChild(elem); } bool ManifestFile::writeXmlFile(const QDomDocument &doc, const QString &fileName) const { QFile file(fileName); if (!file.open(QIODevice::WriteOnly | QIODevice::Text)) return false; bool ok = (file.write(doc.toByteArray(2)) > 0); file.close(); if (ok) { return true; } else { QFile::remove(fileName); return false; } } class LibAccountsFile: public QDomDocument { public: LibAccountsFile(const QFileInfo &fileInfo); QString profile() const; bool createdByUs() const; bool isValid() const { return m_isValid; } private: QFileInfo m_fileInfo; bool m_isValid; }; LibAccountsFile::LibAccountsFile(const QFileInfo &fileInfo): QDomDocument(), m_fileInfo(fileInfo), m_isValid(false) { QFile file(fileInfo.filePath()); if (file.open(QIODevice::ReadOnly)) { if (setContent(&file)) { m_isValid = true; } file.close(); } } QString LibAccountsFile::profile() const { QDomElement root = documentElement(); return root.firstChildElement("profile").text(); } bool LibAccountsFile::createdByUs() const { QString creatorMark = QCoreApplication::applicationName() + ";"; for (QDomNode n = firstChild(); !n.isNull(); n = n.nextSibling()) { if (n.isComment() && n.nodeValue().contains(creatorMark)) { return true; } } return false; } static void disableService(Accounts::Manager *manager, const QString &serviceId, const QString &profile) { Accounts::Service service = manager->service(serviceId); if (Q_UNLIKELY(!service.isValid())) return; AclUpdater aclUpdater; Q_FOREACH(Accounts::AccountId accountId, manager->accountListEnabled()) { Accounts::Account *account = manager->account(accountId); if (Q_UNLIKELY(!account)) continue; if (account->providerName() != service.provider()) continue; uint credentialsId = account->credentialsId(); account->selectService(service); if (account->isEnabled()) { account->setEnabled(false); account->sync(); aclUpdater.removeApp(stripVersion(profile), credentialsId); } } } static void removeStaleAccounts(Accounts::Manager *manager, const QString &providerName) { Q_FOREACH(Accounts::AccountId id, manager->accountList()) { Accounts::Account *account = manager->account(id); if (account->providerName() == providerName) { account->remove(); account->syncAndBlock(); } } } static void removeStaleFiles(Accounts::Manager *manager, const QStringList &fileTypes, const QDir &accountsDir, const QDir &hooksDirIn) { /* Walk through all of * ~/.local/share/accounts/{providers,services,applications}/ * and remove files which are no longer present in hooksDirIn. */ Q_FOREACH(const QString &fileType, fileTypes) { QDir dir(accountsDir.filePath(fileType + "s")); dir.setFilter(QDir::Files | QDir::Readable); QStringList fileTypeFilter; fileTypeFilter << "*." + fileType; dir.setNameFilters(fileTypeFilter); Q_FOREACH(const QFileInfo &fileInfo, dir.entryInfoList()) { LibAccountsFile file(fileInfo.filePath()); /* If this file was not created by our hook let's ignore it. */ if (!file.createdByUs()) continue; QString profile = file.profile(); /* Check that the hook file is still there; if it isn't, then it * means that the click package was removed, and we must remove our * copy as well. */ QString hookFileName = stripVersion(profile) + "_*.accounts"; QStringList nameFilters = QStringList() << hookFileName; if (!hooksDirIn.entryList(nameFilters).isEmpty()) continue; if (fileType == "service") { /* Make sure services get disabled. See also: * https://bugs.launchpad.net/bugs/1417261 */ disableService(manager, fileInfo.completeBaseName(), profile); } else if (fileType == "provider") { /* If this is a provider, we must also remove any accounts * associated with it */ removeStaleAccounts(manager, fileInfo.completeBaseName()); } QFile::remove(fileInfo.filePath()); } } } static void removeStaleTimestampFiles(const QDir &hooksDirIn) { Q_FOREACH(const QFileInfo &fileInfo, hooksDirIn.entryInfoList()) { if (fileInfo.suffix() != "processed") continue; /* Find the corresponding hook file */ QFileInfo hookInfo(fileInfo.absolutePath() + "/" + fileInfo.completeBaseName()); if (!hookInfo.exists()) { QFile::remove(fileInfo.filePath()); } } } int main(int argc, char **argv) { QCoreApplication app(argc, argv); Accounts::Manager::Options managerOptions; if (qgetenv("DBUS_SESSION_BUS_ADDRESS").isEmpty()) { managerOptions |= Accounts::Manager::DisableNotifications; } Accounts::Manager *manager = new Accounts::Manager(managerOptions); /* Go through the hook files in ~/.local/share/online-accounts-hooks2/ and * check if they have already been processed into a file under * ~/.local/share/accounts/{services,applications}/; * if not, open the hook file, write the APP_ID somewhere in it, and * save the result in the location where libaccounts expects to find it. */ QStringList fileTypes; fileTypes << QStringLiteral("service") << QStringLiteral("provider") << QStringLiteral("application"); // This is ~/.local/share/ const QString localShare = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation); QDir hooksDirIn(localShare + "/" HOOK_FILES_SUBDIR); /* Make sure the directories exist */ QDir accountsDir(localShare + "/accounts"); accountsDir.mkpath("applications"); accountsDir.mkpath("services"); accountsDir.mkpath("providers"); accountsDir.mkpath("qml-plugins"); removeStaleFiles(manager, fileTypes, accountsDir, hooksDirIn); removeStaleTimestampFiles(hooksDirIn); Q_FOREACH(const QFileInfo &fileInfo, hooksDirIn.entryInfoList()) { if (fileInfo.suffix() != "accounts") continue; // Our click hook sets the base name to the APP_ID QString appId = fileInfo.completeBaseName(); /* When publishing this file for libaccounts, we want to strip * the version number out. */ QString shortAppId = stripVersion(appId); /* We create an empty file whenever we succesfully process a hook file. * The name of this file is the same as the hook file, with the * .processed suffix appended. */ QFileInfo processedInfo(fileInfo.filePath() + ".processed"); if (processedInfo.exists() && processedInfo.lastModified() == fileInfo.lastModified()) { continue; } ManifestFile manifest = ManifestFile(fileInfo, appId, shortAppId); if (!manifest.isValid()) { qWarning() << "Invalid file" << fileInfo.filePath(); continue; } if (manifest.writeFiles(accountsDir)) { QFile file(processedInfo.filePath()); if (file.open(QIODevice::WriteOnly | QIODevice::Text)) { file.close(); struct utimbuf sourceTime; sourceTime.actime = sourceTime.modtime = fileInfo.lastModified().toTime_t(); utime(processedInfo.filePath().toUtf8().constData(), &sourceTime); } else { qWarning() << "Could not create timestamp file" << processedInfo.filePath(); } } } /* To ensure that all the installed services are parsed into * libaccounts' DB, we enumerate them now. */ manager->serviceList(); delete manager; return EXIT_SUCCESS; } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/click-hooks/acl-updater.cpp0000644000015600001650000000627012674252514030651 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2015 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of online-accounts-ui * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "acl-updater.h" #include #include #include #include #include #include class AclUpdaterPrivate: public QObject { Q_OBJECT public: AclUpdaterPrivate(); public Q_SLOTS: void onInfo(const SignOn::IdentityInfo &info); void onStored(const quint32 id); void onError(const SignOn::Error &error); private: friend class AclUpdater; QEventLoop m_loop; }; AclUpdaterPrivate::AclUpdaterPrivate(): QObject() { } void AclUpdaterPrivate::onInfo(const SignOn::IdentityInfo &info) { SignOn::Identity *identity = qobject_cast(sender()); QString shortAppId = identity->property("appToBeRemoved").toString(); QStringList acl; Q_FOREACH(const QString &token, info.accessControlList()) { if (!token.startsWith(shortAppId)) { acl.append(token); } } if (acl != info.accessControlList()) { SignOn::IdentityInfo newInfo(info); newInfo.setAccessControlList(acl); identity->storeCredentials(newInfo); } else { qDebug() << shortAppId << "was not in ACL of" << info.id(); m_loop.exit(0); } } void AclUpdaterPrivate::onStored(const quint32 id) { Q_UNUSED(id); m_loop.exit(0); } void AclUpdaterPrivate::onError(const SignOn::Error &err) { qWarning() << "Error occurred updating ACL" << err.message(); m_loop.exit(1); } AclUpdater::AclUpdater(): d_ptr(new AclUpdaterPrivate) { } AclUpdater::~AclUpdater() { delete d_ptr; } bool AclUpdater::removeApp(const QString &shortAppId, uint credentialsId) { Q_D(AclUpdater); if (credentialsId == 0 || !shortAppId.contains('_')) return false; SignOn::Identity *identity = SignOn::Identity::existingIdentity(credentialsId, d); if (Q_UNLIKELY(!identity)) return false; identity->setProperty("appToBeRemoved", shortAppId); QObject::connect(identity, SIGNAL(info(const SignOn::IdentityInfo&)), d, SLOT(onInfo(const SignOn::IdentityInfo&))); QObject::connect(identity, SIGNAL(credentialsStored(const quint32)), d, SLOT(onStored(const quint32))); QObject::connect(identity, SIGNAL(error(const SignOn::Error &)), d, SLOT(onError(const SignOn::Error &))); identity->queryInfo(); bool ok = (d->m_loop.exec() == 0); delete identity; return ok; } #include "acl-updater.moc" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/click-hooks/account-service.hook.in0000644000015600001650000000014612674252514032321 0ustar pbuserpbgroup00000000000000Pattern: ${home}/.local/share/$${TARGET}/${id}.service Exec: $${target.path}/$$TARGET User-Level: yes ubuntu-system-settings-online-accounts-0.7+16.04.20160322/click-hooks/account-qml-plugin.hook0000644000015600001650000000011712674252514032337 0ustar pbuserpbgroup00000000000000Pattern: ${home}/.local/share/accounts/qml-plugins/${short-id} User-Level: yes ubuntu-system-settings-online-accounts-0.7+16.04.20160322/click-hooks/account-provider.hook.in0000644000015600001650000000014712674252514032514 0ustar pbuserpbgroup00000000000000Pattern: ${home}/.local/share/$${TARGET}/${id}.provider Exec: $${target.path}/$$TARGET User-Level: yes ubuntu-system-settings-online-accounts-0.7+16.04.20160322/INSTALL0000644000015600001650000000003612674252514024561 0ustar pbuserpbgroup00000000000000qmake make sudo make install ubuntu-system-settings-online-accounts-0.7+16.04.20160322/system-settings-plugin/0000755000015600001650000000000012674252771030214 5ustar pbuserpbgroup00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/system-settings-plugin/NewAccountPage.qml0000644000015600001650000000220112674252514033560 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013-2015 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ import QtQuick 2.0 import Ubuntu.Components 1.3 Page { title: i18n.dtr(domain, "Add account") Flickable { anchors.fill: parent contentHeight: contentItem.childrenRect.height boundsBehavior: Flickable.StopAtBounds ProviderPluginList { onCreationFinished: { if (created) { pageStack.pop() } } } } } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/system-settings-plugin/plugin.h0000644000015600001650000000241312674252514031656 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2015 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #ifndef ONLINE_ACCOUNTS_SYSTEM_SETTINGS_PLUGIN_H #define ONLINE_ACCOUNTS_SYSTEM_SETTINGS_PLUGIN_H #include #include class Plugin: public QObject, public SystemSettings::PluginInterface2 { Q_OBJECT Q_PLUGIN_METADATA(IID "com.ubuntu.SystemSettings.PluginInterface/2.0") Q_INTERFACES(SystemSettings::PluginInterface2) public: SystemSettings::ItemBase *createItem(const QVariantMap &staticData, QObject *parent = 0); }; #endif // ONLINE_ACCOUNTS_SYSTEM_SETTINGS_PLUGIN_H ubuntu-system-settings-online-accounts-0.7+16.04.20160322/system-settings-plugin/AddAccountLabel.qml0000644000015600001650000000205712674252514033673 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013-2015 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ import QtQuick 2.0 import Ubuntu.Components 1.3 import Ubuntu.Components.ListItems 1.3 as ListItem ListItem.Caption { anchors.left: parent.left anchors.right: parent.right anchors.margins: units.gu(2) text: i18n.dtr(domain, "Storing account details here lets apps use the accounts without you having to sign in for each app.") } ././@LongLink0000000000000000000000000000014700000000000011217 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/system-settings-plugin/NormalStartupPage.qmlubuntu-system-settings-online-accounts-0.7+16.04.20160322/system-settings-plugin/NormalStartupPage.q0000644000015600001650000000243712674252514034007 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ import QtQuick 2.0 import Ubuntu.OnlineAccounts 0.1 Item { id: root property Item flickable: accountsPage.visible ? accountsPage : noAccountsPage AccountServiceModel { id: accountsModel service: "global" includeDisabled: true } AccountsPage { id: accountsPage anchors.fill: parent accountsModel: accountsModel visible: accountsModel.count > 0 } NoAccountsPage { id: noAccountsPage anchors.fill: parent accountsModel: accountsModel visible: !accountsPage.visible } } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/system-settings-plugin/AccountsPage.qml0000644000015600001650000000362712674252514033306 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013-2015 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ import QtQuick 2.0 import Ubuntu.Components 1.3 import Ubuntu.Components.ListItems 1.3 as ListItem Flickable { id: root property variant accountsModel contentHeight: contentItem.childrenRect.height boundsBehavior: Flickable.StopAtBounds Column { anchors.left: parent.left anchors.right: parent.right ListView { anchors.left: parent.left anchors.right: parent.right interactive: false height: contentHeight model: accountsModel delegate: AccountItem { ListView.delayRemove: running text: providerName subText: displayName accountHandle: model.accountHandle globalServiceHandle: accountServiceHandle } } ListItem.SingleControl { control: Button { text: i18n.dtr(domain, "Add account…") width: parent.width - units.gu(4) onClicked: pageStack.push(newAccountPage) } showDivider: false } AddAccountLabel {} } Component { id: newAccountPage NewAccountPage {} } } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/system-settings-plugin/ProvidersList.qml0000644000015600001650000000651512674252514033542 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013-2015 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ import QtQuick 2.0 import Ubuntu.Components 1.3 import Ubuntu.Components.ListItems 1.3 as ListItem import Ubuntu.OnlineAccounts 0.1 import Ubuntu.OnlineAccounts.Plugin 1.0 Column { id: root signal providerClicked(string providerId) anchors.left: parent.left anchors.right: parent.right ProviderModel { id: providerModel } ListModel { id: filteredProviderModel function populate() { var length = providerModel.count var usefulProviders = ApplicationManager.usefulProviders() for (var i = 0; i < length; i++) { var providerId = providerModel.get(i, "providerId") if (usefulProviders.indexOf(providerId) < 0) continue var provider = { "providerId": providerId, "displayName": providerModel.get(i, "displayName"), "iconName": providerModel.get(i, "iconName"), "isSingleAccount": providerModel.get(i, "isSingleAccount"), "translations": providerModel.get(i, "translations") } filteredProviderModel.append(provider) } } } Repeater { id: repeater model: filteredProviderModel delegate: ListItem.Standard { id: provider text: displayName enabled: accountModel === null || accountModel.count === 0 iconSource: model.iconName.indexOf("/") === 0 ? model.iconName : "image://theme/" + model.iconName progression: false onTriggered: { activated = true; root.providerClicked(providerId); } property var accountModel: isSingleAccount ? createAccountModel(providerId) : null property bool activated: false ActivityIndicator { anchors.verticalCenter: parent.verticalCenter anchors.right: parent.right anchors.rightMargin: units.gu(2) running: provider.activated } function createAccountModel(providerId) { return accountModelComponent.createObject(this, { "provider": providerId }) } } } Component { id: accountModelComponent AccountServiceModel { includeDisabled: true } } Component.onCompleted: filteredProviderModel.populate() function clearPressedButtons() { for (var i = 0; i < repeater.count; i++) { repeater.itemAt(i).activated = false } } } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/system-settings-plugin/plugin.cpp0000644000015600001650000000655412674252514032223 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2015 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ #include "plugin.h" #include #include #include #include #include #include #include #include using namespace SystemSettings; class Item: public ItemBase { Q_OBJECT public: Item(const QVariantMap &staticData, QObject *parent = 0); ~Item(); private: void computeKeywords(); }; Item::Item(const QVariantMap &staticData, QObject *parent): ItemBase(staticData, parent) { computeKeywords(); } Item::~Item() { } static QStringList translations(const QString &text, const QString &domain) { /* Return a list of keywords based on a translatable name: * - the untranslated text (lowercase, split into words) * - the translated text (lowercase, split into words) */ QStringList keys; keys = text.toLower().split(" ", QString::SkipEmptyParts); if (!domain.isEmpty()) { QByteArray baText = text.toUtf8(); QByteArray baDomain = domain.toUtf8(); QString translated = QString::fromUtf8(dgettext(baDomain.constData(), baText.constData())); if (translated != text) { keys.append(translated.toLower().split(" ", QString::SkipEmptyParts)); } } return keys; } void Item::computeKeywords() { Accounts::Manager *manager = new Accounts::Manager; QStringList keywords; /* List available providers, and add their names to the search keywords */ Q_FOREACH(const Accounts::Provider &provider, manager->providerList()) { keywords.append(provider.name().toLower()); keywords.append(translations(provider.displayName(), provider.trCatalog())); } /* Same for services */ Q_FOREACH(const Accounts::Service &service, manager->serviceList()) { keywords.append(service.name().toLower()); keywords.append(translations(service.displayName(), service.trCatalog())); } /* Also add the account display names */ Q_FOREACH(Accounts::AccountId id, manager->accountList()) { Accounts::Account *account = manager->account(id); if (Q_UNLIKELY(!account)) continue; QString name = account->displayName().toLower(); if (!name.isEmpty()) { keywords.append(name); } } delete manager; setKeywords(keywords); } ItemBase *Plugin::createItem(const QVariantMap &staticData, QObject *parent) { return new Item(staticData, parent); } #include "plugin.moc" ././@LongLink0000000000000000000000000000015200000000000011213 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/system-settings-plugin/online-accounts.settingsubuntu-system-settings-online-accounts-0.7+16.04.20160322/system-settings-plugin/online-accounts.set0000644000015600001650000000106112674252514034023 0ustar pbuserpbgroup00000000000000{ "name": "Accounts", "icon": "/usr/share/ubuntu/settings/system/icons/settings-accounts.svg", "translations": "ubuntu-system-settings-online-accounts", "category": "personal", "priority": 3, "keywords": [ "accounts", "online", "login", "services", "social", "feeds", "access", "authorize", "revoke", "web" ], "has-dynamic-keywords": true, "has-dynamic-visibility": false, "plugin": "online-accounts", "page-component": "MainPage.qml" } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/system-settings-plugin/NoAccountsPage.qml0000644000015600001650000000274512674252514033603 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013-2015 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ import QtQuick 2.0 import Ubuntu.Components 1.3 import Ubuntu.Components.ListItems 1.3 as ListItem Flickable { id: root property variant accountsModel contentHeight: contentItem.childrenRect.height boundsBehavior: Flickable.StopAtBounds Column { anchors.left: parent.left anchors.right: parent.right ListItem.Base { Label { text: i18n.dtr(domain, "No accounts") color: theme.palette.normal.backgroundText fontSize: "large" anchors.centerIn: parent } showDivider: false } AddAccountLabel {} ListItem.Standard { text: i18n.dtr(domain, "Add account:") } ProviderPluginList {} } } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/system-settings-plugin/AccountItem.qml0000644000015600001650000000352412674252514033141 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013-2015 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ import QtQuick 2.0 import Ubuntu.Components 1.3 import Ubuntu.Components.ListItems 1.3 as ListItem import Ubuntu.OnlineAccounts 0.1 ListItem.Subtitled { property variant accountHandle property variant globalServiceHandle property variant __editPage: null property bool running: false iconSource: globalService.provider.iconName.indexOf("/") === 0 ? globalService.provider.iconName : "image://theme/" + globalService.provider.iconName progression: true opacity: globalService.enabled ? 1 : 0.5 resources: [ AccountService { id: globalService objectHandle: globalServiceHandle }, Component { id: accountEditPage AccountEditPage {} } ] onClicked: { __editPage = accountEditPage.createObject(null, { "accountHandle": accountHandle }) __editPage.finished.connect(__onEditFinished) pageStack.push(__editPage) running = true; } function __onEditFinished() { __editPage.destroy(1000) __editPage = null pageStack.pop() running = false } } ././@LongLink0000000000000000000000000000014700000000000011217 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/system-settings-plugin/settings-accounts.svgubuntu-system-settings-online-accounts-0.7+16.04.20160322/system-settings-plugin/settings-accounts.s0000644000015600001650000001764712674252514034067 0ustar pbuserpbgroup00000000000000 image/svg+xml ubuntu-system-settings-online-accounts-0.7+16.04.20160322/system-settings-plugin/MainPage.qml0000644000015600001650000000303312674252514032402 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013-2015 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ import QtQuick 2.0 import SystemSettings 1.0 import Ubuntu.Components 1.3 import Ubuntu.Components.ListItems 1.3 as ListItem import Ubuntu.OnlineAccounts 0.1 ItemPage { id: root property string domain: "ubuntu-system-settings-online-accounts" objectName: "accountsPage" title: i18n.dtr(domain, "Accounts") flickable: accountsPage.visible ? accountsPage : noAccountsPage AccountServiceModel { id: accountsModel service: "global" includeDisabled: true } AccountsPage { id: accountsPage anchors.fill: parent accountsModel: accountsModel visible: accountsModel.count > 0 } NoAccountsPage { id: noAccountsPage anchors.fill: parent accountsModel: accountsModel visible: !accountsPage.visible } } ././@LongLink0000000000000000000000000000015000000000000011211 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/system-settings-plugin/ProviderPluginList.qmlubuntu-system-settings-online-accounts-0.7+16.04.20160322/system-settings-plugin/ProviderPluginList.0000644000015600001650000000254212674252514034020 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013-2015 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ import QtQuick 2.0 import Ubuntu.Components 1.3 import Ubuntu.OnlineAccounts.Client 0.1 ProvidersList { id: root property bool __processing: false signal creationFinished(bool created) enabled: !__processing Setup { id: setup applicationId: "system-settings" onFinished: { __processing = false clearPressedButtons() creationFinished("accountId" in reply && reply.accountId !== 0) } } onProviderClicked: { if (!__processing) { __processing = true setup.providerId = providerId setup.exec() } } } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/system-settings-plugin/AccountEditPage.qml0000644000015600001650000000242212674252514033721 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013-2015 Canonical Ltd. * * Contact: Alberto Mardegan * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU General Public License version 3, as published * by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranties of * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program. If not, see . */ import QtQuick 2.0 import Ubuntu.Components 1.3 import Ubuntu.OnlineAccounts 0.1 import Ubuntu.OnlineAccounts.Plugin 1.0 Page { id: root property variant accountHandle signal finished title: account.provider.displayName flickable: flick Account { id: account objectHandle: accountHandle } Flickable { id: flick anchors.fill: parent contentHeight: options.height Options { id: options onFinished: { root.finished() } } } } ././@LongLink0000000000000000000000000000015400000000000011215 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/system-settings-plugin/system-settings-plugin.proubuntu-system-settings-online-accounts-0.7+16.04.20160322/system-settings-plugin/system-settings-plu0000644000015600001650000000163112674252514034113 0ustar pbuserpbgroup00000000000000include(../common-project-config.pri) include($${TOP_SRC_DIR}/common-vars.pri) TEMPLATE=lib TARGET = online-accounts CONFIG += \ link_pkgconfig \ plugin \ qt QT += \ core \ qml PKGCONFIG += \ SystemSettings \ accounts-qt5 SOURCES += \ plugin.cpp HEADERS += \ plugin.h QML_SOURCES = \ AccountEditPage.qml \ AccountItem.qml \ AccountsPage.qml \ AddAccountLabel.qml \ MainPage.qml \ NewAccountPage.qml \ NoAccountsPage.qml \ NormalStartupPage.qml \ ProviderPluginList.qml \ ProvidersList.qml settings.files = online-accounts.settings settings.path = $${PLUGIN_MANIFEST_DIR} INSTALLS += settings target.path = $${PLUGIN_MODULE_DIR} INSTALLS += target image.files = settings-accounts.svg image.path = $${PLUGIN_MANIFEST_DIR}/icons INSTALLS += image qml.files = $${QML_SOURCES} qml.path = $${PLUGIN_QML_DIR}/online-accounts INSTALLS += qml ubuntu-system-settings-online-accounts-0.7+16.04.20160322/coverage.pri0000644000015600001650000000406712674252514026047 0ustar pbuserpbgroup00000000000000# Coverage CONFIG(coverage) { OBJECTS_DIR = MOC_DIR = LIBS += -lgcov QMAKE_CXXFLAGS += --coverage QMAKE_LDFLAGS += --coverage QMAKE_EXTRA_TARGETS += coverage cov QMAKE_EXTRA_TARGETS += clean-gcno clean-gcda coverage-html \ generate-coverage-html clean-coverage-html coverage-gcovr \ generate-gcovr generate-coverage-gcovr clean-coverage-gcovr clean-gcno.commands = \ "@echo Removing old coverage instrumentation"; \ "find -name '*.gcno' -print | xargs -r rm" clean-gcda.commands = \ "@echo Removing old coverage results"; \ "find -name '*.gcda' -print | xargs -r rm" coverage-html.depends = clean-gcda check generate-coverage-html generate-coverage-html.commands = \ "@echo Collecting coverage data"; \ "lcov --directory $${TOP_SRC_DIR} --capture --output-file coverage.info --no-checksum --compat-libtool"; \ "lcov --extract coverage.info \"*/online-accounts-service/*.cpp\" --extract coverage.info \"*/online-accounts-ui/*.cpp\" --extract coverage.info \"*/client/OnlineAccountsClient/*.cpp\" --extract coverage.info \"*/click-hooks/*.cpp\" -o coverage.info"; \ "lcov --remove coverage.info \"moc_*.cpp\" --remove coverage.info \"tests/*.cpp\" -o coverage.info"; \ "LANG=C genhtml --prefix $${TOP_SRC_DIR} --output-directory coverage-html --title \"Code Coverage\" --legend --show-details coverage.info" clean-coverage-html.depends = clean-gcda clean-coverage-html.commands = \ "lcov --directory $${TOP_SRC_DIR} -z"; \ "rm -rf coverage.info coverage-html" coverage-gcovr.depends = clean-gcda check generate-coverage-gcovr generate-coverage-gcovr.commands = \ "@echo Generating coverage GCOVR report"; \ "gcovr -x -r $${TOP_SRC_DIR} -o $${TOP_SRC_DIR}/coverage.xml -e \".*/moc_.*\" -e \"tests/.*\" -e \".*\\.h\"" clean-coverage-gcovr.depends = clean-gcda clean-coverage-gcovr.commands = \ "rm -rf $${TOP_SRC_DIR}/coverage.xml" QMAKE_CLEAN += *.gcda *.gcno coverage.info coverage.xml } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/ubuntu-system-settings-online-accounts.pro0000644000015600001650000000105412674252514034054 0ustar pbuserpbgroup00000000000000include(common-vars.pri) include(common-project-config.pri) TEMPLATE = subdirs SUBDIRS = \ po \ online-accounts-service \ online-accounts-ui \ click-hooks \ client \ system-settings-plugin \ plugins \ tests system-settings-plugin.depends = client online-accounts-ui.depends = plugins tests.depends = online-accounts-service online-accounts-ui client plugins include(common-installs-config.pri) DISTNAME = $${PROJECT_NAME}-$${PROJECT_VERSION} dist.commands = "bzr export $${DISTNAME}.tar.bz2" QMAKE_EXTRA_TARGETS += dist ubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/0000755000015600001650000000000012674252771025014 5ustar pbuserpbgroup00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/doc/0000755000015600001650000000000012674252771025561 5ustar pbuserpbgroup00000000000000././@LongLink0000000000000000000000000000015000000000000011211 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/doc/ubuntu-appdev-site-footer.qdocconfubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/doc/ubuntu-appdev-site-footer.qdocc0000644000015600001650000000753012674252514033631 0ustar pbuserpbgroup00000000000000HTML.footer = \ "\n" \ "
\n" \ "\n" \ "\n" \ "\n" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/doc/html/0000755000015600001650000000000012674252771026525 5ustar pbuserpbgroup00000000000000././@LongLink0000000000000000000000000000015400000000000011215 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/doc/online-accounts-client-ubuntu.qdocconfubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/doc/online-accounts-client-ubuntu.q0000644000015600001650000000150012674252514033627 0ustar pbuserpbgroup00000000000000include(online-accounts-client-common.qdocconf) include(ubuntu-appdev-site-header.qdocconf) include(ubuntu-appdev-site-footer.qdocconf) HTML.stylesheets = \ doc/css/reset.css \ doc/css/qtquick.css \ doc/css/base.css \ doc/css/scratch.css HTML.headerstyles = \ "\n" \ "\n" \ "\n" \ "\n" \ "\n" \ "\n" ././@LongLink0000000000000000000000000000015400000000000011215 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/doc/online-accounts-client-common.qdocconfubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/doc/online-accounts-client-common.q0000644000015600001650000000116012674252514033577 0ustar pbuserpbgroup00000000000000#include(compat.qdocconf) project = OnlineAccountsClient QML API description = QML API for invoking the online accounts panel outputdir = html outputformats = HTML headerdirs = ../OnlineAccountsClient sourcedirs = ../OnlineAccountsClient sources.fileextensions = "*.qml *.qdoc *.cpp" exampledirs = ./examples imagedirs = ./images HTML.templatedir = . HTML.nobreadcrumbs = "true" HTML.stylesheets = qtquick.css HTML.headerstyles = " \n" HTML.endheader = "\n" HTML.footer = "
Copyright (C) 2013 Canonical Ltd.
\n" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/doc/online-accounts-client.qdocconf0000644000015600001650000000052512674252514033651 0ustar pbuserpbgroup00000000000000include(online-accounts-client-common.qdocconf) HTML.templatedir = . HTML.nobreadcrumbs = "true" HTML.stylesheets = doc/qtquick.css HTML.headerstyles = " \n" HTML.endheader = "\n" HTML.footer = "
Copyright (C) 2013 Canonical Ltd.
\n" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/doc/doc.pri0000644000015600001650000000107612674252514027041 0ustar pbuserpbgroup00000000000000include(../../common-project-config.pri) QDOC = $$[QT_INSTALL_BINS]/qdoc QMAKE_EXTRA_TARGETS += clean-docs docs-html clean-docs-html CONFIG(ubuntu-docs) { docs-html.commands = \ "$${QDOC} $${PWD}/online-accounts-client-ubuntu.qdocconf" } else { docs-html.commands = \ "$${QDOC} $${PWD}/online-accounts-client.qdocconf" } docs.files = $$PWD/html docs.path = $${INSTALL_PREFIX}/share/online-accounts-client/doc docs.depends = docs-html INSTALLS += docs clean-docs-html.commands = \ "rm -rf $${PWD}/html" clean-docs.depends = clean-docs-html ././@LongLink0000000000000000000000000000015000000000000011211 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/doc/ubuntu-appdev-site-header.qdocconfubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/doc/ubuntu-appdev-site-header.qdocc0000644000015600001650000000340012674252514033553 0ustar pbuserpbgroup00000000000000HTML.postheader = \ "
\n" \ "
\n" \ " \n" \ "
\n" \ "
\n" \ "
\n" \ " \n" \ " \"Ubuntu\n" \ "

App Developer

\n" \ "
\n" \ "
\n" \ " \n" \ "
\n" \ "
\n" \ "
\n" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/doc/qtquick.css0000644000015600001650000003175112674252514027756 0ustar pbuserpbgroup00000000000000@media screen { /* basic elements */ html { color: #000000; background: #FFFFFF; } table { border-collapse: collapse; border-spacing: 0; } fieldset, img { border: 0; max-width:100%; } address, caption, cite, code, dfn, em, strong, th, var, optgroup { font-style: inherit; font-weight: inherit; } del, ins { text-decoration: none; } ol li { list-style: decimal; } ul li { list-style: none; } caption, th { text-align: left; } h1.title { font-weight: bold; font-size: 150%; } h0 { font-weight: bold; font-size: 130%; } h1, h2, h3, h4, h5, h6 { font-size: 100%; } q:before, q:after { content: ''; } abbr, acronym { border: 0; font-variant: normal; } sup, sub { vertical-align: baseline; } tt, .qmlreadonly span, .qmldefault span { word-spacing:0.5em; } legend { color: #000000; } strong { font-weight: bold; } em { font-style: italic; } body { margin: 0 1.5em 0 1.5em; font-family: ubuntu; line-height: normal } a { color: #00732F; text-decoration: none; } hr { background-color: #E6E6E6; border: 1px solid #E6E6E6; height: 1px; width: 100%; text-align: left; margin: 1.5em 0 1.5em 0; } pre { border: 1px solid #DDDDDD; -moz-border-radius: 0.7em 0.7em 0.7em 0.7em; -webkit-border-radius: 0.7em 0.7em 0.7em 0.7em; border-radius: 0.7em 0.7em 0.7em 0.7em; padding: 1em 1em 1em 1em; overflow-x: auto; } table, pre { -moz-border-radius: 0.7em 0.7em 0.7em 0.7em; -webkit-border-radius: 0.7em 0.7em 0.7em 0.7em; border-radius: 0.7em 0.7em 0.7em 0.7em; background-color: #F6F6F6; border: 1px solid #E6E6E6; border-collapse: separate; margin-bottom: 2.5em; } pre { font-size: 90%; display: block; overflow:hidden; } thead { margin-top: 0.5em; font-weight: bold } th { padding: 0.5em 1.5em 0.5em 1em; background-color: #E1E1E1; border-left: 1px solid #E6E6E6; } td { padding: 0.25em 1.5em 0.25em 1em; } td.rightAlign { padding: 0.25em 0.5em 0.25em 1em; } table tr.odd { border-left: 1px solid #E6E6E6; background-color: #F6F6F6; color: black; } table tr.even { border-left: 1px solid #E6E6E6; background-color: #ffffff; color: #202020; } div.float-left { float: left; margin-right: 2em } div.float-right { float: right; margin-left: 2em } span.comment { color: #008B00; } span.string, span.char { color: #000084; } span.number { color: #a46200; } span.operator { color: #202020; } span.keyword { color: #840000; } span.name { color: black } span.type { font-weight: bold } span.type a:visited { color: #0F5300; } span.preprocessor { color: #404040 } /* end basic elements */ /* font style elements */ .heading { font-weight: bold; font-size: 125%; } .subtitle { font-size: 110% } .small-subtitle { font-size: 100% } .red { color:red; } /* end font style elements */ /* global settings*/ .header, .footer { display: block; clear: both; overflow: hidden; } /* end global settings*/ /* header elements */ .header .qtref { color: #00732F; font-weight: bold; font-size: 130%; } .header .content { margin-left: 5px; margin-top: 5px; margin-bottom: 0.5em; } .header .breadcrumb { font-size: 90%; padding: 0.5em 0 0.5em 1em; margin: 0; background-color: #fafafa; height: 1.35em; border-bottom: 1px solid #d1d1d1; } .header .breadcrumb ul { margin: 0; padding: 0; } .header .content { word-wrap: break-word; } .header .breadcrumb ul li { float: left; background: url(../images/breadcrumb.png) no-repeat 0 3px; padding-left: 1.5em; margin-left: 1.5em; } .header .breadcrumb ul li.last { font-weight: normal; } .header .breadcrumb ul li a { color: #00732F; } .header .breadcrumb ul li.first { background-image: none; padding-left: 0; margin-left: 0; } .header .content ol li { background: none; margin-bottom: 1.0em; margin-left: 1.2em; padding-left: 0 } .header .content li { background: url(../images/bullet_sq.png) no-repeat 0 5px; margin-bottom: 1em; padding-left: 1.2em; } /* end header elements */ /* content elements */ .content h1 { font-weight: bold; font-size: 130% } .content h2 { font-weight: bold; font-size: 120%; width: 100%; } .content h3 { font-weight: bold; font-size: 110%; width: 100%; } .content table p { margin: 0 } .content ul { padding-left: 2.5em; } .content li { padding-top: 0.25em; padding-bottom: 0.25em; } .content ul img { vertical-align: middle; } .content a:visited { color: #4c0033; text-decoration: none; } .content a:visited:hover { color: #4c0033; text-decoration: underline; } a:hover { color: #4c0033; text-decoration: underline; } descr p a { text-decoration: underline; } .descr p a:visited { text-decoration: underline; } .alphaChar{ width:95%; background-color:#F6F6F6; border:1px solid #E6E6E6; -moz-border-radius: 7px 7px 7px 7px; border-radius: 7px 7px 7px 7px; -webkit-border-radius: 7px 7px 7px 7px; font-size:12pt; padding-left:10px; margin-top:10px; margin-bottom:10px; } .flowList{ /*vertical-align:top;*/ /*margin:20px auto;*/ column-count:3; -webkit-column-count:3; -moz-column-count:3; /* column-width:100%; -webkit-column-width:200px; -col-column-width:200px; */ column-gap:41px; -webkit-column-gap:41px; -moz-column-gap:41px; column-rule: 1px dashed #ccc; -webkit-column-rule: 1px dashed #ccc; -moz-column-rule: 1px dashed #ccc; } .flowList dl{ } .flowList dd{ /*display:inline-block;*/ margin-left:10px; min-width:250px; line-height: 1.5; min-width:100%; min-height:15px; } .flowList dd a{ } .mainContent { padding-left:5px; } .content .flowList p{ padding:0px; } .content .alignedsummary { margin: 15px; } .qmltype { text-align: center; font-size: 120%; } .qmlreadonly { padding-left: 5px; float: right; color: #254117; } .qmldefault { padding-left: 5px; float: right; color: red; } .qmldoc { } .generic .alphaChar{ margin-top:5px; } .generic .odd .alphaChar{ background-color: #F6F6F6; } .generic .even .alphaChar{ background-color: #FFFFFF; } .memItemRight{ padding: 0.25em 1.5em 0.25em 0; } .highlightedCode { margin: 1.0em; } .annotated td { padding: 0.25em 0.5em 0.25em 0.5em; } .toc { font-size: 80% } .header .content .toc ul { padding-left: 0px; } .content .toc h3 { border-bottom: 0px; margin-top: 0px; } .content .toc h3 a:hover { color: #00732F; text-decoration: none; } .content .toc .level2 { margin-left: 1.5em; } .content .toc .level3 { margin-left: 3.0em; } .content ul li { background: url(../images/bullet_sq.png) no-repeat 0 0.7em; padding-left: 1em } .content .toc li { background: url(../images/bullet_dn.png) no-repeat 0 5px; padding-left: 1em } .relpage { -moz-border-radius: 7px 7px 7px 7px; -webkit-border-radius: 7px 7px 7px 7px; border-radius: 7px 7px 7px 7px; border: 1px solid #DDDDDD; padding: 25px 25px; clear: both; } .relpage ul { float: none; padding: 1.5em; } h3.fn, span.fn { -moz-border-radius:7px 7px 7px 7px; -webkit-border-radius:7px 7px 7px 7px; border-radius:7px 7px 7px 7px; background-color: #F6F6F6; border-width: 1px; border-style: solid; border-color: #E6E6E6; font-weight: bold; word-spacing:3px; padding:3px 5px; } .functionIndex { font-size:12pt; word-spacing:10px; margin-bottom:10px; background-color: #F6F6F6; border-width: 1px; border-style: solid; border-color: #E6E6E6; -moz-border-radius: 7px 7px 7px 7px; -webkit-border-radius: 7px 7px 7px 7px; border-radius: 7px 7px 7px 7px; width:100%; } .centerAlign { text-align:center; } .rightAlign { text-align:right; } .leftAlign { text-align:left; } .topAlign{ vertical-align:top } .functionIndex a{ display:inline-block; } /* end content elements */ /* footer elements */ .footer { color: #393735; font-size: 0.75em; text-align: center; padding-top: 1.5em; padding-bottom: 1em; background-color: #E6E7E8; margin: 0; } .footer p { margin: 0.25em } .small { font-size: 0.5em; } /* end footer elements */ .item { float: left; position: relative; width: 100%; overflow: hidden; } .item .primary { margin-right: 220px; position: relative; } .item hr { margin-left: -220px; } .item .secondary { float: right; width: 200px; position: relative; } .item .cols { clear: both; display: block; } .item .cols .col { float: left; margin-left: 1.5%; } .item .cols .col.first { margin-left: 0; } .item .cols.two .col { width: 45%; } .item .box { margin: 0 0 10px 0; } .item .box h3 { margin: 0 0 10px 0; } .cols.unclear { clear:none; } } /* end of screen media */ /* start of print media */ @media print { input, textarea, .header, .footer, .toolbar, .feedback, .wrapper .hd, .wrapper .bd .sidebar, .wrapper .ft, #feedbackBox, #blurpage, .toc, .breadcrumb, .toolbar, .floatingResult { display: none; background: none; } .content { background: none; display: block; width: 100%; margin: 0; float: none; } } /* end of print media */ /* modify the TOC layouts */ div.toc ul { padding-left: 20px; } div.toc li { padding-left: 4px; } /* Remove the border around images*/ a img { border:none; } /*Add styling to the front pages*/ .threecolumn_area { padding-top: 20px; padding-bottom: 20px; } .threecolumn_piece { display: inline-block; margin-left: 78px; margin-top: 8px; padding: 0; vertical-align: top; width: 25.5%; } div.threecolumn_piece ul { list-style-type: none; padding-left: 0px; margin-top: 2px; } div.threecolumn_piece p { margin-bottom: 7px; color: #5C626E; text-decoration: none; font-weight: bold; } div.threecolumn_piece li { padding-left: 0px; margin-bottom: 5px; } div.threecolumn_piece a { font-weight: normal; } /* Add style to guide page*/ .fourcolumn_area { padding-top: 20px; padding-bottom: 20px; } .fourcolumn_piece { display: inline-block; margin-left: 35px; margin-top: 8px; padding: 0; vertical-align: top; width: 21.3%; } div.fourcolumn_piece ul { list-style-type: none; padding-left: 0px; margin-top: 2px; } div.fourcolumn_piece p { margin-bottom: 7px; color: #40444D; text-decoration: none; font-weight: bold; } div.fourcolumn_piece li { padding-left: 0px; margin-bottom: 5px; } div.fourcolumn_piece a { font-weight: normal; } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/doc/css/0000755000015600001650000000000012674252771026351 5ustar pbuserpbgroup00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/doc/css/base.css0000644000015600001650000002706712674252514030004 0ustar pbuserpbgroup00000000000000/** * Ubuntu Developer base stylesheet * * A base stylesheet containing site-wide styles * * @project Ubuntu Developer * @version 1.0 * @author Canonical Web Team: Steve Edwards * @copyright 2011 Canonical Ltd. */ /** * @section Global */ body { font-family: 'Ubuntu', 'Ubuntu Beta', UbuntuBeta, Ubuntu, 'Bitstream Vera Sans', 'DejaVu Sans', Tahoma, sans-serif; font-size: 13px; line-height: 1.4; color: #333; } a { color: #dd4814; text-decoration: none; outline: 0; } p, dl { margin-bottom: 10px; } strong { font-weight: bold; } em { font-style: italic; } code{ padding: 10px; font-family: 'Ubuntu Mono', 'Consolas', 'Monaco', 'DejaVu Sans Mono', Courier, monospace; background-color: #fdf6f2; display: block; margin-bottom: 10px; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } h1 { font-size: 36px; line-height: 1.1; margin-bottom: 20px; } article h1, h2 { font-size: 24px; line-height: 1.2; margin-bottom: 14px; } h3 { font-size: 16px; line-height: 1.3; margin-bottom: 8px; } h4 { font-weight: bold; } time { color:#999; } /** * @section Structure */ .header-login, .header-navigation div, .header-content div { margin: 0 auto; width: 940px; } .header-content h1{ background-color:#ffffff; display:inline-block; } .header-content h2{ background-color:#ffffff; display:table; } .header-login ul { margin: 4px 0; float: right; } .header-login li { margin-right: 10px; float: left; } .header-login a { color: #333; } .header-navigation { border-top: 2px solid #dd4814; border-bottom: 2px solid #dd4814; background-color: #fff; height: 54px; clear: right; overflow: hidden; } .header-navigation nav ul { border-right: 1px solid #dd4814; float: right; } .header-navigation nav li { border-left: 1px solid #dd4814; float: left; height: 54px; } .header-navigation nav a { padding: 18px 14px 0; font-size: 14px; display: block; height: 36px; } .header-navigation nav a:hover { background-color: #fcece7; } .header-navigation nav .current_page_item a, .header-navigation nav .current_page_parent a, .header-navigation nav .current_page_ancestor a { background-color: #dd4814; color: #fff; } .header-navigation input { margin: 12px 10px 0 10px; padding: 5px; border-top: 1px solid #a1a1a1; border-right: 1px solid #e0e0e0; border-bottom: 1px solid #fff; border-left: 1px solid #e0e0e0; width: 90px; font-style: italic; color: #ccc; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; -moz-box-shadow: inset 0 1px 1px #e0e0e0; -webkit-box-shadow: inset 0 1px 1px #e0e0e0; box-shadow: inset 0 1px 1px #e0e0e0; } .header-navigation h2 { margin: 18px 0 0 6px; text-transform: lowercase; font-size: 22px; color: #dd4814; float: left; } .header-navigation .logo-ubuntu { margin-top: 12px; float: left; } .header-content .header-navigation-secondary { margin-bottom: 40px; padding: 0; position: relative; z-index: 2; } .header-navigation-secondary div { padding: 0; border: 2px solid #dd4814; -moz-border-radius: 0px 0px 4px 4px; -webkit-border-radius: 0px 0px 4px 4px; border-radius: 0px 0px 4px 4px; background: #fff; border-top: 0px; width: 936px; } .header-navigation-secondary nav li { float: left; } .header-navigation-secondary nav li a { color: #333; display: block; height: 25px; padding: 8px 8px 0; } .header-navigation-secondary nav li:hover, .header-navigation-secondary nav .current_page_item a { background: url("../img/sec-nav-hover.gif"); } .header-content { padding-bottom: 30px; border-bottom: 1px solid #e0e0e0; -moz-box-shadow: 0 1px 3px #e0e0e0; -webkit-box-shadow: 0 1px 3px #e0e0e0; box-shadow: 0 1px 3px #e0e0e0; margin-bottom: 3px; position: relative; overflow: hidden; } footer { padding: 10px 10px 40px 10px; position: relative; -moz-border-radius: 0 0 4px 4px; -webkit-border-radius: 0 0 4px 4px; border-radius: 0 0 4px 4px; font-size: 12px; background: url("../img/background-footer.png") repeat scroll 0 0 #f7f6f5; } footer div { margin: 0 auto; padding: 0 10px; width: 940px; } footer a { color: #000; } footer nav ul { margin: 10px 17px 30px 0; width: 172px; display: inline-block; vertical-align: top; height: auto; zoom: 1; *display: inline; } footer nav ul.last { margin-right: 0; } footer nav li { margin-bottom: 8px; } footer nav li:first-child { font-weight: bold; } footer p { margin-bottom: 0; } #content { padding-top: 35px; } .arrow-nav { display: none; position: absolute; top: -1px; z-index: 3; } .shadow { margin: 30px 0 3px 0; border-bottom: 1px solid #e0e0e0; -moz-box-shadow: 0 2px 3px #e0e0e0; -webkit-box-shadow: 0 2px 3px #e0e0e0; box-shadow: 0 2px 3px #e0e0e0; height: 3px; } /** * @section Site-wide */ #content h2{ font-size:24px; } .box-orange { padding: 10px; border: 3px solid #dd4814; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } .box-orange .link-action-small { float: right; margin: 0 0 0 20px; } .link-bug { margin-left: 10px; color: #999; } .link-action { float: left; margin-bottom: 20px; padding: 8px 12px; display: block; background-color: #dd4814; color: #fff; -moz-border-radius: 20px; -webkit-border-radius: 20px; border-radius: 20px; font-size: 16px; line-height: 1.3; border-top: 3px solid #e6633a; border-bottom: 3px solid #c03d14; } .link-action2 { float: left; display: block; color: #fff; font-size: 16px; line-height: 1.3; } .link-action2 span{ display:block; float:left; } .link-action2 .cta-left{ background:url(../img/button-cta-left.png) no-repeat; width:22px; height:48px; } .link-action2 .cta-center{ background:url(../img/button-cta-slice.png) repeat-x; line-height:45px; height:48px; } .link-action2 .cta-right{ background:url(../img/button-cta-right.png) no-repeat; width:22px; height:48px; } .link-action-small { float: left; display: block; color: #fff; font-size: 16px; } .link-action-small span{ display:block; float:left; height:42px; } .link-action-small .cta-left{ background:url(../img/button-cta-left-small.png) no-repeat; width:19px; } .link-action-small .cta-center{ background:url(../img/button-cta-slice-small.png) repeat-x; line-height:42px; } .link-action-small .cta-right{ background:url(../img/button-cta-right-small.png) no-repeat; width:19px; } .link-action:active { position: relative; top: 1px; } .link-action2:active { position: relative; top: 1px; } .link-action-small:active { position: relative; top: 1px; } .list-bullets li { margin-bottom: 10px; list-style: disc; list-style-position: inside; } .box { margin-bottom: 30px; padding: 15px; border: 1px solid #aea79f; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } .box-padded { margin-bottom: 30px; padding: 5px; border: 2px solid #aea79f; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; background: url("../img/pattern-featured.gif") repeat scroll 0 0 #ebe9e7; overflow: hidden; } .box-padded h3 { margin: 5px 0 10px 5px; } .box-padded div { padding: 10px; border: 1px solid #aea79f; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; background-color: #fff; overflow: hidden; } .box-padded li { padding: 0 10px; float: left; width: 211px; border-right: 1px dotted #aea79f; } .box-padded li.first { padding: 0; margin-bottom: 0; } .box-padded li.last { border: 0; width: 217px; } .box-padded img { margin: 0 10px 50px 0; float: left; -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; } .box-clear { margin-bottom: 40px; } .box-clear .grid-4.first { margin-right: 15px; padding-right: 15px; } .box-clear .grid-4 { margin-left: 0; margin-right: 10px; padding-right: 10px; width: 298px; } .box-clear time { display: block; border-bottom: 1px dotted #aea79f; padding-bottom: 10px; margin-bottom: 10px; } .box-clear div.first { border-right: 1px dotted #aea79f; } .box-clear a { display: block; } .box-clear .rss { background: url("../img/rss.jpg") no-repeat scroll 0 center; padding-left: 20px; } .box-clear .location { display: block; margin-bottom: 1px; } .box-clear .last { margin: 0; padding-right: 0; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; width: 293px; } /* Widgets */ .ui-state-focus { outline: none; } .ui-accordion { border-bottom: 1px dotted #aea79f; } .ui-accordion a { display: block; } .ui-accordion h3 { margin-bottom: 0; border-top: 1px dotted #aea79f; position: relative; font-size: 13px; font-weight: bold; } .ui-accordion h3 a { padding: 10px 0; color: #333; } .ui-accordion h4 { margin-bottom: 5px; } .ui-accordion div fieldset { padding-bottom: 5px; } .ui-accordion div li, .ui-accordion div input { margin-bottom: 10px; } .ui-accordion .ui-icon { position: absolute; top: 15px; right: 0; display: block; width: 8px; height: 8px; background: url("../img/icon-accordion-inactive.png") 0 0 no-repeat transparent; } .ui-accordion .ui-state-active .ui-icon { background-image: url("../img/icon-accordion-active.png"); } .ui-accordion .current_page_item a { color: #333; } .container-tweet { -moz-border-radius: 4px 4px 4px 4px; -webkit-border-radius: 4px 4px 4px 4px; border-radius: 4px 4px 4px 4px; padding: 10px 10px 10px; background-color: #f7f7f7; } .container-tweet .tweet-follow { margin-top: 10px; margin-bottom: -10px; padding-left: 55px; padding-bottom: 6px; background: url("../img/tweet-follow.png") 0 5px no-repeat; display: block; } .container-tweet .tweet-follow span { font-size: 16px; font-weight: bold; line-height: 1.2; display: block; } .tweet a { display: inline; } .tweet .tweet_text { padding: 10px; background-color: #fff; -moz-border-radius: 4px 4px 4px 4px; -webkit-border-radius: 4px 4px 4px 4px; border-radius: 4px 4px 4px 4px; border: 1px solid #dd4814; font-size: 16px; display: block; clear: both; } .tweet.tweet-small .tweet_text { font-size: inherit; } .tweet .tweet_text a { color: #333; } .tweet .tweet_time, .tweet .tweet_user_and_time { padding: 15px 0 10px 0; position: relative; top: -2px; background: url("../img/tweet-arrow.png") no-repeat; display: block; } .tweet .tweet_odd .tweet_time, .tweet .tweet_odd .tweet_user_and_time { background-position: right 0; float: right; } .tweet .tweet_even .tweet_time, .tweet .tweet_even .tweet_user_and_time { background-position: left 0; float: left; } /* Search */ #content .list-search li { list-style-type:none; border:0px; margin-bottom: 15px; padding-top: 15px; } /* Blog */ .blog-article #nav-single { margin-top: 30px; margin-bottom: 30px; } .blog-article #nav-single .nav-next { float: right; } .blog-article article header .entry-meta { margin-bottom: 20px; } .blog-article article .entry-meta { color: #999; } .blog-article #respond form input[type="submit"] { float: left; cursor: pointer; margin-bottom: 20px; padding: 8px 12px; display: block; background-color: #dd4814; color: #fff; -moz-border-radius: 20px; -webkit-border-radius: 20px; border-radius: 20px; font-size: 16px; line-height: 1.3; border-top: 3px solid #e6633a; border-left: 3px solid #e6633a; border-right: 3px solid #e6633a; border-bottom: 3px solid #c03d14; } .blog-article #respond form input[type="submit"]:active { position: relative; top: 1px; } .alignnone{ float:left; margin:10px 20px 10px 0; } .alignleft{ float:left; margin:10px 20px 10px 0; } .alignright{ float:right; margin:10px 0 10px 20px; } .aligncenter{ float:left; margin:10px 20px 10px 0; } .entry-content h2, .entry-content h3{ margin-top:20px; } .entry-content ul li{ list-style-type: circle; margin-left:16px; } .entry-content hr{ border:none; border-top: 1px dotted #AEA79F; } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/doc/css/scratch.css0000644000015600001650000000137412674252514030512 0ustar pbuserpbgroup00000000000000body { margin: 0; } div.toc ul { padding: 0; } div.toc li { margin-bottom: 3px; } h1.title { font-size: 36px; line-height: 1.1; font-weight: normal; } h0, h2 { font-size: 24px; line-height: 1.2; margin: 14px 0; font-weight: normal; display: block; } a:hover { color: #dd4814; text-decoration: underline; outline: 0; } table, pre { border-radius: 0; } .annotated td { padding: 0.8em 1em 0.3em; } .wrapper { width: 940px; margin: 0 auto; } .main-content { width: 668px; position: relative; left: 270px; } .title { margin-left: -270px; margin-top: 30px; margin-bottom: 50px; } .toc { margin-left: -270px; font-size: 100%; margin-bottom: 40px; padding: 0; z-index: 2; position: absolute; top: 100px; width: 250px; } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/doc/css/reset.css0000644000015600001650000000153312674252514030202 0ustar pbuserpbgroup00000000000000/* Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.com/yui/license.html version: 3.3.0 build: 3167 */ html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:text-top;}sub{vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}input,textarea,select{*font-size:100%;}legend{color:#000;}ubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/doc/css/qtquick.css0000644000015600001650000003175112674252514030546 0ustar pbuserpbgroup00000000000000@media screen { /* basic elements */ html { color: #000000; background: #FFFFFF; } table { border-collapse: collapse; border-spacing: 0; } fieldset, img { border: 0; max-width:100%; } address, caption, cite, code, dfn, em, strong, th, var, optgroup { font-style: inherit; font-weight: inherit; } del, ins { text-decoration: none; } ol li { list-style: decimal; } ul li { list-style: none; } caption, th { text-align: left; } h1.title { font-weight: bold; font-size: 150%; } h0 { font-weight: bold; font-size: 130%; } h1, h2, h3, h4, h5, h6 { font-size: 100%; } q:before, q:after { content: ''; } abbr, acronym { border: 0; font-variant: normal; } sup, sub { vertical-align: baseline; } tt, .qmlreadonly span, .qmldefault span { word-spacing:0.5em; } legend { color: #000000; } strong { font-weight: bold; } em { font-style: italic; } body { margin: 0 1.5em 0 1.5em; font-family: ubuntu; line-height: normal } a { color: #00732F; text-decoration: none; } hr { background-color: #E6E6E6; border: 1px solid #E6E6E6; height: 1px; width: 100%; text-align: left; margin: 1.5em 0 1.5em 0; } pre { border: 1px solid #DDDDDD; -moz-border-radius: 0.7em 0.7em 0.7em 0.7em; -webkit-border-radius: 0.7em 0.7em 0.7em 0.7em; border-radius: 0.7em 0.7em 0.7em 0.7em; padding: 1em 1em 1em 1em; overflow-x: auto; } table, pre { -moz-border-radius: 0.7em 0.7em 0.7em 0.7em; -webkit-border-radius: 0.7em 0.7em 0.7em 0.7em; border-radius: 0.7em 0.7em 0.7em 0.7em; background-color: #F6F6F6; border: 1px solid #E6E6E6; border-collapse: separate; margin-bottom: 2.5em; } pre { font-size: 90%; display: block; overflow:hidden; } thead { margin-top: 0.5em; font-weight: bold } th { padding: 0.5em 1.5em 0.5em 1em; background-color: #E1E1E1; border-left: 1px solid #E6E6E6; } td { padding: 0.25em 1.5em 0.25em 1em; } td.rightAlign { padding: 0.25em 0.5em 0.25em 1em; } table tr.odd { border-left: 1px solid #E6E6E6; background-color: #F6F6F6; color: black; } table tr.even { border-left: 1px solid #E6E6E6; background-color: #ffffff; color: #202020; } div.float-left { float: left; margin-right: 2em } div.float-right { float: right; margin-left: 2em } span.comment { color: #008B00; } span.string, span.char { color: #000084; } span.number { color: #a46200; } span.operator { color: #202020; } span.keyword { color: #840000; } span.name { color: black } span.type { font-weight: bold } span.type a:visited { color: #0F5300; } span.preprocessor { color: #404040 } /* end basic elements */ /* font style elements */ .heading { font-weight: bold; font-size: 125%; } .subtitle { font-size: 110% } .small-subtitle { font-size: 100% } .red { color:red; } /* end font style elements */ /* global settings*/ .header, .footer { display: block; clear: both; overflow: hidden; } /* end global settings*/ /* header elements */ .header .qtref { color: #00732F; font-weight: bold; font-size: 130%; } .header .content { margin-left: 5px; margin-top: 5px; margin-bottom: 0.5em; } .header .breadcrumb { font-size: 90%; padding: 0.5em 0 0.5em 1em; margin: 0; background-color: #fafafa; height: 1.35em; border-bottom: 1px solid #d1d1d1; } .header .breadcrumb ul { margin: 0; padding: 0; } .header .content { word-wrap: break-word; } .header .breadcrumb ul li { float: left; background: url(../images/breadcrumb.png) no-repeat 0 3px; padding-left: 1.5em; margin-left: 1.5em; } .header .breadcrumb ul li.last { font-weight: normal; } .header .breadcrumb ul li a { color: #00732F; } .header .breadcrumb ul li.first { background-image: none; padding-left: 0; margin-left: 0; } .header .content ol li { background: none; margin-bottom: 1.0em; margin-left: 1.2em; padding-left: 0 } .header .content li { background: url(../images/bullet_sq.png) no-repeat 0 5px; margin-bottom: 1em; padding-left: 1.2em; } /* end header elements */ /* content elements */ .content h1 { font-weight: bold; font-size: 130% } .content h2 { font-weight: bold; font-size: 120%; width: 100%; } .content h3 { font-weight: bold; font-size: 110%; width: 100%; } .content table p { margin: 0 } .content ul { padding-left: 2.5em; } .content li { padding-top: 0.25em; padding-bottom: 0.25em; } .content ul img { vertical-align: middle; } .content a:visited { color: #4c0033; text-decoration: none; } .content a:visited:hover { color: #4c0033; text-decoration: underline; } a:hover { color: #4c0033; text-decoration: underline; } descr p a { text-decoration: underline; } .descr p a:visited { text-decoration: underline; } .alphaChar{ width:95%; background-color:#F6F6F6; border:1px solid #E6E6E6; -moz-border-radius: 7px 7px 7px 7px; border-radius: 7px 7px 7px 7px; -webkit-border-radius: 7px 7px 7px 7px; font-size:12pt; padding-left:10px; margin-top:10px; margin-bottom:10px; } .flowList{ /*vertical-align:top;*/ /*margin:20px auto;*/ column-count:3; -webkit-column-count:3; -moz-column-count:3; /* column-width:100%; -webkit-column-width:200px; -col-column-width:200px; */ column-gap:41px; -webkit-column-gap:41px; -moz-column-gap:41px; column-rule: 1px dashed #ccc; -webkit-column-rule: 1px dashed #ccc; -moz-column-rule: 1px dashed #ccc; } .flowList dl{ } .flowList dd{ /*display:inline-block;*/ margin-left:10px; min-width:250px; line-height: 1.5; min-width:100%; min-height:15px; } .flowList dd a{ } .mainContent { padding-left:5px; } .content .flowList p{ padding:0px; } .content .alignedsummary { margin: 15px; } .qmltype { text-align: center; font-size: 120%; } .qmlreadonly { padding-left: 5px; float: right; color: #254117; } .qmldefault { padding-left: 5px; float: right; color: red; } .qmldoc { } .generic .alphaChar{ margin-top:5px; } .generic .odd .alphaChar{ background-color: #F6F6F6; } .generic .even .alphaChar{ background-color: #FFFFFF; } .memItemRight{ padding: 0.25em 1.5em 0.25em 0; } .highlightedCode { margin: 1.0em; } .annotated td { padding: 0.25em 0.5em 0.25em 0.5em; } .toc { font-size: 80% } .header .content .toc ul { padding-left: 0px; } .content .toc h3 { border-bottom: 0px; margin-top: 0px; } .content .toc h3 a:hover { color: #00732F; text-decoration: none; } .content .toc .level2 { margin-left: 1.5em; } .content .toc .level3 { margin-left: 3.0em; } .content ul li { background: url(../images/bullet_sq.png) no-repeat 0 0.7em; padding-left: 1em } .content .toc li { background: url(../images/bullet_dn.png) no-repeat 0 5px; padding-left: 1em } .relpage { -moz-border-radius: 7px 7px 7px 7px; -webkit-border-radius: 7px 7px 7px 7px; border-radius: 7px 7px 7px 7px; border: 1px solid #DDDDDD; padding: 25px 25px; clear: both; } .relpage ul { float: none; padding: 1.5em; } h3.fn, span.fn { -moz-border-radius:7px 7px 7px 7px; -webkit-border-radius:7px 7px 7px 7px; border-radius:7px 7px 7px 7px; background-color: #F6F6F6; border-width: 1px; border-style: solid; border-color: #E6E6E6; font-weight: bold; word-spacing:3px; padding:3px 5px; } .functionIndex { font-size:12pt; word-spacing:10px; margin-bottom:10px; background-color: #F6F6F6; border-width: 1px; border-style: solid; border-color: #E6E6E6; -moz-border-radius: 7px 7px 7px 7px; -webkit-border-radius: 7px 7px 7px 7px; border-radius: 7px 7px 7px 7px; width:100%; } .centerAlign { text-align:center; } .rightAlign { text-align:right; } .leftAlign { text-align:left; } .topAlign{ vertical-align:top } .functionIndex a{ display:inline-block; } /* end content elements */ /* footer elements */ .footer { color: #393735; font-size: 0.75em; text-align: center; padding-top: 1.5em; padding-bottom: 1em; background-color: #E6E7E8; margin: 0; } .footer p { margin: 0.25em } .small { font-size: 0.5em; } /* end footer elements */ .item { float: left; position: relative; width: 100%; overflow: hidden; } .item .primary { margin-right: 220px; position: relative; } .item hr { margin-left: -220px; } .item .secondary { float: right; width: 200px; position: relative; } .item .cols { clear: both; display: block; } .item .cols .col { float: left; margin-left: 1.5%; } .item .cols .col.first { margin-left: 0; } .item .cols.two .col { width: 45%; } .item .box { margin: 0 0 10px 0; } .item .box h3 { margin: 0 0 10px 0; } .cols.unclear { clear:none; } } /* end of screen media */ /* start of print media */ @media print { input, textarea, .header, .footer, .toolbar, .feedback, .wrapper .hd, .wrapper .bd .sidebar, .wrapper .ft, #feedbackBox, #blurpage, .toc, .breadcrumb, .toolbar, .floatingResult { display: none; background: none; } .content { background: none; display: block; width: 100%; margin: 0; float: none; } } /* end of print media */ /* modify the TOC layouts */ div.toc ul { padding-left: 20px; } div.toc li { padding-left: 4px; } /* Remove the border around images*/ a img { border:none; } /*Add styling to the front pages*/ .threecolumn_area { padding-top: 20px; padding-bottom: 20px; } .threecolumn_piece { display: inline-block; margin-left: 78px; margin-top: 8px; padding: 0; vertical-align: top; width: 25.5%; } div.threecolumn_piece ul { list-style-type: none; padding-left: 0px; margin-top: 2px; } div.threecolumn_piece p { margin-bottom: 7px; color: #5C626E; text-decoration: none; font-weight: bold; } div.threecolumn_piece li { padding-left: 0px; margin-bottom: 5px; } div.threecolumn_piece a { font-weight: normal; } /* Add style to guide page*/ .fourcolumn_area { padding-top: 20px; padding-bottom: 20px; } .fourcolumn_piece { display: inline-block; margin-left: 35px; margin-top: 8px; padding: 0; vertical-align: top; width: 21.3%; } div.fourcolumn_piece ul { list-style-type: none; padding-left: 0px; margin-top: 2px; } div.fourcolumn_piece p { margin-bottom: 7px; color: #40444D; text-decoration: none; font-weight: bold; } div.fourcolumn_piece li { padding-left: 0px; margin-bottom: 5px; } div.fourcolumn_piece a { font-weight: normal; } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/OnlineAccountsClient/0000755000015600001650000000000012674252771031077 5ustar pbuserpbgroup00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/OnlineAccountsClient/setup.cpp0000644000015600001650000002046712674252514032747 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013-2015 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of OnlineAccountsClient. * * OnlineAccountsClient is free software: you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * OnlineAccountsClient is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with OnlineAccountsClient. If not, see * . */ #include "online-accounts-ui/globals.h" #include "onlineaccountsui_interface.h" #include "setup.h" #include #include #include #include #include #include using namespace OnlineAccountsClient; using namespace com::ubuntu; namespace OnlineAccountsClient { class SetupPrivate: public QObject { Q_OBJECT Q_DECLARE_PUBLIC(Setup) public: inline SetupPrivate(Setup *setup); ~SetupPrivate() {}; void exec(); QWindow *clientWindow() const; private Q_SLOTS: void onRequestAccessReply(QDBusPendingCallWatcher *watcher); private: OnlineAccountsUi m_onlineAccountsUi; QString m_applicationId; QString m_serviceId; QString m_serviceTypeId; QString m_providerId; pid_t m_clientPid; mutable Setup *q_ptr; }; }; // namespace static QDBusConnection sessionBus() { /* When this module is used within the online-accounts-service process, we * need to use a separate D-Bus connection otherwise link-local calls won't * work (QtDBus does not support delayed replies on local calls). */ return QCoreApplication::applicationName() == "online-accounts-service" ? QDBusConnection::connectToBus(QDBusConnection::SessionBus, "oa-private") : QDBusConnection::sessionBus(); } SetupPrivate::SetupPrivate(Setup *setup): QObject(setup), m_onlineAccountsUi(OAU_SERVICE_NAME, OAU_OBJECT_PATH, sessionBus()), m_clientPid(0), q_ptr(setup) { m_onlineAccountsUi.setTimeout(INT_MAX); } void SetupPrivate::exec() { QVariantMap options; options.insert(OAU_KEY_PID, uint(m_clientPid != 0 ? m_clientPid : getpid())); QWindow *window = clientWindow(); if (window) { options.insert(OAU_KEY_WINDOW_ID, window->winId()); /* TODO: remove this hack once Mir supports window reparenting. * Since Mir always return the same window Id for all windows, we use * the process ID instead; for the time being this is acceptable since * Mir/unity8 don't support more than one window per process. * See: https://bugs.launchpad.net/bugs/1153666 */ if (QGuiApplication::platformName().startsWith("ubuntu")) { options.insert(OAU_KEY_WINDOW_ID, uint(getpid())); } } if (!m_applicationId.isEmpty()) { options.insert(OAU_KEY_APPLICATION, m_applicationId); } if (!m_serviceId.isEmpty()) { options.insert(OAU_KEY_SERVICE_ID, m_serviceId); } if (!m_serviceTypeId.isEmpty()) { options.insert(OAU_KEY_SERVICE_TYPE, m_serviceTypeId); } if (!m_providerId.isEmpty()) { options.insert(OAU_KEY_PROVIDER, m_providerId); } QDBusPendingReply reply = m_onlineAccountsUi.requestAccess(options); QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(reply, this); QObject::connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), this, SLOT(onRequestAccessReply(QDBusPendingCallWatcher*))); } QWindow *SetupPrivate::clientWindow() const { QWindow *window = QGuiApplication::focusWindow(); if (window) return window; /* Otherwise, just return the first toplevel window; later on, if the need * arises, we might add a property to let the client explicitly specify * which window to use. */ return QGuiApplication::topLevelWindows().value(0, 0); } void SetupPrivate::onRequestAccessReply(QDBusPendingCallWatcher *watcher) { Q_Q(Setup); watcher->deleteLater(); QVariantMap response; QDBusPendingReply reply = *watcher; if (reply.isError()) { qWarning() << "RequestAccess failed:" << reply.error(); response.insert("errorName", reply.error().name()); } else { // At the moment, we don't have any use for the reply. response = reply.value(); } Q_EMIT q->finished(response); } /*! * \qmltype Setup * \inqmlmodule Ubuntu.OnlineAccounts.Client 0.1 * \ingroup Ubuntu * * \brief Invoke the Online Accounts panel * * This object can be used by applications to request the creation of an * account. By calling the \l exec() method, the Online Accounts panel will * appear and guide the user through the creation of an account. Once done, the * \l finished() signal will be emitted. The type of account to be created can * be configured by this object's properties. * * Example: * * \qml * import QtQuick 2.0 * import Ubuntu.Components 1.3 * import Ubuntu.OnlineAccounts.Client 0.1 * * Rectangle { * width: 400 * height: 300 * * Button { * anchors.centerIn: parent * text: "Create Facebook account" * onClicked: setup.exec() * } * * Setup { * id: setup * applicationId: "MyApp" * providerId: "facebook" * } * } * \endqml */ Setup::Setup(QObject *parent): QObject(parent), d_ptr(new SetupPrivate(this)) { } Setup::~Setup() { delete d_ptr; } /*! * \qmlproperty string Setup::applicationId * Specifies which application is asking for access. The value of this string * must be equal to the filename of the XML application file (installed in \c * /usr/share/accounts/applications/ or \c * ~/.local/share/accounts/applications/) minus the \c .application suffix. */ void Setup::setApplicationId(const QString &applicationId) { Q_D(Setup); if (applicationId == d->m_applicationId) return; d->m_applicationId = applicationId; Q_EMIT applicationIdChanged(); } QString Setup::applicationId() const { Q_D(const Setup); return d->m_applicationId; } /*! * \qmlproperty string Setup::serviceId * If set to a valid service ID, the user will be asked to create an Online * Account which provides this service. */ void Setup::setServiceId(const QString &serviceId) { Q_D(Setup); if (serviceId == d->m_serviceId) return; d->m_serviceId = serviceId; Q_EMIT serviceIdChanged(); } QString Setup::serviceId() const { Q_D(const Setup); return d->m_serviceId; } /*! * \qmlproperty string Setup::serviceTypeId * If set to a valid service type, the user will be asked to create an Online * Account which supports this service type. */ void Setup::setServiceTypeId(const QString &serviceTypeId) { Q_D(Setup); if (serviceTypeId == d->m_serviceTypeId) return; d->m_serviceTypeId = serviceTypeId; Q_EMIT serviceTypeIdChanged(); } QString Setup::serviceTypeId() const { Q_D(const Setup); return d->m_serviceTypeId; } /*! * \qmlproperty string Setup::providerId * If set to a valid provider, the user will be asked to create an Online * Account provided by this entity. */ void Setup::setProviderId(const QString &providerId) { Q_D(Setup); if (providerId == d->m_providerId) return; d->m_providerId = providerId; Q_EMIT providerIdChanged(); } QString Setup::providerId() const { Q_D(const Setup); return d->m_providerId; } /* At the moment this method is meant to be used by unconfined services, when * forwarding a request from their client. */ void Setup::setClientPid(pid_t clientPid) { Q_D(Setup); d->m_clientPid = clientPid; } /*! * \qmlmethod void Setup::exec() * Launches the Online Accounts panel. */ void Setup::exec() { Q_D(Setup); d->exec(); } /*! * \qmlsignal Setup::finished() * Emitted when the Online Accounts panel has been closed. */ #include "setup.moc" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/OnlineAccountsClient/Setup0000644000015600001650000000002312674252514032110 0ustar pbuserpbgroup00000000000000#include "setup.h" ubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/OnlineAccountsClient/global.h0000644000015600001650000000216012674252514032502 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of OnlineAccountsClient. * * OnlineAccountsClient is free software: you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * OnlineAccountsClient is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with OnlineAccountsClient. If not, see * . */ #ifndef ONLINE_ACCOUNTS_CLIENT_GLOBAL_H #define ONLINE_ACCOUNTS_CLIENT_GLOBAL_H #include #if defined(BUILDING_ONLINE_ACCOUNTS_CLIENT) # define OAC_EXPORT Q_DECL_EXPORT #else # define OAC_EXPORT Q_DECL_IMPORT #endif #endif // ONLINE_ACCOUNTS_CLIENT_GLOBAL_H ././@LongLink0000000000000000000000000000016100000000000011213 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/OnlineAccountsClient/OnlineAccountsClient.pc.inubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/OnlineAccountsClient/OnlineAccounts0000644000015600001650000000045712674252514033747 0ustar pbuserpbgroup00000000000000prefix=$$INSTALL_PREFIX exec_prefix=${prefix} libdir=$$INSTALL_LIBDIR includedir=${prefix}/include Name: OnlineAccountsClient Description: Client for the Online Accounts setup Version: $$PROJECT_VERSION Requires: Qt5Core Requires.private: Qt5Gui Cflags: -I${includedir} Libs: -L${libdir} -l$${TARGET} ././@LongLink0000000000000000000000000000015700000000000011220 Lustar 00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/OnlineAccountsClient/OnlineAccountsClient.proubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/OnlineAccountsClient/OnlineAccounts0000644000015600001650000000153212674252514033742 0ustar pbuserpbgroup00000000000000include (../../common-project-config.pri) include($${TOP_SRC_DIR}/common-vars.pri) TEMPLATE = lib TARGET = online-accounts-client CONFIG += \ qt QT += \ dbus \ gui QMAKE_CXXFLAGS += \ -fvisibility=hidden DEFINES += BUILDING_ONLINE_ACCOUNTS_CLIENT # Error on undefined symbols QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF public_headers += \ global.h \ setup.h Setup INCLUDEPATH += \ $${TOP_SRC_DIR} ONLINE_ACCOUNTS_SERVICE_SRC = $${TOP_SRC_DIR}/online-accounts-service DBUS_INTERFACES += \ $${ONLINE_ACCOUNTS_SERVICE_SRC}/com.ubuntu.OnlineAccountsUi.xml SOURCES += \ setup.cpp HEADERS += \ $${private_headers} \ $${public_headers} headers.files = $${public_headers} include($${TOP_SRC_DIR}/common-installs-config.pri) pkgconfig.files = OnlineAccountsClient.pc include($${TOP_SRC_DIR}/common-pkgconfig.pri) ubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/OnlineAccountsClient/setup.h0000644000015600001650000000470412674252514032410 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of OnlineAccountsClient. * * OnlineAccountsClient is free software: you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * OnlineAccountsClient is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with OnlineAccountsClient. If not, see * . */ #ifndef ONLINE_ACCOUNTS_CLIENT_SETUP_H #define ONLINE_ACCOUNTS_CLIENT_SETUP_H #include "global.h" #include #include #include #include namespace OnlineAccountsClient { class SetupPrivate; class OAC_EXPORT Setup: public QObject { Q_OBJECT Q_PROPERTY(QString applicationId READ applicationId \ WRITE setApplicationId NOTIFY applicationIdChanged) Q_PROPERTY(QString serviceId READ serviceId \ WRITE setServiceId NOTIFY serviceIdChanged REVISION 2) Q_PROPERTY(QString serviceTypeId READ serviceTypeId \ WRITE setServiceTypeId NOTIFY serviceTypeIdChanged) Q_PROPERTY(QString providerId READ providerId \ WRITE setProviderId NOTIFY providerIdChanged) public: Setup(QObject *parent = 0); ~Setup(); void setApplicationId(const QString &applicationId); QString applicationId() const; void setServiceId(const QString &serviceId); QString serviceId() const; void setServiceTypeId(const QString &serviceTypeId); QString serviceTypeId() const; void setProviderId(const QString &providerId); QString providerId() const; // Intentionally not exposed to QML; see the source code for the reason void setClientPid(pid_t clientPid); Q_INVOKABLE void exec(); Q_SIGNALS: void applicationIdChanged(); Q_REVISION(2) void serviceIdChanged(); void serviceTypeIdChanged(); void providerIdChanged(); void finished(QVariantMap reply); private: SetupPrivate *d_ptr; Q_DECLARE_PRIVATE(Setup) }; }; // namespace #endif // ONLINE_ACCOUNTS_CLIENT_SETUP_H ubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/client.pro0000644000015600001650000000015512674252514027010 0ustar pbuserpbgroup00000000000000include(doc/doc.pri) TEMPLATE = subdirs CONFIG += ordered SUBDIRS = \ OnlineAccountsClient \ module ubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/module/0000755000015600001650000000000012674252771026301 5ustar pbuserpbgroup00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/module/plugin.h0000644000015600001650000000233212674252514027743 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of OnlineAccountsClient. * * OnlineAccountsClient is free software: you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * OnlineAccountsClient is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with OnlineAccountsClient. If not, see * . */ #ifndef ONLINE_ACCOUNTS_CLIENT_PLUGIN_H #define ONLINE_ACCOUNTS_CLIENT_PLUGIN_H #include namespace OnlineAccountsClient { class Plugin: public QQmlExtensionPlugin { Q_OBJECT Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") public: void registerTypes(const char *uri); }; }; // namespace #endif // ONLINE_ACCOUNTS_CLIENT_PLUGIN_H ubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/module/plugin.cpp0000644000015600001650000000223312674252514030276 0ustar pbuserpbgroup00000000000000/* * Copyright (C) 2013 Canonical Ltd. * * Contact: Alberto Mardegan * * This file is part of OnlineAccountsClient. * * OnlineAccountsClient is free software: you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * OnlineAccountsClient is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with OnlineAccountsClient. If not, see * . */ #include "plugin.h" #include #include #include using namespace OnlineAccountsClient; void Plugin::registerTypes(const char *uri) { qDebug() << Q_FUNC_INFO << uri; qmlRegisterType(uri, 0, 1, "Setup"); qmlRegisterType(uri, 0, 2, "Setup"); } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/module/module.pro0000644000015600001650000000153212674252514030304 0ustar pbuserpbgroup00000000000000include(../../common-project-config.pri) include($${TOP_SRC_DIR}/common-vars.pri) TEMPLATE = lib TARGET = OnlineAccountsClient API_URI = "Ubuntu.OnlineAccounts.Client" API_VER = 0.2 DESTDIR = $$replace(API_URI, \\., /) PLUGIN_INSTALL_BASE = $$[QT_INSTALL_QML]/$${DESTDIR} CONFIG += \ plugin \ qt QT += qml # Error on undefined symbols QMAKE_LFLAGS += $$QMAKE_LFLAGS_NOUNDEF SOURCES = \ plugin.cpp HEADERS += \ plugin.h INCLUDEPATH += \ $$TOP_SRC_DIR/client QMAKE_LIBDIR = $${TOP_BUILD_DIR}/client/OnlineAccountsClient LIBS += -lonline-accounts-client QMLDIR_FILES += qmldir QMAKE_SUBSTITUTES += qmldir.in OTHER_FILES += qmldir.in QMAKE_POST_LINK += $$QMAKE_COPY $${QMLDIR_FILES} $$DESTDIR target.path = $${PLUGIN_INSTALL_BASE} INSTALLS += target qmldir.files = qmldir qmldir.path = $${PLUGIN_INSTALL_BASE} INSTALLS += qmldir ubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/module/qmldir.in0000644000015600001650000000004512674252514030113 0ustar pbuserpbgroup00000000000000module $${API_URI} plugin $${TARGET} ubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/examples/0000755000015600001650000000000012674252771026632 5ustar pbuserpbgroup00000000000000ubuntu-system-settings-online-accounts-0.7+16.04.20160322/client/examples/CreateFacebook.qml0000644000015600001650000000050712674252514032177 0ustar pbuserpbgroup00000000000000import QtQuick 2.0 import Ubuntu.Components 1.3 import Ubuntu.OnlineAccounts.Client 0.1 Rectangle { width: 400 height: 300 Button { anchors.centerIn: parent text: "Create Facebook account" onClicked: setup.exec() } Setup { id: setup providerId: "facebook" } } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/common-pkgconfig.pri0000644000015600001650000000052012674252514027477 0ustar pbuserpbgroup00000000000000# Include this file after defining the pkgconfig.files variable !isEmpty(pkgconfig.files) { QMAKE_SUBSTITUTES += $${pkgconfig.files}.in pkgconfig.CONFIG = no_check_exist pkgconfig.path = $${INSTALL_LIBDIR}/pkgconfig QMAKE_EXTRA_TARGETS += pkgconfig INSTALLS += pkgconfig QMAKE_CLEAN += $${pkgconfig.files} } ubuntu-system-settings-online-accounts-0.7+16.04.20160322/.qmake.conf0000644000015600001650000000006612674252514025556 0ustar pbuserpbgroup00000000000000TOP_SRC_DIR = $$PWD TOP_BUILD_DIR = $$shadowed($$PWD)