--- /dev/null
+REPOSITORY = "git://anongit.kde.org/kaccounts-providers"
+REVIEWBOARD_URL = "https://git.reviewboard.kde.org"
+TARGET_GROUPS = "kde-telepathy"
--- /dev/null
+project(kde-account-providers)
+
+cmake_minimum_required(VERSION 2.8.12)
+
+set(KDE_APPLICATIONS_VERSION_MAJOR "16")
+set(KDE_APPLICATIONS_VERSION_MINOR "08")
+set(KDE_APPLICATIONS_VERSION_MICRO "3")
+set(KACCOUNTS_VERSION "${KDE_APPLICATIONS_VERSION_MAJOR}.${KDE_APPLICATIONS_VERSION_MINOR}.${KDE_APPLICATIONS_VERSION_MICRO}")
+
+set(REQUIRED_QT_VERSION "5.2.0")
+set(REQUIRED_KF5_VERSION "5.4.0")
+
+find_package(ECM 1.0.0 REQUIRED NO_MODULE)
+set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
+
+find_package(Intltool REQUIRED)
+find_package(KAccounts REQUIRED)
+
+find_package(Qt5 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Core Qml)
+find_package(KF5 ${REQUIRED_KF5_VERSION} REQUIRED KIO
+ I18n
+ Declarative
+ Package)
+
+include(KDEInstallDirs)
+include(KDECMakeSettings)
+include(FeatureSummary)
+include(ECMInstallIcons)
+include(KDECompilerSettings NO_POLICY_SCOPE)
+
+add_subdirectory(icons)
+add_subdirectory(services)
+add_subdirectory(providers)
+add_subdirectory(webkit-options)
+add_subdirectory(plugins)
+
+feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
--- /dev/null
+NOTE! The GPL below is copyrighted by the Free Software Foundation, but
+the instance of code that it refers to (the kde programs) are copyrighted
+by the authors who actually wrote it.
+
+---------------------------------------------------------------------------
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) 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
+this service 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 make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. 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.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+\f
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+\f
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+\f
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+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
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+\f
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the 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 a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE 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.
+
+ 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
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) 19yy <name of author>
+
+ 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 2 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, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) 19yy name of author
+ Gnomovision 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, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This 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 Library General
+Public License instead of this License.
--- /dev/null
+#! /usr/bin/env bash
+
+find . -name "*.provider.in" -o -name "*.service.in" -type f | xargs -n1 intltool-extract -l -type="gettext/xml"
+$XGETTEXT `find . -name "*.h" -o -name "*.cpp"` -c -kN_ -o $podir/kaccounts-providers.pot
+rm -rf ./tmp/
--- /dev/null
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--- /dev/null
+#
+# cmake/Intltool.cmake
+# Copyright (C) 2013, Valama development team
+#
+# Valama 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.
+#
+# Valama 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 <http://www.gnu.org/licenses/>.
+#
+##
+find_program(INTLTOOL_EXTRACT_EXECUTABLE intltool-extract)
+find_program(INTLTOOL_MERGE_EXECUTABLE intltool-merge)
+mark_as_advanced(INTLTOOL_EXTRACT_EXECUTABLE)
+mark_as_advanced(INTLTOOL_MERGE_EXECUTABLE)
+
+if(INTLTOOL_EXTRACT_EXECUTABLE)
+ execute_process(
+ COMMAND
+ ${INTLTOOL_EXTRACT_EXECUTABLE} "--version"
+ OUTPUT_VARIABLE
+ intltool_version
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE
+ )
+ if(intltool_version MATCHES "^intltool-extract \\(.*\\) [0-9]")
+ string(REGEX REPLACE "^intltool-extract \\([^\\)]*\\) ([0-9\\.]+[^ \n]*).*" "\\1" INTLTOOL_VERSION_STRING "${intltool_version}")
+ endif()
+ unset(intltool_version)
+endif()
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(Intltool
+ REQUIRED_VARS
+ INTLTOOL_EXTRACT_EXECUTABLE
+ INTLTOOL_MERGE_EXECUTABLE
+ VERSION_VAR
+ INTLTOOL_VERSION_STRING
+)
+
+set(INTLTOOL_OPTIONS_DEFAULT
+ "--quiet"
+)
\ No newline at end of file
--- /dev/null
+file(GLOB _icons *.png)
+
+ecm_install_icons(ICONS ${_icons}
+ DESTINATION ${ICON_INSTALL_DIR})
\ No newline at end of file
--- /dev/null
+add_subdirectory(owncloud-ui)
--- /dev/null
+project (owncloud-ui-plugin)
+
+include_directories (${CMAKE_CURRENT_BUILD_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+)
+
+set (owncloud_plugin_kaccounts_SRCS
+ owncloud.cpp
+ qmlhelper.cpp
+)
+
+add_library (owncloud_plugin_kaccounts MODULE
+ ${owncloud_plugin_kaccounts_SRCS}
+)
+
+target_link_libraries (owncloud_plugin_kaccounts
+ Qt5::Core
+ KF5::KIOCore
+ KF5::I18n
+ KF5::Declarative
+ KAccounts
+ ${ACCOUNTSQT_LIBRARIES}
+ ${SIGNONQT_LIBRARIES}
+)
+
+# Install:
+install (TARGETS owncloud_plugin_kaccounts
+ DESTINATION ${PLUGIN_INSTALL_DIR}/kaccounts/ui
+)
+kpackage_install_package(package org.kde.kaccounts.owncloud genericqml)
--- /dev/null
+/*************************************************************************************
+ * Copyright (C) 2012 by Alejandro Fiestas Olivares <afiestas@kde.org> *
+ * Copyright (C) 2015 by Martin Klapetek <mklapetek@kde.org> *
+ * *
+ * 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 2 *
+ * 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, write to the Free Software *
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA *
+ *************************************************************************************/
+
+#include "owncloud.h"
+#include "qmlhelper.h"
+
+#include <KLocalizedString>
+#include <KDeclarative/QmlObject>
+
+#include <QQmlEngine>
+#include <QQmlContext>
+
+OwnCloudWizard::OwnCloudWizard(QObject *parent)
+ : KAccountsUiPlugin(parent)
+{
+}
+
+OwnCloudWizard::~OwnCloudWizard()
+{
+}
+
+void OwnCloudWizard::init(KAccountsUiPlugin::UiType type)
+{
+ if (type == KAccountsUiPlugin::NewAccountDialog) {
+
+ const QString packagePath("org.kde.kaccounts.owncloud");
+
+ m_object = new KDeclarative::QmlObject();
+ m_object->setTranslationDomain(packagePath);
+ m_object->setInitializationDelayed(true);
+ m_object->loadPackage(packagePath);
+
+ QmlHelper *helper = new QmlHelper(m_object);
+ connect(helper, &QmlHelper::wizardFinished, this, &OwnCloudWizard::success);
+ connect(helper, &QmlHelper::wizardFinished, [=] {
+ QWindow *window = qobject_cast<QWindow *>(m_object->rootObject());
+ if (window) {
+ window->close();
+ }
+ m_object->deleteLater();
+ });
+ m_object->engine()->rootContext()->setContextProperty("helper", helper);
+
+ m_object->completeInitialization();
+
+ if (!m_object->package().metadata().isValid()) {
+ return;
+ }
+
+ Q_EMIT uiReady();
+ }
+
+}
+
+void OwnCloudWizard::setProviderName(const QString &providerName)
+{
+ //TODO: unused?
+ m_providerName = providerName;
+}
+
+void OwnCloudWizard::showNewAccountDialog()
+{
+ QWindow *window = qobject_cast<QWindow *>(m_object->rootObject());
+ if (window) {
+ window->setTransientParent(transientParent());
+ window->show();
+ window->requestActivate();
+ window->setTitle(m_object->package().metadata().name());
+ window->setIcon(QIcon::fromTheme(m_object->package().metadata().iconName()));
+ }
+}
+
+void OwnCloudWizard::showConfigureAccountDialog(const quint32 accountId)
+{
+
+}
+
+QStringList OwnCloudWizard::supportedServicesForConfig() const
+{
+ return QStringList();
+}
--- /dev/null
+/*************************************************************************************
+ * Copyright (C) 2012 by Alejandro Fiestas Olivares <afiestas@kde.org> *
+ * Copyright (C) 2015 by Martin Klapetek <mklapetek@kde.org> *
+ * *
+ * 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 2 *
+ * 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, write to the Free Software *
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA *
+ *************************************************************************************/
+
+#ifndef OWNCLOUD_H
+#define OWNCLOUD_H
+
+#include <QUrl>
+#include <QHash>
+
+#include <kaccountsuiplugin.h>
+
+namespace KDeclarative {
+ class QmlObject;
+}
+
+class OwnCloudWizard : public KAccountsUiPlugin
+{
+ Q_OBJECT
+ Q_PLUGIN_METADATA(IID "org.kde.kaccounts.UiPlugin")
+ Q_INTERFACES(KAccountsUiPlugin)
+
+public:
+ explicit OwnCloudWizard(QObject *parent = 0);
+ virtual ~OwnCloudWizard();
+
+ virtual void init(KAccountsUiPlugin::UiType type) Q_DECL_OVERRIDE;
+ virtual void setProviderName(const QString &providerName) Q_DECL_OVERRIDE;
+ virtual void showNewAccountDialog() Q_DECL_OVERRIDE;
+ virtual void showConfigureAccountDialog(const quint32 accountId) Q_DECL_OVERRIDE;
+ virtual QStringList supportedServicesForConfig() const Q_DECL_OVERRIDE;
+
+private:
+ QString m_providerName;
+ QHash<QString, int> m_services;
+ KDeclarative::QmlObject *m_object;
+};
+
+#endif //OWNCLOUD_H
--- /dev/null
+/*
+ * Copyright 2015 (C) Martin Klapetek <mklapetek@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Library General Public License as
+ * published by the Free Software Foundation; either version 2 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 Library General Public License for more details
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+import QtQuick 2.2
+import QtQuick.Layouts 1.1
+import QtQuick.Controls 1.2
+import org.kde.plasma.core 2.0 as PlasmaCore
+
+ColumnLayout {
+ id: basicInfoLayout
+ property bool canContinue: !helper.isWorking && helper.noError && nameText.text.length > 0 && passwordText.text.length > 0
+ property bool canRestartTimer: nameText.text.length > 0 && passwordText.text.length > 0 && serverText.text.length > 0
+
+ Timer {
+ id: checkServerTimer
+ interval: 1000
+ repeat: false
+ running: false
+
+ onTriggered: {
+ helper.checkServer(nameText.text, passwordText.text, serverText.text);
+ }
+ }
+
+ TextField {
+ id: nameText
+ Layout.fillWidth: true
+// clearButtonShown: true
+ placeholderText: "Username"
+
+ onTextChanged: {
+ if (basicInfoLayout.canRestartTimer) {
+ checkServerTimer.restart();
+ }
+ }
+ }
+
+ TextField {
+ id: passwordText
+ Layout.fillWidth: true
+// clearButtonShown: true
+ placeholderText: "Password"
+ echoMode: TextInput.Password
+
+ onTextChanged: {
+ if (basicInfoLayout.canRestartTimer) {
+ checkServerTimer.restart();
+ }
+ }
+ }
+
+ TextField {
+ id: serverText
+ Layout.fillWidth: true
+// clearButtonShown: true
+ placeholderText: "Server"
+
+ onTextChanged: {
+ if (basicInfoLayout.canRestartTimer) {
+ checkServerTimer.restart();
+ }
+ }
+ }
+
+ Label {
+ id: errorLabel
+ Layout.fillWidth: true
+ visible: text.length > 0 && !checkServerTimer.running
+ text: helper.errorMessage
+ wrapMode: Text.WordWrap
+ }
+
+ Item {
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+
+ BusyIndicator {
+ id: busy
+ width: parent.height > parent.width ? Math.round(parent.width/2) : Math.round(parent.height/2)
+ height: width
+ anchors.centerIn: parent
+ running: helper.isWorking
+ visible: running
+ }
+
+ PlasmaCore.IconItem {
+ width: busy.width
+ height: width
+ anchors.centerIn: parent
+ source: "dialog-ok"
+ visible: !helper.isWorking && helper.noError && !errorLabel.visible
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright 2015 (C) Martin Klapetek <mklapetek@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Library General Public License as
+ * published by the Free Software Foundation; either version 2 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 Library General Public License for more details
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+import QtQuick 2.2
+import QtQuick.Layouts 1.1
+import QtQuick.Controls 1.2
+
+ColumnLayout {
+ id: basicInfoLayout
+ property bool canContinue: true
+
+ //FIXME at some point this should become a list of disabled services
+ property alias contactsEnabled: contactsService.checked
+
+ Label {
+ text: i18n("Choose services to enable");
+ }
+
+ CheckBox {
+ id: contactsService
+ text: i18n("Contacts")
+ }
+
+ // Just an item padder
+ Item {
+ Layout.fillHeight: true
+ }
+}
--- /dev/null
+/*
+ * Copyright 2015 (C) Martin Klapetek <mklapetek@kde.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Library General Public License as
+ * published by the Free Software Foundation; either version 2 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 Library General Public License for more details
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+import QtQuick 2.2
+import QtQuick.Layouts 1.1
+import QtQuick.Controls 1.2
+
+ApplicationWindow {
+ id: kaccountsRoot
+ objectName: "_root"
+
+ width: 400; height: 250
+
+ ColumnLayout {
+ anchors.fill: parent
+ anchors.margins: units.largeSpacing
+
+ Label {
+ text: i18n("Add new ownCloud account")
+ }
+
+ StackView {
+ id: stack
+
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+
+ initialItem: BasicInfo {
+ id: basicInfoPage
+ objectName: "basicInfoPage"
+ }
+ }
+
+ Component {
+ id: servicesComponent
+
+ Services {
+ objectName: "servicesPage"
+ }
+ }
+
+ RowLayout {
+ Button {
+ id: backButton
+ Layout.fillWidth: true
+ text: i18n("Back");
+ enabled: stack.currentItem.objectName == "servicesPage"
+
+ onClicked: {
+ if (stack.currentItem.objectName == "servicesPage") {
+ stack.pop(servicesComponent);
+ }
+ }
+ }
+
+ Button {
+ id: nextButton
+ Layout.fillWidth: true
+ text: i18n("Next")
+ enabled: basicInfoPage.canContinue //: false
+ visible: stack.currentItem == basicInfoPage
+
+ onClicked: {
+ if (stack.currentItem == basicInfoPage) {
+ stack.push(servicesComponent);
+ }
+ }
+ }
+
+ Button {
+ id: finishButton
+ Layout.fillWidth: true
+ text: i18n("Finish")
+ visible: stack.currentItem.objectName == "servicesPage"
+
+ onClicked: {
+ helper.finish(stack.currentItem.contactsEnabled);
+ }
+ }
+ }
+ }
+}
--- /dev/null
+[Desktop Entry]
+Name=OwnCloud KAccounts QML plugin
+Name[ast]=Complementu QML de KAccounts d'OwnCloud
+Name[ca]=Connector OwnCloud en QML per a KAccounts
+Name[ca@valencia]=Connector OwnCloud en QML per a KAccounts
+Name[cs]=QML modul KAccounts pro OwnCloud
+Name[da]=KAccounts-QML-plugin til OwnCloud
+Name[de]=KAccounts-QML-Modul für OwnCloud
+Name[en_GB]=OwnCloud KAccounts QML plugin
+Name[es]=Complemento QML de KAccounts para OwnCloud
+Name[et]=KAccountsi OwnCloudi QML-plugin
+Name[fi]=OwnCloud KAccounts -QML-liitännäinen
+Name[gl]=Complemento QML de KAccounts de OwnCloud
+Name[ia]=OwnCloud KAccounts QML plugin
+Name[it]=Estensione QML di KAccounts per OwnCloud
+Name[ko]=OwnCloud KAccounts QML 플러그인
+Name[nl]=OwnCloud KAccounts QML plug-in
+Name[pl]=Wtyczka QML OwnCloud dla KAccounts
+Name[pt]='Plugin' em QML do KAccounts para o OwnCloud
+Name[pt_BR]=Plugin em QML do KAccounts para o OwnCloud
+Name[ru]=Модуль настройки учётных записей OwnCloud
+Name[sk]=OwnCloud KAccounts QML plugin
+Name[sl]=Vstavek QML za KAccounts za OwnCloud
+Name[sr]=КуМЛ прикључак К‑налога за Оунклауд
+Name[sr@ijekavian]=КуМЛ прикључак К‑налога за Оунклауд
+Name[sr@ijekavianlatin]=QML priključak K‑naloga za ownCloud
+Name[sr@latin]=QML priključak K‑naloga za ownCloud
+Name[sv]=OwnCloud QML-insticksprogram för konton
+Name[uk]=Додаток QML KAccounts OwnCloud
+Name[x-test]=xxOwnCloud KAccounts QML pluginxx
+Name[zh_CN]=OwnCloud KAccounts QML 插件
+
+Encoding=UTF-8
+Type=Service
+Icon=applications-internet
+X-KDE-PluginInfo-Author=Martin Klapetek
+X-KDE-PluginInfo-Email=mklapetek@kde.org
+X-KDE-PluginInfo-Name=owncloud_kaccounts_ui
+X-KDE-PluginInfo-Version=1.0
+X-KDE-PluginInfo-Website=http://kde.org
+X-KDE-PluginInfo-Category=Network
+X-KDE-PluginInfo-Depends=
+X-KDE-PluginInfo-License=GPL
+X-KDE-PluginInfo-EnabledByDefault=true
+X-KDE-FormFactors=handset,tablet,mediacenter
+X-Plasma-MainScript=ui/main.qml
--- /dev/null
+/*************************************************************************************
+ * Copyright (C) 2015 by Martin Klapetek <mklapetek@kde.org> *
+ * *
+ * 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 2 *
+ * 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, write to the Free Software *
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA *
+ *************************************************************************************/
+
+#include "qmlhelper.h"
+
+#include <KIO/Job>
+#include <KIO/DavJob>
+#include <kio/global.h>
+#include <KLocalizedString>
+
+#include <QJsonDocument>
+#include <QJsonObject>
+#include <QDebug>
+
+QmlHelper::QmlHelper(QObject *parent)
+ : QObject(parent),
+ m_isWorking(false),
+ m_noError(false),
+ m_errorMessage(QString())
+{
+}
+
+QmlHelper::~QmlHelper()
+{
+}
+
+void QmlHelper::checkServer(const QString &username, const QString &password, const QString &path)
+{
+ m_errorMessage.clear();
+ Q_EMIT errorMessageChanged();
+
+ m_username = username;
+ m_password = password;
+
+ QString fixedUrl;
+ if (!path.startsWith("http://") && !path.startsWith("https://")) {
+ fixedUrl.append("https://");
+ fixedUrl.append(path);
+ } else {
+ fixedUrl = path;
+ }
+
+ m_json.clear();
+
+ QUrl url(fixedUrl);
+ url = url.adjusted(QUrl::StripTrailingSlash);
+ url.setPath(url.path() + '/' + "status.php");
+
+ if (url.host().isEmpty()) {
+ return;
+ }
+
+ checkServer(url);
+}
+
+void QmlHelper::checkServer(const QUrl &url)
+{
+ qDebug() << "Checking for ownCloud instance at" << url;
+ setWorking(true);
+ KIO::TransferJob *job = KIO::get(url, KIO::NoReload, KIO::HideProgressInfo);
+ job->setUiDelegate(0);
+ connect(job, SIGNAL(data(KIO::Job*,QByteArray)), SLOT(dataReceived(KIO::Job*,QByteArray)));
+ connect(job, SIGNAL(finished(KJob*)), this, SLOT(fileChecked(KJob*)));
+}
+
+void QmlHelper::figureOutServer(const QUrl& url)
+{
+ if (/*url == QLatin1String("/") ||*/ url.isEmpty()) {
+ serverCheckResult(false);
+ return;
+ }
+
+ m_json.clear();
+
+ qDebug() << "Received url to figure out:" << url;
+ // This needs 2x up cause first it just removes the status.php
+ // and only the second call actually moves up
+ QUrl urlUp = KIO::upUrl(KIO::upUrl(url));
+ urlUp.setPath(urlUp.path() + '/' + "status.php");
+
+ if (urlUp != url) {
+ checkServer(urlUp.adjusted(QUrl::NormalizePathSegments));
+ } else {
+ serverCheckResult(false);
+ }
+}
+
+void QmlHelper::dataReceived(KIO::Job *job, const QByteArray &data)
+{
+ Q_UNUSED(job);
+ m_json.append(data);
+}
+
+void QmlHelper::fileChecked(KJob* job)
+{
+ KIO::TransferJob *kJob = qobject_cast<KIO::TransferJob *>(job);
+ if (kJob->error()) {
+ qDebug() << job->errorString();
+ qDebug() << job->errorText();
+ figureOutServer(kJob->url());
+ return;
+ }
+
+ QJsonDocument parser = QJsonDocument::fromJson(m_json);
+ QJsonObject map = parser.object();
+ if (!map.contains("version")) {
+ figureOutServer(kJob->url());
+ qDebug() << "No json";
+ return;
+ }
+
+ m_server = kJob->url().adjusted(QUrl::RemoveFilename).toString();
+ qDebug() << "ownCloud appears to be running at the specified URL";
+ serverCheckResult(true);
+}
+
+void QmlHelper::setWorking(bool start)
+{
+ if (start == m_isWorking) {
+ return;
+ }
+
+ m_isWorking = start;
+ Q_EMIT isWorkingChanged();
+}
+
+void QmlHelper::serverCheckResult(bool result)
+{
+ m_noError = result;
+ Q_EMIT noErrorChanged();
+
+ if (!result) {
+ m_errorMessage = i18n("Unable to connect to ownCloud at the given server URL. Please check the server URL.");
+ setWorking(false);
+ } else {
+ m_errorMessage.clear();
+
+ qDebug() << "Server URL ok, checking auth...";
+
+ m_json.clear();
+
+ QUrl url(m_server);
+
+ url.setUserName(m_username);
+ url.setPassword(m_password);
+
+ url = url.adjusted(QUrl::StripTrailingSlash);
+ url.setPath(url.path() + '/' + "remote.php/webdav");
+ // Send a basic PROPFIND command to test access
+ const QString requestStr = QStringLiteral(
+ "<d:propfind xmlns:d=\"DAV:\">"
+ "<d:prop>"
+ "<d:current-user-principal />"
+ "</d:prop>"
+ "</d:propfind>");
+
+ KIO::DavJob *job = KIO::davPropFind(url, QDomDocument(requestStr), "1", KIO::HideProgressInfo);
+ connect(job, SIGNAL(finished(KJob*)), this, SLOT(authCheckResult(KJob*)));
+ connect(job, SIGNAL(data(KIO::Job*,QByteArray)), SLOT(dataReceived(KIO::Job*,QByteArray)));
+
+ QVariantMap metadata{{"cookies","none"}, {"no-cache",true}};
+
+ job->setMetaData(metadata);
+ job->setUiDelegate(0);
+ job->start();
+ }
+
+ Q_EMIT errorMessageChanged();
+
+}
+
+void QmlHelper::authCheckResult(KJob *job)
+{
+ if (job->error()) {
+ qDebug() << job->errorString();
+ qDebug() << job->errorText();
+ }
+
+ KIO::DavJob *kJob = qobject_cast<KIO::DavJob*>(job);
+ qDebug() << "Auth job finished, received error page:" << kJob->isErrorPage();
+
+ if (kJob->isErrorPage()) {
+ m_errorMessage = i18n("Unable to authenticate using the provided username and password");
+ } else {
+ m_errorMessage.clear();
+ }
+
+ Q_EMIT errorMessageChanged();
+
+ m_noError = !kJob->isErrorPage();
+ Q_EMIT noErrorChanged();
+ setWorking(false);
+}
+
+bool QmlHelper::isWorking()
+{
+ return m_isWorking;
+}
+
+bool QmlHelper::noError()
+{
+ return m_noError;
+}
+
+QString QmlHelper::errorMessage() const
+{
+ return m_errorMessage;
+}
+
+void QmlHelper::finish(bool contactsEnabled)
+{
+ QVariantMap data;
+ data.insert("server", m_server);
+
+ if (!contactsEnabled) {
+ data.insert("__service/owncloud-contacts", false);
+ }
+
+ QUrl carddavUrl(m_server);
+ carddavUrl.setPath(carddavUrl.path() + QString("/remote.php/carddav/addressbooks/%1").arg(m_username));
+
+ data.insert("carddavUrl", carddavUrl);
+
+ Q_EMIT wizardFinished(m_username, m_password, data);
+}
+
+#include "qmlhelper.moc"
--- /dev/null
+/*************************************************************************************
+ * Copyright (C) 2015 by Martin Klapetek <mklapetek@kde.org> *
+ * *
+ * 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 2 *
+ * 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, write to the Free Software *
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA *
+ *************************************************************************************/
+
+#ifndef QMLHELPER_H
+#define QMLHELPER_H
+
+#include <QObject>
+#include <QStringList>
+
+namespace KIO
+{
+ class Job;
+};
+class KJob;
+
+class QmlHelper : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(bool isWorking READ isWorking NOTIFY isWorkingChanged)
+ Q_PROPERTY(bool noError READ noError NOTIFY noErrorChanged)
+ Q_PROPERTY(QString errorMessage READ errorMessage NOTIFY errorMessageChanged)
+
+public:
+ QmlHelper(QObject *parent = 0);
+ ~QmlHelper();
+
+ Q_INVOKABLE void checkServer(const QString &username, const QString &password, const QString &server);
+ Q_INVOKABLE void finish(bool contactsEnabled);
+ bool isWorking();
+ bool noError();
+ QString errorMessage() const;
+
+Q_SIGNALS:
+ void isWorkingChanged();
+ void noErrorChanged();
+ void errorMessageChanged();
+ void wizardFinished(const QString &username, const QString &password, const QVariantMap &data);
+
+private Q_SLOTS:
+ void fileChecked(KJob *job);
+ void dataReceived(KIO::Job *job, const QByteArray &data);
+ void authCheckResult(KJob *job);
+
+private:
+ void checkServer(const QUrl &url);
+ void figureOutServer(const QUrl &url);
+ void setWorking(bool start);
+ void serverCheckResult(bool result);
+
+ QByteArray m_json;
+ QString m_errorMessage;
+ QString m_server;
+ QString m_username;
+ QString m_password;
+ QStringList m_disabledServices;
+ bool m_isWorking;
+ bool m_noError;
+
+};
+
+#endif // QMLHELPER_H
--- /dev/null
+file(GLOB provider_in_files *.provider.in)
+foreach(provider_in_file ${provider_in_files})
+ kaccounts_add_provider(${provider_in_file})
+endforeach()
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<provider id="facebook">
+ <_name>Facebook</_name>
+ <icon>im-facebook</icon>
+ <!-- Tooltip text appearing over the button to create this type of account -->
+ <_description>Includes Posts, Notes, Events, Notifications and Chat</_description>
+ <translations>kaccounts-providers</translations>
+ <domains>.*facebook\.com</domains>
+
+ <template>
+ <group name="auth">
+ <setting name="method">oauth2</setting>
+ <setting name="mechanism">user_agent</setting>
+ <group name="oauth2">
+ <group name="user_agent">
+ <setting name="Host">www.facebook.com</setting>
+ <setting name="ClientId">175243235841602</setting>
+ <setting name="AuthPath">/dialog/oauth</setting>
+ <setting name="RedirectUri">https://www.facebook.com/connect/login_success.html</setting>
+ <setting name="Display">popup</setting>
+ <setting type="as" name="Scope">['offline_access','friends_birthday' ,'friends_website' ,'friends_location' ,'friends_work_history' ,'friends_relationships' ,'manage_notifications' ,'publish_actions' ,'read_stream','user_events','user_notes', 'xmpp_login']</setting>
+ <setting name="AllowedSchemes" type="as">['https','http']</setting>
+ </group>
+ </group>
+ </group>
+ </template>
+</provider>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<provider id="identica">
+ <_name>identi.ca</_name>
+ <icon>laconica_microblog</icon>
+ <translations>kaccounts-providers</translations>
+ <domains>.*identi\.ca</domains>
+
+ <template>
+ <group name="auth">
+ <setting name="method">oauth2</setting>
+ <setting name="mechanism">HMAC-SHA1</setting>
+ <group name="oauth2">
+ <group name="HMAC-SHA1">
+ <setting name="ConsumerKey">anonymous</setting>
+ <setting name="ConsumerSecret">anonymous</setting>
+ <setting name="RequestEndpoint">https://identi.ca/api/oauth/request_token</setting>
+ <setting name="TokenEndpoint">https://identi.ca/api/oauth/access_token</setting>
+ <setting name="AuthorizationEndpoint">https://identi.ca/api/oauth/authorize</setting>
+ <setting name="Callback">http://localhost.com/twitter_login.php</setting>
+ <setting name="Source">Ubuntu</setting>
+ <setting name="Mode">desktop</setting>
+ </group>
+ </group>
+ </group>
+ </template>
+</provider>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<provider id="owncloud">
+ <_name>ownCloud</_name>
+ <icon>owncloud</icon>
+ <!-- Tooltip text appearing over the button to create this type of account -->
+ <_description>ownCloud account</_description>
+ <translations>kaccounts-providers</translations>
+
+ <template>
+ <group name="auth">
+ <setting name="method">password</setting>
+ <setting name="mechanism">password</setting>
+ </group>
+ <group name="dav">
+ <setting name="host"></setting>
+ </group>
+ </template>
+</provider>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<provider id="runnersid">
+ <!-- Runners ID is a service similar to ownCloud/DropBox etc -->
+ <_name>Runners ID</_name>
+ <icon>netrunnerid</icon>
+ <translations>kaccounts-providers</translations>
+ <domains>.*identi\.ca</domains>
+
+ <template>
+ <group name="auth">
+ <setting name="method">password</setting>
+ <setting name="mechanism">password</setting>
+ </group>
+ <group name="dav">
+ <setting name="host">myowncloud.com</setting>
+ </group>
+ </template>
+</provider>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" ?>
+<provider id="google">
+ <_name>Google</_name>
+ <!-- Tooltip text appearing over the button to create this type of account -->
+ <_description>Includes GMail, Hangouts, Google Docs, Google+, YouTube and Picasa</_description>
+ <icon>im-google</icon>
+ <translations>kaccounts-providers</translations>
+ <domains>.*google\.com</domains>
+
+ <template>
+ <group name="auth">
+ <setting name="method">oauth2</setting>
+ <setting name="mechanism">web_server</setting>
+ <group name="oauth2">
+ <group name="web_server">
+ <setting name="Host">accounts.google.com</setting>
+ <setting name="AuthPath">o/oauth2/auth?access_type=offline&approval_prompt=force</setting>
+ <setting name="TokenPath">o/oauth2/token</setting>
+ <setting name="RedirectUri">http://localhost/oauth2callback</setting>
+ <!-- HACK: access_type is non standard, but Google requires it in
+ order to return a refresh token -->
+ <setting name="ResponseType">code</setting>
+ <setting name="Scope" type="as">[
+ 'https://docs.google.com/feeds/',
+ 'https://www.googleapis.com/auth/googletalk',
+ 'https://www.googleapis.com/auth/youtube.upload',
+ 'https://www.googleapis.com/auth/youtube',
+ 'https://www.googleapis.com/auth/userinfo.email',
+ 'https://www.googleapis.com/auth/userinfo.profile',
+ 'https://picasaweb.google.com/data/',
+ 'https://www.googleapis.com/auth/calendar',
+ 'https://www.google.com/m8/feeds/',
+ 'https://www.googleapis.com/auth/tasks'
+ ]</setting>
+ <setting name="AllowedSchemes" type="as">['https','http']</setting>
+ <setting name="ClientId">876209205844-9e3g6ocf6ejv48dap37et84ks35rdre0.apps.googleusercontent.com</setting>
+ <setting name="ClientSecret">LvV-hkunrdMj4Ijr74rT6kH7</setting>
+ <setting name="ForceClientAuthViaRequestBody" type="b">true</setting>
+ </group>
+ </group>
+ </group>
+ </template>
+</provider>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<provider id="owncloud">
+ <_name>ownCloud</_name>
+ <icon>owncloud</icon>
+ <!-- Tooltip text appearing over the button to create this type of account -->
+ <_description>ownCloud account</_description>
+ <translations>kaccounts-providers</translations>
+ <plugin>owncloud_plugin_kaccounts</plugin>
+
+ <template>
+ <group name="auth">
+ <setting name="method">password</setting>
+ <setting name="mechanism">password</setting>
+ </group>
+ <group name="dav">
+ <setting name="host"></setting>
+ </group>
+ </template>
+</provider>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<provider id="twitter">
+ <_name>Twitter</_name>
+ <icon>im-twitter</icon>
+ <translations>kaccounts-providers</translations>
+ <domains>.*twitter\.com</domains>
+
+ <template>
+ <group name="auth">
+ <setting name="method">oauth2</setting>
+ <setting name="mechanism">HMAC-SHA1</setting>
+ <group name="oauth2">
+ <group name="HMAC-SHA1">
+ <setting name="ConsumerKey">LvNgYPymxgVSfZB17Xfz2FCgZ</setting>
+ <setting name="ConsumerSecret">Eq6mOydSdNcNVxuqTdJzqCyUFSRKQI2aU0U3Jut69a2uXQLHgG</setting>
+ <setting name="RequestEndpoint">https://api.twitter.com/oauth/request_token</setting>
+ <setting name="TokenEndpoint">https://api.twitter.com/oauth/access_token</setting>
+ <setting name="AuthorizationEndpoint">https://api.twitter.com/oauth/authorize</setting>
+ <setting name="Callback">http://localhost.com/twitter_login.php</setting>
+ </group>
+ </group>
+ </group>
+ </template>
+</provider>
--- /dev/null
+file(GLOB service_files_in *.service.in)
+foreach(service_file_in ${service_files_in})
+ kaccounts_add_service(${service_file_in})
+endforeach()
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<service id="facebook-contacts">
+ <type>facebook-contacts</type>
+ <!-- "Contacts" on Facebook - Service name being displayed as a checkbox label to enable/disable this service
+ Would be nice to use the localized name of this service if it exists/makes sense -->
+ <_name>Contacts</_name>
+ <icon>facebook-contacts</icon>
+ <provider>facebook</provider>
+ <translations>kaccounts-providers</translations>
+</service>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<service id="facebook-events">
+ <type>facebook-events</type>
+ <!-- "Events" on Facebook - Service name being displayed as a checkbox label to enable/disable this service
+ Would be nice to use the localized name of this service if it exists/makes sense -->
+ <_name>Events</_name>
+ <icon>facebook-events</icon>
+ <provider>facebook</provider>
+ <translations>kaccounts-providers</translations>
+</service>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<service id="facebook-feed">
+ <type>facebook-feed</type>
+ <!-- "Posts Feed" on Facebook - Service name being displayed as a checkbox label to enable/disable this service
+ Would be nice to use the localized name of this service if it exists/makes sense -->
+ <_name>Posts Feed</_name>
+ <icon>facebook-feed</icon>
+ <provider>facebook</provider>
+ <translations>kaccounts-providers</translations>
+</service>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<service id="facebook-notes">
+ <type>facebook-notes</type>
+ <!-- "Notes" on Facebook - Service name being displayed as a checkbox label to enable/disable this service
+ Would be nice to use the localized name of this service if it exists/makes sense -->
+ <_name>Notes</_name>
+ <icon>facebook-notes</icon>
+ <provider>facebook</provider>
+ <translations>kaccounts-providers</translations>
+</service>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<service id="facebook-notifications">
+ <type>facebook-notifications</type>
+ <!-- "Notifications" on Facebook - Service name being displayed as a checkbox label to enable/disable this service
+ Would be nice to use the localized name of this service if it exists/makes sense -->
+ <_name>Notifications</_name>
+ <icon>facebook-notifications</icon>
+ <provider>facebook</provider>
+ <translations>kaccounts-providers</translations>
+</service>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<service id="google-calendar">
+ <type>google-calendar</type>
+ <!-- Google's Calendars - Service name being displayed as a checkbox label to enable/disable this service
+ Would be nice to use the localized name of this service if it exists/makes sense -->
+ <_name>Calendars and Tasks</_name>
+ <icon>google-calendars</icon>
+ <provider>google</provider>
+ <translations>kaccounts-providers</translations>
+</service>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<service id="google-contacts">
+ <type>google-contacts</type>
+ <!-- Google's Contacts - Service name being displayed as a checkbox label to enable/disable this service
+ Would be nice to use the localized name of this service if it exists/makes sense -->
+ <_name>Contacts</_name>
+ <icon>google-contacts</icon>
+ <provider>google</provider>
+ <translations>kaccounts-providers</translations>
+</service>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<service id="identica-microblog">
+ <type>twitter-microblog</type>
+ <!-- identi.ca microblog feed - Service name being displayed as a checkbox label to enable/disable this service
+ Would be nice to use the localized name of this service if it exists/makes sense -->
+ <_name>identi.ca</_name>
+ <icon>identica</icon>
+ <provider>identica</provider>
+ <translations>kaccounts-providers</translations>
+</service>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<service id="owncloud-calendar">
+ <type>dav-calendar</type>
+ <!-- ownCloud's Calendar - Service name being displayed as a checkbox label to enable/disable this service
+ Would be nice to use the localized name of this service if it exists/makes sense -->
+ <_name>Calendar</_name>
+ <icon>owncloud-calendar</icon>
+ <provider>owncloud</provider>
+ <translations>kaccounts-providers</translations>
+
+ <template>
+ <group name="dav">
+ <setting name="path">/remote.php/caldav/</setting>
+ </group>
+ </template>
+</service>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<service id="owncloud-contacts">
+ <type>dav-contacts</type>
+ <!-- ownCloud's Contacts - Service name being displayed as a checkbox label to enable/disable this service
+ Would be nice to use the localized name of this service if it exists/makes sense -->
+ <_name>Contacts</_name>
+ <icon>owncloud-contacts</icon>
+ <provider>owncloud</provider>
+ <translations>kaccounts-providers</translations>
+
+ <template>
+ <group name="dav">
+ <setting name="path">/remote.php/carddav/</setting>
+ </group>
+ </template>
+</service>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<service id="owncloud-storage">
+ <type>dav-storage</type>
+ <!-- ownCloud's Storage - Service name being displayed as a checkbox label to enable/disable this service
+ Would be nice to use the localized name of this service if it exists/makes sense -->
+ <_name>Storage</_name>
+ <icon>owncloud-storage</icon>
+ <provider>owncloud</provider>
+ <translations>kaccounts-providers</translations>
+
+ <template>
+ <group name="dav">
+ <setting name="path">/remote.php/webdav/</setting>
+ </group>
+ </template>
+</service>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<service id="runnersid-calendar">
+ <type>dav-calendar</type>
+ <!-- Runners-ID Calendar - Service name being displayed as a checkbox label to enable/disable this service
+ Would be nice to use the localized name of this service if it exists/makes sense -->
+ <_name>Calendar</_name>
+ <icon>runnersid-calendar</icon>
+ <provider>runnersid</provider>
+ <translations>kaccounts-providers</translations>
+
+ <template>
+ <group name="dav">
+ <setting name="path">/remote.php/caldav/</setting>
+ </group>
+ </template>
+</service>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<service id="runnersid-contacts">
+ <type>dav-contacts</type>
+ <!-- Runners-ID Contacts - Service name being displayed as a checkbox label to enable/disable this service
+ Would be nice to use the localized name of this service if it exists/makes sense -->
+ <_name>Contacts</_name>
+ <icon>runnersid-contacts</icon>
+ <provider>runnersid</provider>
+ <translations>kaccounts-providers</translations>
+
+ <template>
+ <group name="dav">
+ <setting name="path">/remote.php/carddav/</setting>
+ </group>
+ </template>
+</service>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<service id="runnersid-music">
+ <type>music</type>
+ <!-- Runners-ID Music - Service name being displayed as a checkbox label to enable/disable this service
+ Would be nice to use the localized name of this service if it exists/makes sense -->
+ <_name>Music</_name>
+ <icon>runnersid-music</icon>
+ <provider>runnersid</provider>
+ <translations>kaccounts-providers</translations>
+</service>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<service id="runnersid-storage">
+ <type>dav-storage</type>
+ <!-- Runners-ID Storage - Service name being displayed as a checkbox label to enable/disable this service
+ Would be nice to use the localized name of this service if it exists/makes sense -->
+ <_name>Storage</_name>
+ <icon>runnersid-storage</icon>
+ <provider>runnersid</provider>
+ <translations>kaccounts-providers</translations>
+
+ <template>
+ <group name="dav">
+ <setting name="path">/remote.php/webdav/</setting>
+ </group>
+ </template>
+</service>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<service id="twitter-microblog">
+ <type>twitter-microblog</type>
+ <!-- Twitter's feed - Service name being displayed as a checkbox label to enable/disable this service
+ Would be nice to use the localized name of this service if it exists/makes sense -->
+ <_name>Twitter</_name>
+ <icon>twitter</icon>
+ <provider>twitter</provider>
+ <translations>kaccounts-providers</translations>
+</service>
\ No newline at end of file
--- /dev/null
+set(WEBKIT_CONFIG_DESTINATION ${KDE_INSTALL_FULL_SYSCONFDIR}/signon-ui/webkit-options.d/)
+install(FILES www.facebook.com.conf DESTINATION ${WEBKIT_CONFIG_DESTINATION})
+install(FILES accounts.google.com.conf DESTINATION ${WEBKIT_CONFIG_DESTINATION})
+install(FILES api.twitter.com.conf DESTINATION ${WEBKIT_CONFIG_DESTINATION})
+install(FILES identi.ca.conf DESTINATION ${WEBKIT_CONFIG_DESTINATION})
--- /dev/null
+ViewportWidth = 480
+ViewportHeight = 420
+UsernameField = input[name="Email"]
+PasswordField = input[name="Passwd"]
+# Accept all https URLs, and add as exceptions those http only
+# URLs which are used in some countries.
+# See https://bugs.launchpad.net/bugs/1074733
+AllowedUrls = (https://.*|http://[^/]*google\\.[^.]+/accounts/.*)
\ No newline at end of file
--- /dev/null
+UsernameField = input[id="username_or_email"]
+PasswordField = input[id="password"]
\ No newline at end of file
--- /dev/null
+UsernameField = input[name="nickname"]
+PasswordField = input[name="password"]
+# Force mobile version, so that layout does not scroll horizonally
+# https://bugs.launchpad.net/1051596
+UserAgent = Mozilla/5.0 (iPhone; CPU iPhone OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B206 Safari/7534.48.3
\ No newline at end of file
--- /dev/null
+ViewportWidth = 420
+ViewportHeight = 320
+UsernameField = input[name="email"]
+PasswordField = input[name="pass"]
+#ZoomFactor = 2
+#PreferredWidth = 420
\ No newline at end of file